Bug#963824: libgl1-mesa-dri: Segfault in iris_dri.so breaks several programs

2020-06-27 Thread Markus Grunwald

Package: libgl1-mesa-dri
Version: 20.1.2-1
Severity: important

Dear Maintainer,

A segfault in iris_dri.so breaks at least these programs (they 
crash

immediately after starting them):

- Blender
- mpv
- openscad

Jun 27 23:08:27 bob kernel: openscad[12554]: segfault at 24 ip 
151fddab0ecb sp 7ffdc05f9a50 error 6 in 
iris_dri.so[151fdcfc7000+e13000]
Jun 27 23:08:27 bob kernel: Code: ff ef ff 00 00 0f 87 dc 17 00 00 
48 01 f0 48 89 42 30 48 85 f6 0f 84 2d 02 00 00 41 83 ef 01 48 8d 
56 04 41 81 cf 00 00 09 78 <44> 89 3e 45 85 ed 74 72 41 8d 45 ff 
48 8d 74 c6 0c 0f 1f 40 00>
Jun 27 23:08:42 bob kernel: mpv/vo[12616]: segfault at a0 ip 
154398fb6558 sp 15439a223b90 error 4 in 
iris_dri.so[1543984cd000+e13000]
Jun 27 23:08:42 bob kernel: Code: 44 24 18 48 c7 44 24 10 00 00 00 
00 48 c7 44 24 18 00 00 00 00 50 4c 8d 4c 24 18 e8 d2 7a ad ff 48 
8b 44 24 18 31 d2 48 89 ef <4c> 8b b0 a0 00 00 00 4c 89 f6 e8 b9 
91 fd ff 48 8b bd 28 01 00>
Jun 27 23:08:53 bob kernel: blender[12672]: segfault at 24 ip 
1509a303eecb sp 7ffc88667b10 error 6
Jun 27 23:08:53 bob kernel: Code: ff ef ff 00 00 0f 87 dc 17 00 00 
48 01 f0 48 89 42 30 48 85 f6 0f 84 2d 02 00 00 41 83 ef 01 48 8d 
56 04 41 81 cf 00 00 09 78 <44> 89 3e 45 85 ed 74 72 41 8d 45 ff 
48 8d 74 c6 0c 0f 1f 40 0


Please tell me if I can be of any help. I need blender and 
openscad

urgently...

Thanks,
Markus

-- Package-specific info:
glxinfo:

name of display: :0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
   GLX_ARB_create_context, GLX_ARB_create_context_no_error,
   GLX_ARB_create_context_profile, 
   GLX_ARB_create_context_robustness,
   GLX_ARB_fbconfig_float, GLX_ARB_framebuffer_sRGB, 
   GLX_ARB_multisample,
   GLX_EXT_create_context_es2_profile, 
   GLX_EXT_create_context_es_profile,

   GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB,
   GLX_EXT_import_context, GLX_EXT_libglvnd, 
   GLX_EXT_no_config_context,
   GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, 
   GLX_EXT_visual_rating,
   GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer, 
   GLX_OML_swap_method,

   GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
   GLX_SGIX_visual_select_group, GLX_SGI_make_current_read,
   GLX_SGI_swap_control
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
   GLX_ARB_context_flush_control, GLX_ARB_create_context,
   GLX_ARB_create_context_no_error, 
   GLX_ARB_create_context_profile,

   GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float,
   GLX_ARB_framebuffer_sRGB, GLX_ARB_get_proc_address, 
   GLX_ARB_multisample,

   GLX_EXT_buffer_age, GLX_EXT_create_context_es2_profile,
   GLX_EXT_create_context_es_profile, 
   GLX_EXT_fbconfig_packed_float,

   GLX_EXT_framebuffer_sRGB, GLX_EXT_import_context,
   GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, 
   GLX_EXT_visual_rating,

   GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer,
   GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,
   GLX_MESA_swap_control, GLX_OML_swap_method, 
   GLX_OML_sync_control,

   GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
   GLX_SGIX_visual_select_group, GLX_SGI_make_current_read,
   GLX_SGI_swap_control, GLX_SGI_video_sync
GLX version: 1.4
GLX extensions:
   GLX_ARB_create_context, GLX_ARB_create_context_no_error,
   GLX_ARB_create_context_profile, 
   GLX_ARB_create_context_robustness,

   GLX_ARB_fbconfig_float, GLX_ARB_framebuffer_sRGB,
   GLX_ARB_get_proc_address, GLX_ARB_multisample,
   GLX_EXT_create_context_es2_profile, 
   GLX_EXT_create_context_es_profile,

   GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB,
   GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, 
   GLX_EXT_visual_info,
   GLX_EXT_visual_rating, GLX_INTEL_swap_event, 
   GLX_MESA_copy_sub_buffer,
   GLX_MESA_query_renderer, GLX_MESA_swap_control, 
   GLX_OML_swap_method,

   GLX_OML_sync_control, GLX_SGIS_multisample, GLX_SGIX_fbconfig,
   GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group, 
   GLX_SGI_make_current_read,

   GLX_SGI_swap_control, GLX_SGI_video_sync
Extended renderer info (GLX_MESA_query_renderer):
   Vendor: Intel (0x8086)
   Device: Mesa Intel(R) HD Graphics 620 (KBL GT2) (0x5916)
   Version: 20.1.2
   Accelerated: yes
   Video memory: 3072MB
   Unified memory: yes
   Preferred profile: core (0x1)
   Max core profile version: 4.6
   Max compat profile version: 4.6
   Max GLES1 profile version: 1.1
   Max GLES[23] profile version: 3.2
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) HD Graphics 620 (KBL GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.1.2
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
   GL_3DFX_texture_compression_FXT1, GL_AMD_conservative_depth,
   GL_AMD_depth_clamp_separate, GL_AMD_draw_b

Re: Bug#963709: pyside2: FTBFS on arm64: web_engine_initialize test fails with "Could not initialize GLX"

2020-06-27 Thread Dmitry Shachnev
On Fri, Jun 26, 2020 at 09:30:14PM +0300, Dmitry Shachnev wrote:
> Some more information on this: it looks like dlopen'ing libGLX_mesa.so.0
> returns NULL (src/GLX/libglxmapping.c:430).
>
> LD_PRELOAD'ing that library helps. Adding the following two lines to top
> of web_engine_initialize.py also helps:
>
> import ctypes
> ctypes.CDLL('libGLX_mesa.so.0', ctypes.RTLD_GLOBAL)
>
> I can't say why dlopen fails without that, though.

Some more information on this. I remembered that there is dlerror function,
and checked its output:

$ gdb python3
(gdb) r ./test.py
[...]
(gdb) b libglxmapping.c:432
Breakpoint 1 at 0xf54f5f08: file ../src/GLX/libglxmapping.c, line 432.
(gdb) r
[...]
Thread 1 "python3" hit Breakpoint 1, __glXLookupVendorByName 
(vendorName=) at ../src/GLX/libglxmapping.c:432
(gdb) p vendor->dlhandle
$1 = (void *) 0x0
(gdb) p (char *)dlerror()
$2 = 0xc54f60 "/usr/lib/aarch64-linux-gnu/libglapi.so.0: cannot allocate memory 
in static TLS block"

So this is the real reason for this failure.

I have searched the internet and found a couple of bug reports with a similar
problem:

- https://github.com/opencv/opencv/issues/14884
- https://bugzilla.redhat.com/show_bug.cgi?id=1722181

The last link mentions a glibc patch from ARM that is currently under review:

https://sourceware.org/pipermail/libc-alpha/2020-May/114247.html

Unfortunately my knowledge of library loading process is little. I am CCing
glibc and mesa maintainers: maybe they can tell more about this issue?

Finally, a very short Python reproducer for this bug (needs libqt5webengine5):

#!/usr/bin/python3
import ctypes
ctypes.CDLL("libQt5WebEngine.so.5")
ctypes.CDLL("libglapi.so.0")

fails with:

Traceback (most recent call last):
  File "./test.py", line 4, in 
ctypes.CDLL("libglapi.so.0")
  File "/usr/lib/python3.8/ctypes/__init__.py", line 373, in __init__
self._handle = _dlopen(self._name, mode)
OSError: /usr/lib/aarch64-linux-gnu/libglapi.so.0: cannot allocate memory in 
static TLS block

--
Dmitry Shachnev


signature.asc
Description: PGP signature


Re: Re: Backport for vulkan-loader

2020-06-27 Thread Luca Boccassi
> On 12.6.2020 1.37, Felix Dörre wrote:
> > Hi,
> > 
> > The primus/primus-vk/bumblebee packages got recently updated on sid
> to
> > support offloading for vulkan applications. Additionally support
> for
> > glvnd-nvidia-drivers was fixed. We would like to do a backport for
> > buster as these two "features" seem to be of interest to a number
> of
> > debian users. However for such a backport, we would need libvulkan
> > (>=1.1.108) in buster backports, as primus-vk depends on a fix that
> got
> > into the vulkan loader at this version. Could you do a backport for
> > vulkan-loader?
> > 
> 
> maybe someone else might have time for it

Hello Timo,

Would an NMU be ok for the debian-x team? I'd be happy to take care of
it, if it's not a problem

-- 
Kind regards,
Luca Boccassi


signature.asc
Description: This is a digitally signed message part