Bug#1023552: bumblebee: segfault in libGL.so.1

Nicolas VIVIEN nicolas at progweb.com
Sun Dec 18 12:53:01 GMT 2022


Hi,

I have updated my Linux Debian SID today. The issue isn't yet fixed.

$ optirun glxinfo | grep -E "OpenGL renderer|direct rendering"
$ glxinfo | grep -E "OpenGL renderer|direct rendering"
direct rendering: Yes
OpenGL renderer string: Mesa Intel(R) HD Graphics 4600 (HSW GT2)

déc. 18 13:44:40 Dahlia kernel: bbswitch: enabling discrete graphics
déc. 18 13:44:41 Dahlia kernel: nvidia-nvlink: Nvlink Core is being
initialized, major device number 241
déc. 18 13:44:41 Dahlia kernel: NVRM: loading NVIDIA UNIX x86_64 Kernel
Module  510.108.03  Thu Oct 20 05:10:45 UTC 2022
déc. 18 13:44:41 Dahlia kernel: nvidia-modeset: Loading NVIDIA Kernel
Mode Setting Driver for UNIX platforms  510.108.03  Thu Oct 20 05:00:22
UTC 2022
déc. 18 13:44:41 Dahlia kernel: [drm] [nvidia-drm] [GPU ID 0x00000100]
Loading driver
déc. 18 13:44:41 Dahlia kernel: [drm] Initialized nvidia-drm 0.0.0
20160202 for 0000:01:00.0 on minor 1
déc. 18 13:44:42 Dahlia kernel: glxinfo[14112]: segfault at 0 ip
00007f74afbc9d13 sp 00007ffdeab92500 error 4 in
libGL.so.1[7f74afbb7000+19000]
déc. 18 13:44:42 Dahlia kernel: Code: 48 89 d3 48 83 ec 28 64 48 8b 04
25 28 00 00 00 48 89 44 24 18 31 c0 e8 6b d9 fe ff 45 89 e0 48 89 d9 ba
14 80 00 00 48 89 c5 <48> 8b 30 48 8b 3d 4b b4 01 00 ff 15 65 b4 01 00
48 8b 6d 00 48 89
déc. 18 13:44:42 Dahlia kernel: [drm] [nvidia-drm] [GPU ID 0x00000100]
Unloading driver
déc. 18 13:44:42 Dahlia kernel: nvidia-modeset: Unloading
déc. 18 13:44:42 Dahlia kernel: nvidia-nvlink: Unregistered the Nvlink
Core, major device number 241
déc. 18 13:44:42 Dahlia kernel: bbswitch: disabling discrete graphics

Then:

$ apt-get install systemd-coredump
$ optirun glxgears -info

$ journalctl -e 
déc. 18 13:48:29 Dahlia kernel: glxgears[14561]: segfault at 0 ip
00007f0394f5ad13 sp 00007fff8c732a70 error 4 in
libGL.so.1[7f0394f48000+19000]
déc. 18 13:48:29 Dahlia kernel: Code: 48 89 d3 48 83 ec 28 64 48 8b 04
25 28 00 00 00 48 89 44 24 18 31 c0 e8 6b d9 fe ff 45 89 e0 48 89 d9 ba
14 80 00 00 48 89 c5 <48> 8b 3>
déc. 18 13:48:29 Dahlia systemd[1]: Started Process Core Dump (PID
14563/UID 0).
déc. 18 13:48:30 Dahlia systemd-coredump[14564]: [🡕] Process 14561
(glxgears) of user 1000 dumped core.

   Stack trace of thread 14561:
   #0  0x00007f0394f5ad13 glXCreateContext (libGL.so.1 + 0x25d13)
   #1  0x000055b6910297a1 n/a (glxgears.x86_64-linux-gnu + 0x37a1)
   #2  0x000055b691028591 n/a (glxgears.x86_64-linux-gnu + 0x2591)
   #3  0x00007f0394b5a18a __libc_start_call_main (libc.so.6 + 0x2718a)
   #4  0x00007f0394b5a245 __libc_start_main_impl (libc.so.6 + 0x27245)
   #5  0x000055b69102915a n/a (glxgears.x86_64-linux-gnu + 0x315a)
   
   Stack trace of thread 14562:
   #0  0x00007f0394bb8d36 __futex_abstimed_wait_common64 (libc.so.6 +
0x85d36)
   #1  0x00007f0394bbb3f8 __pthread_cond_wait_common (libc.so.6 +
0x883f8) 
   #2  0x00007f039210bff9 n/a (crocus_dri.so + 0x10bff9)
   #3  0x00007f03920be11b n/a (crocus_dri.so + 0xbe11b) 
   #4  0x00007f039210bf37 n/a (crocus_dri.so + 0x10bf37)
   #5  0x00007f0394bbbfd4 start_thread (libc.so.6 + 0x88fd4)
   #6  0x00007f0394c3c66c __clone3 (libc.so.6 + 0x10966c)
   ELF object binary architecture: AMD x86-64

déc. 18 13:48:30 Dahlia systemd[1]: systemd-coredump at 1-14563-0.service:
Deactivated successfully.
déc. 18 13:48:30 Dahlia kernel: [drm] [nvidia-drm] [GPU ID 0x00000100]
Unloading driver
déc. 18 13:48:30 Dahlia kernel: nvidia-modeset: Unloading


Le samedi 10 décembre 2022 à 16:47 +0100, Bernhard Übelacker a écrit :
> Dear Maintainer, hello Nicolas,
> tried to collect some more information from the two
> given kernel lines [1].
> 
> I could find given the byte sequence in a similar two-GPU-equipped
> laptop attaching to a runnig "optirun glxgears".
> 
> The "libGL.so.1" is the one from package primus-libs.
> There it leads to the function glXCreateContext, libglfork.cpp line
> 609.
> 
> Unfortunately I cannot reproduce the issue on my side
> with "i5-4210U/Intel HD Graphics 4400" and nvidia GF117M.
> 
> Looking through a few primus upstream bug reports I
> arrived at one stating that both GPU accelerations have to
> be in a working state.
> Nicolas, maybe because of the updates your system fell back
> to software rendering instead of the Intel graphics?
> What do following commands give at your system?
>    glxinfo | grep -E "OpenGL renderer|direct rendering"
>    optirun glxinfo | grep -E "OpenGL renderer|direct rendering"
> 
> Otherwise you could also install a package systemd-coredump.
> Then you should see a more complete backtrace in "journalctl -e"
> after the crash happened.
> 
> Kind regards,
> Bernhard
> 
> 
> [1]
>      [  191.398476] glxgears[3650]: segfault at 0 ip 00007f98c763cd13
> sp 00007fffab17b3f0 error 4 in libGL.so.1[7f98c762a000+19000]
>      [  191.398485] Code: 48 89 d3 48 83 ec 28 64 48 8b 04 25 28 00
> 00 00 48 89 44 24 18 31 c0 e8 6b d9 fe ff 45 89 e0 48 89 d9 ba 14 80
> 00 00 48 89 c5 <48> 8b 30 48 8b 3d 4b b4 01 00 ff 15 65 b4 01 00 48
> 8b 6d 00 48 89
> 
> 
> [2]
>      https://wiki.debian.org/InterpretingKernelOutputAtProcessCrash
> 
>      error 4:
>          0: no page found
>          0: read access
>          1: user-mode access
> 
>      $ gdb -q --pid $(pidof glxgears)
> 
>      (gdb) pipe info share | grep "libGL\."
>      0x00007f54f3232510  0x00007f54f324a0b7  Yes (*)    
> /usr/lib/x86_64-linux-gnu/primus/libGL.so.1
>      0x00007f54f2d1a100  0x00007f54f2d1cb79  Yes (*)    
> /usr/lib/x86_64-linux-gnu/libGL.so.1
> 
>      benutzer at asus-x555ld:~$ ls -lisah /usr/lib/x86_64-linux-
> gnu/primus/libGL.so.1
>      2491553 260K -rw-r--r-- 1 root root 259K  3. Apr 2022 
> /usr/lib/x86_64-linux-gnu/primus/libGL.so.1
>      benutzer at asus-x555ld:~$ dpkg -S /usr/lib/x86_64-linux-
> gnu/primus/libGL.so.1
>      primus-libs:amd64: /usr/lib/x86_64-linux-gnu/primus/libGL.so.1
> 
>      (gdb) find /b 0x00007f54f3232510,  0x00007f54f324a0b7, 0x48,
> 0x89, 0xd3, 0x48, 0x83, 0xec, 0x28, 0x64, 0x48, 0x8b, 0x04, 0x25,
> 0x28, 0x00, 0x00, 0x00, 0x48, 0x89, 0x44, 0x24, 0x18, 0x31, 0xc0,
> 0xe8, 0x6b, 0xd9, 0xfe, 0xff, 0x45, 0x89, 0xe0, 0x48, 0x89, 0xd9,
> 0xba, 0x14, 0x80, 0x00, 0x00, 0x48, 0x89, 0xc5, 0x48, 0x8b, 0x30,
> 0x48, 0x8b, 0x3d, 0x4b, 0xb4, 0x01, 0x00, 0xff, 0x15, 0x65, 0xb4,
> 0x01, 0x00, 0x48, 0x8b, 0x6d, 0x00, 0x48, 0x89
>      0x7f54f3244ce9 <glXCreateContext+9>
>      1 pattern found.
>      (gdb) find /b 0x00007f54f2d1a100,  0x00007f54f2d1cb79, 0x48,
> 0x89, 0xd3, 0x48, 0x83, 0xec, 0x28, 0x64, 0x48, 0x8b, 0x04, 0x25,
> 0x28, 0x00, 0x00, 0x00, 0x48, 0x89, 0x44, 0x24, 0x18, 0x31, 0xc0,
> 0xe8, 0x6b, 0xd9, 0xfe, 0xff, 0x45, 0x89, 0xe0, 0x48, 0x89, 0xd9,
> 0xba, 0x14, 0x80, 0x00, 0x00, 0x48, 0x89, 0xc5, 0x48, 0x8b, 0x30,
> 0x48, 0x8b, 0x3d, 0x4b, 0xb4, 0x01, 0x00, 0xff, 0x15, 0x65, 0xb4,
> 0x01, 0x00, 0x48, 0x8b, 0x6d, 0x00, 0x48, 0x89
>      Pattern not found.
> 
>      (gdb) b * (0x7f54f3244ce9 + 42)
>      Breakpoint 1 at 0x7f54f3244d13
>      (gdb) info b
>      Num     Type           Disp Enb Address            What
>      1       breakpoint     keep y   0x00007f54f3244d13
> <glXCreateContext+51>
> 
>      apt install primus-libs-dbgsym
>      primus-libs-dbgsym:amd64 (0~20150328-14) wird eingerichtet ...
> 
>      (gdb) noshare
>      (gdb) pipe sharedlibrary | grep 123
> 
>      (gdb) info b
>      Num     Type           Disp Enb Address            What
>      1       breakpoint     keep y   0x00007f54f3244d13 in
> glXCreateContext(Display*, XVisualInfo*, GLXContext, int) at
> ./libglfork.cpp:609
> 
>      (gdb) disassemble /r 0x7f54f3244ce9, 0x7f54f3244ce9 + 62
>      Dump of assembler code from 0x7f54f3244ce9 to 0x7f54f3244d27:
>         0x00007f54f3244ce9 <glXCreateContext(Display*, XVisualInfo*,
> GLXContext, int)+9>:    48 89 d3                        mov   
> %rdx,%rbx
>         0x00007f54f3244cec <glXCreateContext(Display*, XVisualInfo*,
> GLXContext, int)+12>:   48 83 ec 28                     sub   
> $0x28,%rsp
>         0x00007f54f3244cf0 <glXCreateContext(Display*, XVisualInfo*,
> GLXContext, int)+16>:   64 48 8b 04 25 28 00 00 00      mov   
> %fs:0x28,%rax
>         0x00007f54f3244cf9 <glXCreateContext(Display*, XVisualInfo*,
> GLXContext, int)+25>:   48 89 44 24 18                  mov   
> %rax,0x18(%rsp)
>         0x00007f54f3244cfe <glXCreateContext(Display*, XVisualInfo*,
> GLXContext, int)+30>:   31 c0                           xor   
> %eax,%eax
>         0x00007f54f3244d00 <glXCreateContext(Display*, XVisualInfo*,
> GLXContext, int)+32>:   e8 6b d9 fe ff                  call  
> 0x7f54f3232670 <match_fbconfig(Display*, XVisualInfo*)>
>         0x00007f54f3244d05 <glXCreateContext(Display*, XVisualInfo*,
> GLXContext, int)+37>:   45 89 e0                        mov   
> %r12d,%r8d
>         0x00007f54f3244d08 <glXCreateContext(Display*, XVisualInfo*,
> GLXContext, int)+40>:   48 89 d9                        mov   
> %rbx,%rcx
>         0x00007f54f3244d0b <glXCreateContext(Display*, XVisualInfo*,
> GLXContext, int)+43>:   ba 14 80 00 00                  mov   
> $0x8014,%edx
>         0x00007f54f3244d10 <glXCreateContext(Display*, XVisualInfo*,
> GLXContext, int)+48>:   48 89 c5                        mov   
> %rax,%rbp
>      >>>0x00007f54f3244d13 <glXCreateContext(Display*, XVisualInfo*,
> GLXContext, int)+51>:   48 8b 30                        mov   
> (%rax),%rsi
>         0x00007f54f3244d16 <glXCreateContext(Display*, XVisualInfo*,
> GLXContext, int)+54>:   48 8b 3d 4b b4 01 00            mov   
> 0x1b44b(%rip),%rdi        # 0x7f54f3260168 <_ZL6primus+40>
>         0x00007f54f3244d1d <glXCreateContext(Display*, XVisualInfo*,
> GLXContext, int)+61>:   ff 15 65 b4 01 00               call  
> *0x1b465(%rip)        # 0x7f54f3260188 <_ZL6primus+72>
>         0x00007f54f3244d23 <glXCreateContext(Display*, XVisualInfo*,
> GLXContext, int)+67>:   48 8b 6d 00                     mov   
> 0x0(%rbp),%rbp
>      End of assembler dump.
> 
>     
> https://sources.debian.org/src/primus/0~20150328-14/libglfork.cpp/#L609
> 
>      606 GLXContext glXCreateContext(Display *dpy, XVisualInfo *vis,
> GLXContext shareList, Bool direct)
>      607 {
>      608   GLXFBConfig *acfgs = match_fbconfig(dpy, vis);
>      609   GLXContext actx =
> primus.afns.glXCreateNewContext(primus.adpy, *acfgs, GLX_RGBA_TYPE,
> shareList, direct);
>      610   primus.contexts.record(actx, *acfgs, shareList);
>      611   return actx;
>      612 }
> 
> 
> [3]
>      https://github.com/amonakov/primus/issues
>      https://github.com/amonakov/primus/issues/118
> 



More information about the pkg-nvidia-devel mailing list