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

Bernhard Übelacker bernhardu at mailbox.org
Sat Dec 10 15:47:00 GMT 2022


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