<div dir="auto"><div><br><div class="gmail_extra"><br><div class="gmail_quote">Le 17 déc. 2017 05:18, "Andreas Beckmann" <<a href="mailto:anbe@debian.org">anbe@debian.org</a>> a écrit :<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Aurelien,<br>
<br>
I can reproduce the problem in glxgears using nvidia driver 375.82-9~bpo9+1 and libc6 2.24-11+deb9u1 in a mostly stretch system:<br>
<br>
I ran glxgears in gdb and it died here:<br>
<br>
(gdb) bt<br>
#0  0x00007ffff6a15360 in __GI__IO_link_in (fp=fp@entry=0x5555557b2510) at genops.c:102<br>
#1  0x00007ffff6a13fa2 in _IO_new_file_init_internal (fp=fp@entry=0x5555557b2510) at fileops.c:151<br>
#2  0x00007ffff6a08573 in __fopen_internal (filename=0x5555557b2450 "/home/beckmann/.Xauthority", mode=0x7ffff3e04cb7 "rb", is32=1) at iofopen.c:82<br>
#3  0x00007ffff3e04477 in XauGetBestAuthByAddr () from /usr/lib/x86_64-linux-gnu/<wbr>libXau.so.6<br>
#4  0x00007ffff4017070 in ?? () from /usr/lib/x86_64-linux-gnu/<wbr>libxcb.so.1<br>
#5  0x00007ffff40171ed in ?? () from /usr/lib/x86_64-linux-gnu/<wbr>libxcb.so.1<br>
#6  0x00007ffff4016d1b in xcb_connect_to_display_with_<wbr>auth_info () from /usr/lib/x86_64-linux-gnu/<wbr>libxcb.so.1<br>
#7  0x00007ffff6f93e8a in _XConnectXCB () from /usr/lib/x86_64-linux-gnu/<wbr>libX11.so.6<br>
#8  0x00007ffff6f84bc2 in XOpenDisplay () from /usr/lib/x86_64-linux-gnu/<wbr>libX11.so.6<br>
#9  0x00005555555563f4 in main (argc=<optimized out>, argv=<optimized out>) at glxgears.c:762<br>
<br>
   0x00007ffff6a15360 <+512>:   callq  *%rax<br>
(gdb) print /x $rax<br>
$8 = 0xb08ebdf3733b6f74<br>
<br>
(gdb) info shared<br>
From                To                  Syms Read   Shared Object Library<br>
0x00007ffff7dd9aa0  0x00007ffff7df5340  Yes         /lib64/ld-linux-x86-64.so.2<br>
0x00007ffff7b8dcc0  0x00007ffff7bb6100  Yes (*)     /usr/lib/x86_64-linux-gnu/<wbr>libGLEW.so.2.0<br>
0x00007ffff78d96d0  0x00007ffff792bb13  Yes (*)     /usr/lib/x86_64-linux-gnu/<wbr>libGLU.so.1<br>
0x00007ffff75e8f00  0x00007ffff765e291  Yes (*)     /usr/lib/x86_64-linux-gnu/<wbr>libGL.so.1<br>
0x00007ffff7297680  0x00007ffff73038da  Yes         /lib/x86_64-linux-gnu/libm.so.<wbr>6<br>
0x00007ffff6f6fda0  0x00007ffff6ff7434  Yes (*)     /usr/lib/x86_64-linux-gnu/<wbr>libX11.so.6<br>
0x00007ffff6d43700  0x00007ffff6d4d49f  Yes (*)     /usr/lib/x86_64-linux-gnu/<wbr>libXext.so.6<br>
0x00007ffff69c0910  0x00007ffff6aea403  Yes         /lib/x86_64-linux-gnu/libc.so.<wbr>6<br>
0x00007ffff66ae090  0x00007ffff6756b69  Yes         /usr/lib/x86_64-linux-gnu/<wbr>libstdc++.so.6<br>
0x00007ffff640dac0  0x00007ffff641dde5  Yes         /lib/x86_64-linux-gnu/libgcc_<wbr>s.so.1<br>
0x00007ffff6208810  0x00007ffff620a5a3  Yes (*)     /usr/lib/x86_64-linux-gnu/<wbr>libnvidia-tls.so.375.82<br>
0x00007ffff4734600  0x00007ffff5817c77  Yes (*)     /usr/lib/x86_64-linux-gnu/<wbr>libnvidia-glcore.so.375.82<br>
0x00007ffff422fd80  0x00007ffff423094e  Yes         /lib/x86_64-linux-gnu/libdl.<wbr>so.2<br>
0x00007ffff4012b40  0x00007ffff40249f5  Yes (*)     /usr/lib/x86_64-linux-gnu/<wbr>libxcb.so.1<br>
0x00007ffff3e04010  0x00007ffff3e04c8c  Yes (*)     /usr/lib/x86_64-linux-gnu/<wbr>libXau.so.6<br>
0x00007ffff3bfe340  0x00007ffff3bffc48  Yes (*)     /usr/lib/x86_64-linux-gnu/<wbr>libXdmcp.so.6<br>
0x00007ffff39ea3d0  0x00007ffff39f75df  Yes (*)     /lib/x86_64-linux-gnu/libbsd.<wbr>so.0<br>
0x00007ffff37e10e0  0x00007ffff37e3ecf  Yes         /lib/x86_64-linux-gnu/librt.<wbr>so.1<br>
0x00007ffff35c7ab0  0x00007ffff35d4811  Yes         /lib/x86_64-linux-gnu/<wbr>libpthread.so.0<br>
<br>
Since I wanted to know where that invalid pointer came from, I stopped a few instructions earlier:<br>
<br>
(gdb) break *__GI__IO_link_in+480<br>
Breakpoint 3 at 0x7ffff6a15340: file genops.c, line 102.<br>
<br>
(gdb) disassemble<br>
Dump of assembler code for function __GI__IO_link_in:<br>
   0x00007ffff6a15160 <+0>:     mov    (%rdi),%eax<br>
...<br>
=> 0x00007ffff6a15340 <+480>:   mov    0x32a3a9(%rip),%rax        # 0x7ffff6d3f6f0 <__libc_pthread_functions+368><br>
   0x00007ffff6a15347 <+487>:   mov    %rsp,%rdi<br>
   0x00007ffff6a1534a <+490>:   xor    %edx,%edx<br>
   0x00007ffff6a1534c <+492>:   ror    $0x11,%rax<br>
   0x00007ffff6a15350 <+496>:   xor    %fs:0x30,%rax<br>
   0x00007ffff6a15359 <+505>:   lea    -0x580(%rip),%rsi        # 0x7ffff6a14de0 <flush_cleanup><br>
   0x00007ffff6a15360 <+512>:   callq  *%rax<br>
...<br>
<br>
(gdb) print /x $rax<br>
$1 = 0xfbad248c<br>
(gdb) stepi<br>
0x00007ffff6a15347      102     in genops.c<br>
(gdb) print /x $rax<br>
$2 = 0xd14c4c80fe79611d<br>
(gdb) print &__libc_pthread_functions.ptr_<wbr>_pthread_cleanup_push_defer<br>
$3 = (void (**)(struct _pthread_cleanup_buffer *, void (*)(void *), void *)) 0x7ffff6d3f6f0 <__libc_pthread_functions+368><br>
(gdb) print __libc_pthread_functions.ptr__<wbr>pthread_cleanup_push_defer<br>
$4 = (void (*)(struct _pthread_cleanup_buffer *, void (*)(void *), void *)) 0xd14c4c80fe79611d<br>
(gdb) stepi<br>
0x00007ffff6a1534a      102     in genops.c<br>
(gdb) stepi<br>
0x00007ffff6a1534c      102     in genops.c<br>
(gdb) print /x $rax<br>
$5 = 0xd14c4c80fe79611d<br>
(gdb) stepi<br>
0x00007ffff6a15350      102     in genops.c<br>
(gdb) print /x $rax<br>
$6 = 0xb08ee8a626407f3c<br>
(gdb) stepi<br>
0x00007ffff6a15359      102     in genops.c<br>
(gdb) print /x $rax<br>
$7 = 0xb08ebdf3733b6f74<br>
(gdb) stepi<br>
0x00007ffff6a15360      102     in genops.c<br>
(gdb) print /x $rax<br>
$8 = 0xb08ebdf3733b6f74<br>
(gdb) stepi<br>
<br>
Program received signal SIGSEGV, Segmentation fault.<br>
0x00007ffff6a15360 in __GI__IO_link_in (fp=fp@entry=0x5555557b2510) at genops.c:102<br>
102     in genops.c<br>
<br>
(gdb) print &_pthread_cleanup_push_defer<br>
$9 = (void (*)(struct _pthread_cleanup_buffer *, void (*)(void *), void *)) 0x7ffff35d1ac0 <_pthread_cleanup_push_defer><br>
<br>
<br>
And now let's retry that without /etc/ld.so.nohwcap<br>
<br>
(gdb) break *__GI__IO_link_in+480<br>
Breakpoint 2 at 0x7ffff6a15340: file genops.c, line 102.<br>
(gdb) cont<br>
Continuing.<br>
<br>
Breakpoint 2, __GI__IO_link_in (fp=fp@entry=0x5555557b2510) at genops.c:102<br>
102     genops.c: No such file or directory.<br>
(gdb) disassemble<br>
Dump of assembler code for function __GI__IO_link_in:<br>
   0x00007ffff6a15160 <+0>:     mov    (%rdi),%eax<br>
...<br>
=> 0x00007ffff6a15340 <+480>:   mov    0x32a3a9(%rip),%rax        # 0x7ffff6d3f6f0 <__libc_pthread_functions+368><br>
   0x00007ffff6a15347 <+487>:   mov    %rsp,%rdi<br>
   0x00007ffff6a1534a <+490>:   xor    %edx,%edx<br>
   0x00007ffff6a1534c <+492>:   ror    $0x11,%rax<br>
   0x00007ffff6a15350 <+496>:   xor    %fs:0x30,%rax<br>
   0x00007ffff6a15359 <+505>:   lea    -0x580(%rip),%rsi        # 0x7ffff6a14de0 <flush_cleanup><br>
   0x00007ffff6a15360 <+512>:   callq  *%rax<br>
...<br>
(gdb) print /x $rax<br>
$1 = 0xfbad248c<br>
(gdb) print &__libc_pthread_functions.ptr_<wbr>_pthread_cleanup_push_defer<br>
$2 = (void (**)(struct _pthread_cleanup_buffer *, void (*)(void *), void *)) 0x7ffff6d3f6f0 <__libc_pthread_functions+368><br>
(gdb) print __libc_pthread_functions.ptr__<wbr>pthread_cleanup_push_defer<br>
$3 = (void (*)(struct _pthread_cleanup_buffer *, void (*)(void *), void *)) 0x1bb877ddeda50cb<br>
(gdb) print &_pthread_cleanup_push_defer<br>
$4 = (void (*)(struct _pthread_cleanup_buffer *, void (*)(void *), void *)) 0x7ffff35d0ac0 <_pthread_cleanup_push_defer><br>
(gdb) stepi<br>
0x00007ffff6a15347      102     in genops.c<br>
(gdb) print /x $rax<br>
$5 = 0x1bb877ddeda50cb<br>
(gdb) stepi<br>
0x00007ffff6a1534a      102     in genops.c<br>
(gdb) stepi<br>
0x00007ffff6a1534c      102     in genops.c<br>
(gdb) print /x $rax<br>
$6 = 0x1bb877ddeda50cb<br>
(gdb) stepi<br>
0x00007ffff6a15350      102     in genops.c<br>
(gdb) print /x $rax<br>
$7 = 0x286580ddc3beef6d<br>
(gdb) stepi<br>
0x00007ffff6a15359      102     in genops.c<br>
(gdb) print /x $rax<br>
$8 = 0x7ffff35d0ac0<br>
(gdb) stepi<br>
0x00007ffff6a15360      102     in genops.c<br>
(gdb) stepi<br>
_pthread_cleanup_push_defer (buffer=0x7fffffffd720, routine=0x7ffff6a14de0 <flush_cleanup>, arg=0x0) at cleanup_defer_compat.c:28<br>
28      cleanup_defer_compat.c: No such file or directory.<br>
(gdb) bt<br>
#0  _pthread_cleanup_push_defer (buffer=0x7fffffffd720, routine=0x7ffff6a14de0 <flush_cleanup>, arg=0x0) at cleanup_defer_compat.c:28<br>
#1  0x00007ffff6a15362 in __GI__IO_link_in (fp=fp@entry=0x5555557b2510) at genops.c:102<br>
#2  0x00007ffff6a13fa2 in _IO_new_file_init_internal (fp=fp@entry=0x5555557b2510) at fileops.c:151<br>
#3  0x00007ffff6a08573 in __fopen_internal (filename=0x5555557b2450 "/home/beckmann/.Xauthority", mode=0x7ffff3e03cb7 "rb", is32=1) at iofopen.c:82<br>
#4  0x00007ffff3e03477 in XauGetBestAuthByAddr () from /usr/lib/x86_64-linux-gnu/<wbr>libXau.so.6<br>
#5  0x00007ffff4016070 in ?? () from /usr/lib/x86_64-linux-gnu/<wbr>libxcb.so.1<br>
#6  0x00007ffff40161ed in ?? () from /usr/lib/x86_64-linux-gnu/<wbr>libxcb.so.1<br>
#7  0x00007ffff4015d1b in xcb_connect_to_display_with_<wbr>auth_info () from /usr/lib/x86_64-linux-gnu/<wbr>libxcb.so.1<br>
#8  0x00007ffff6f93e8a in _XConnectXCB () from /usr/lib/x86_64-linux-gnu/<wbr>libX11.so.6<br>
#9  0x00007ffff6f84bc2 in XOpenDisplay () from /usr/lib/x86_64-linux-gnu/<wbr>libX11.so.6<br>
#10 0x00005555555563f4 in main (argc=<optimized out>, argv=<optimized out>) at glxgears.c:762<br>
(gdb) info shared<br>
From                To                  Syms Read   Shared Object Library<br>
0x00007ffff7dd9aa0  0x00007ffff7df5340  Yes         /lib64/ld-linux-x86-64.so.2<br>
0x00007ffff7b8dcc0  0x00007ffff7bb6100  Yes (*)     /usr/lib/x86_64-linux-gnu/<wbr>libGLEW.so.2.0<br>
0x00007ffff78d96d0  0x00007ffff792bb13  Yes (*)     /usr/lib/x86_64-linux-gnu/<wbr>libGLU.so.1<br>
0x00007ffff75e8f00  0x00007ffff765e291  Yes (*)     /usr/lib/x86_64-linux-gnu/<wbr>libGL.so.1<br>
0x00007ffff7297680  0x00007ffff73038da  Yes         /lib/x86_64-linux-gnu/libm.so.<wbr>6<br>
0x00007ffff6f6fda0  0x00007ffff6ff7434  Yes (*)     /usr/lib/x86_64-linux-gnu/<wbr>libX11.so.6<br>
0x00007ffff6d43700  0x00007ffff6d4d49f  Yes (*)     /usr/lib/x86_64-linux-gnu/<wbr>libXext.so.6<br>
0x00007ffff69c0910  0x00007ffff6aea403  Yes         /lib/x86_64-linux-gnu/libc.so.<wbr>6<br>
0x00007ffff66ae090  0x00007ffff6756b69  Yes         /usr/lib/x86_64-linux-gnu/<wbr>libstdc++.so.6<br>
0x00007ffff640dac0  0x00007ffff641dde5  Yes         /lib/x86_64-linux-gnu/libgcc_<wbr>s.so.1<br>
0x00007ffff62079a0  0x00007ffff6209683  Yes (*)     /usr/lib/x86_64-linux-gnu/tls/<wbr>libnvidia-tls.so.375.82<br>
0x00007ffff4733600  0x00007ffff5816c77  Yes (*)     /usr/lib/x86_64-linux-gnu/<wbr>libnvidia-glcore.so.375.82<br>
0x00007ffff422ed80  0x00007ffff422f94e  Yes         /lib/x86_64-linux-gnu/libdl.<wbr>so.2<br>
0x00007ffff4011b40  0x00007ffff40239f5  Yes (*)     /usr/lib/x86_64-linux-gnu/<wbr>libxcb.so.1<br>
0x00007ffff3e03010  0x00007ffff3e03c8c  Yes (*)     /usr/lib/x86_64-linux-gnu/<wbr>libXau.so.6<br>
0x00007ffff3bfd340  0x00007ffff3bfec48  Yes (*)     /usr/lib/x86_64-linux-gnu/<wbr>libXdmcp.so.6<br>
0x00007ffff39e93d0  0x00007ffff39f65df  Yes (*)     /lib/x86_64-linux-gnu/libbsd.<wbr>so.0<br>
0x00007ffff37e00e0  0x00007ffff37e2ecf  Yes         /lib/x86_64-linux-gnu/librt.<wbr>so.1<br>
0x00007ffff35c6ab0  0x00007ffff35d3811  Yes         /lib/x86_64-linux-gnu/<wbr>libpthread.so.0<br>
<br>
So this looks like __libc_pthread_functions is not set up correctly if /etc/ld.so.nohwcap exists<br>
(and several other conditions are fulfilled, as is done with using the nvidia driver)<br>
<font color="#888888"></font></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">The same actually applies for string functions in stdlib.</div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><font color="#888888"><br>
<br>
Andreas<br>
</font></blockquote></div><br></div></div></div>