Bug 38214 - Segmentation fault в OpenGL
Summary: Segmentation fault в OpenGL
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: xorg-dri-intel (show other bugs)
Version: unstable
Hardware: x86_64 Linux
: P5 normal
Assignee: Valery Inozemtsev
QA Contact: qa-sisyphus
URL:
Keywords:
: 38232 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-03-12 18:00 MSK by Ivan A. Melnikov
Modified: 2020-03-19 14:57 MSK (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan A. Melnikov 2020-03-12 18:00:02 MSK
Ноутбук с подключеным вторым монитором, x86_64, свежий Сизиф; программы, которые пытаются что-то отобразить через OpenGL, падают. Точно не знаю, когда начали, на этой системе пользуюсь такими не ежедневно.

$ uname -r                                                                           
5.5.8-un-def-alt1                                                                                                       
$ lscpu                                                                              
Architecture:        x86_64                                                                                             
CPU op-mode(s):      32-bit, 64-bit                                                                                     
Byte Order:          Little Endian                                                                                      
Address sizes:       39 bits physical, 48 bits virtual                                                                  
CPU(s):              8                                                                                                  
On-line CPU(s) list: 0-7                                                                                                
Thread(s) per core:  2                                                                                                  
Core(s) per socket:  4                                                                                                  
Socket(s):           1                                                                                                  
NUMA node(s):        1                                                                                                  
Vendor ID:           GenuineIntel                                                                                       
CPU family:          6                                                                                                  
Model:               158                                                                                                
Model name:          Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz                                                          
Stepping:            9                                                                                                  
CPU MHz:             800.306                                                                                            
CPU max MHz:         3800,0000                                                                                          
CPU min MHz:         800,0000                                                                                                                                                                                                                   
BogoMIPS:            5599.85                                                                                            
Virtualization:      VT-x                                                                                               
L1d cache:           32K                                                                                                
L1i cache:           32K                                                                                                
L2 cache:            256K                                                                                                                                                                                                                       
L3 cache:            6144K                                                                                              
NUMA node0 CPU(s):   0-7                                                                                                                                                                                                                        
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop
_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single
 pti tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp
$ lspci -vv | grep -A13 'VGA controller'
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 630 (rev 04) (prog-if 00 [VGA controller])
        DeviceName:  Onboard IGD
        Subsystem: Dell Device 07fa
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0
        Interrupt: pin A routed to IRQ 137
        Region 0: Memory at db000000 (64-bit, non-prefetchable) [size=16M]
        Region 2: Memory at 70000000 (64-bit, prefetchable) [size=256M]
        Region 4: I/O ports at f000 [size=64]
        Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
        Capabilities: <access denied>
        Kernel driver in use: i915


В качестве примера, backtrace от mpv с vo=gpu (это его дефолт):
VO: [gpu] 1920x1080 yuv420p

Thread 9 "mpv/vo" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe671e700 (LWP 6928)]
stream_state (batch=0x7fffdc4bb730, uploader=<optimized out>, size=12, alignment=alignment@entry=64, out_offset=out_offset@entry=0x7fffe671c09c, out_bo=out_bo@entry=0x0) at ../src/gallium/drivers/iris/iris_blorp.c:62
62         struct iris_bo *bo = iris_resource_bo(res);
(gdb) bt
#0  stream_state (batch=0x7fffdc4bb730, uploader=<optimized out>, size=12, alignment=alignment@entry=64, out_offset=out_offset@entry=0x7fffe671c09c, out_bo=out_bo@entry=0x0) at ../src/gallium/drivers/iris/iris_blorp.c:62
#1  0x00007fffd74d478d in blorp_alloc_dynamic_state (blorp_batch=0x7fffe671c9b0, blorp_batch=0x7fffe671c9b0, offset=0x7fffe671c09c, alignment=64, size=<optimized out>) at ../src/gallium/drivers/iris/iris_blorp.c:138
#2  blorp_emit_blend_state (params=0x7fffe671c250, batch=0x7fffe671c9b0) at ../src/intel/blorp/blorp_genX_exec.h:1074
#3  blorp_emit_pipeline (params=0x7fffe671c250, batch=0x7fffe671c9b0) at ../src/intel/blorp/blorp_genX_exec.h:1265
#4  blorp_exec (params=0x7fffe671c250, batch=0x7fffe671c9b0) at ../src/intel/blorp/blorp_genX_exec.h:1968
#5  iris_blorp_exec (blorp_batch=0x7fffe671c9b0, params=0x7fffe671c250) at ../src/gallium/drivers/iris/iris_blorp.c:310
#6  0x00007fffd76852dc in blorp_clear (batch=batch@entry=0x7fffe671c9b0, surf=surf@entry=0x7fffe671c9e0, format=ISL_FORMAT_B8G8R8X8_UNORM, swizzle=..., swizzle@entry=..., level=level@entry=0, start_layer=0, num_layers=1, x0=0, y0=0,
    x1=320, y1=200, clear_color=..., color_write_disable=0x7fffe671c9d0) at ../src/intel/blorp/blorp_clear.c:560
#7  0x00007fffd74b02fd in clear_color (ice=ice@entry=0x7fffdc4bb1c0, p_res=<optimized out>, level=<optimized out>, box=box@entry=0x7fffe671cad0, render_condition_enabled=render_condition_enabled@entry=true, format=<optimized out>,
    swizzle=..., color=...) at ../src/gallium/drivers/iris/iris_clear.c:388
#8  0x00007fffd74b0f35 in iris_clear (ctx=0x7fffdc4bb1c0, buffers=4, p_color=0x7fffdc4c9b74, depth=<optimized out>, stencil=<optimized out>) at ../src/gallium/drivers/iris/iris_clear.c:673
#9  0x00007fffd6edd8d4 in st_Clear (ctx=0x7fffdc4c7a40, mask=2) at ../src/mesa/state_tracker/st_cb_clear.c:513
#10 0x00000000004dc97d in gl_clear (ra=<optimized out>, dst=<optimized out>, color=0x7fffe671ccb0, scissor=0x7fffe671cc70) at ../video/out/opengl/ra_gl.c:662
#11 0x00000000004d2957 in gl_video_render_frame (p=0x7fffdc536de0, frame=frame@entry=0x7fffdc52c950, fbo=..., flags=flags@entry=3) at ../video/out/gpu/video.c:3058
#12 0x00000000004e2eeb in draw_frame (vo=0x65a2c0, frame=0x7fffdc52c950) at ../video/out/vo_gpu.c:87
#13 0x00000000004e109e in vo_render_frame_external (vo=vo@entry=0x65a2c0) at ../video/out/vo.c:898
#14 0x00000000004e1b40 in vo_thread (ptr=0x65a2c0) at ../video/out/vo.c:1055
#15 0x00007ffff65a6f27 in start_thread (arg=<optimized out>) at pthread_create.c:479
#16 0x00007ffff51ab59f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95


Та же история с glxgears:
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.

Thread 1 "glxgears" received signal SIGSEGV, Segmentation fault.
stream_state (batch=0x5bb2c0, uploader=<optimized out>, size=size@entry=24, alignment=alignment@entry=64, out_offset=out_offset@entry=0x7fffffffcff0, out_bo=out_bo@entry=0x0) at ../src/gallium/drivers/iris/iris_blorp.c:62
62         struct iris_bo *bo = iris_resource_bo(res);
(gdb) bt
#0  stream_state (batch=0x5bb2c0, uploader=<optimized out>, size=size@entry=24, alignment=alignment@entry=64, out_offset=out_offset@entry=0x7fffffffcff0, out_bo=out_bo@entry=0x0) at ../src/gallium/drivers/iris/iris_blorp.c:62
#1  0x00007ffff686f88d in blorp_alloc_dynamic_state (blorp_batch=0x7fffffffd900, blorp_batch=0x7fffffffd900, offset=0x7fffffffcff0, alignment=64, size=24) at ../src/gallium/drivers/iris/iris_blorp.c:138
#2  blorp_emit_color_calc_state (params=0x7fffffffd1a0, batch=0x7fffffffd900) at ../src/intel/blorp/blorp_genX_exec.h:1120
#3  blorp_emit_pipeline (params=0x7fffffffd1a0, batch=0x7fffffffd900) at ../src/intel/blorp/blorp_genX_exec.h:1267
#4  blorp_exec (params=0x7fffffffd1a0, batch=0x7fffffffd900) at ../src/intel/blorp/blorp_genX_exec.h:1968
#5  iris_blorp_exec (blorp_batch=0x7fffffffd900, params=0x7fffffffd1a0) at ../src/gallium/drivers/iris/iris_blorp.c:310
#6  0x00007ffff6a202dc in blorp_clear (batch=batch@entry=0x7fffffffd900, surf=surf@entry=0x7fffffffd930, format=ISL_FORMAT_B8G8R8X8_UNORM, swizzle=..., swizzle@entry=..., level=level@entry=0, start_layer=0, num_layers=1, x0=0, y0=0,
    x1=300, y1=300, clear_color=..., color_write_disable=0x7fffffffd920) at ../src/intel/blorp/blorp_clear.c:560
#7  0x00007ffff684b2fd in clear_color (ice=ice@entry=0x5bad50, p_res=<optimized out>, level=<optimized out>, box=box@entry=0x7fffffffda20, render_condition_enabled=render_condition_enabled@entry=true, format=<optimized out>, swizzle=...,
    color=...) at ../src/gallium/drivers/iris/iris_clear.c:388
#8  0x00007ffff684bf35 in iris_clear (ctx=0x5bad50, buffers=5, p_color=0x5c4d14, depth=<optimized out>, stencil=<optimized out>) at ../src/gallium/drivers/iris/iris_clear.c:673
#9  0x00007ffff62788d4 in st_Clear (ctx=0x5c2be0, mask=18) at ../src/mesa/state_tracker/st_cb_clear.c:513
#10 0x000000000040309e in draw () at glxgears.c:254
#11 0x0000000000402c49 in draw_gears () at glxgears.c:316
#12 draw_frame (win=67108866, dpy=0x408d40) at glxgears.c:341
#13 event_loop (win=67108866, dpy=0x408d40) at glxgears.c:703
#14 main (argc=<optimized out>, argv=<optimized out>) at glxgears.c:798
(gdb)
Comment 1 Valery Inozemtsev 2020-03-13 14:31:53 MSK
в Mesa 20 для intel Gen8+ используется драйвер iris вместо старого i965
http://git.altlinux.org/people/shrek/packages/mesa.git?p=mesa.git;a=blob;f=include/pci_ids/i965_pci_ids.h;h=903f550ba2a1f840a02916c62f3d9171ad02847a;hb=HEAD#l106
возможно в следующих сборках верну все что ниже 106 строки обратно на i965, пока можно сделать следующее:
$ cat /usr/share/drirc.d/00-mesa-intel.conf 
<driconf>
  <device driver="loader" kernel_driver="i915">
    <option name="dri_driver" value="i965" />
  </device>
</driconf>
Comment 2 Ivan A. Melnikov 2020-03-14 11:09:17 MSK
> можно сделать следующее

Спасибо, так действительно не падает.
Comment 3 Valery Inozemtsev 2020-03-14 17:12:20 MSK
правильнее это прописать в /etc/drirc
Comment 4 Valery Inozemtsev 2020-03-18 09:28:29 MSK
*** Bug 38232 has been marked as a duplicate of this bug. ***
Comment 5 Repository Robot 2020-03-19 14:57:51 MSK
Mesa-4:20.0.2-alt1 -> sisyphus:

 Thu Mar 19 2020 Valery Inozemtsev <shrek@altlinux.ru> 4:20.0.2-alt1
 - 20.0.0
 - used i965 driver for Intel Gen8-11 by default (closes: #38214)