Re: Potential "AIO / io workers" inter-worker locking issue in PG18?

From: Marco Boeringa <marco(at)boeringa(dot)demon(dot)nl>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Potential "AIO / io workers" inter-worker locking issue in PG18?
Date: 2025-10-07 07:34:14
Message-ID: c6d1ee3c-12c6-4be5-b11f-2200b6fa445d@boeringa.demon.nl
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Andres,

That worked, I successfully booted with kernel 6.8!

I can now run perf, but it emits a warning, see below. Do you have
suggestions of how to set these perf 'paranoid' settings?

Marco

|Access to performance monitoring and observability operations is
limited.  │
│Consider adjusting /proc/sys/kernel/perf_event_paranoid setting to
open    │
│access to performance monitoring and observability operations for
processes│
|without CAP_PERFMON, CAP_SYS_PTRACE or CAP_SYS_ADMIN Linux capability.
│More information can be found at 'Perf events and tool security'
document: │
│https://www.kernel.org/doc/html/latest/admin-guide/perf-security.html     │
│perf_event_paranoid setting is 4:           │
│  -1: Allow use of (almost) all events by all users           │
|      Ignore mlock limit after perf_event_mlock_kb without
CAP_IPC_LOCK    │
│>= 0: Disallow raw and ftrace function tracepoint access              │
│>= 1: Disallow CPU event access             │
│>= 2: Disallow kernel profiling             │
│To make the adjusted perf_event_paranoid setting permanent preserve it 
   │
│in /etc/sysctl.conf (e.g. kernel.perf_event_paranoid = <setting>)

Op 7-10-2025 om 09:15 schreef Marco Boeringa:
> It didn't work: as soon as I attempted to run perf, it emitted the
> warning message about the kernel version mismatch with suggestions of
> package to install.
>
> However, I now realized after further digging, that Ubuntu usually has
> multiple kernel versions installed. I have now attempted to add the
> GRUB boot menu, which should allow me to boot with the older 6.8
> version of the kernel (which was available during configuration of
> GRUB), and hopefully run perf with that version of the kernel.
>
> Marco
>
> Op 6-10-2025 om 23:39 schreef Andres Freund:
>> On 2025-10-06 22:41:31 +0200, Marco Boeringa wrote:
>>> Hi Andres,
>>>
>>> I now found out that I do have a 'perf' living under one of 'usr'
>>> folders,
>>> but unfortunately, this is the 6.8 kernel version:
>>>
>>> /usr/lib/linux-tools-6.8.0-85
>>>
>>> None of the other suggested packages and their likely install
>>> folders seem
>>> to contain perf.
>>>
>>> Since perf appears and rather understandably seems to need to
>>> exactly match
>>> the kernel version, I can't use this one, as my kernel was already
>>> upgraded
>>> to 6.14 by a more or less forced update in Software Updater.
>> I'm pretty sure that you can use any halfway-recent perf binary, they
>> don't
>> actually need to match exactly. I don't know why ubuntu insists on a
>> perfect
>> match. I regularly run completely different versions.
>>
>> Greetings,
>>
>> Andres Freund

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Marco Boeringa 2025-10-07 09:50:08 Re: Potential "AIO / io workers" inter-worker locking issue in PG18?
Previous Message Marco Boeringa 2025-10-07 07:15:51 Re: Potential "AIO / io workers" inter-worker locking issue in PG18?