| From: | Jakub Wartak <jakub(dot)wartak(at)enterprisedb(dot)com> |
|---|---|
| To: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
| Cc: | Lucas DRAESCHER <git(at)draescher(dot)fr>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, 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-04 09:47:03 |
| Message-ID: | CAKZiRmzn0Eba5ExJfnYvw_k77NG3s7eOhA9=BgeHfWrMOfDMzg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, Nov 3, 2026 at 3:53 PM Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>
> 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?
Hi Fujii, thanks for taking a look, if You are willing to backpatch then v1
sounds better way better for endusers and just to give little more confidence,
I've checked both patces on REL_18_STABLE and master:
1) this passes: PG_TEST_INITDB_EXTRA_OPTS="-c io_method=io_uring" meson test
-C build
2) code looks good and is even simpler
3) and yes uring fd leaks are gone with this after SIGSEGV
v18 and especially upcoming v19 should have this IMHO if possible.
-J.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alexander Kukushkin | 2026-11-04 09:50:51 | fmgr_security_definer() setup and teardown asymmetry |
| Previous Message | Etsuro Fujita | 2026-11-04 09:44:44 | Re: Copy-pasto in comment in ExecAppendAsyncReset |