Re: kernel diagnostic assertion "st->timeout == PFTM_UNLINKED" failed: file "

2023-12-08 Thread Vitaliy Makkoveev
On Thu, Dec 07, 2023 at 11:58:31PM -0500, Johan Huldtgren wrote: > hello, > [skip] > > Would this apply against 7.4 or only -current? Machine is currently > running 7.4+syspatches (and sashan@ patch from earlier in this thread) > if I need to get on -current that's not a big deal it would

pthread_main_np(3) randomly fails

2023-12-08 Thread Kurt Miller
While hunting for why the jdk's stack overflow execptions were randomly not working, I determined the root cause was that pthread_main_np(3) randomly fails to work properly. Reproduced on sparc64, amd64, and aarch64. On i386 the standalone test program doesn't reproduce the problem. However, I obs

Re: pthread_main_np(3) randomly fails

2023-12-08 Thread Miod Vallat
How about that diff. Index: include/tib.h === RCS file: /OpenBSD/src/include/tib.h,v retrieving revision 1.9 diff -u -p -r1.9 tib.h --- include/tib.h 27 Dec 2022 07:44:56 - 1.9 +++ include/tib.h 8 Dec 2023 15:24:4

Re: pthread_main_np(3) randomly fails

2023-12-08 Thread Kurt Miller
On Dec 8, 2023, at 10:25 AM, Miod Vallat wrote: > > How about that diff. > Tested on amd64 and it does indeed fix the problem. This is clearly the cause. okay kurt@ > Index: include/tib.h > === > RCS file: /OpenBSD/src/include/tib

Re: pthread_main_np(3) randomly fails

2023-12-08 Thread Theo Buehler
On Fri, Dec 08, 2023 at 03:25:21PM +, Miod Vallat wrote: > How about that diff. Should the tib_tid also be initialized? > > Index: include/tib.h > === > RCS file: /OpenBSD/src/include/tib.h,v > retrieving revision 1.9 > diff -u

Re: pthread_main_np(3) randomly fails

2023-12-08 Thread Miod Vallat
> Should the tib_tid also be initialized? I don't think so, it is initialized outside of the TIB_INIT macro. See e.g. setup_static_tib().

Re: kernel diagnostic assertion "st->timeout == PFTM_UNLINKED" failed: file "

2023-12-08 Thread Alexander Bluhm
On Thu, Dec 07, 2023 at 06:14:30PM +0300, Vitaliy Makkoveev wrote: > Here id the diff. I introduces `sc_mtx' mutex(9) to protect the most of > pflow_softc structure. The `send_nam', `sc_flowsrc' and `sc_flowdst' are > prtected by `sc_lock' rwlock(9). `sc_tmpl_ipfix' is immutable. > > Also, the pf

Re: kernel diagnostic assertion "st->timeout == PFTM_UNLINKED" failed: file "

2023-12-08 Thread Vitaliy Makkoveev
On Fri, Dec 08, 2023 at 11:36:31PM +0100, Alexander Bluhm wrote: > On Thu, Dec 07, 2023 at 06:14:30PM +0300, Vitaliy Makkoveev wrote: > > Here id the diff. I introduces `sc_mtx' mutex(9) to protect the most of > > pflow_softc structure. The `send_nam', `sc_flowsrc' and `sc_flowdst' are > > prtecte

Re: kernel diagnostic assertion "st->timeout == PFTM_UNLINKED" failed: file "

2023-12-08 Thread Alexander Bluhm
On Sat, Dec 09, 2023 at 02:07:06AM +0300, Vitaliy Makkoveev wrote: > > > SLIST_ENTRY(pflow_softc) sc_next; > > > > This list is protected by net lock. Can you add an [N] here? > > > > This is not true. The netlock is not taken while export_pflow() called > from pf_purge_states(). I privately

Re: kernel diagnostic assertion "st->timeout == PFTM_UNLINKED" failed: file "

2023-12-08 Thread Vitaliy Makkoveev
On Sat, Dec 09, 2023 at 12:28:10AM +0100, Alexander Bluhm wrote: > On Sat, Dec 09, 2023 at 02:07:06AM +0300, Vitaliy Makkoveev wrote: > > > > SLIST_ENTRY(pflow_softc) sc_next; > > > > > > This list is protected by net lock. Can you add an [N] here? > > > > > > > This is not true. The ne