From: Peter Zijlstra <peterz@infradead.org>
To: Florian Weimer <fweimer@redhat.com>
Cc: Markus Trippelsdorf <markus@trippelsdorf.de>,
linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: commit cfafcd117 "futex: Rework futex_lock_pi() to use rt_mutex_*_proxy_lock()" causes glibc nptl/tst-robustpi8 failure
Date: Thu, 18 May 2017 13:43:23 +0200 [thread overview]
Message-ID: <20170518114323.um3znbcoaxo7woo3@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <665ea364-3967-407d-4039-983ec95ad171@redhat.com>
On Thu, May 18, 2017 at 10:34:34AM +0200, Florian Weimer wrote:
> On 05/18/2017 10:31 AM, Peter Zijlstra wrote:
> > But it does that after building the tst-robustpi8 thing, so I seem to
> > have all I need here.
>
> Great, have fun figuring out what's going on. :-/
ld-linux-x86-64-2165 [018] .... 290.235869: sched_process_fork: comm=ld-linux-x86-64 pid=2165 child_comm=ld-linux-x86-64 child_pid=2166
ld-linux-x86-64-2166 [019] .... 290.436398: handle_futex_death: 00007f066634e870: 876 -> 40000000
ld-linux-x86-64-2166 [019] .... 290.436399: handle_futex_death: 00007f066634e0c8: 876 -> 40000000
ld-linux-x86-64-2166 [019] .... 290.436400: handle_futex_death: 00007f066634ee38: 80000876 -> c0000000
ld-linux-x86-64-2166 [019] .... 290.436401: sched_process_exit: comm=ld-linux-x86-64 pid=2166 prio=120
ld-linux-x86-64-2164 [019] ...1 290.436546: attach_to_pi_owner: 2: 00007f066634e078 = 80000876
ld-linux-x86-64-2183 [026] .... 827.987914: sched_process_fork: comm=ld-linux-x86-64 pid=2183 child_comm=ld-linux-x86-64 child_pid=2187
ld-linux-x86-64-2187 [029] .... 828.188218: handle_futex_death: 00007f76dd361690: 88b -> 40000000
ld-linux-x86-64-2187 [029] .... 828.188219: handle_futex_death: 00007f76dd361898: 8000088b -> c0000000
ld-linux-x86-64-2187 [029] .... 828.188220: handle_futex_death: 00007f76dd3615c8: 8000088b -> c0000000
ld-linux-x86-64-2187 [029] .... 828.188220: handle_futex_death: 00007f76dd3612d0: 8000088b -> c0000000
ld-linux-x86-64-2187 [029] .... 828.188220: handle_futex_death: 00007f76dd361af0: 8000088b -> c0000000
ld-linux-x86-64-2187 [029] .... 828.188221: handle_futex_death: 00007f76dd361168: 8000088b -> c0000000
ld-linux-x86-64-2187 [029] .... 828.188222: sched_process_exit: comm=ld-linux-x86-64 pid=2187 prio=120
ld-linux-x86-64-2182 [019] ...1 828.188373: attach_to_pi_owner: 2: 00007f76dd361000 = 8000088b
In both cases we fail in FUTEX_LOCK_PI trying to acquire a futex owned
by a dead task, resulting in the -ESRCH.
Now, pthread_mutex_lock() isn't expecting -ESRCH for robust futexes,
because for robust we'd expect handle_futex_death() to clear out the
futex value and set OWNER_DIED, as can be seen above.
The problem is however that the futex address we fail on, doesn't appear
to have been fixed up, so its either not on the robust list, or the
robust list got broken.
I'll see if I can narrow that down a little more.
next prev parent reply other threads:[~2017-05-18 11:43 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-17 17:36 Markus Trippelsdorf
2017-05-17 17:50 ` Florian Weimer
2017-05-18 6:46 ` Peter Zijlstra
2017-05-18 6:57 ` Peter Zijlstra
2017-05-18 7:40 ` Peter Zijlstra
2017-05-18 8:04 ` Markus Trippelsdorf
2017-05-18 8:14 ` Peter Zijlstra
2017-05-18 8:12 ` Florian Weimer
2017-05-18 8:31 ` Peter Zijlstra
2017-05-18 8:34 ` Florian Weimer
2017-05-18 8:41 ` Peter Zijlstra
2017-05-18 8:42 ` Florian Weimer
2017-05-18 11:43 ` Peter Zijlstra [this message]
2017-05-18 12:30 ` Peter Zijlstra
2017-05-19 15:48 ` Peter Zijlstra
2017-05-19 16:07 ` Peter Zijlstra
2017-05-19 17:35 ` Markus Trippelsdorf
2017-05-22 20:04 ` [tip:locking/urgent] futex,rt_mutex: Fix rt_mutex_cleanup_proxy_lock() tip-bot for Peter Zijlstra
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=20170518114323.um3znbcoaxo7woo3@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=fweimer@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=markus@trippelsdorf.de \
--cc=tglx@linutronix.de \
/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®