lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aHSvbVcc0DKMGcYT@fedora>
Date: Mon, 14 Jul 2025 07:19:09 +0000
From: Hangbin Liu <liuhangbin@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
	pabeni@...hat.com, andrew+netdev@...n.ch, horms@...nel.org,
	shuah@...nel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH net] selftests: rtnetlink: try double sleep to give WQ a
 chance

On Fri, Jul 11, 2025 at 07:17:29AM -0700, Jakub Kicinski wrote:
> On Fri, 11 Jul 2025 02:14:03 +0000 Hangbin Liu wrote:
> > >  	sleep 5
> > > +	# Schedule out for a bit, address GC runs from the power efficient WQ
> > > +	# if the long sleep above has put the whole system into sleep state
> > > +	# the WQ may have not had a chance to run.
> > > +	sleep 0.1
> > > +  
> > 
> > How about use slowwait to check if the address still exists.
> 
> Weirdly if we read the addresses twice they disappear, I haven't looked
> into the code for the why, but seemed like using slowwait could
> potentially mask the addresses sticking around when nobody runs 
> the Netlink handlers for a while? Dunno..

Not sure if I understand correctly. Do you mean the addresses will keep there
if we use slowwait?

Thanks
Hangbin

> 
> I queued this debug patch a couple of months ago:
> 
>  	sleep 5
> -	run_cmd_grep_fail "10.23.11." ip addr show dev "$devdummy"
> +	ip addr show dev "$devdummy" > /tmp/a
> +	run_cmd_grep_fail "10.23.11." cat /tmp/a
>  	if [ $? -eq 0 ]; then
> -		check_err 1
> -		end_test "FAIL: preferred_lft addresses remaining"
> +	    check_err 1
> +	    cat /tmp/a
> +	    echo "==="
> +		ip addr show dev "$devdummy"
> +		end_test "FAIL: preferred_lft addresses remaining ($lft)"
>  		return
>  	fi
> 
> And when it flakes the output looks like this:
> 
> # 7.23 [+7.00] 297: test-dummy0: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
> # 7.23 [+0.00]     link/ether 9e:a6:c4:c2:1b:16 brd ff:ff:ff:ff:ff:ff
> # 7.23 [+0.00]     inet 10.23.11.81/32 scope global deprecated dynamic test-dummy0
> # 7.23 [+0.00]        valid_lft 0sec preferred_lft 0sec
> # 7.23 [+0.00]     inet 10.23.11.84/32 scope global deprecated dynamic test-dummy0
> # 7.24 [+0.00]        valid_lft 0sec preferred_lft 0sec
> # 7.24 [+0.00]     inet 10.23.11.93/32 scope global deprecated dynamic test-dummy0
> # 7.24 [+0.00]        valid_lft 0sec preferred_lft 0sec
> # 7.24 [+0.00]     inet 10.23.11.94/32 scope global deprecated dynamic test-dummy0
> # 7.24 [+0.00]        valid_lft 0sec preferred_lft 0sec
> # 7.24 [+0.00]     inet 10.23.11.97/32 scope global deprecated dynamic test-dummy0
> # 7.24 [+0.00]        valid_lft 0sec preferred_lft 0sec
> # 7.24 [+0.00]     inet 10.23.11.99/32 scope global deprecated dynamic test-dummy0
> # 7.24 [+0.00]        valid_lft 0sec preferred_lft 0sec
> # 7.24 [+0.00]     inet6 fe80::9ca6:c4ff:fec2:1b16/64 scope link proto kernel_ll 
> # 7.24 [+0.00]        valid_lft forever preferred_lft forever
> # 7.24 [+0.00] ===
> # 7.25 [+0.00] 297: test-dummy0: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
> # 7.25 [+0.00]     link/ether 9e:a6:c4:c2:1b:16 brd ff:ff:ff:ff:ff:ff
> # 7.25 [+0.00]     inet6 fe80::9ca6:c4ff:fec2:1b16/64 scope link proto kernel_ll 
> # 7.25 [+0.00]        valid_lft forever preferred_lft forever
> # 7.25 [+0.00] FAIL: preferred_lft addresses remaining (1)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ