gnif / LookingGlass

An extremely low latency KVMFR (KVM FrameRelay) implementation for guests with VGA PCI Passthrough.
GNU General Public License v2.0
4.75k stars 261 forks source link

Looking glass window crashes randomly on B7-rc1 and B7-rc1-30-d060e375 #1129

Closed saqib-saleem closed 3 months ago

saqib-saleem commented 4 months ago

Looking glass windows is crashing randomly. These are the last three crash reports:

05:30:23.618 [E]             crash.c:215  | crit_err_hdlr                  | ==== FATAL CRASH (B7-rc1) ====
05:30:23.618 [E]             crash.c:216  | crit_err_hdlr                  | signal 11 (Segmentation fault), address is 0x7f11f7600000
05:30:23.618 [E]             crash.c:207  | printBacktrace                 | [trace]: (0) /lib/x86_64-linux-gnu/libc.so.6(+0x3d580) [0x7f1245858580]
05:30:23.618 [E]             crash.c:207  | printBacktrace                 | [trace]: (1) looking-glass/looking-glass-B7-rc1/client/build/looking-glass-client(+0x11bb97) [0x5608d7c2db97]
05:30:23.618 [E]             crash.c:207  | printBacktrace                 | [trace]: (2) looking-glass/looking-glass-B7-rc1/client/build/looking-glass-client(+0x11b364) [0x5608d7c2d364]
05:30:23.618 [E]             crash.c:207  | printBacktrace                 | [trace]: (3) looking-glass/looking-glass-B7-rc1/client/build/looking-glass-client(+0x11b6fb) [0x5608d7c2d6fb]
05:30:23.719 [E]             crash.c:202  | printBacktrace                 | [trace]: (4) /home/test/looking-glass/looking-glass-B7-rc1/client/renderers/EGL/texture_framebuffer.c:138 (egl_texFBUpdate)
05:30:23.719 [E]             crash.c:202  | printBacktrace                 | [trace]: (5) /home/test/looking-glass/looking-glass-B7-rc1/client/renderers/EGL/texture.c:179 (egl_textureUpdateFromFrame)
05:30:23.719 [E]             crash.c:202  | printBacktrace                 | [trace]: (6) /home/test/looking-glass/looking-glass-B7-rc1/client/renderers/EGL/desktop.c:418 (egl_desktopUpdate)
05:30:23.719 [E]             crash.c:202  | printBacktrace                 | [trace]: (7) /home/test/looking-glass/looking-glass-B7-rc1/client/renderers/EGL/egl.c:627 (egl_onFrame)
05:30:23.719 [E]             crash.c:202  | printBacktrace                 | [trace]: (8) /home/test/looking-glass/looking-glass-B7-rc1/client/src/main.c:794 (main_frameThread)
05:30:23.719 [E]             crash.c:207  | printBacktrace                 | [trace]: (9) looking-glass/looking-glass-B7-rc1/client/build/looking-glass-client(+0x11daa4) [0x5608d7c2faa4]
05:30:23.719 [E]             crash.c:207  | printBacktrace                 | [trace]: (10) /lib/x86_64-linux-gnu/libc.so.6(+0x89dab) [0x7f12458a4dab]
05:30:23.719 [E]             crash.c:207  | printBacktrace                 | [trace]: (11) /lib/x86_64-linux-gnu/libc.so.6(+0x10b9f8) [0x7f12459269f8]
02:00:34.004 [E]             crash.c:215  | crit_err_hdlr                  | ==== FATAL CRASH (B7-rc1) ====
02:00:34.004 [E]             crash.c:216  | crit_err_hdlr                  | signal 11 (Segmentation fault), address is 0x7f3a86c00000
02:00:34.004 [E]             crash.c:207  | printBacktrace                 | [trace]: (0) /lib/x86_64-linux-gnu/libc.so.6(+0x3d580) [0x7f3ad6058580]
02:00:34.004 [E]             crash.c:207  | printBacktrace                 | [trace]: (1) looking-glass/looking-glass-B7-rc1/client/build/looking-glass-client(+0x11bb97) [0x55e7ad601b97]
02:00:34.004 [E]             crash.c:207  | printBacktrace                 | [trace]: (2) looking-glass/looking-glass-B7-rc1/client/build/looking-glass-client(+0x11b364) [0x55e7ad601364]
02:00:34.004 [E]             crash.c:207  | printBacktrace                 | [trace]: (3) looking-glass/looking-glass-B7-rc1/client/build/looking-glass-client(+0x11b6fb) [0x55e7ad6016fb]
02:00:34.117 [E]             crash.c:202  | printBacktrace                 | [trace]: (4) /home/test/looking-glass/looking-glass-B7-rc1/client/renderers/EGL/texture_framebuffer.c:138 (egl_texFBUpdate)
02:00:34.117 [E]             crash.c:202  | printBacktrace                 | [trace]: (5) /home/test/looking-glass/looking-glass-B7-rc1/client/renderers/EGL/texture.c:179 (egl_textureUpdateFromFrame)
02:00:34.117 [E]             crash.c:202  | printBacktrace                 | [trace]: (6) /home/test/looking-glass/looking-glass-B7-rc1/client/renderers/EGL/desktop.c:418 (egl_desktopUpdate)
02:00:34.117 [E]             crash.c:202  | printBacktrace                 | [trace]: (7) /home/test/looking-glass/looking-glass-B7-rc1/client/renderers/EGL/egl.c:627 (egl_onFrame)
02:00:34.117 [E]             crash.c:202  | printBacktrace                 | [trace]: (8) /home/test/looking-glass/looking-glass-B7-rc1/client/src/main.c:794 (main_frameThread)
02:00:34.117 [E]             crash.c:207  | printBacktrace                 | [trace]: (9) looking-glass/looking-glass-B7-rc1/client/build/looking-glass-client(+0x11daa4) [0x55e7ad603aa4]
02:00:34.117 [E]             crash.c:207  | printBacktrace                 | [trace]: (10) /lib/x86_64-linux-gnu/libc.so.6(+0x89dab) [0x7f3ad60a4dab]
02:00:34.117 [E]             crash.c:207  | printBacktrace                 | [trace]: (11) /lib/x86_64-linux-gnu/libc.so.6(+0x10b9f8) [0x7f3ad61269f8]
00:00:03.217 [E]             crash.c:215  | crit_err_hdlr                  | ==== FATAL CRASH (B7-rc1) ====
00:00:03.217 [E]             crash.c:216  | crit_err_hdlr                  | signal 11 (Segmentation fault), address is 0x7faf86c00000
00:00:03.217 [E]             crash.c:207  | printBacktrace                 | [trace]: (0) /lib/x86_64-linux-gnu/libc.so.6(+0x3d580) [0x7fafd0458580]
00:00:03.217 [E]             crash.c:207  | printBacktrace                 | [trace]: (1) looking-glass/looking-glass-B7-rc1/client/build/looking-glass-client(+0x11bb97) [0x5615a642fb97]
00:00:03.217 [E]             crash.c:207  | printBacktrace                 | [trace]: (2) looking-glass/looking-glass-B7-rc1/client/build/looking-glass-client(+0x11b364) [0x5615a642f364]
00:00:03.217 [E]             crash.c:207  | printBacktrace                 | [trace]: (3) looking-glass/looking-glass-B7-rc1/client/build/looking-glass-client(+0x11b6fb) [0x5615a642f6fb]
00:00:03.305 [E]             crash.c:202  | printBacktrace                 | [trace]: (4) /home/test/looking-glass/looking-glass-B7-rc1/client/renderers/EGL/texture_framebuffer.c:138 (egl_texFBUpdate)
00:00:03.305 [E]             crash.c:202  | printBacktrace                 | [trace]: (5) /home/test/looking-glass/looking-glass-B7-rc1/client/renderers/EGL/texture.c:179 (egl_textureUpdateFromFrame)
00:00:03.305 [E]             crash.c:202  | printBacktrace                 | [trace]: (6) /home/test/looking-glass/looking-glass-B7-rc1/client/renderers/EGL/desktop.c:418 (egl_desktopUpdate)
00:00:03.305 [E]             crash.c:202  | printBacktrace                 | [trace]: (7) /home/test/looking-glass/looking-glass-B7-rc1/client/renderers/EGL/egl.c:627 (egl_onFrame)
00:00:03.305 [E]             crash.c:202  | printBacktrace                 | [trace]: (8) /home/test/looking-glass/looking-glass-B7-rc1/client/src/main.c:794 (main_frameThread)
00:00:03.305 [E]             crash.c:207  | printBacktrace                 | [trace]: (9) looking-glass/looking-glass-B7-rc1/client/build/looking-glass-client(+0x11daa4) [0x5615a6431aa4]
00:00:03.305 [E]             crash.c:207  | printBacktrace                 | [trace]: (10) /lib/x86_64-linux-gnu/libc.so.6(+0x89dab) [0x7fafd04a4dab]
00:00:03.305 [E]             crash.c:207  | printBacktrace                 | [trace]: (11) /lib/x86_64-linux-gnu/libc.so.6(+0x10b9f8) [0x7fafd05269f8]

The startup info looks like this:

00:00:00.000 [I]              main.c:1859 | main                           | Looking Glass (B7-rc1)
00:00:00.000 [I]              main.c:1860 | main                           | Locking Method: Atomic
00:00:00.001 [I]           cpuinfo.c:38   | cpuInfo_log                    | CPU Model: AMD Ryzen Threadripper 3970X 32-Core Processor
00:00:00.001 [I]           cpuinfo.c:39   | cpuInfo_log                    | CPU: 1 sockets, 32 cores, 64 threads
00:00:00.009 [I]              main.c:1185 | lg_run                         | Using font: /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf
00:00:00.009 [I]           ivshmem.c:128  | ivshmemOpenDev                 | KVMFR Device     : /dev/shm/looking-glass
00:00:00.013 [I]             audio.c:159  | audio_init                     | Using AudioDev: PipeWire
00:00:00.013 [I]                ps.c:245  | purespice_connect              | Connecting to socket 127.0.0.1:5900
00:00:00.025 [I]               rsa.c:178  | rsa_encryptPassword            | Using Nettle
00:00:00.025 [I]                ps.c:268  | purespice_connect              | Connected
00:00:00.026 [I]             agent.c:103  | agent_connect                  | Connected to the spice guest agent
00:00:00.026 [I]      channel_main.c:167  | onMessage_mainName             | Guest name: TestMachine
00:00:00.026 [I]      channel_main.c:183  | onMessage_mainUUID             | Guest UUID: a06e7c18-dadf-4b0b-8af5-c20299d6ef05
00:00:00.052 [I]                ps.c:644  | ps_connectChannel              | RECORD channel connected
00:00:00.064 [I]                ps.c:644  | ps_connectChannel              | PLAYBACK channel connected
00:00:00.072 [I]                ps.c:644  | ps_connectChannel              | INPUTS channel connected
00:00:00.072 [I]           channel.c:323  | onMessage_notify               | [notify] keyboard channel is insecure
00:00:00.072 [I]               egl.c:289  | egl_initialize                 | Double buffering is off
00:00:00.072 [I]              main.c:1139 | tryRenderer                    | Using Renderer: EGL
00:00:00.073 [I]               x11.c:232  | x11CheckEWMHSupport            | EWMH-compliant window manager detected: GNOME Shell
00:00:00.074 [I]               x11.c:497  | x11Init                        | X11 XInput 2.0 in use
00:00:00.082 [I]               x11.c:1496 | x11GetEGLDisplay               | Using eglGetPlatformDisplayEXT
00:00:00.271 [I]               egl.c:773  | egl_renderStartup              | Multisampling enabled, max samples: 4
00:00:00.272 [I]               egl.c:856  | egl_renderStartup              | Single buffer mode
00:00:00.274 [I]               egl.c:883  | egl_renderStartup              | EGL     : 1.5
00:00:00.274 [I]               egl.c:884  | egl_renderStartup              | Vendor  : AMD
00:00:00.274 [I]               egl.c:885  | egl_renderStartup              | Renderer: AMD Radeon RX 7800 XT (radeonsi, navi32, LLVM 17.0.6, DRM 3.57, 6.8.12-amd64)
00:00:00.274 [I]               egl.c:886  | egl_renderStartup              | Version : OpenGL ES 3.2 Mesa 24.1.1-2
00:00:00.274 [I]               egl.c:887  | egl_renderStartup              | EGL APIs: OpenGL OpenGL_ES 
00:00:00.274 [I]               egl.c:958  | egl_renderStartup              | Debug messages disabled, enable with egl:debug=true
00:00:00.303 [I]           eglutil.c:35   | swapWithDamageInit             | Using EGL_KHR_swap_buffers_with_damage
00:00:00.499 [I]              main.c:1590 | lg_run                         | Guest Information:
00:00:00.499 [I]              main.c:1591 | lg_run                         | Version  : B7-rc1
00:00:00.499 [I]              main.c:1612 | lg_run                         | UUID     : a06e7c18-dadf-4b0b-8af5-c20299d6ef05
00:00:00.499 [I]              main.c:1621 | lg_run                         | CPU Model: AMD Ryzen Threadripper 3970X 32-Core Processor
00:00:00.499 [I]              main.c:1622 | lg_run                         | CPU      : 1 sockets, 16 cores, 32 threads
00:00:00.499 [I]              main.c:1624 | lg_run                         | Using    : D12
00:00:00.502 [I]              main.c:1710 | lg_run                         | OS       : Windows
00:00:00.502 [I]              main.c:1712 | lg_run                         | OS Name  : Windows 10 Pro N (Build: 19045) 
00:00:00.502 [I]              main.c:1734 | lg_run                         | Starting session
00:00:00.511 [I]              main.c:710  | main_frameThread               | Format: FRAME_TYPE_BGRA 3840x2160 (3840x2160) stride:3840 pitch:15360 rotation:0 hdr:0 pq:0

This happens on B7-rc1-30-d060e375 as well

00:00:00.000 [I]              main.c:1859 | main                           | Looking Glass (B7-rc1-30-d060e375)
00:00:00.000 [I]              main.c:1860 | main                           | Locking Method: Atomic
00:00:00.001 [I]           cpuinfo.c:38   | cpuInfo_log                    | CPU Model: AMD Ryzen Threadripper 3970X 32-Core Processor
00:00:00.001 [I]           cpuinfo.c:39   | cpuInfo_log                    | CPU: 1 sockets, 32 cores, 64 threads
00:00:00.010 [I]              main.c:1185 | lg_run                         | Using font: /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf
00:00:00.010 [I]           ivshmem.c:128  | ivshmemOpenDev                 | KVMFR Device     : /dev/shm/looking-glass
00:00:00.014 [I]             audio.c:159  | audio_init                     | Using AudioDev: PipeWire
00:00:00.014 [I]                ps.c:245  | purespice_connect              | Connecting to socket 127.0.0.1:5900
00:00:00.027 [I]               rsa.c:178  | rsa_encryptPassword            | Using Nettle
00:00:00.028 [I]                ps.c:268  | purespice_connect              | Connected
00:00:00.028 [I]             agent.c:103  | agent_connect                  | Connected to the spice guest agent
00:00:00.028 [I]      channel_main.c:167  | onMessage_mainName             | Guest name: TestMachine
00:00:00.028 [I]      channel_main.c:183  | onMessage_mainUUID             | Guest UUID: a06e7c18-dadf-4b0b-8af5-c20299d6ef05
00:00:00.039 [I]                ps.c:644  | ps_connectChannel              | RECORD channel connected
00:00:00.056 [I]                ps.c:644  | ps_connectChannel              | PLAYBACK channel connected
00:00:00.070 [I]                ps.c:644  | ps_connectChannel              | INPUTS channel connected
00:00:00.070 [I]           channel.c:323  | onMessage_notify               | [notify] keyboard channel is insecure
00:00:00.071 [I]               egl.c:289  | egl_initialize                 | Double buffering is off
00:00:00.071 [I]              main.c:1139 | tryRenderer                    | Using Renderer: EGL
00:00:00.072 [I]               x11.c:232  | x11CheckEWMHSupport            | EWMH-compliant window manager detected: GNOME Shell
00:00:00.072 [I]               x11.c:497  | x11Init                        | X11 XInput 2.0 in use
00:00:00.082 [I]               x11.c:1501 | x11GetEGLDisplay               | Using eglGetPlatformDisplayEXT
00:00:00.209 [I]               egl.c:773  | egl_renderStartup              | Multisampling enabled, max samples: 4
00:00:00.210 [I]               egl.c:856  | egl_renderStartup              | Single buffer mode
00:00:00.212 [I]               egl.c:883  | egl_renderStartup              | EGL     : 1.5
00:00:00.212 [I]               egl.c:884  | egl_renderStartup              | Vendor  : AMD
00:00:00.212 [I]               egl.c:885  | egl_renderStartup              | Renderer: AMD Radeon RX 7800 XT (radeonsi, navi32, LLVM 17.0.6, DRM 3.57, 6.9.9-amd64)
00:00:00.212 [I]               egl.c:886  | egl_renderStartup              | Version : OpenGL ES 3.2 Mesa 24.1.3-2
00:00:00.212 [I]               egl.c:887  | egl_renderStartup              | EGL APIs: OpenGL OpenGL_ES 
00:00:00.212 [I]               egl.c:958  | egl_renderStartup              | Debug messages disabled, enable with egl:debug=true
00:00:00.272 [I]           eglutil.c:35   | swapWithDamageInit             | Using EGL_KHR_swap_buffers_with_damage
00:00:00.466 [I]              main.c:1590 | lg_run                         | Guest Information:
00:00:00.466 [I]              main.c:1591 | lg_run                         | Version  : B7-rc1-30-d060e375
00:00:00.466 [I]              main.c:1612 | lg_run                         | UUID     : a06e7c18-dadf-4b0b-8af5-c20299d6ef05
00:00:00.466 [I]              main.c:1621 | lg_run                         | CPU Model: AMD Ryzen Threadripper 3970X 32-Core Processor
00:00:00.466 [I]              main.c:1622 | lg_run                         | CPU      : 1 sockets, 16 cores, 32 threads
00:00:00.466 [I]              main.c:1624 | lg_run                         | Using    : D12
00:00:00.468 [I]              main.c:1710 | lg_run                         | OS       : Windows
00:00:00.468 [I]              main.c:1712 | lg_run                         | OS Name  : Windows 10 Pro N (Build: 19045) 
00:00:00.468 [I]              main.c:1734 | lg_run                         | Starting session
00:00:01.211 [I]              main.c:710  | main_frameThread               | Format: FRAME_TYPE_BGRA 3840x2160 (3840x2160) stride:3840 pitch:15360 rotation:0 hdr:0 pq:0
00:00:10.826 [I]              main.c:710  | main_frameThread               | Format: FRAME_TYPE_BGRA 3840x2160 (3840x2160) stride:3840 pitch:15360 rotation:0 hdr:0 pq:0
00:00:16.643 [I]              main.c:710  | main_frameThread               | Format: FRAME_TYPE_BGRA 3840x2160 (3840x2160) stride:3840 pitch:15360 rotation:0 hdr:0 pq:0
00:40:28.627 [E]             crash.c:215  | crit_err_hdlr                  | ==== FATAL CRASH (B7-rc1-30-d060e375) ====
00:40:28.627 [E]             crash.c:216  | crit_err_hdlr                  | signal 11 (Segmentation fault), address is 0x7f78cec00000
00:40:28.627 [E]             crash.c:207  | printBacktrace                 | [trace]: (0) /lib/x86_64-linux-gnu/libc.so.6(+0x3f590) [0x7f791e656590]
00:40:28.627 [E]             crash.c:207  | printBacktrace                 | [trace]: (1) looking-glass/looking-glass-B7-rc1-30/client/build/looking-glass-client(+0x11bc65) [0x55f9184b7c65]
00:40:28.627 [E]             crash.c:207  | printBacktrace                 | [trace]: (2) looking-glass/looking-glass-B7-rc1-30/client/build/looking-glass-client(+0x11b432) [0x55f9184b7432]
00:40:28.627 [E]             crash.c:207  | printBacktrace                 | [trace]: (3) looking-glass/looking-glass-B7-rc1-30/client/build/looking-glass-client(+0x11b7c9) [0x55f9184b77c9]
00:40:28.631 [E]             crash.c:202  | printBacktrace                 | [trace]: (4) texture_framebuffer.c:0 (egl_texFBUpdate)
00:40:28.631 [E]             crash.c:207  | printBacktrace                 | [trace]: (5) looking-glass/looking-glass-B7-rc1-30/client/build/looking-glass-client(+0x1093d8) [0x55f9184a53d8]
00:40:28.631 [E]             crash.c:207  | printBacktrace                 | [trace]: (6) looking-glass/looking-glass-B7-rc1-30/client/build/looking-glass-client(+0xf4093) [0x55f918490093]
00:40:28.631 [E]             crash.c:202  | printBacktrace                 | [trace]: (7) egl.c:0 (egl_onFrame)
00:40:28.631 [E]             crash.c:207  | printBacktrace                 | [trace]: (8) looking-glass/looking-glass-B7-rc1-30/client/build/looking-glass-client(+0x19a8c) [0x55f9183b5a8c]
00:40:28.631 [E]             crash.c:207  | printBacktrace                 | [trace]: (9) looking-glass/looking-glass-B7-rc1-30/client/build/looking-glass-client(+0x11db72) [0x55f9184b9b72]
00:40:28.631 [E]             crash.c:207  | printBacktrace                 | [trace]: (10) /lib/x86_64-linux-gnu/libc.so.6(+0x8c6b2) [0x7f791e6a36b2]
00:40:28.631 [E]             crash.c:207  | printBacktrace                 | [trace]: (11) /lib/x86_64-linux-gnu/libc.so.6(+0x107128) [0x7f791e71e128]
ghost commented 4 months ago

I am also experiencing this, with the same error logs.

Some added context: As strange as it may be, it seems to happen mostly when I am in game when I flick the cursor to the edge of the screen (any direction)

boombel commented 4 months ago

Same issue here, crash observed on main. It crashes when moving the mouse cursor to the bottom right of the screen (very inconvenient for playing strategies, auto restart is very helpful). Host: integrated AMD, guest: AMD 6800S.

gnif commented 3 months ago

Credit to @D0ot for finding and fixing this.