stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG 4.4.178] x86_64 compat mode futexes broken
@ 2019-06-06 21:11 Joe Korty
  2019-06-06 23:11 ` Nathan Chancellor
  0 siblings, 1 reply; 4+ messages in thread
From: Joe Korty @ 2019-06-06 21:11 UTC (permalink / raw)
  To: stable; +Cc: LKML, Alistair Strachan

Starting with 4.4.178, the LTP test

  pthread_cond_wait/2-3

when compiled on x86_64 with 'gcc -m32', started failing.  It generates this log output:

  [16:18:38]Implementation supports the MONOTONIC CLOCK but option is disabled in test.           
  [16:18:38]Test starting
  [16:18:38] Process-shared primitive will be tested
  [16:18:38] Alternative clock for cond will be tested
  [16:18:38]Test 2-3.c FAILED: The child did not own the mutex inside the cleanup handler

A git bisection between 4.4.177..178 shows that this commit is the culprit:

  Git-Commit: 79739ad2d0ac5787a15a1acf7caaf34cd95bbf3c
  Author: Alistair Strachan <astrachan@google.com>
  Subject: [PATCH] x86: vdso: Use $LD instead of $CC to link

And, indeed, when I back this patch out of 4.4.178 proper, the above test
passes again.

Please consider backing this patch out of linux-4.4.y, and from master, and from
any other linux branch it has been backported to.

PS: In backing it out of 4.4.178, I first backed out

   7c45b45fd6e928c9ce275c32f6fa98d317e6f5ee
   
This is a follow-on vdso patch which collides with the
patch we are interested in removing.  As it claims to be
only removing redundant code, it probably should never
have been backported in the first place.

Signed-off-by: Joe Korty <joe.korty@concurrent-rt.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [BUG 4.4.178] x86_64 compat mode futexes broken
  2019-06-06 21:11 [BUG 4.4.178] x86_64 compat mode futexes broken Joe Korty
@ 2019-06-06 23:11 ` Nathan Chancellor
  2019-06-07  1:01   ` Joe Korty
  0 siblings, 1 reply; 4+ messages in thread
From: Nathan Chancellor @ 2019-06-06 23:11 UTC (permalink / raw)
  To: Joe Korty
  Cc: stable, LKML, Alistair Strachan, Nick Desaulniers, clang-built-linux

On Thu, Jun 06, 2019 at 09:11:43PM +0000, Joe Korty wrote:
> Starting with 4.4.178, the LTP test
> 
>   pthread_cond_wait/2-3
> 
> when compiled on x86_64 with 'gcc -m32', started failing.  It generates this log output:
> 
>   [16:18:38]Implementation supports the MONOTONIC CLOCK but option is disabled in test.           
>   [16:18:38]Test starting
>   [16:18:38] Process-shared primitive will be tested
>   [16:18:38] Alternative clock for cond will be tested
>   [16:18:38]Test 2-3.c FAILED: The child did not own the mutex inside the cleanup handler
> 

What is the exact build command + test case command? I'd like to
reproduce this myself.

> A git bisection between 4.4.177..178 shows that this commit is the culprit:
> 
>   Git-Commit: 79739ad2d0ac5787a15a1acf7caaf34cd95bbf3c
>   Author: Alistair Strachan <astrachan@google.com>
>   Subject: [PATCH] x86: vdso: Use $LD instead of $CC to link
> 

Have you tested 4.4.180? There were two subsequent fixes to this patch
in 4.4:

485d15db01ca ("kbuild: simplify ld-option implementation")
07d35512e494 ("x86/vdso: Pass --eh-frame-hdr to the linker")

> And, indeed, when I back this patch out of 4.4.178 proper, the above test
> passes again.
> 
> Please consider backing this patch out of linux-4.4.y, and from master, and from
> any other linux branch it has been backported to.
> 

So this is broken in mainline too?

> PS: In backing it out of 4.4.178, I first backed out
> 
>    7c45b45fd6e928c9ce275c32f6fa98d317e6f5ee
>    
> This is a follow-on vdso patch which collides with the
> patch we are interested in removing.  As it claims to be
> only removing redundant code, it probably should never
> have been backported in the first place.

While it is redundant for ld.bfd, it causes a build failure with the
release version of ld.lld:

https://github.com/ClangBuiltLinux/linux/issues/31

Cheers,
Nathan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [BUG 4.4.178] x86_64 compat mode futexes broken
  2019-06-06 23:11 ` Nathan Chancellor
@ 2019-06-07  1:01   ` Joe Korty
  2019-06-07  2:10     ` Nathan Chancellor
  0 siblings, 1 reply; 4+ messages in thread
From: Joe Korty @ 2019-06-07  1:01 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: stable, LKML, Alistair Strachan, Nick Desaulniers, clang-built-linux

On Thu, Jun 06, 2019 at 04:11:30PM -0700, Nathan Chancellor wrote:
> On Thu, Jun 06, 2019 at 09:11:43PM +0000, Joe Korty wrote:
> > Starting with 4.4.178, the LTP test
> > 
> >   pthread_cond_wait/2-3
> > 
> > when compiled on x86_64 with 'gcc -m32', started failing.  It generates this log output:
> > 
> >   [16:18:38]Implementation supports the MONOTONIC CLOCK but option is disabled in test.           
> >   [16:18:38]Test starting
> >   [16:18:38] Process-shared primitive will be tested
> >   [16:18:38] Alternative clock for cond will be tested
> >   [16:18:38]Test 2-3.c FAILED: The child did not own the mutex inside the cleanup handler
> > 
> 
> What is the exact build command + test case command? I'd like to
> reproduce this myself.
> 
> > A git bisection between 4.4.177..178 shows that this commit is the culprit:
> > 
> >   Git-Commit: 79739ad2d0ac5787a15a1acf7caaf34cd95bbf3c
> >   Author: Alistair Strachan <astrachan@google.com>
> >   Subject: [PATCH] x86: vdso: Use $LD instead of $CC to link
> > 
> 
> Have you tested 4.4.180? There were two subsequent fixes to this patch
> in 4.4:

Hi Nathan,
I started with 4.4.179-rt181 and worked backwards from there.  Per your
suggestion, I tried 4.4.180 and it does work properly.

Thanks,
Joe




> 485d15db01ca ("kbuild: simplify ld-option implementation")
> 07d35512e494 ("x86/vdso: Pass --eh-frame-hdr to the linker")
> 
> > And, indeed, when I back this patch out of 4.4.178 proper, the above test
> > passes again.
> > 
> > Please consider backing this patch out of linux-4.4.y, and from master, and from
> > any other linux branch it has been backported to.
> > 
> 
> So this is broken in mainline too?
> 
> > PS: In backing it out of 4.4.178, I first backed out
> > 
> >    7c45b45fd6e928c9ce275c32f6fa98d317e6f5ee
> >    
> > This is a follow-on vdso patch which collides with the
> > patch we are interested in removing.  As it claims to be
> > only removing redundant code, it probably should never
> > have been backported in the first place.
> 
> While it is redundant for ld.bfd, it causes a build failure with the
> release version of ld.lld:
> 
> https://github.com/ClangBuiltLinux/linux/issues/31
> 
> Cheers,
> Nathan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [BUG 4.4.178] x86_64 compat mode futexes broken
  2019-06-07  1:01   ` Joe Korty
@ 2019-06-07  2:10     ` Nathan Chancellor
  0 siblings, 0 replies; 4+ messages in thread
From: Nathan Chancellor @ 2019-06-07  2:10 UTC (permalink / raw)
  To: Joe Korty
  Cc: stable, LKML, Alistair Strachan, Nick Desaulniers, clang-built-linux

On Fri, Jun 07, 2019 at 01:01:36AM +0000, Joe Korty wrote:
> Hi Nathan,
> I started with 4.4.179-rt181 and worked backwards from there.  Per your
> suggestion, I tried 4.4.180 and it does work properly.
> 
> Thanks,
> Joe

Great, thank you for testing and sorry for the breakage in the first
place, I missed those commits in my series :(

Cheers,
Nathan

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-06-07  2:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-06 21:11 [BUG 4.4.178] x86_64 compat mode futexes broken Joe Korty
2019-06-06 23:11 ` Nathan Chancellor
2019-06-07  1:01   ` Joe Korty
2019-06-07  2:10     ` Nathan Chancellor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).