Re: [Bug Report + Patch] File descriptor leak when io_method=io_uring

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Lucas DRAESCHER <git(at)draescher(dot)fr>
Cc: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, Jakub Wartak <jakub(dot)wartak(at)enterprisedb(dot)com>, Laetitia Avrot <laetitia(dot)avrot(at)gmail(dot)com>, "tanswis42(at)gmail(dot)com" <tanswis42(at)gmail(dot)com>, cca5507 <cca5507(at)qq(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [Bug Report + Patch] File descriptor leak when io_method=io_uring
Date: 2026-11-03 14:53:12
Message-ID: CAHGQGwFhxyDfHF_rFsR+oMvujLm7UQ4q6xYX0U2mO5VJ8BHkng@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Sep 10, 2026 at 3:10 AM Lucas DRAESCHER <git(at)draescher(dot)fr> wrote:
> Alternatively, if maintaining a separate backpatch variant is undesirable,
> v1 is still available. It doesn't change the `IoMethodOps` struct at all,
> so the ABI question disappears.

I don't object to the v4 approach for master, but I still prefer v1 for
backpatching because it keeps the changes minimal and avoids changing
the IoMethodOps ABI.

I've attached updated v1-based patches. The changes are:
- Rename the cleanup function.
- Replace the NULL check with an assertion and add Assert(!IsUnderPostmaster).
- Remove the debug log message.

How about committing this v1-based fix and backpatching it to v18, then
considering a common cleanup interface separately for master if needed?

Regards,

--
Fujii Masao

Attachment Content-Type Size
nocfbot-v1-2-PG18-0001-Fix-io_uring-resource-leaks-across-crash-restar.patch application/octet-stream 2.8 KB
v1-2-0001-Fix-io_uring-resource-leaks-across-crash-restar.patch application/octet-stream 2.8 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Manu 2026-11-03 14:54:43 Re: O(N^3) planning time in choose_plan_name() since 8c49a484e8e
Previous Message vignesh C 2026-11-03 14:51:17 Re: Test publication.sql racing with subscription.sql might fail due to cache lookup error