Article View: muc.lists.freebsd.hackers
Article #67Re: Cyrus IMAP autostart problem [patch]
From: Andrea Venturoli
Date: Tue, 27 Oct 2026 20:08
Date: Tue, 27 Oct 2026 20:08
38 lines
4628 bytes
4628 bytes
On 10/26/26 19:28, Andrea Venturoli wrote:
> In any case it would still not address the root cause.
I think the problem is in fdcopy.
This was changed from 14.x to 15.1 and, if this is it, I think it's
still broken in main.
This patch should solve:
> diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
> index 80735e0b4c0c..77424384303e 100644
> --- a/sys/kern/kern_descrip.c
> +++ b/sys/kern/kern_descrip.c
> @@ -2644,8 +2644,11 @@ fdcopy(struct filedesc *fdp, struct proc *p1)
> if ((ops->fo_flags & DFLAG_FORK) != 0 &&
> (ofde->fde_flags & UF_FOCLOSE) == 0) {
> if (ops->fo_fork(newfdp, ofde->fde_file, &fp, p1,
> - curthread) != 0)
> + curthread) != 0) {
> + if (newfdp->fd_freefile == fdp->fd_freefile)
> + newfdp->fd_freefile = i;
> continue;
> + }
> fork_pass = true;
> } else if ((ops->fo_flags & DFLAG_PASSABLE) == 0 ||
> (ofde->fde_flags & UF_FOCLOSE) != 0 ||
However, I'm no kernel expert, so if someone could give it a look...
It works in a test VM, but I don't dare put it in production otherwise.
bye & Thanks
av.
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID:
<b86f9536-9413-4483-80cb-b3e95fa493f8@netfence.it>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mailReferences:
<> <4350dd49-17aa-4baf-83c0-bfed50426805@netfence.it>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mail From: Andrea Venturoli <ml@netfence.it> Newsgroups: muc.lists.freebsd.hackers Subject: Re: Cyrus IMAP autostart problem [patch] Date: Tue, 27 Oct 2026 21:08:43 +0100 Organization: Newsgate at muc.de e.V. Sender: owner-freebsd-hackers@FreeBSD.org Approved: news-admin@muc.de Distribution: world Message-ID: <b86f9536-9413-4483-80cb-b3e95fa493f8@netfence.it> References: <> <4350dd49-17aa-4baf-83c0-bfed50426805@netfence.it> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2"; logging-data="66048"; mail-complaints-to="news-admin@muc.de" User-Agent: Mozilla Thunderbird DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793131737; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=JRmlLRs5fL+psBWgrURp6SytVIpLRW0f4+3C5y0MlsY=; b=quG+pWwWzTds35mGfWzTsJPY/eqm1ipI5CH4NHENBgNaTvTAEXKBLTPg/MxjZjHXXOnLV5 EkQKYYkABHChmUrLYlX/fn+DaubInYRe9Ft9d4Be+REY5GPSFhPe4LFsQXg00L6Wz6ZB36 3s0Ew648Cu0UEKwvucxGIxp22HnKHM31sezrDeIhFfE50wi4PYgzCEPTiJ7oJ2VDdy0uBr i1e7HmiXnei3UJdc+eQpfGavMpQtJB5TG7IAmjSJ/uX6oTpFqOhSH5MIRIYV0qgdkVeoZN Y5/XsGIKoJebjEjK7Sf5WfxecNz5pxNomi7TcY1ErkgPn7uM0JI0wOLn/1h1Nw== X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of ml@netfence.it designates 78.134.96.152 as permitted sender) smtp.mailfrom=ml@netfence.it; dmarc=pass (policy=none) header.from=netfence.it X-Authentication-Warning: soth.netfence.it: Host alamar.local.netfence.it [10.1.2.18] claimed to be [10.1.2.18] Precedence: list Content-Language: en-US In-Reply-To: <4350dd49-17aa-4baf-83c0-bfed50426805@netfence.it> X-Spamd-Bar: / X-Spamd-Result: default: False [-0.80 / 15.00]; DMARC_POLICY_ALLOW(-0.50)[netfence.it,none]; R_SPF_ALLOW(-0.20)[+ip4:78.134.96.152]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:35612, ipnet:78.134.0.0/17, country:IT]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[freebsd-ports@freebsd.org,freebsd-hackers@freebsd.org]; FROM_HAS_DN(0.00)[]; HAS_XAW(0.00)[]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_FIVE(0.00)[5] X-Rspamd-Queue-Id: 4jDhQX0R7hz3PXQ X-Newsgate-Id: f02c70b8849f+ X-No-Archive: Yes