From nobody Fri Sep 6 16:46:54 2024 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4X0hvy3K8Mz5VV1b for ; Fri, 06 Sep 2024 16:46:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X0hvy120Jz40hb for ; Fri, 6 Sep 2024 16:46:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725641214; a=rsa-sha256; cv=none; b=YJcGGKmhjG+eEPpa5BK74yLy2cEwwjk+Lwv/5luXgVH+VKVczXT849FGfYvQyjRKRQtytt Iy0t4MuO4In5b8hO/g88V9AgLAi4MeyfUwPefnwCU8WZJbS7CThX6WLauFSNrnllWZOrWi 7VBYWODGZ50eyelK1+yXczFN8nPExc7E3FI6aK4qDmUEnLDDvmAM3hQ6urGK7HbfrU81EN HmTt8w3P/PvJiykf7pqjgiAxUvxQ7m1A19x5HkNuYOlNuXlkz+mWrreP1hjiMWWAI7vLcN IueNHeff3p/5D3zpC7KOfhhK1OCb+3/RDkFw2Kmc5E+FyD8Mr7TtLlL5iHbp/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725641214; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=co2Hb1SlHRLW+wN+BNhBVSrGvPe+hfpD1VUmmuhHYQY=; b=rJhEVDwbQOqM6zXNcIhW5DGHcnVtrm9W9jAnZEtbX6cNZ/dKBwqIjTdK2aGir6+QltkpIH c0FhRfNW2b1BX4DgPl3iHq9WSu9GXYVe5SUaYyvXHUMS1VP/vycCoRs0/XGSkW2dVPtm9c JJ2wxL9ZqSnVHdzw67ZYpYKt9iQ+UbCesXvHkERFp/oC01AFr1vs1EyQBgxy3Lm0MaZWug f334K9xAlSpD+nUzRGlWxWQ7AjFNAcjYlLJIhDQ5mHdM5cHs06NsrG2YizItms1WJ1sV+/ LjmCzMHvO2MoPFAVBwb5ZL6pjopzZIeKahBF0Vd9EfZ328r6keMU7lo64e07fw== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4X0hvy0D1xz10H1 for ; Fri, 6 Sep 2024 16:46:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 486GkrI9095244 for ; Fri, 6 Sep 2024 16:46:53 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 486GkrAg095243 for bugs@FreeBSD.org; Fri, 6 Sep 2024 16:46:53 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 238006] syslogd not starting because of missing /var/run/log Date: Fri, 06 Sep 2024 16:46:54 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 12.0-RELEASE X-Bugzilla-Keywords: needs-qa X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: bugzilla.freebsd@omnilan.de X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D238006 Harald Schmalzbauer changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla.freebsd@omnilan.de --- Comment #6 from Harald Schmalzbauer --- Hello, I stumbled across this PR while debugging: 'logmsg: pri 53, flags 0, from , msg getaddrinfo failed for syslog: Name do= es not resolve' Since services(5) does include 'syslog 514/udp' in FreeBSD 14.1, my problem isn't exactly the same, but related. syslogd(8) doesn't stat in jails which are neither vnet-enabled nor do have= a shared-ip assigned. I tracked it down to socksetup() in src/usr.sbin/syslogd/syslogd.c. In main(), after getopt processing, if no -b as CLI arg was specified [line 742]: /* Listen by default: *:514 if no -b flag. */ if (bflag =3D=3D 0) addpeer(&(struct peer){ .pe_serv =3D "syslog" }); addpeer() is unconditionally called to add service "syslog" to peer.pe_serv, even if ( SecureMode > 1 ). Then, in socksetup(), getaddrinfo() fails in jails as decribed above (no vn= et, no shared-IP). Unfortunately, that's the part I don't understand. Neither why it fails, nor why this unconditionally causes die(0); [line 384= 0]. The check which should make the check result meaningless comes _after_ die(= 0) [line 3845]: if (res->ai_family !=3D AF_LOCAL && SecureMode > 1) { /* Only AF_LOCAL in secure mode. */ continue; } My C skills are too weak to propose a patch, but at least I found a suitable workaround for the moment: Adding -b 127.0.0.1 (in addition to -ss) as CLI arg prevents from die(0);. Anyone familiar with getaddrinfo(3) who can judge if the problem really is = in the syslogd code path as outlined above, or if the real bug is that getaddrinf(3) fails in jails without a shared-IP configured (and not a vnet lo0)? Thanks, -harry --=20 You are receiving this mail because: You are the assignee for the bug.=