Re: glibc 2.23 testsuite issues on hppa

2016-07-03 Thread John David Anglin
On 2016-07-02, at 11:34 AM, Aurelien Jarno wrote:

>> dave@mx3210:~/gnu/glibc/objdir/nptl$ ldd ./tst-cancel9
>>  libpthread.so.0 => /lib/hppa-linux-gnu/libpthread.so.0 (0xfd4d8000)
>>  libc.so.6 => /lib/hppa-linux-gnu/libc.so.6 (0xfd2df000)
>>  /lib/ld.so.1 (0x4100)
> 
> Do you think that the test is not run correctly and uses part of the
> glibc from the host system?

I just remembered that cancellation involves loading libgcc to do the unwind.  
It also
depends on libc.so.6:

dave@mx3210:~/gnu/gcc/objdir/hppa-linux-gnu/libgcc$ ldd libgcc_s.so.4
libc.so.6 => /lib/hppa-linux-gnu/libc.so.6 (0xfcedf000)
/lib/ld.so.1 (0x4100)

So, there's some possibility that the dynamic loader messes up when not using 
the
default LD_LIBRARY_PATH.

The unwind works okay for a few steps back.  It suggests the unwind is on wrong 
stack,
or child stack wasn't hooked correctly to unwind.

Dave
--
John David Anglin   dave.ang...@bell.net





Re: glibc 2.23 testsuite issues on hppa

2016-07-02 Thread John David Anglin
On 2016-07-02, at 11:34 AM, Aurelien Jarno wrote:

> Do you think that the test is not run correctly and uses part of the
> glibc from the host system? It would be interesting to build glibc 2.23,
> install it on the system and check if the tests still fail.

The test fails randomly with new libraries and system dynamic loader.  It seems 
to always
pass with system libraries and system dynamic loader.

The test in testsuite is run using new dynamic loader but  I wonder if starting 
threads uses the system
dynamic loader.  We have in program headers:

  INTERP 0xf4 0x000100f4 0x000100f4 0xd 0xd R   0x1
  [Requesting program interpreter: /lib/ld.so.1]

Will see if building 2.23 using 2.23 is successful.

Dave
--
John David Anglin   dave.ang...@bell.net





Re: glibc 2.23 testsuite issues on hppa

2016-07-02 Thread Aurelien Jarno
On 2016-07-02 10:24, John David Anglin wrote:
> On 2016-06-30, at 7:25 PM, Aurelien Jarno wrote:
> 
> >  FAIL: nptl/tst-cancel9
> >  FAIL: nptl/tst-cancelx9
> > 
> > These two errors need some investigation as the build log does not
> > provide a lot of details. They seem to be linked as they anyway use the
> > same source code with different compilation options.
> 
> These two fails are not new and I thought they had been added to XFAIL list.  
> They
> were listed as regressions in your mail "glibc 2.22 testsuite issues on hppa" 
> on March 8
> and were added to the 2.22 XFAIL list.

Correct, I remember that now. In practice we have never marked them as
XFAIL, and strangely they never fail on the build daemon since the glibc
2.22 is in unstable.

> They also occur with trunk.
> 
> Strangely, these two tests do not fail when run using installed libraries:
> dave@mx3210:~/gnu/glibc/objdir/nptl$ ./tst-cancel9
> cancel now
> waiting for the child
> in cleanup
> dave@mx3210:~/gnu/glibc/objdir/nptl$ ldd ./tst-cancel9
>   libpthread.so.0 => /lib/hppa-linux-gnu/libpthread.so.0 (0xfd4d8000)
>   libc.so.6 => /lib/hppa-linux-gnu/libc.so.6 (0xfd2df000)
>   /lib/ld.so.1 (0x4100)

Do you think that the test is not run correctly and uses part of the
glibc from the host system? It would be interesting to build glibc 2.23,
install it on the system and check if the tests still fail.

> The tests fail due to some kind of race which causes a segmentation fault in 
> the unwind code:

[...]

> I tend to think it's a kernel bug.

If you consider it's a kernel bug, we can mark them as XFAIL.

Aurelien

-- 
Aurelien Jarno  GPG: 4096R/1DDD8C9B
aurel...@aurel32.net http://www.aurel32.net



Re: glibc 2.23 testsuite issues on hppa

2016-07-02 Thread John David Anglin
On 2016-06-30, at 7:25 PM, Aurelien Jarno wrote:

>  FAIL: nptl/tst-cancel9
>  FAIL: nptl/tst-cancelx9
> 
> These two errors need some investigation as the build log does not
> provide a lot of details. They seem to be linked as they anyway use the
> same source code with different compilation options.

These two fails are not new and I thought they had been added to XFAIL list.  
They
were listed as regressions in your mail "glibc 2.22 testsuite issues on hppa" 
on March 8
and were added to the 2.22 XFAIL list.

They also occur with trunk.

Strangely, these two tests do not fail when run using installed libraries:
dave@mx3210:~/gnu/glibc/objdir/nptl$ ./tst-cancel9
cancel now
waiting for the child
in cleanup
dave@mx3210:~/gnu/glibc/objdir/nptl$ ldd ./tst-cancel9
libpthread.so.0 => /lib/hppa-linux-gnu/libpthread.so.0 (0xfd4d8000)
libc.so.6 => /lib/hppa-linux-gnu/libc.so.6 (0xfd2df000)
/lib/ld.so.1 (0x4100)

The tests fail due to some kind of race which causes a segmentation fault in 
the unwind code:

(gdb) r
Starting program: /home/dave/gnu/glibc/objdir/nptl/tst-cancel9 
warning: Unable to find libthread_db matching inferior's thread library, thread 
debugging will not be available.
[New process 17717]
warning: Unable to find libthread_db matching inferior's thread library, thread 
debugging will not be available.
[New LWP 17718]
cancel now
waiting for the child

Thread 3.2 "tst-cancel9" received signal SIGSEGV, Segmentation fault.
[Switching to LWP 17718]
0xfa59afd4 in _Unwind_GetGR (index=2, context=0xfacd3708)
at ../../../src/libgcc/unwind-dw2.c:239
239 ../../../src/libgcc/unwind-dw2.c: No such file or directory.
(gdb) Timed out: killed the child process
bt
#0  0xfa59afd4 in _Unwind_GetGR (
index=, 
context=0xfacd3708) at ../../../src/libgcc/unwind-dw2.c:239
#1  _Unwind_GetPtr (
index=, 
context=0xfacd3708) at ../../../src/libgcc/unwind-dw2.c:251
#2  uw_update_context (context=0xfacd3708, 
context@entry=, fs=fs@entry=0xfacd3bc8) at ../../../src/libgcc/unwind-dw2.c:1518
#3  0xfa59b294 in uw_advance_context (fs=0xfacd3bc8, 
context=) at ../../../src/libgcc/unwind-dw2.c:1525
#4  _Unwind_ForcedUnwind_Phase2 (
exc=, 
context=) at ../../../src/libgcc/unwind.inc:185
Backtrace stopped: Cannot access memory at address 0xfacd3bac

I tend to think it's a kernel bug.

Dave
--
John David Anglin   dave.ang...@bell.net