Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Sep 2025 21:36:01 -0400
From:      Ian Freislich <ianfreislich@gmail.com>
To:        Kyle Evans <kevans@FreeBSD.org>, <freebsd-current@freebsd.org>
Subject:   Re: Possible incompatible change with initgroups(3)?
Message-ID:  <19964c38be8.28c3.64e08aff09ba5a21b2fc9010d26a90e5@gmail.com>
In-Reply-To: <c40e0333-3248-4510-bac6-af2bcf78d4a5@FreeBSD.org>
References:  <20250920.080248.183796883139076827.yasu@FreeBSD.org> <20250920084357.32586ee5@darrin.worldsmith.org> <c40e0333-3248-4510-bac6-af2bcf78d4a5@FreeBSD.org>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On September 19, 2025 19:35:45 Kyle Evans <kevans@FreeBSD.org> wrote:

> On 9/19/25 18:13, Darrin Smith wrote:
>> On Sat, 20 Sep 2025 08:02:48 +0900 (JST)
>> Yasuhiro Kimura <yasu@FreeBSD.org> wrote:
>>
>>> Today I updated my 16.0-CURRENT amd64 system from
>>> main-n280279-b0e7b55a0e90 to main-n280498-b3468202994f and noticed
>>> Postfix emits such error messages as below.
>>>
>>> ----------------------------------------------------------------------
>>> Sep 20 03:00:11 rolling-vm-freebsd1 postfix/qmgr[2634]: fatal:
>>> initgroups: Socket operation on non-socket Sep 20 03:00:11
>>> rolling-vm-freebsd1 postfix/pickup[2635]: fatal: initgroups: Socket
>>> operation on non-socket Sep 20 03:01:00 rolling-vm-freebsd1
>>> postfix/showq[66274]: fatal: initgroups: Socket operation on
>>> non-socket
>>> ----------------------------------------------------------------------
>>>
>>> So I rebuilt, reinstalled and restared Postfix. Then error message
>>> disappeared.
>>>
>>> I checked commit log between b0e7b55a0e90 and b3468202994f, and found
>>> following one.
>>>
>>> ----------------------------------------------------------------------
>>> commit 0b018cfd81d8
>>> Author:     Olivier Certner <olce@FreeBSD.org>
>>> AuthorDate: Tue Sep 16 17:52:20 2025 +0200
>>> Commit:     Olivier Certner <olce@FreeBSD.org>
>>> CommitDate: Wed Sep 17 14:16:06 2025 +0200
>>>
>>> initgroups(3): Fix return value on allocation failure
>>>
>>> We must not return ENOMEM, but rather -1 with 'errno' set to
>>> ENOMEM, as described in the manual page and as other implementations
>>> are doing. A malloc() failure actually already sets ENOMEM for us.
>>> Add comments indicating which function set 'errno' each time we
>>> return.
>>> While here, improve style and remove useless headers.
>>>
>>> Reviewed by:    kib, emaste
>>> Fixes:          54404cfb13d4 ("In preparation for raising NGROUPS
>>> and NGROUPS_MAX, ...") MFC after:      5 days
>>> Sponsored by:   The FreeBSD Foundation
>>> Differential Revision:  https://reviews.freebsd.org/D52580
>>> ----------------------------------------------------------------------
>>>
>>> According to commit message, it is likely that the commit introduces
>>> some incompatibility with initgroups(3) and that it causes error
>>> messages of Postfix. And if it is correct, then __FreeBSD_version
>>> should be bumped to force packages that use initgroups(3) to be
>>> rebuilt.
>>>
>>> ---
>>> Yasuhiro Kimura
>>
>> I can confirm this issue. I've had to recompile audio/musicpd
>> and sysutils/bareos23-client to resolve it. (Also getting
>> the same Socket operation on non-socket in each case).
>
> Are you folks using GENERIC, or a custom kernel config?  The more interesting
> commit here is 9dc1ac8691966480ff8bd9c37dd405b981b41dd5, which would surface a
> problem fixed by a rebuild if you're using a custom kernel that does not have
> COMPAT_FREEBSD14 enabled.  I don't think I'd quite expect that failure mode,
> though, so maybe not.

I use a custom kernel that has COMPAT_FREEBSD14 and I experienced this last 
night. Had to recompile bind920, zabbix7_agent, zabbix7_server and freeradius3.

Ian

[-- Attachment #2 --]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">;
<html>
<body>
<div dir="auto">
<div dir="auto"><span style="font-size: 12pt;">On September 19, 2025 19:35:45 Kyle Evans &lt;kevans@FreeBSD.org&gt; wrote:</span></div><div id="aqm-original" style="color: black;">
<div><br></div>
<blockquote type="cite" class="gmail_quote" style="margin: 0 0 0 0.75ex; border-left: 1px solid #808080; padding-left: 0.75ex;">
<div dir="auto">On 9/19/25 18:13, Darrin Smith wrote:</div>
<blockquote type="cite" class="gmail_quote" style="margin: 0 0 0 0.75ex; border-left: 1px solid #0099CC; padding-left: 0.75ex;">
<div dir="auto">On Sat, 20 Sep 2025 08:02:48 +0900 (JST)</div>
<div dir="auto">Yasuhiro Kimura &lt;yasu@FreeBSD.org&gt; wrote:</div>
<div dir="auto"><br></div>
<blockquote type="cite" class="gmail_quote" style="margin: 0 0 0 0.75ex; border-left: 1px solid #9933CC; padding-left: 0.75ex;">
<div dir="auto">Today I updated my 16.0-CURRENT amd64 system from</div>
<div dir="auto">main-n280279-b0e7b55a0e90 to main-n280498-b3468202994f and noticed</div>
<div dir="auto">Postfix emits such error messages as below.</div>
<div dir="auto"><br></div>
<div dir="auto">----------------------------------------------------------------------</div>
<div dir="auto">Sep 20 03:00:11 rolling-vm-freebsd1 postfix/qmgr[2634]: fatal:</div>
<div dir="auto">initgroups: Socket operation on non-socket Sep 20 03:00:11</div>
<div dir="auto">rolling-vm-freebsd1 postfix/pickup[2635]: fatal: initgroups: Socket</div>
<div dir="auto">operation on non-socket Sep 20 03:01:00 rolling-vm-freebsd1</div>
<div dir="auto">postfix/showq[66274]: fatal: initgroups: Socket operation on</div>
<div dir="auto">non-socket</div>
<div dir="auto">----------------------------------------------------------------------</div>
<div dir="auto"><br></div>
<div dir="auto">So I rebuilt, reinstalled and restared Postfix. Then error message</div>
<div dir="auto">disappeared.</div>
<div dir="auto"><br></div>
<div dir="auto">I checked commit log between b0e7b55a0e90 and b3468202994f, and found</div>
<div dir="auto">following one.</div>
<div dir="auto"><br></div>
<div dir="auto">----------------------------------------------------------------------</div>
<div dir="auto">commit 0b018cfd81d8</div>
<div dir="auto">Author: &nbsp; &nbsp; Olivier Certner &lt;olce@FreeBSD.org&gt;</div>
<div dir="auto">AuthorDate: Tue Sep 16 17:52:20 2025 +0200</div>
<div dir="auto">Commit: &nbsp; &nbsp; Olivier Certner &lt;olce@FreeBSD.org&gt;</div>
<div dir="auto">CommitDate: Wed Sep 17 14:16:06 2025 +0200</div>
<div dir="auto"><br></div>
<div dir="auto">initgroups(3): Fix return value on allocation failure</div>
<div dir="auto"><br></div>
<div dir="auto">We must not return ENOMEM, but rather -1 with 'errno' set to</div>
<div dir="auto">ENOMEM, as described in the manual page and as other implementations</div>
<div dir="auto">are doing. A malloc() failure actually already sets ENOMEM for us.</div>
<div dir="auto">Add comments indicating which function set 'errno' each time we</div>
<div dir="auto">return.</div>
<div dir="auto">While here, improve style and remove useless headers.</div>
<div dir="auto"><br></div>
<div dir="auto">Reviewed by: &nbsp; &nbsp;kib, emaste</div>
<div dir="auto">Fixes: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;54404cfb13d4 ("In preparation for raising NGROUPS</div>
<div dir="auto">and NGROUPS_MAX, ...") MFC after: &nbsp; &nbsp; &nbsp;5 days</div>
<div dir="auto">Sponsored by: &nbsp; The FreeBSD Foundation</div>
<div dir="auto">Differential Revision: &nbsp;https://reviews.freebsd.org/D52580</div>;
<div dir="auto">----------------------------------------------------------------------</div>
<div dir="auto"><br></div>
<div dir="auto">According to commit message, it is likely that the commit introduces</div>
<div dir="auto">some incompatibility with initgroups(3) and that it causes error</div>
<div dir="auto">messages of Postfix. And if it is correct, then __FreeBSD_version</div>
<div dir="auto">should be bumped to force packages that use initgroups(3) to be</div>
<div dir="auto">rebuilt.</div>
<div dir="auto"><br></div>
<div dir="auto">---</div>
<div dir="auto">Yasuhiro Kimura</div>
<div dir="auto"><br></div>
</blockquote>
<div dir="auto"><br></div>
<div dir="auto">I can confirm this issue. I've had to recompile audio/musicpd</div>
<div dir="auto">and sysutils/bareos23-client to resolve it. (Also getting</div>
<div dir="auto">the same Socket operation on non-socket in each case).</div>
<div dir="auto"><br></div>
</blockquote>
<div dir="auto"><br></div>
<div dir="auto">Are you folks using GENERIC, or a custom kernel config? &nbsp;The more interesting</div>
<div dir="auto">commit here is 9dc1ac8691966480ff8bd9c37dd405b981b41dd5, which would surface a</div>
<div dir="auto">problem fixed by a rebuild if you're using a custom kernel that does not have</div>
<div dir="auto">COMPAT_FREEBSD14 enabled. &nbsp;I don't think I'd quite expect that failure mode,</div>
<div dir="auto">though, so maybe not.</div>
</blockquote>
</div><div dir="auto"><br></div><div dir="auto">I use a custom kernel that has COMPAT_FREEBSD14 and I experienced this last night. Had to recompile bind920, zabbix7_agent, zabbix7_server and freeradius3.</div><div dir="auto"><br>Ian</div>
</div></body>
</html>
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19964c38be8.28c3.64e08aff09ba5a21b2fc9010d26a90e5>