NetBSD Problem Report #59330

From www@netbsd.org  Sat Apr 19 15:18:34 2025
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)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id BE9961A923D
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 19 Apr 2025 15:18:33 +0000 (UTC)
Message-Id: <20250419151832.718E21A923E@mollari.NetBSD.org>
Date: Sat, 19 Apr 2025 15:18:32 +0000 (UTC)
From: andrew.cagney@gmail.com
Reply-To: andrew.cagney@gmail.com
To: gnats-bugs@NetBSD.org
Subject: startup race because racoon's control socket created after daemon)
X-Send-Pr-Version: www-1.0

>Number:         59330
>Category:       bin
>Synopsis:       startup race because racoon's control socket created after daemon)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Apr 19 15:20:00 +0000 2025
>Last-Modified:  Sat Apr 19 19:15:01 +0000 2025
>Originator:     cagney
>Release:        
>Organization:
>Environment:
NetBSD netbsd 10.1 NetBSD 10.1 (GENERIC) #0: Mon Dec 16 13:08:11 UTC 2024  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64

>Description:
racoon calls daemon() and then creates its control socket.
This leads to the text-book race where the racoon process has detached before it is ready.  Leading to:

# racoon -l /tmp/racoon.log
# # create a partial state on east, don't hold the hack for retransmit
# racoonctl establish-sa -w isakmp inet ${left} ${right}
send: Bad file descriptor


>How-To-Repeat:

>Fix:
suggest tweaking documentation

>Audit-Trail:
From: Andrew Cagney <andrew.cagney@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: bin/59330: startup race because racoon's control socket created
 after daemon)
Date: Sat, 19 Apr 2025 15:14:29 -0400

 ps, racoon.conf documents the socket file at /var/racoon/racoon.sock
 but it's /var/run/racoon.sock

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.49 2026/05/14 01:52:41 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.