mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Dmitry Vyukov <dvyukov@google.com>
Cc: David Matlack <dmatlack@google.com>,
	Thomas Gleixner <tglx@kernel.org>, Marco Elver <elver@google.com>,
	Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Michael Jeanson <mjeanson@efficios.com>,
	Jens Axboe <axboe@kernel.dk>,
	"Paul E. McKenney" <paulmck@kernel.org>, X86 ML <x86@kernel.org>,
	Sean Christopherson <seanjc@google.com>,
	Wei Liu <wei.liu@kernel.org>
Subject: Re: SIGSEGVs after 39a167560a61 ("rseq: Optimize event setting")
Date: Wed, 28 Jan 2026 06:28:33 -0500	[thread overview]
Message-ID: <5f3843ba-31d4-4acf-b3b9-0d2a131dca23@efficios.com> (raw)
In-Reply-To: <CACT4Y+a9GnOh3wHKSRwzoKF6_OSksQ8qehnHfpCgkQSt_OOmYg@mail.gmail.com>

On 2026-01-28 03:54, Dmitry Vyukov wrote:
> On Tue, 27 Jan 2026 at 21:34, Mathieu Desnoyers
> <mathieu.desnoyers@efficios.com> wrote:
>>
>> +CC Dmitry and Marco.
>>
>> On 2026-01-26 17:35, Mathieu Desnoyers wrote:
>>> On 2026-01-26 17:27, David Matlack wrote:
>>>> On Mon, Jan 26, 2026 at 1:51 PM Thomas Gleixner <tglx@kernel.org> wrote:
>>> [...]
>>>>>> Perhaps this is the nudge Google needs to go fix this.
>>>>>
>>>>> The real question is whether the segfault is triggered from the rseq
>>>>> sanity checks or if the application segfaults becauses it relies on
>>>>> something something which is not guaranteed by the ABI. As this is
>>>>> secret sauce, I can't tell.
>>>>
>>>> I tried enabling /debug/rseq/debug but many of the daemons on my host
>>>> started crash-looping so much that I wasn't able to even run my test.
>>>>
>>>> Next I tried disabling CONFIG_RSEQ and as expected the issue went
>>>> away. I will use that for now to unblock my VFIO testing.
>>>>
>>>> I have reported the tcmalloc regression internally within Google to
>>>> figure out what next step they want to take.
>>>
>>> Note that I've proposed to help out the tcmalloc people a few
>>> times in the past years to fix this, but I've been told that
>>> it was not a priority on their end, and that they would not be
>>> able to even test whatever I would come up with.
> 
> I see the patch sets t->rseq.event.ids_changed when cid changes.
> David, perhaps we miss the same update vcpu changes b/c logically vcpu
> is the same as cid?
> Otherwise I don't see why this change would interfere with tcmalloc's
> [ab]use of rseq. Fences (membarrier) should continue to update rseq
> unconditionally for tcmalloc, but that's not the scheduler fast paths.

I suspect that tcmalloc's aliasing of the rseq cpu_id_start field
with its own data structure, corrupting its content, and expecting the
kernel to update it on every preemption does not work anymore, because
the kernel only updates it when the cpu_id actually changes.

Thanks,

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com

  reply	other threads:[~2026-01-28 11:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-26 19:46 David Matlack
2026-01-26 20:47 ` Peter Zijlstra
2026-01-26 20:49   ` Peter Zijlstra
2026-01-26 21:50   ` Thomas Gleixner
2026-01-26 22:27     ` David Matlack
2026-01-26 22:35       ` Mathieu Desnoyers
2026-01-27 20:34         ` Mathieu Desnoyers
2026-01-28  8:54           ` Dmitry Vyukov
2026-01-28 11:28             ` Mathieu Desnoyers [this message]
2026-01-28 11:40               ` Dmitry Vyukov
2026-01-28 13:16                 ` Thomas Gleixner
2026-02-02  7:11                   ` Dmitry Vyukov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5f3843ba-31d4-4acf-b3b9-0d2a131dca23@efficios.com \
    --to=mathieu.desnoyers@efficios.com \
    --cc=axboe@kernel.dk \
    --cc=dmatlack@google.com \
    --cc=dvyukov@google.com \
    --cc=elver@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjeanson@efficios.com \
    --cc=paulmck@kernel.org \
    --cc=peterz@infradead.org \
    --cc=seanjc@google.com \
    --cc=tglx@kernel.org \
    --cc=wei.liu@kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®