NetBSD Problem Report #57956

From  Fri Feb 23 21:39:05 2024
Return-Path: <>
Received: from ( [])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "", Issuer " CA" (not verified))
	by (Postfix) with ESMTPS id ECBA01A9239
	for <>; Fri, 23 Feb 2024 21:39:04 +0000 (UTC)
Message-Id: <>
Date: Fri, 23 Feb 2024 21:39:03 +0000 (UTC)
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
The NetBSDCHCPCD Foundation
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
nanocons# dhcpcd -k ure0
dhcpcd not running
nanocons# dhcpcd -k urtwn0
dhcpcd not running

But dhcpcd is definitely running and configuring these interfaces:

<>Feb 23 21:28:33 nanocons dhcpcd[8543]: ure0: renew in 16971, rebind in 29931, expire in 4294967295 seconds
<>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/"
 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
nanocons# dhcpcd -U urtwn0

Sometimes it prints some information first before reporting a timeout:

nanocons# dhcpcd -U ure0

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_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.)
Yes, please!



Responsible-Changed-From-To: bin-bug-people->roy
Responsible-Changed-When: Fri, 23 Feb 2024 22:05:06 +0000
over to dhcpcd wizard


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD:,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.