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

Nicolas VIVIEN nicolas at progweb.com
Sun Dec 18 16:34:47 GMT 2022


Finally, after install packages:

$ apt-get install primus-libs:i386 nvidia-driver-libs
[...]
Les paquets supplémentaires suivants seront installés : 
  gcc-12-base:i386 libatomic1:i386 libbsd0:i386 libc6:i386
libcuda1:i386 libdrm-amdgpu1:i386 libdrm-intel1:i386 libdrm-
nouveau2:i386 libdrm-radeon1:i386 libdrm2:i386
  libedit2:i386 libegl-mesa0:i386 libegl-nvidia0 libegl-nvidia0:i386
libegl1:i386 libelf1:i386 libexpat1:i386 libffi8:i386 libgbm1:i386
libgcc-s1:i386 libgl1:i386
  libgl1-mesa-dri:i386 libgl1-nvidia-glvnd-glx libgl1-nvidia-glvnd-
glx:i386 libglapi-mesa:i386 libgles-nvidia1 libgles-nvidia1:i386
libgles-nvidia2 libgles-nvidia2:i386
  libgles1:i386 libgles2:i386 libglvnd0:i386 libglx-mesa0:i386 libglx-
nvidia0 libglx-nvidia0:i386 libglx0:i386 libicu72:i386 libidn2-0:i386
libllvm15:i386 liblzma5:i386
  libmd0:i386 libnvcuvid1:i386 libnvidia-allocator1 libnvidia-
allocator1:i386 libnvidia-egl-gbm1:i386 libnvidia-eglcore libnvidia-
eglcore:i386 libnvidia-encode1:i386
  libnvidia-glcore libnvidia-glcore:i386 libnvidia-ptxjitcompiler1:i386
libopengl0:i386 libpciaccess0:i386 libsensors5:i386 libstdc++6:i386
libtinfo6:i386
  libunistring2:i386 libwayland-client0:i386 libwayland-server0:i386
libx11-6:i386 libx11-xcb1:i386 libxau6:i386 libxcb-dri2-0:i386 libxcb-
dri3-0:i386 libxcb-glx0:i386
  libxcb-present0:i386 libxcb-randr0:i386 libxcb-shm0:i386 libxcb-
sync1:i386 libxcb-xfixes0:i386 libxcb1:i386 libxdmcp6:i386
libxext6:i386 libxfixes3:i386 libxml2:i386
  libxshmfence1:i386 libxxf86vm1:i386 libz3-4:i386 libzstd1:i386
nvidia-driver nvidia-driver-bin nvidia-driver-libs:i386 nvidia-egl-icd
nvidia-egl-icd:i386
  nvidia-kernel-dkms nvidia-kernel-support xserver-xorg-video-nvidia
zlib1g:i386
Paquets suggérés :
  glibc-doc:i386 locales:i386 libnss-nis:i386 libnss-nisplus:i386 lm-
sensors:i386
Paquets recommandés :
  nvidia-vulkan-icd nvidia-vulkan-icd:i386
Les paquets suivants seront ENLEVÉS :
  libegl-nvidia-tesla0 libgl1-nvidia-tesla-glvnd-glx libgles-nvidia-
tesla1 libgles-nvidia-tesla2 libglx-nvidia-tesla0 libnvidia-tesla-
eglcore libnvidia-tesla-glcore
  nvidia-tesla-driver nvidia-tesla-driver-bin nvidia-tesla-driver-libs
nvidia-tesla-egl-icd xserver-xorg-video-nvidia-tesla
Les NOUVEAUX paquets suivants seront installés :
  gcc-12-base:i386 libatomic1:i386 libbsd0:i386 libc6:i386
libcuda1:i386 libdrm-amdgpu1:i386 libdrm-intel1:i386 libdrm-
nouveau2:i386 libdrm-radeon1:i386 libdrm2:i386
  libedit2:i386 libegl-mesa0:i386 libegl-nvidia0 libegl-nvidia0:i386
libegl1:i386 libelf1:i386 libexpat1:i386 libffi8:i386 libgbm1:i386
libgcc-s1:i386 libgl1:i386
  libgl1-mesa-dri:i386 libgl1-nvidia-glvnd-glx libgl1-nvidia-glvnd-
glx:i386 libglapi-mesa:i386 libgles-nvidia1 libgles-nvidia1:i386
libgles-nvidia2 libgles-nvidia2:i386
  libgles1:i386 libgles2:i386 libglvnd0:i386 libglx-mesa0:i386 libglx-
nvidia0 libglx-nvidia0:i386 libglx0:i386 libicu72:i386 libidn2-0:i386
libllvm15:i386 liblzma5:i386
  libmd0:i386 libnvcuvid1:i386 libnvidia-allocator1 libnvidia-
allocator1:i386 libnvidia-egl-gbm1:i386 libnvidia-eglcore libnvidia-
eglcore:i386 libnvidia-encode1:i386
  libnvidia-glcore libnvidia-glcore:i386 libnvidia-ptxjitcompiler1:i386
libopengl0:i386 libpciaccess0:i386 libsensors5:i386 libstdc++6:i386
libtinfo6:i386
  libunistring2:i386 libwayland-client0:i386 libwayland-server0:i386
libx11-6:i386 libx11-xcb1:i386 libxau6:i386 libxcb-dri2-0:i386 libxcb-
dri3-0:i386 libxcb-glx0:i386
  libxcb-present0:i386 libxcb-randr0:i386 libxcb-shm0:i386 libxcb-
sync1:i386 libxcb-xfixes0:i386 libxcb1:i386 libxdmcp6:i386
libxext6:i386 libxfixes3:i386 libxml2:i386
  libxshmfence1:i386 libxxf86vm1:i386 libz3-4:i386 libzstd1:i386
nvidia-driver nvidia-driver-bin nvidia-driver-libs nvidia-driver-
libs:i386 nvidia-egl-icd
  nvidia-egl-icd:i386 nvidia-kernel-dkms nvidia-kernel-support xserver-
xorg-video-nvidia zlib1g:i386
0 mis à jour, 89 nouvellement installés, 12 à enlever et 0 non mis à
jour.
[...]

it's working as expected.

$ inxi -G
Graphics:
  Device-1: Intel 4th Gen Core Processor Integrated Graphics driver:
i915
    v: kernel
  Device-2: NVIDIA GM107M [GeForce GTX 850M] driver: N/A
  Device-3: IMC Networks USB2.0 UVC HD Webcam type: USB driver:
uvcvideo
  Display: x11 server: X.Org v: 1.21.1.5 with: Xwayland v: 22.1.6
driver: X:
    loaded: nvidia dri: crocus gpu: i915 resolution: 1920x1080~60Hz
  API: OpenGL v: 4.6 Mesa 22.3.1 renderer: Mesa Intel HD Graphics 4600
(HSW GT2)

$ optirun inxi -G
Graphics:
  Device-1: Intel 4th Gen Core Processor Integrated Graphics driver:
i915
    v: kernel
  Device-2: NVIDIA GM107M [GeForce GTX 850M] driver: nvidia v:
510.108.03
  Device-3: IMC Networks USB2.0 UVC HD Webcam type: USB driver:
uvcvideo
  Display: x11 server: X.Org v: 1.21.1.5 with: Xwayland v: 22.1.6
driver: X:
    loaded: nvidia gpu: i915 resolution: 1920x1080~60Hz
  API: OpenGL v: 4.6.0 NVIDIA 510.108.03 renderer: NVIDIA GeForce GTX
    850M/PCIe/SSE2



xserver-xorg-video-nvidia-tesla seems to be replaced by xserver-xorg-
video-nvidia.


Thank's for your help.


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