Re: [External] : pf_state_key_unref: panic: kernel diagnostic assertion "refcnt != ~0" failed: file "/usr/src/sys/kern/kern_synch.c", line 826

2021-05-13 Thread Alexandr Nedvedicky
Hello Sebastien, > > thank you very much for doing the test for me. > > patch below should kill the bug. > > > > patch applies to current. > > I confirm that since 4 days the host is stable without any issues. > > Your diff is ok semarie@ > thank you for OK. unfortunately one more tweak is

Re: [External] : pf_state_key_unref: panic: kernel diagnostic assertion "refcnt != ~0" failed: file "/usr/src/sys/kern/kern_synch.c", line 826

2021-05-12 Thread Sebastien Marie
On Sat, May 08, 2021 at 12:31:50AM +0200, Alexandr Nedvedicky wrote: > Hello, > > thank you very much for doing the test for me. > patch below should kill the bug. > > patch applies to current. I confirm that since 4 days the host is stable without any issues. Your diff is ok semarie@ Thanks

Re: [External] : pf_state_key_unref: panic: kernel diagnostic assertion "refcnt != ~0" failed: file "/usr/src/sys/kern/kern_synch.c", line 826

2021-05-07 Thread Olivier Cherrier
On Sat, May 08, 2021 at 12:31:50AM +0200, alexandr.nedvedi...@oracle.com wrote: > Hello, > > thank you very much for doing the test for me. > patch below should kill the bug. > > patch applies to current. > > thanks and > regards > sashan Hello Alexandr, I'll give it a try :) In the

Re: [External] : pf_state_key_unref: panic: kernel diagnostic assertion "refcnt != ~0" failed: file "/usr/src/sys/kern/kern_synch.c", line 826

2021-05-07 Thread Sebastien Marie
On Fri, May 07, 2021 at 02:16:35AM +0200, Alexandr Nedvedicky wrote: > > I'd like to ask you for yet another brave test. just to verify > the story I dream of above really happens. The plan is to put > yet another KASSERT() to pf_state_key_link_reverse(): > > KASSERT(sk != skrev); > > I

Re: [External] : pf_state_key_unref: panic: kernel diagnostic assertion "refcnt != ~0" failed: file "/usr/src/sys/kern/kern_synch.c", line 826

2021-05-06 Thread Alexandr Nedvedicky
Hello Olivier and Sebastien, I took a look at old version of pf_state_key_link_reverse(), before my commit [1] changed it. The answer was there: 7368 void 7369 pf_state_key_link_reverse(struct pf_state_key *sk, struct pf_state_key *skrev) 7370 { 7371 /* Note that sk and skrev may be

Re: [External] : pf_state_key_unref: panic: kernel diagnostic assertion "refcnt != ~0" failed: file "/usr/src/sys/kern/kern_synch.c", line 826

2021-05-06 Thread Olivier Cherrier
On Thu, May 06, 2021 at 04:50:31PM +0200, alexandr.nedvedi...@oracle.com wrote: > thank you for your help with this. I have not heard back from Sebastien > yet. > one more question: > are you building your bsd kernel with DIAGNOSTIC option enabled? It is the GENERIC kernel. So with

Re: [External] : pf_state_key_unref: panic: kernel diagnostic assertion "refcnt != ~0" failed: file "/usr/src/sys/kern/kern_synch.c", line 826

2021-05-06 Thread Sebastien Marie
On Thu, May 06, 2021 at 06:10:39PM +0200, Alexandr Nedvedicky wrote: > Hello, > > > > > to be honest I have no idea what could be causing problems on those two > > > fairly > > > distinct machines. The strange thing is that pf_test() currently does not > > > run in > > > parallel. I don't

Re: [External] : pf_state_key_unref: panic: kernel diagnostic assertion "refcnt != ~0" failed: file "/usr/src/sys/kern/kern_synch.c", line 826

2021-05-06 Thread Alexandr Nedvedicky
Hello, > > to be honest I have no idea what could be causing problems on those two > > fairly > > distinct machines. The strange thing is that pf_test() currently does not > > run in > > parallel. I don't quite understand why reverting my earlier change helps > > here. > > it could be two

Re: [External] : pf_state_key_unref: panic: kernel diagnostic assertion "refcnt != ~0" failed: file "/usr/src/sys/kern/kern_synch.c", line 826

2021-05-06 Thread Sebastien Marie
On Thu, May 06, 2021 at 04:50:31PM +0200, Alexandr Nedvedicky wrote: > Hello Olivier, > > > > This morning, I've rebuild a new --current kernel and got some panics after > > some minutes with PF enabled. > > Then I've applied your patch and it is stable so far. > > > > thank you for your

Re: [External] : pf_state_key_unref: panic: kernel diagnostic assertion "refcnt != ~0" failed: file "/usr/src/sys/kern/kern_synch.c", line 826

2021-05-06 Thread Alexandr Nedvedicky
Hello Olivier, > > in your case we've missed the assert and are dying on uvm fault. > > > > you both seem to be using rdr-to. your pf seems to use also divert-to rule. > > I suspect something is going wrong when we deal with traffic, which matches > > rdr-to rule. > > > > > > would you be so

Re: [External] : pf_state_key_unref: panic: kernel diagnostic assertion "refcnt != ~0" failed: file "/usr/src/sys/kern/kern_synch.c", line 826

2021-05-06 Thread Olivier Cherrier
Hello Alexandr, On Wed, May 05, 2021 at 05:53:25PM +0200, alexandr.nedvedi...@oracle.com wrote: > I've seen your report here > > https://marc.info/?l=openbsd-bugs=161968896108810 > > your crash is slightly different. Sebastien is lucky enough > to trip crash in assert, when state

Re: [External] : pf_state_key_unref: panic: kernel diagnostic assertion "refcnt != ~0" failed: file "/usr/src/sys/kern/kern_synch.c", line 826

2021-05-05 Thread Alexandr Nedvedicky
Hello Olivier, I've seen your report here https://marc.info/?l=openbsd-bugs=161968896108810 your crash is slightly different. Sebastien is lucky enough to trip crash in assert, when state key is dereferenced. in your case we've missed the assert and are dying on uvm fault. you both seem

Re: [External] : pf_state_key_unref: panic: kernel diagnostic assertion "refcnt != ~0" failed: file "/usr/src/sys/kern/kern_synch.c", line 826

2021-05-05 Thread Olivier Cherrier
On Tue, May 04, 2021 at 12:26:17PM +0200, sema...@online.fr wrote: > Date: Tue, 4 May 2021 12:26:17 +0200 > From: Sebastien Marie > To: Alexandr Nedvedicky > Cc: bugs@openbsd.org > Subject: Re: [External] : pf_state_key_unref: panic: kernel diagnostic > assertion "ref

Re: [External] : pf_state_key_unref: panic: kernel diagnostic assertion "refcnt != ~0" failed: file "/usr/src/sys/kern/kern_synch.c", line 826

2021-05-05 Thread Sebastien Marie
On Tue, May 04, 2021 at 04:50:06PM +0200, Sebastien Marie wrote: > On Tue, May 04, 2021 at 02:15:05PM +0200, Alexandr Nedvedicky wrote: > > Hello Sebastien, > > > > thank you for additional info about previously working kernel. > > > > it looks like your older kernel, which works, might be

Re: [External] : pf_state_key_unref: panic: kernel diagnostic assertion "refcnt != ~0" failed: file "/usr/src/sys/kern/kern_synch.c", line 826

2021-05-04 Thread Alexandr Nedvedicky
On Tue, May 04, 2021 at 05:01:35PM +0200, Florian Obser wrote: > On 2021-05-04 16:50 +02, Sebastien Marie wrote: > > On Tue, May 04, 2021 at 02:15:05PM +0200, Alexandr Nedvedicky wrote: > >> Hello Sebastien, > >> > >> thank you for additional info about previously working kernel. > >> > >> it

Re: [External] : pf_state_key_unref: panic: kernel diagnostic assertion "refcnt != ~0" failed: file "/usr/src/sys/kern/kern_synch.c", line 826

2021-05-04 Thread Florian Obser
On 2021-05-04 16:50 +02, Sebastien Marie wrote: > On Tue, May 04, 2021 at 02:15:05PM +0200, Alexandr Nedvedicky wrote: >> Hello Sebastien, >> >> thank you for additional info about previously working kernel. >> >> it looks like your older kernel, which works, might be running without >> my

Re: [External] : pf_state_key_unref: panic: kernel diagnostic assertion "refcnt != ~0" failed: file "/usr/src/sys/kern/kern_synch.c", line 826

2021-05-04 Thread Sebastien Marie
On Tue, May 04, 2021 at 02:15:05PM +0200, Alexandr Nedvedicky wrote: > Hello Sebastien, > > thank you for additional info about previously working kernel. > > it looks like your older kernel, which works, might be running without > my commit > > revision 1.1116 > date: 2021/04/27

Re: [External] : pf_state_key_unref: panic: kernel diagnostic assertion "refcnt != ~0" failed: file "/usr/src/sys/kern/kern_synch.c", line 826

2021-05-04 Thread Alexandr Nedvedicky
Hello Sebastien, thank you for additional info about previously working kernel. it looks like your older kernel, which works, might be running without my commit revision 1.1116 date: 2021/04/27 09:38:29; author: sashan; state: Exp;\ lines: +14 -6; commitid: 3W1fRTkLb3ZlUanF;

Re: [External] : pf_state_key_unref: panic: kernel diagnostic assertion "refcnt != ~0" failed: file "/usr/src/sys/kern/kern_synch.c", line 826

2021-05-04 Thread Sebastien Marie
On Tue, May 04, 2021 at 11:47:55AM +0200, Alexandr Nedvedicky wrote: > Hello Sebastien, > > On Tue, May 04, 2021 at 11:08:19AM +0200, Sebastien Marie wrote: > > Hi, > > > > Currently, I am regulary (~1 per day) get panic on an amd64 host (OpenBSD > > 6.9-current (GENERIC.MP) #492: Sat May 1

Re: [External] : pf_state_key_unref: panic: kernel diagnostic assertion "refcnt != ~0" failed: file "/usr/src/sys/kern/kern_synch.c", line 826

2021-05-04 Thread Alexandr Nedvedicky
Hello Sebastien, On Tue, May 04, 2021 at 11:08:19AM +0200, Sebastien Marie wrote: > Hi, > > Currently, I am regulary (~1 per day) get panic on an amd64 host (OpenBSD > 6.9-current (GENERIC.MP) #492: Sat May 1 17:37:28 MDT 2021). > > panic: kernel diagnostic assertion "refcnt != ~0" failed: