[Bug 1186040] gdb crash internal-error: jit_event_handler
![](https://seccdn.libravatar.org/avatar/a895f78a81a109471893519443e4d933.jpg?s=120&d=mm&r=g)
https://bugzilla.suse.com/show_bug.cgi?id=1186040 https://bugzilla.suse.com/show_bug.cgi?id=1186040#c3 --- Comment #3 from Paul Fee <pafee@tycoint.com> --- When gdb crashes, it asks whether to quit the session. Previously I answered "y" and examined the corefile that captured gdb's crash. This time, I answered "n" and got some more information. The stack trace shows the Qt program starting at main(), almost 50 frames within Qt before QGL2PaintEngineExPrivate::fill() called into Mesa. Another 7 frames down, Mesa (via llvmpipe) calls LLVMGetPointerToGlobal(). Another 3 frames down we see GDBJITRegistrationListener::notifyObjectLoaded() and finally __jit_debug_register_code(). GDB documentation indicates that LLVM is currently the only user of the GDB JIT interface. https://sourceware.org/gdb/current/onlinedocs/gdb/JIT-Interface.html It seems that LLVM uses this interface to tell GDB how to find Just In Time compiled code. Therefore reproducing such issues would require a similar graphics setup to me. I'm using QEMU/KVM with my application running within a VM. The virtual machine's graphics card is set to QXL. The corresponding libvirt XML is: <video> <model type="qxl" ram="65536" vram="65536" vgamem="16384" heads="1" primary="yes"/> <alias name="video0"/> <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0"/> </video> Within the VM, this appears as: # lspci | grep VGA 00:01.0 VGA compatible controller: Red Hat, Inc. QXL paravirtual graphic card (rev 04) From glxinfo: OpenGL vendor string: VMware, Inc. OpenGL renderer string: llvmpipe (LLVM 9.0.1, 256 bits) As a workaround, I'll try debugging my application with different graphics hardware, for example on a physical machine. Avoiding LLVMpipe may allow me to avoid this LLVMpipe + GDB JIT interaction. I'm unable to tell which part (LLVM or GDB) is at fault. Though I see hints in the code that the API may be fragile, requiring in memory layout of structs to be kept in sync to maintain ABI compatibility. https://llvm.org/doxygen/GDBRegistrationListener_8cpp_source.html Line 22: // This must be kept in sync with gdb/gdb/jit.h . If LLVM is the only user of the GDB JIT API, then perhaps there's a higher chance of bugs as the code is not so well tested via widespread use. Is LLVM 9.0.1 compatible with GDB JIT from GDB 10.1? -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com