All of lore.kernel.org
 help / color / mirror / Atom feed
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>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Darren Hart <dvhart@infradead.org>
Subject: Re: commit cfafcd117 "futex: Rework futex_lock_pi() to use rt_mutex_*_proxy_lock()" causes glibc nptl/tst-robustpi8 failure
Date: Fri, 19 May 2017 18:07:13 +0200	[thread overview]
Message-ID: <20170519160713.3lzkqm44twkz36sd@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20170519154850.mlomgdsd26drq5j6@hirez.programming.kicks-ass.net>

On Fri, May 19, 2017 at 05:48:50PM +0200, Peter Zijlstra wrote:

> Markus reported that the glibc/nptl/tst-robustpi8 test was failing after
> commit:
> 
>   cfafcd117da0 ("futex: Rework futex_lock_pi() to use rt_mutex_*_proxy_lock()")
> 
> Much tracing later I managed to catch the culprit:
> 
>  ld-linux-x86-64-2161  [019] ....   410.760971: SyS_futex: 00007ffbeb76b028: 80000875  op=FUTEX_LOCK_PI
>  ld-linux-x86-64-2161  [019] ...1   410.760972: lock_pi_update_atomic: 00007ffbeb76b028: curval=80000875 uval=80000875 newval=80000875 ret=0
>  ld-linux-x86-64-2165  [011] ....   410.760978: SyS_futex: 00007ffbeb76b028: 80000875  op=FUTEX_UNLOCK_PI
>  ld-linux-x86-64-2165  [011] d..1   410.760979: do_futex: 00007ffbeb76b028: curval=80000875 uval=80000875 newval=80000871 ret=0
>  ld-linux-x86-64-2165  [011] ....   410.760980: SyS_futex: 00007ffbeb76b028: 80000871 ret=0000
>  ld-linux-x86-64-2161  [019] ....   410.760980: SyS_futex: 00007ffbeb76b028: 80000871 ret=ETIMEDOUT

The above trace continues like:

 ld-linux-x86-64-2164  [006] ....   410.762336: SyS_futex: 00007ffbeb76b028: 80000871  op=FUTEX_LOCK_PI
 ld-linux-x86-64-2164  [006] ...1   410.762337: lock_pi_update_atomic: 00007ffbeb76b028: curval=80000871 uval=80000871 newval=80000871 ret=0
 ld-linux-x86-64-2164  [006] ....   410.762347: SyS_futex: 00007ffbeb76b028: 80000871 ret=ETIMEDOUT
 ld-linux-x86-64-2161  [019] ....   410.762521: SyS_futex: 00007ffbeb76b028: 80000871  op=FUTEX_LOCK_PI
 ld-linux-x86-64-2161  [019] ....   410.762522: SyS_futex: 00007ffbeb76b028: 80000871 ret=EDEADLK

And every subsequent attempt by 2161 will (obviously) return EDEADLK.

Now since the test explicitly tracks the lock state[] and
pthread_mutex_*lock() return values this _should_ have triggered one of
the printf()'s, but I never saw any of those.

  reply	other threads:[~2017-05-19 16:07 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
2017-05-18 12:30           ` Peter Zijlstra
2017-05-19 15:48         ` Peter Zijlstra
2017-05-19 16:07           ` Peter Zijlstra [this message]
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=20170519160713.3lzkqm44twkz36sd@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=bigeasy@linutronix.de \
    --cc=dvhart@infradead.org \
    --cc=fweimer@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markus@trippelsdorf.de \
    --cc=tglx@linutronix.de \
    --subject='Re: commit cfafcd117 "futex: Rework futex_lock_pi() to use rt_mutex_*_proxy_lock()" causes glibc nptl/tst-robustpi8 failure' \
    /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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.