Re: wg destroy hangs

2023-10-08 Thread Claudio Jeker
On Wed, Oct 04, 2023 at 11:31:47PM +0200, Alexander Bluhm wrote: > On Wed, Oct 04, 2023 at 11:03:27PM +0300, Vitaliy Makkoveev wrote: > > On Wed, Oct 04, 2023 at 09:13:59PM +0200, Alexander Bluhm wrote: > > > On Wed, Oct 04, 2023 at 08:42:48PM +0200, Kirill Miazine wrote: > > > > > If it happns

Re: wg destroy hangs

2023-10-05 Thread Alexander Bluhm
On Thu, Oct 05, 2023 at 07:15:23AM +0200, Kirill Miazine wrote: > > This diff checks IFF_RUNNING flag within while (!ifq_empty()) loop of > > wg_peer_destroy(). If the flag is not set queue will be purged and check > > performed again. I intentionally keep netlock to prevent ifconfig > >

Re: wg destroy hangs

2023-10-04 Thread Kirill Miazine
• Vitaliy Makkoveev [2023-10-05 01:10]: On Thu, Oct 05, 2023 at 12:08:55AM +0200, Kirill Miazine wrote: • Vitaliy Makkoveev [2023-10-05 00:02]: On 5 Oct 2023, at 00:56, Kirill Miazine wrote: new diff doesn't prevent hang in test scenario either. Which one? I meant to say new diffS,

Re: wg destroy hangs

2023-10-04 Thread Vitaliy Makkoveev
On Thu, Oct 05, 2023 at 12:08:55AM +0200, Kirill Miazine wrote: > • Vitaliy Makkoveev [2023-10-05 00:02]: > > > On 5 Oct 2023, at 00:56, Kirill Miazine wrote: > > > > > > new diff doesn't prevent hang in test scenario either. > > > > > > > Which one? > > I meant to say new diffS, as I had

Re: wg destroy hangs

2023-10-04 Thread Kirill Miazine
• Vitaliy Makkoveev [2023-10-05 00:02]: On 5 Oct 2023, at 00:56, Kirill Miazine wrote: new diff doesn't prevent hang in test scenario either. Which one? I meant to say new diffS, as I had applied both... what I have now is this:

Re: wg destroy hangs

2023-10-04 Thread Vitaliy Makkoveev
> On 5 Oct 2023, at 00:56, Kirill Miazine wrote: > > new diff doesn't prevent hang in test scenario either. > Which one?

Re: wg destroy hangs

2023-10-04 Thread Kirill Miazine
• Vitaliy Makkoveev [2023-10-04 23:38]: On 5 Oct 2023, at 00:31, Alexander Bluhm wrote: On Wed, Oct 04, 2023 at 11:03:27PM +0300, Vitaliy Makkoveev wrote: On Wed, Oct 04, 2023 at 09:13:59PM +0200, Alexander Bluhm wrote: On Wed, Oct 04, 2023 at 08:42:48PM +0200, Kirill Miazine wrote: If

Re: wg destroy hangs

2023-10-04 Thread Vitaliy Makkoveev
> On 5 Oct 2023, at 00:31, Alexander Bluhm wrote: > > On Wed, Oct 04, 2023 at 11:03:27PM +0300, Vitaliy Makkoveev wrote: >> On Wed, Oct 04, 2023 at 09:13:59PM +0200, Alexander Bluhm wrote: >>> On Wed, Oct 04, 2023 at 08:42:48PM +0200, Kirill Miazine wrote: > If it happns again, could you

Re: wg destroy hangs

2023-10-04 Thread Alexander Bluhm
On Wed, Oct 04, 2023 at 11:03:27PM +0300, Vitaliy Makkoveev wrote: > On Wed, Oct 04, 2023 at 09:13:59PM +0200, Alexander Bluhm wrote: > > On Wed, Oct 04, 2023 at 08:42:48PM +0200, Kirill Miazine wrote: > > > > If it happns again, could you send an 'ps axlww | grep ifconifg' > > > > output? Then

Re: wg destroy hangs

2023-10-04 Thread Vitaliy Makkoveev
On Wed, Oct 04, 2023 at 11:07:24PM +0200, Kirill Miazine wrote: > > > • Vitaliy Makkoveev [2023-10-04 22:03]: > > On Wed, Oct 04, 2023 at 09:13:59PM +0200, Alexander Bluhm wrote: > > > On Wed, Oct 04, 2023 at 08:42:48PM +0200, Kirill Miazine wrote: > > > > > If it happns again, could you send an

Re: wg destroy hangs

2023-10-04 Thread Kirill Miazine
• Vitaliy Makkoveev [2023-10-04 22:03]: On Wed, Oct 04, 2023 at 09:13:59PM +0200, Alexander Bluhm wrote: On Wed, Oct 04, 2023 at 08:42:48PM +0200, Kirill Miazine wrote: If it happns again, could you send an 'ps axlww | grep ifconifg' output? Then we see the wait channel where it hangs in

Re: wg destroy hangs

2023-10-04 Thread Vitaliy Makkoveev
On Wed, Oct 04, 2023 at 09:13:59PM +0200, Alexander Bluhm wrote: > On Wed, Oct 04, 2023 at 08:42:48PM +0200, Kirill Miazine wrote: > > > If it happns again, could you send an 'ps axlww | grep ifconifg' > > > output? Then we see the wait channel where it hangs in the kernel. > > > > > > $ ps

Re: wg destroy hangs

2023-10-04 Thread Alexander Bluhm
On Wed, Oct 04, 2023 at 08:42:48PM +0200, Kirill Miazine wrote: > > If it happns again, could you send an 'ps axlww | grep ifconifg' > > output? Then we see the wait channel where it hangs in the kernel. > > > > $ ps axlww > >UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT

Re: wg destroy hangs

2023-10-04 Thread Kirill Miazine
• Kirill Miazine [2023-10-04 20:42]: I saw some changes to wg recently, so I wanted to report the issue in case recent commit changed something in time for release. I understand the issue is probably a year old by now. I guess I hadn't destroyed wg for a while, although I do believe I

Re: wg destroy hangs

2023-10-04 Thread Kirill Miazine
I saw some changes to wg recently, so I wanted to report the issue in case recent commit changed something in time for release. I understand the issue is probably a year old by now. I guess I hadn't destroyed wg for a while, although I do believe I have... • Alexander Bluhm [2023-10-04

Re: wg destroy hangs

2023-10-04 Thread Sonic
It works currently on my own firewall. The problem occured on a client's firewall, which I can't test right now. It's an amd64 system (older Supermicro) and as I was shelled in remotely I was getting worried about recovering and then I discovered "reboot -q" - nothing else was working to get the

Re: wg destroy hangs

2023-10-04 Thread Alexander Bluhm
On Wed, Oct 04, 2023 at 10:53:30AM -0400, Sonic wrote: > When it happened to me back then (2022) I'm pretty sure I did a "down" > followed by a "delete" and then the "destroy". root@ot6:.../~# cd /usr/src/regress/sys/net/wg root@ot6:.../wg# make ifconfig ... root@ot6:.../wg# ifconfig wg11 wg11:

Re: wg destroy hangs

2023-10-04 Thread Sonic
When it happened to me back then (2022) I'm pretty sure I did a "down" followed by a "delete" and then the "destroy". Have not tried to recreate since then. On Wed, Oct 4, 2023 at 10:31 AM Alexander Bluhm wrote: > On Wed, Oct 04, 2023 at 10:08:01AM -0400, Sonic wrote: > > See the post: > >

Re: wg destroy hangs

2023-10-04 Thread Alexander Bluhm
On Wed, Oct 04, 2023 at 10:08:01AM -0400, Sonic wrote: > See the post: > "Uninterruptible D State after ifconfig wg0 destroy" Oct. 31, 2022 in the > Bugs archive. I have a test regress/sys/net/wg that configures a wg(4), sends some traffic, and destroys it. I have never seen this bug. There

Re: wg destroy hangs

2023-10-04 Thread Sonic
See the post: "Uninterruptible D State after ifconfig wg0 destroy" Oct. 31, 2022 in the Bugs archive. On Wed, Oct 4, 2023 at 10:04 AM Sonic wrote: > This goes back a ways, to at least 7.2 in October 2022. > > > On Wed, Oct 4, 2023 at 8:54 AM Kirill Miazine wrote: > >> Recently on snapshots I

Re: wg destroy hangs

2023-10-04 Thread Sonic
This goes back a ways, to at least 7.2 in October 2022. On Wed, Oct 4, 2023 at 8:54 AM Kirill Miazine wrote: > Recently on snapshots I have noticed that ifconfig wgN destroy would > just hang there, without any way to get back the control. Power reset > would be the only way to reboot and

Re: wg destroy hangs

2023-10-04 Thread Chris Cappuccio
Can you try compiling without this: https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/net/if_wg.c.diff?r1=1.29=1.30 Kirill Miazine [k...@krot.org] wrote: > Recently on snapshots I have noticed that ifconfig wgN destroy would just > hang there, without any way to get back the control. Power reset