RE: [PATCH v5] lib/eal: fix segfaults in exiting

2022-09-07 Thread Zeng, ZhichaoX
Hi Stephen, > > > > +static void mark_forked(void) > > +{ > > + is_forked++; > > +} > > + > > This will end up counting application threads as well. > I think it would be counted in the child process when 'fork()' is called, and in the parent process, it would be zero. > Also, it would need

Re: [PATCH v5] lib/eal: fix segfaults in exiting

2022-09-06 Thread Stephen Hemminger
On Tue, 6 Sep 2022 10:51:31 +0800 Zhichao Zeng wrote: > > +static void mark_forked(void) > +{ > + is_forked++; > +} > + This will end up counting application threads as well. Also, it would need to be atomic. > /* Launch threads, called at application init(). */ > int > rte_eal_init(

[PATCH v5] lib/eal: fix segfaults in exiting

2022-09-05 Thread Zhichao Zeng
The 'eal-intr-thread' is not closed before memory cleanup in the process of exiting. There is a small chance that the 'eal-intr-thread' is about to use some pointers, the memory was just cleaned, which causes segfaults caught by ASan. This patch closes the 'eal-intr-thread' before memory cleanup i

[PATCH v5] lib/eal: fix segfaults in exiting

2022-09-05 Thread Zhichao Zeng
The 'eal-intr-thread' is not closed before memory cleanup in the process of exiting. There is a small chance that the 'eal-intr-thread' is about to use some pointers, the memory was just cleaned, which causes segfaults caught by ASan. This patch closes the 'eal-intr-thread' before memory cleanup i