NetBSD Problem Report #57956
From www@netbsd.org Fri Feb 23 21:39:05 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id ECBA01A9239
for <gnats-bugs@gnats.NetBSD.org>; Fri, 23 Feb 2024 21:39:04 +0000 (UTC)
Message-Id: <20240223213903.7B1571A923A@mollari.NetBSD.org>
Date: Fri, 23 Feb 2024 21:39:03 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: dhcpcd -k ifN consistently fails to release lease, dhcpcd -U ifN sometimes fails to dump lease
X-Send-Pr-Version: www-1.0
>Number: 57956
>Category: bin
>Synopsis: dhcpcd -k ifN consistently fails to release lease, dhcpcd -U ifN sometimes fails to dump lease
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: roy
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Feb 23 21:40:00 +0000 2024
>Last-Modified: Fri Feb 23 22:05:06 +0000 2024
>Originator: Taylor R Campbell
>Release: netbsd-10
>Organization:
The NetBSDCHCPCD Foundation
>Environment:
NetBSD nanocons.local 10.0_RC3 NetBSD 10.0_RC3 (GENERIC64) #15: Wed Jan 17 05:31:14 UTC 2024 root@manticore.local:/usr/obj/10/evbarm64/sys/arch/evbarm/compile/GENERIC64 evbarm
>Description:
nanocons# dhcpcd -k ure0
dhcpcd not running
nanocons# dhcpcd -k urtwn0
dhcpcd not running
But dhcpcd is definitely running and configuring these interfaces:
<daemon.info>Feb 23 21:28:33 nanocons dhcpcd[8543]: ure0: renew in 16971, rebind in 29931, expire in 4294967295 seconds
...
<daemon.info>Feb 23 21:28:33 nanocons dhcpcd[8543]: urtwn0: renew in 16971, rebind in 29931, expire in 4294967295 seconds
<daemon.err>Feb 23 21:29:54 nanocons dhcpcd[11503]: dhcpcd not running
ktrace reveals that it's just checking for a nonexistent pid file before giving up:
27625 27625 dhcpcd CALL open(0xffffffc3cc88,0x400004,0x2f)
27625 27625 dhcpcd NAMI "/var/run/dhcpcd/ure0.pid"
27625 27625 dhcpcd RET open -1 errno 2 No such file or directory
27625 27625 dhcpcd CALL write(2,0x2d2e510,0x13)
27625 27625 dhcpcd GIO fd 2 wrote 19 bytes
"dhcpcd not running\n"
What is actually in /var/run/dhcpcd:
nanocons# ls -l /var/run/dhcpcd
total 16
drwxr-xr-x 4 root wheel 512 Feb 23 21:35 hook-state
-rw-r--r-- 1 root wheel 5 Feb 23 21:28 pid
srw-rw---- 1 root wheel 0 Feb 23 21:28 sock
srw-rw-rw- 1 root wheel 0 Feb 23 21:28 unpriv.sock
Sometimes when I run dhcpcd -U it just fails entirely:
nanocons# dhcpcd -U ure0
dhcpcd_readdumptimeout
nanocons# dhcpcd -U urtwn0
dhcpcd_readdumptimeout
Sometimes it prints some information first before reporting a timeout:
nanocons# dhcpcd -U ure0
reason=CARRIER
interface=ure0
protocol=link
if_configured=true
...
reason=REBOOT
interface=ure0
protocol=dhcp
...
reason=ROUTERADVERT
interface=ure0
protocol=ra
dhcpcd_readdumptimeout
>How-To-Repeat:
I have three interfaces: emac0, ure0, and urtwn0. emac0 is statically configured, so I asked dhcpcd not to configure it with -Z in rc.conf:
dhcpcd=YES
dhcpcd_flags="${dhcpcd_flags} -Z emac0"
The only changes from the default 10.0_RC3 dhcpcd.conf I have are:
-option rapid_commit
+#option rapid_commit
...
+nooption dhcp6_reconfigure_accept
(Perhaps I should get rid of these, from trying to diagnose some problem several years ago, but I don't think they should cause dhcpcd -k or -U to malfunction in any case.)
>Fix:
Yes, please!
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: bin-bug-people->roy
Responsible-Changed-By: riastradh@NetBSD.org
Responsible-Changed-When: Fri, 23 Feb 2024 22:05:06 +0000
Responsible-Changed-Why:
over to dhcpcd wizard
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.