[Fixed] Crash with "Address not mapped to object (signal 11)" error

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Crash with "Address not mapped to object (signal 11)" error

Postby lumbo7332 » Fri Sep 11, 2020 11:07 pm

I'm getting a crash in GZDoom every once and a while and I can't really reproduce it, but there's the error it gives:

Code: Select allExpand view
*** Fatal Error ***
Address not mapped to object (signal 11)
Address: 0x50

System: Linux snowy 5.8.8-arch1-1 #1 SMP PREEMPT Wed, 09 Sep 2020 18:59:45 +0000 x86_64 GNU/Linux

GZDoom version g4.4.2-m (04e53b815f8c1653cc77d5b6b376d99f93110be6)
Command line: /usr/bin/gzdoom -config /home/cassidy/Games/Doom/INIs/ultimate-doom.ini -savedir ~/Games/Doom/Saves/UltimateDoom -iwad /home/cassidy/Games/Doom/IWADs/DOOM.wad -file /home/cassidy/Games/Doom/Mods/Faithful_Doom.pk3 /home/cassidy/Games/Doom/Mods/NashGore/nashgore.pk3 /home/cassidy/Games/Doom/Mods/DoomSkyboxes/SB_D1.wad /home/cassidy/Games/Doom/Mods/IDKFA/WAD/IDKFAv2.wad /home/cassidy/Games/Doom/Mods/reikalldoomvoxels.pk3 /home/cassidy/Games/Doom/Mods/HiResDoomSFX.wad /home/cassidy/Games/Doom/Mods/RockCrosshairs/crosshairs.wad
Wad 0: gzdoom.pk3
Wad 1: game_support.pk3
Wad 2: DOOM.wad
Wad 3: Faithful_Doom.pk3
Wad 4: nashgore.pk3
Wad 5: SB_D1.wad
Wad 6: IDKFAv2.wad
Wad 7: reikalldoomvoxels.pk3
Wad 8: HiResDoomSFX.wad
Wad 9: crosshairs.wad

Current map: E1M2

viewx = -1775.972469
viewy = 1746.077313
viewz = 154.366462
viewangle = 55.942383

Executing: gdb --quiet --batch --command=gdb-respfile-txPsmy
[New LWP 3446]
[New LWP 3449]
[New LWP 3450]
[New LWP 3451]
[New LWP 3457]
[New LWP 3458]
[New LWP 3459]
[New LWP 3460]
[New LWP 3461]
[New LWP 3462]
[New LWP 3463]
[New LWP 3464]
[New LWP 3465]
[New LWP 3466]
[New LWP 3467]
[New LWP 3468]
[New LWP 3469]
[New LWP 3470]
[New LWP 3471]
[New LWP 3472]
[New LWP 3473]
[New LWP 3474]
[New LWP 3475]
[New LWP 3476]
[New LWP 3477]
[New LWP 3478]
[New LWP 3483]
[New LWP 3484]
[New LWP 3485]
[New LWP 3486]
[New LWP 3491]
[New LWP 3622]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
0x00007f7a41c51eef in wait4 () from /usr/lib/libc.so.6

* Loaded Libraries
From                To                  Syms Read   Shared Object Library
0x00007f7a42f2c020  0x00007f7a42f9ef4e  Yes (*)     /usr/lib/libopenal.so.1
0x00007f7a427f9020  0x00007f7a42b78049  Yes (*)     /usr/lib/libgtk-3.so.0
0x00007f7a42760020  0x00007f7a4276d270  Yes (*)     /usr/lib/libz.so.1
0x00007f7a42713020  0x00007f7a42740bbc  Yes (*)     /usr/lib/libgobject-2.0.so.0
0x00007f7a425f6040  0x00007f7a4267ab92  Yes (*)     /usr/lib/libglib-2.0.so.0
0x00007f7a4247d040  0x00007f7a4256ff42  Yes (*)     /usr/lib/libSDL2-2.0.so.0
0x00007f7a423cc020  0x00007f7a42420ea6  Yes (*)     /usr/lib/libjpeg.so.8
0x00007f7a423b7020  0x00007f7a423c3b72  Yes (*)     /usr/lib/libbz2.so.1.0
0x00007f7a423b0210  0x00007f7a423b1179  Yes (*)     /usr/lib/libdl.so.2
0x00007f7a4213e020  0x00007f7a4227f58f  Yes (*)     /usr/lib/libzmusic.so.1
0x00007f7a41fa7040  0x00007f7a42092b52  Yes         /usr/lib/libstdc++.so.6
0x00007f7a41dda3b0  0x00007f7a41e75658  Yes (*)     /usr/lib/libm.so.6
0x00007f7a41d93420  0x00007f7a41dbc752  Yes         /usr/lib/libgomp.so.1
0x00007f7a41d73020  0x00007f7a41d83ca5  Yes         /usr/lib/libgcc_s.so.1
0x00007f7a41d55a70  0x00007f7a41d64025  Yes (*)     /usr/lib/libpthread.so.0
0x00007f7a41bab650  0x00007f7a41cf66bd  Yes (*)     /usr/lib/libc.so.6
0x00007f7a43062090  0x00007f7a43082746  Yes (*)     /lib64/ld-linux-x86-64.so.2
0x00007f7a41aae020  0x00007f7a41b2a323  Yes (*)     /usr/lib/libgdk-3.so.0
0x00007f7a41a80020  0x00007f7a41a80fac  Yes (*)     /usr/lib/libgmodule-2.0.so.0
0x00007f7a418fd020  0x00007f7a419f6a94  Yes (*)     /usr/lib/libgio-2.0.so.0
0x00007f7a418bb020  0x00007f7a418c12a3  Yes (*)     /usr/lib/libpangocairo-1.0.so.0
0x00007f7a41873020  0x00007f7a41899365  Yes (*)     /usr/lib/libpango-1.0.so.0
0x00007f7a4179f040  0x00007f7a4182f612  Yes (*)     /usr/lib/libharfbuzz.so.0
0x00007f7a41679020  0x00007f7a4174e2ff  Yes (*)     /usr/lib/libcairo.so.2
0x00007f7a41656020  0x00007f7a4165f93a  Yes (*)     /usr/lib/libpangoft2-1.0.so.0
0x00007f7a4160c020  0x00007f7a4163213e  Yes (*)     /usr/lib/libfontconfig.so.1
0x00007f7a4153e020  0x00007f7a415c226f  Yes (*)     /usr/lib/libfreetype.so.6
0x00007f7a41513020  0x00007f7a41517108  Yes (*)     /usr/lib/libfribidi.so.0
0x00007f7a41509020  0x00007f7a4150a241  Yes (*)     /usr/lib/libcairo-gobject.so.2
0x00007f7a414e4020  0x00007f7a414f7855  Yes (*)     /usr/lib/libgdk_pixbuf-2.0.so.0
0x00007f7a414c0020  0x00007f7a414cde54  Yes (*)     /usr/lib/libatk-1.0.so.0
0x00007f7a413e2020  0x00007f7a41448a17  Yes (*)     /usr/lib/libepoxy.so.0
0x00007f7a41374020  0x00007f7a4137e989  Yes (*)     /usr/lib/libXi.so.6
0x00007f7a4124c020  0x00007f7a412d57af  Yes (*)     /usr/lib/libX11.so.6
0x00007f7a41207040  0x00007f7a4121c892  Yes (*)     /usr/lib/libatk-bridge-2.0.so.0
0x00007f7a411f2020  0x00007f7a411f4446  Yes (*)     /usr/lib/libXfixes.so.3
0x00007f7a411e6040  0x00007f7a411eb39e  Yes (*)     /usr/lib/libffi.so.7
0x00007f7a41174020  0x00007f7a411c3b6d  Yes (*)     /usr/lib/libpcre.so.1
0x00007f7a410fd020  0x00007f7a4114e358  Yes (*)     /usr/lib/libsndfile.so.1
0x00007f7a4109a020  0x00007f7a410d4b86  Yes (*)     /usr/lib/libmpg123.so.0
0x00007f7a40fd6020  0x00007f7a4100d7f1  Yes (*)     /usr/lib/libfluidsynth.so.2
0x00007f7a40f17020  0x00007f7a40f92ab6  Yes (*)     /usr/lib/libasound.so.2
0x00007f7a40ec02b0  0x00007f7a40ecce54  Yes (*)     /usr/lib/libmvec.so.1
0x00007f7a40eb6750  0x00007f7a40eb98d0  Yes (*)     /usr/lib/librt.so.1
0x00007f7a40e74020  0x00007f7a40e91fec  Yes (*)     /usr/lib/libxkbcommon.so.0
0x00007f7a40e62020  0x00007f7a40e66e10  Yes (*)     /usr/lib/libwayland-client.so.0
0x00007f7a40e54020  0x00007f7a40e55c29  Yes (*)     /usr/lib/libwayland-cursor.so.0
0x00007f7a40e4f020  0x00007f7a40e4f1b5  Yes (*)     /usr/lib/libwayland-egl.so.1
0x00007f7a40e3d020  0x00007f7a40e4733e  Yes (*)     /usr/lib/libXext.so.6
0x00007f7a40e30020  0x00007f7a40e34c3e  Yes (*)     /usr/lib/libXcursor.so.1
0x00007f7a40e29020  0x00007f7a40e299ab  Yes (*)     /usr/lib/libXdamage.so.1
0x00007f7a40e24020  0x00007f7a40e24a55  Yes (*)     /usr/lib/libXcomposite.so.1
0x00007f7a40e16020  0x00007f7a40e1c696  Yes (*)     /usr/lib/libXrandr.so.2
0x00007f7a40e10020  0x00007f7a40e109a3  Yes (*)     /usr/lib/libXinerama.so.1
0x00007f7a40dbd040  0x00007f7a40df8c42  Yes (*)     /usr/lib/libmount.so.1
0x00007f7a40d9b710  0x00007f7a40da86fc  Yes (*)     /usr/lib/libresolv.so.2
0x00007f7a40d8e020  0x00007f7a40d91a24  Yes (*)     /usr/lib/libthai.so.0
0x00007f7a40d68020  0x00007f7a40d81462  Yes (*)     /usr/lib/libgraphite2.so.3
0x00007f7a40cc8020  0x00007f7a40d49934  Yes (*)     /usr/lib/libpixman-1.so.0
0x00007f7a40c8c020  0x00007f7a40caf8da  Yes (*)     /usr/lib/libpng16.so.16
0x00007f7a40c82020  0x00007f7a40c82b44  Yes (*)     /usr/lib/libxcb-shm.so.0
0x00007f7a40c63020  0x00007f7a40c75b86  Yes (*)     /usr/lib/libxcb.so.1
0x00007f7a40c4d020  0x00007f7a40c51b7f  Yes (*)     /usr/lib/libxcb-render.so.0
0x00007f7a40c3a020  0x00007f7a40c403a3  Yes (*)     /usr/lib/libXrender.so.1
0x00007f7a40c0c020  0x00007f7a40c29f1a  Yes (*)     /usr/lib/libexpat.so.1
0x00007f7a40bc1020  0x00007f7a40bef203  Yes (*)     /usr/lib/libdbus-1.so.3
0x00007f7a40b8c020  0x00007f7a40ba09d5  Yes (*)     /usr/lib/libatspi.so.0
0x00007f7a40b46020  0x00007f7a40b6e79b  Yes (*)     /usr/lib/libFLAC.so.8
0x00007f7a40b32020  0x00007f7a40b343de  Yes (*)     /usr/lib/libogg.so.0
0x00007f7a40b06020  0x00007f7a40b1b51b  Yes (*)     /usr/lib/libvorbis.so.0
0x00007f7a40a6b020  0x00007f7a40a6d677  Yes (*)     /usr/lib/libvorbisenc.so.2
0x00007f7a40a3b020  0x00007f7a40a45877  Yes (*)     /usr/lib/libjack.so.0
0x00007f7a40a30020  0x00007f7a40a31287  Yes (*)     /usr/lib/libpulse-simple.so.0
0x00007f7a40a02020  0x00007f7a40a19637  Yes (*)     /usr/lib/libportaudio.so.2
0x00007f7a409bf020  0x00007f7a409e6756  Yes (*)     /usr/lib/libreadline.so.8
0x00007f7a4090c020  0x00007f7a4096e909  Yes (*)     /usr/lib/libinstpatch-1.0.so.2
0x00007f7a4089e040  0x00007f7a408d0942  Yes (*)     /usr/lib/libblkid.so.1
0x00007f7a4088d020  0x00007f7a408905a1  Yes (*)     /usr/lib/libdatrie.so.1
0x00007f7a40887040  0x00007f7a40887d52  Yes (*)     /usr/lib/libXau.so.6
0x00007f7a4087e020  0x00007f7a4087f882  Yes (*)     /usr/lib/libXdmcp.so.6
0x00007f7a407db040  0x00007f7a40850750  Yes (*)     /usr/lib/libsystemd.so.0
0x00007f7a40634020  0x00007f7a407771b1  Yes (*)     /usr/lib/libdb-5.3.so
0x00007f7a405c2020  0x00007f7a405f01b0  Yes (*)     /usr/lib/libpulse.so.0
0x00007f7a40545040  0x00007f7a4058a402  Yes (*)     /usr/lib/pulseaudio/libpulsecommon-13.0.so
0x00007f7a404d5020  0x00007f7a40510fd8  Yes (*)     /usr/lib/libncursesw.so.6
0x00007f7a40499020  0x00007f7a404afe73  Yes (*)     /usr/lib/liblzma.so.5
0x00007f7a403c9020  0x00007f7a40481786  Yes (*)     /usr/lib/libzstd.so.1
0x00007f7a403a5020  0x00007f7a403be6a7  Yes (*)     /usr/lib/liblz4.so.1
0x00007f7a4028d040  0x00007f7a4035deb8  Yes (*)     /usr/lib/libgcrypt.so.20
0x00007f7a40279020  0x00007f7a4027b67a  Yes (*)     /usr/lib/libasyncns.so.0
0x00007f7a40255040  0x00007f7a402698d2  Yes (*)     /usr/lib/libgpg-error.so.0
0x00007f7a3fa23040  0x00007f7a3fa39fe0  Yes (*)     /usr/lib/libudev.so.1
0x00007f7a3fa1b020  0x00007f7a3fa1bcfd  Yes (*)     /usr/lib/libXss.so.1
0x00007f7a3fa14020  0x00007f7a3fa1682b  Yes (*)     /usr/lib/libXxf86vm.so.1
0x00007f7a3cbfb020  0x00007f7a3cbfda1d  Yes (*)     /usr/lib/libGL.so.1
0x00007f7a3cb42020  0x00007f7a3cb43f87  Yes (*)     /usr/lib/libGLdispatch.so.0
0x00007f7a3cad2020  0x00007f7a3caebbb1  Yes (*)     /usr/lib/libGLX.so.0
0x00007f7a3ca6a040  0x00007f7a3cab0a72  Yes (*)     /usr/lib/libGLX_mesa.so.0
0x00007f7a3ca24020  0x00007f7a3ca312f1  Yes (*)     /usr/lib/libglapi.so.0
0x00007f7a3ca08020  0x00007f7a3ca11616  Yes (*)     /usr/lib/libdrm.so.2
0x00007f7a3c9f1020  0x00007f7a3c9f96a6  Yes (*)     /usr/lib/libxcb-glx.so.0
0x00007f7a3fa0f020  0x00007f7a3fa0f10b  Yes (*)     /usr/lib/libX11-xcb.so.1
0x00007f7a3fa09020  0x00007f7a3fa0a1a6  Yes (*)     /usr/lib/libxcb-dri2.so.0
0x00007f7a3fa03020  0x00007f7a3fa03e34  Yes (*)     /usr/lib/libxcb-dri3.so.0
0x00007f7a3c9e1020  0x00007f7a3c9e18a6  Yes (*)     /usr/lib/libxcb-present.so.0
0x00007f7a3c9d9020  0x00007f7a3c9db1b2  Yes (*)     /usr/lib/libxcb-sync.so.1
0x00007f7a3c9d2020  0x00007f7a3c9d22ec  Yes (*)     /usr/lib/libxshmfence.so.1
0x00007f7a22999040  0x00007f7a2378ed22  Yes (*)     /usr/lib/dri/radeonsi_dri.so
0x00007f7a1dc66090  0x00007f7a20a37783  Yes (*)     /usr/lib/libLLVM-10.so
0x00007f7a3c9c2020  0x00007f7a3c9c8cb6  Yes (*)     /usr/lib/libsensors.so.5
0x00007f7a3c9b2020  0x00007f7a3c9b8975  Yes (*)     /usr/lib/libdrm_radeon.so.1
0x00007f7a3c999020  0x00007f7a3c9a8b7b  Yes (*)     /usr/lib/libelf.so.1
0x00007f7a3c98d020  0x00007f7a3c991550  Yes (*)     /usr/lib/libdrm_amdgpu.so.1
0x00007f7a3c982020  0x00007f7a3c985c37  Yes (*)     /usr/lib/libdrm_nouveau.so.2
0x00007f7a3c936020  0x00007f7a3c9678c9  Yes (*)     /usr/lib/libvulkan.so.1
0x00007f7a3c8ef040  0x00007f7a3c90b724  Yes (*)     /usr/lib/../lib/libedit.so.0
0x00007f7a3c7ae020  0x00007f7a3c88fabf  Yes (*)     /usr/lib/../lib/libxml2.so.2
0x00007f7a3c5fd020  0x00007f7a3c6e20c7  Yes (*)     /usr/lib/../lib/libicuuc.so.67
                                        Yes (*)     /usr/lib/../lib/libicudata.so.67
0x00007f7a3c588550  0x00007f7a3c58e17c  Yes (*)     /usr/lib/libnss_files.so.2
0x00007f79dc29b040  0x00007f79dc573302  Yes (*)     /usr/lib/libvulkan_radeon.so
0x00007f7a3c037020  0x00007f7a3c03bc41  Yes (*)     /usr/lib/libxcb-randr.so.0
(*): Shared library is missing debugging information.

* Threads
  Id   Target Id                                        Frame
* 1    Thread 0x7f7a40248f00 (LWP 3445) "gzdoom"        0x00007f7a41c51eef in wait4 () from /usr/lib/libc.so.6
  2    Thread 0x7f7a40245640 (LWP 3446) "gzdoom"        0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
  3    Thread 0x7f7a3f948640 (LWP 3449) "gzdoom"        0x00007f7a41c7a46f in poll () from /usr/lib/libc.so.6
  4    Thread 0x7f7a3f147640 (LWP 3450) "gzdoom"        0x00007f7a41c7a46f in poll () from /usr/lib/libc.so.6
  5    Thread 0x7f7a3e946640 (LWP 3451) "gzdoom"        0x00007f7a41d60014 in do_futex_wait.constprop () from /usr/lib/libpthread.so.0
  6    Thread 0x7f7a1b960640 (LWP 3457) "gzdoom:cs0"    0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
  7    Thread 0x7f7a1b15f640 (LWP 3458) "gzdoom:disk$0" 0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
  8    Thread 0x7f7a1a95e640 (LWP 3459) "gzdoom:disk$1" 0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
  9    Thread 0x7f7a1a15d640 (LWP 3460) "gzdoom:disk$2" 0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
  10   Thread 0x7f7a1995c640 (LWP 3461) "gzdoom:disk$3" 0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
  11   Thread 0x7f7a1915b640 (LWP 3462) "gzdoom:sh0"    0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
  12   Thread 0x7f7a1895a640 (LWP 3463) "gzdoom:sh1"    0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
  13   Thread 0x7f7a03fff640 (LWP 3464) "gzdoom:sh2"    0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
  14   Thread 0x7f7a037fe640 (LWP 3465) "gzdoom:sh3"    0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
  15   Thread 0x7f7a02ffd640 (LWP 3466) "gzdoom:sh4"    0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
  16   Thread 0x7f7a027fc640 (LWP 3467) "gzdoom:sh5"    0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
  17   Thread 0x7f7a01ffb640 (LWP 3468) "gzdoom:sh6"    0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
  18   Thread 0x7f7a017fa640 (LWP 3469) "gzdoom:sh7"    0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
  19   Thread 0x7f7a00ff9640 (LWP 3470) "gzdoom:sh8"    0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
  20   Thread 0x7f79dffff640 (LWP 3471) "gzdoom:sh9"    0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
  21   Thread 0x7f79df7fe640 (LWP 3472) "gzdoom:sh10"   0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
  22   Thread 0x7f79deffd640 (LWP 3473) "gzdoom:sh11"   0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
  23   Thread 0x7f79de7fc640 (LWP 3474) "gzdoom:shlo0"  0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
  24   Thread 0x7f79ddffb640 (LWP 3475) "gzdoom:shlo1"  0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
  25   Thread 0x7f79dd7fa640 (LWP 3476) "gzdoom:shlo2"  0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
  26   Thread 0x7f79dcff9640 (LWP 3477) "gzdoom:shlo3"  0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
  27   Thread 0x7f79bffff640 (LWP 3478) "gzdoom:shlo4"  0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
  28   Thread 0x7f79bf7fe640 (LWP 3483) "gzdoom:disk$0" 0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
  29   Thread 0x7f79beffd640 (LWP 3484) "gzdoom:disk$1" 0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
  30   Thread 0x7f79be7fc640 (LWP 3485) "gzdoom:disk$2" 0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
  31   Thread 0x7f79bdffb640 (LWP 3486) "gzdoom:disk$3" 0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
  32   Thread 0x7f79bc9f0640 (LWP 3491) "gzdoom"        0x00007f7a41d5dcf8 in pthread_cond_clockwait () from /usr/lib/libpthread.so.0
  33   Thread 0x7f799f7fe640 (LWP 3622) "gzdoom"        0x00007f7a41d5d9c8 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0

* FPU Status
  R7: Empty   0x00000000000000000000
  R6: Empty   0x00000000000000000000
  R5: Empty   0x00000000000000000000
  R4: Empty   0x00000000000000000000
  R3: Empty   0x00000000000000000000
  R2: Empty   0x00000000000000000000
  R1: Empty   0x00000000000000000000
=>R0: Empty   0x00000000000000000000

Status Word:         0x0000                                           
                       TOP: 0
Control Word:        0x037f   IM DM ZM OM UM PM
                       PC: Extended Precision (64-bits)
                       RC: Round to nearest
Tag Word:            0xffff
Instruction Pointer: 0x00:0x00000000
Operand Pointer:     0x00:0x00000000
Opcode:              0x0000

* Registers
rax            0xfffffffffffffe00  -512
rbx            0xf0d               3853
rcx            0x7f7a41c51eef      140163066175215
rdx            0x0                 0
rsi            0x55b23c961e6c      94224009010796
rdi            0xf0d               3853
rbp            0xb                 0xb
rsp            0x55b23c961e30      0x55b23c961e30
r8             0x0                 0
r9             0x0                 0
r10            0x0                 0
r11            0x200293            2097811
r12            0x55b23c961e6c      94224009010796
r13            0x55b23c95f360      94224008999776
r14            0x21                33
r15            0x1090              4240
rip            0x7f7a41c51eef      0x7f7a41c51eef <wait4+95>
eflags         0x200293            [ CF AF SF IF ID ]
cs             0x33                51
ss             0x2b                43
ds             0x0                 0
es             0x0                 0
fs             0x0                 0
gs             0x0                 0

* Backtrace

Thread 33 (Thread 0x7f799f7fe640 (LWP 3622)):
#0  0x00007f7a41d5d9c8 in pthread_cond_timedwait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f79dc366b2f in  () at /usr/lib/libvulkan_radeon.so
#2  0x00007f7a41d573e9 in start_thread () at /usr/lib/libpthread.so.0
#3  0x00007f7a41c85293 in clone () at /usr/lib/libc.so.6

Thread 32 (Thread 0x7f79bc9f0640 (LWP 3491)):
#0  0x00007f7a41d5dcf8 in pthread_cond_clockwait () at /usr/lib/libpthread.so.0
#1  0x000055b23c3bc0eb in OpenALSoundRenderer::BackgroundProc() ()
#2  0x00007f7a41fe0c24 in std::execute_native_thread_routine(void*) (__p=0x55b2451591b0) at /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80
#3  0x00007f7a41d573e9 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f7a41c85293 in clone () at /usr/lib/libc.so.6

Thread 31 (Thread 0x7f79bdffb640 (LWP 3486)):
#0  0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f79dc3714fc in  () at /usr/lib/libvulkan_radeon.so
#2  0x00007f79dc371388 in  () at /usr/lib/libvulkan_radeon.so
#3  0x00007f7a41d573e9 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f7a41c85293 in clone () at /usr/lib/libc.so.6

Thread 30 (Thread 0x7f79be7fc640 (LWP 3485)):
#0  0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f79dc3714fc in  () at /usr/lib/libvulkan_radeon.so
#2  0x00007f79dc371388 in  () at /usr/lib/libvulkan_radeon.so
#3  0x00007f7a41d573e9 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f7a41c85293 in clone () at /usr/lib/libc.so.6

Thread 29 (Thread 0x7f79beffd640 (LWP 3484)):
#0  0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f79dc3714fc in  () at /usr/lib/libvulkan_radeon.so
#2  0x00007f79dc371388 in  () at /usr/lib/libvulkan_radeon.so
#3  0x00007f7a41d573e9 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f7a41c85293 in clone () at /usr/lib/libc.so.6

Thread 28 (Thread 0x7f79bf7fe640 (LWP 3483)):
#0  0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f79dc3714fc in  () at /usr/lib/libvulkan_radeon.so
#2  0x00007f79dc371388 in  () at /usr/lib/libvulkan_radeon.so
#3  0x00007f7a41d573e9 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f7a41c85293 in clone () at /usr/lib/libc.so.6

Thread 27 (Thread 0x7f79bffff640 (LWP 3478)):
#0  0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f7a22d43e3c in  () at /usr/lib/dri/radeonsi_dri.so
#2  0x00007f7a22d42838 in  () at /usr/lib/dri/radeonsi_dri.so
#3  0x00007f7a41d573e9 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f7a41c85293 in clone () at /usr/lib/libc.so.6

Thread 26 (Thread 0x7f79dcff9640 (LWP 3477)):
#0  0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f7a22d43e3c in  () at /usr/lib/dri/radeonsi_dri.so
#2  0x00007f7a22d42838 in  () at /usr/lib/dri/radeonsi_dri.so
#3  0x00007f7a41d573e9 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f7a41c85293 in clone () at /usr/lib/libc.so.6

Thread 25 (Thread 0x7f79dd7fa640 (LWP 3476)):
#0  0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f7a22d43e3c in  () at /usr/lib/dri/radeonsi_dri.so
#2  0x00007f7a22d42838 in  () at /usr/lib/dri/radeonsi_dri.so
#3  0x00007f7a41d573e9 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f7a41c85293 in clone () at /usr/lib/libc.so.6

Thread 24 (Thread 0x7f79ddffb640 (LWP 3475)):
#0  0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f7a22d43e3c in  () at /usr/lib/dri/radeonsi_dri.so
#2  0x00007f7a22d42838 in  () at /usr/lib/dri/radeonsi_dri.so
#3  0x00007f7a41d573e9 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f7a41c85293 in clone () at /usr/lib/libc.so.6

Thread 23 (Thread 0x7f79de7fc640 (LWP 3474)):
#0  0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f7a22d43e3c in  () at /usr/lib/dri/radeonsi_dri.so
#2  0x00007f7a22d42838 in  () at /usr/lib/dri/radeonsi_dri.so
#3  0x00007f7a41d573e9 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f7a41c85293 in clone () at /usr/lib/libc.so.6

Thread 22 (Thread 0x7f79deffd640 (LWP 3473)):
#0  0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f7a22d43e3c in  () at /usr/lib/dri/radeonsi_dri.so
#2  0x00007f7a22d42838 in  () at /usr/lib/dri/radeonsi_dri.so
#3  0x00007f7a41d573e9 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f7a41c85293 in clone () at /usr/lib/libc.so.6

Thread 21 (Thread 0x7f79df7fe640 (LWP 3472)):
#0  0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f7a22d43e3c in  () at /usr/lib/dri/radeonsi_dri.so
#2  0x00007f7a22d42838 in  () at /usr/lib/dri/radeonsi_dri.so
#3  0x00007f7a41d573e9 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f7a41c85293 in clone () at /usr/lib/libc.so.6

Thread 20 (Thread 0x7f79dffff640 (LWP 3471)):
#0  0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f7a22d43e3c in  () at /usr/lib/dri/radeonsi_dri.so
#2  0x00007f7a22d42838 in  () at /usr/lib/dri/radeonsi_dri.so
#3  0x00007f7a41d573e9 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f7a41c85293 in clone () at /usr/lib/libc.so.6

Thread 19 (Thread 0x7f7a00ff9640 (LWP 3470)):
#0  0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f7a22d43e3c in  () at /usr/lib/dri/radeonsi_dri.so
#2  0x00007f7a22d42838 in  () at /usr/lib/dri/radeonsi_dri.so
#3  0x00007f7a41d573e9 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f7a41c85293 in clone () at /usr/lib/libc.so.6

Thread 18 (Thread 0x7f7a017fa640 (LWP 3469)):
#0  0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f7a22d43e3c in  () at /usr/lib/dri/radeonsi_dri.so
#2  0x00007f7a22d42838 in  () at /usr/lib/dri/radeonsi_dri.so
#3  0x00007f7a41d573e9 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f7a41c85293 in clone () at /usr/lib/libc.so.6

Thread 17 (Thread 0x7f7a01ffb640 (LWP 3468)):
#0  0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f7a22d43e3c in  () at /usr/lib/dri/radeonsi_dri.so
#2  0x00007f7a22d42838 in  () at /usr/lib/dri/radeonsi_dri.so
#3  0x00007f7a41d573e9 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f7a41c85293 in clone () at /usr/lib/libc.so.6

Thread 16 (Thread 0x7f7a027fc640 (LWP 3467)):
#0  0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f7a22d43e3c in  () at /usr/lib/dri/radeonsi_dri.so
#2  0x00007f7a22d42838 in  () at /usr/lib/dri/radeonsi_dri.so
#3  0x00007f7a41d573e9 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f7a41c85293 in clone () at /usr/lib/libc.so.6

Thread 15 (Thread 0x7f7a02ffd640 (LWP 3466)):
#0  0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f7a22d43e3c in  () at /usr/lib/dri/radeonsi_dri.so
#2  0x00007f7a22d42838 in  () at /usr/lib/dri/radeonsi_dri.so
#3  0x00007f7a41d573e9 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f7a41c85293 in clone () at /usr/lib/libc.so.6

Thread 14 (Thread 0x7f7a037fe640 (LWP 3465)):
#0  0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f7a22d43e3c in  () at /usr/lib/dri/radeonsi_dri.so
#2  0x00007f7a22d42838 in  () at /usr/lib/dri/radeonsi_dri.so
#3  0x00007f7a41d573e9 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f7a41c85293 in clone () at /usr/lib/libc.so.6

Thread 13 (Thread 0x7f7a03fff640 (LWP 3464)):
#0  0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f7a22d43e3c in  () at /usr/lib/dri/radeonsi_dri.so
#2  0x00007f7a22d42838 in  () at /usr/lib/dri/radeonsi_dri.so
#3  0x00007f7a41d573e9 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f7a41c85293 in clone () at /usr/lib/libc.so.6

Thread 12 (Thread 0x7f7a1895a640 (LWP 3463)):
#0  0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f7a22d43e3c in  () at /usr/lib/dri/radeonsi_dri.so
#2  0x00007f7a22d42838 in  () at /usr/lib/dri/radeonsi_dri.so
#3  0x00007f7a41d573e9 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f7a41c85293 in clone () at /usr/lib/libc.so.6

Thread 11 (Thread 0x7f7a1915b640 (LWP 3462)):
#0  0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f7a22d43e3c in  () at /usr/lib/dri/radeonsi_dri.so
#2  0x00007f7a22d42838 in  () at /usr/lib/dri/radeonsi_dri.so
#3  0x00007f7a41d573e9 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f7a41c85293 in clone () at /usr/lib/libc.so.6

Thread 10 (Thread 0x7f7a1995c640 (LWP 3461)):
#0  0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f7a22d43e3c in  () at /usr/lib/dri/radeonsi_dri.so
#2  0x00007f7a22d42838 in  () at /usr/lib/dri/radeonsi_dri.so
#3  0x00007f7a41d573e9 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f7a41c85293 in clone () at /usr/lib/libc.so.6

Thread 9 (Thread 0x7f7a1a15d640 (LWP 3460)):
#0  0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f7a22d43e3c in  () at /usr/lib/dri/radeonsi_dri.so
#2  0x00007f7a22d42838 in  () at /usr/lib/dri/radeonsi_dri.so
#3  0x00007f7a41d573e9 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f7a41c85293 in clone () at /usr/lib/libc.so.6

Thread 8 (Thread 0x7f7a1a95e640 (LWP 3459)):
#0  0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f7a22d43e3c in  () at /usr/lib/dri/radeonsi_dri.so
#2  0x00007f7a22d42838 in  () at /usr/lib/dri/radeonsi_dri.so
#3  0x00007f7a41d573e9 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f7a41c85293 in clone () at /usr/lib/libc.so.6

Thread 7 (Thread 0x7f7a1b15f640 (LWP 3458)):
#0  0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f7a22d43e3c in  () at /usr/lib/dri/radeonsi_dri.so
#2  0x00007f7a22d42838 in  () at /usr/lib/dri/radeonsi_dri.so
#3  0x00007f7a41d573e9 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f7a41c85293 in clone () at /usr/lib/libc.so.6

Thread 6 (Thread 0x7f7a1b960640 (LWP 3457)):
#0  0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f7a22d43e3c in  () at /usr/lib/dri/radeonsi_dri.so
#2  0x00007f7a22d42838 in  () at /usr/lib/dri/radeonsi_dri.so
#3  0x00007f7a41d573e9 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007f7a41c85293 in clone () at /usr/lib/libc.so.6

Thread 5 (Thread 0x7f7a3e946640 (LWP 3451)):
#0  0x00007f7a41d60014 in do_futex_wait.constprop () at /usr/lib/libpthread.so.0
#1  0x00007f7a41d60118 in __new_sem_wait_slow.constprop.0 () at /usr/lib/libpthread.so.0
#2  0x00007f7a42f9ee74 in  () at /usr/lib/libopenal.so.1
#3  0x00007f7a42f3ce09 in  () at /usr/lib/libopenal.so.1
#4  0x00007f7a41fe0c24 in std::execute_native_thread_routine(void*) (__p=0x55b23e513930) at /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80
#5  0x00007f7a41d573e9 in start_thread () at /usr/lib/libpthread.so.0
#6  0x00007f7a41c85293 in clone () at /usr/lib/libc.so.6

Thread 4 (Thread 0x7f7a3f147640 (LWP 3450)):
#0  0x00007f7a41c7a46f in poll () at /usr/lib/libc.so.6
#1  0x00007f7a42f95ba7 in  () at /usr/lib/libopenal.so.1
#2  0x00007f7a405d0059 in pa_mainloop_poll () at /usr/lib/libpulse.so.0
#3  0x00007f7a405da301 in pa_mainloop_iterate () at /usr/lib/libpulse.so.0
#4  0x00007f7a405da3b1 in pa_mainloop_run () at /usr/lib/libpulse.so.0
#5  0x00007f7a42f9649e in  () at /usr/lib/libopenal.so.1
#6  0x00007f7a41fe0c24 in std::execute_native_thread_routine(void*) (__p=0x7f7a3800a370) at /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80
#7  0x00007f7a41d573e9 in start_thread () at /usr/lib/libpthread.so.0
#8  0x00007f7a41c85293 in clone () at /usr/lib/libc.so.6

Thread 3 (Thread 0x7f7a3f948640 (LWP 3449)):
#0  0x00007f7a41c7a46f in poll () at /usr/lib/libc.so.6
#1  0x00007f7a42f95ba7 in  () at /usr/lib/libopenal.so.1
#2  0x00007f7a405d0059 in pa_mainloop_poll () at /usr/lib/libpulse.so.0
#3  0x00007f7a405da301 in pa_mainloop_iterate () at /usr/lib/libpulse.so.0
#4  0x00007f7a405da3b1 in pa_mainloop_run () at /usr/lib/libpulse.so.0
#5  0x00007f7a42f9649e in  () at /usr/lib/libopenal.so.1
#6  0x00007f7a41fe0c24 in std::execute_native_thread_routine(void*) (__p=0x55b23e65b9e0) at /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80
#7  0x00007f7a41d573e9 in start_thread () at /usr/lib/libpthread.so.0
#8  0x00007f7a41c85293 in clone () at /usr/lib/libc.so.6

Thread 2 (Thread 0x7f7a40245640 (LWP 3446)):
#0  0x00007f7a41d5d6a2 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f7a41fdac11 in __gthread_cond_wait (__mutex=<optimized out>, __cond=<optimized out>) at /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:865
        __e = <optimized out>
#2  std::condition_variable::wait(std::unique_lock<std::mutex>&) (this=<optimized out>, __lock=...) at /build/gcc/src/gcc/libstdc++-v3/src/c++11/condition_variable.cc:53
        __e = <optimized out>
#3  0x000055b23c0caed5 in ctpl::thread_pool::set_thread(int)::{lambda()#1}::operator()() const ()
#4  0x00007f7a41fe0c24 in std::execute_native_thread_routine(void*) (__p=0x55b23dc890b0) at /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80
#5  0x00007f7a41d573e9 in start_thread () at /usr/lib/libpthread.so.0
#6  0x00007f7a41c85293 in clone () at /usr/lib/libc.so.6

Thread 1 (Thread 0x7f7a40248f00 (LWP 3445)):
#0  0x00007f7a41c51eef in wait4 () at /usr/lib/libc.so.6
#1  0x000055b23bf216ed in  ()
#2  0x00007f7a41d620f0 in <signal handler called> () at /usr/lib/libpthread.so.0
#3  0x000055b23c4d8eb4 in DObject::Destroy() ()
#4  0x000055b23c2af085 in  ()
#5  0x000055b23c53082e in VMNativeFunction::NativeScriptCall(VMFunction*, VMValue*, int, VMReturn*, int) ()
#6  0x00007f7a3cf9c7c5 in  ()
#7  0x0000000000000000 in  ()
[Inferior 1 (process 3445) detached]


As you can see, the mods I'm using are:
  • Faithful Doom
  • Nash's Gore
  • Doom Skyboxes
  • IDKFA (music mod)
  • Reikall's Doom Voxels
  • HiRes Doom SFX
  • Rock's Crosshairs

I'm using GZDoom v4.4.2 on Arch Linux
User avatar
lumbo7332
 
Joined: 27 Jul 2018
Operating System: Other Linux 64-bit
Graphics Processor: ATI/AMD with Vulkan Support

Re: Crash with "Address not mapped to object (signal 11)" er

Postby sigsegv » Tue Jun 22, 2021 7:32 am

I also get this crash frequently on a debug build with the latest gzdoom commit (256451115). See attached stack trace.

After inspecting the source code, it seems like there's an atomicity violation when calling DObject::Destroy(), as if it gets called after the object has already been / is in the process of being destroyed. To test this hypothesis, I've added a mutex and a flag for this method, as you can see in the following diff, ensuring that the object is destroyed only once. This seems to avoid the atomicity violation, although it could be masking the actual issue.

Code: Select allExpand view
diff --git a/src/common/objects/dobject.cpp b/src/common/objects/dobject.cpp
index 9f4a164e4..d6a6e9379 100644
--- a/src/common/objects/dobject.cpp
+++ b/src/common/objects/dobject.cpp
@@ -316,17 +316,35 @@ void DObject::Release()
 
 void DObject::Destroy ()
 {
-   // We cannot call the VM during shutdown because all the needed data has been or is in the process of being deleted.
-   if (PClass::bVMOperational)
-   {
-      IFVIRTUAL(DObject, OnDestroy)
-      {
-         VMValue params[1] = { (DObject*)this };
-         VMCall(func, params, 1, nullptr, 0);
+   MutexDestroy.lock();
+
+   try {
+      if (!AlreadyDestroyed) {
+         AlreadyDestroyed = true;
+         // We cannot call the VM during shutdown because all the needed data has been or is in the process of being deleted.
+         if (PClass::bVMOperational)
+         {
+            IFVIRTUAL(DObject, OnDestroy)
+            {
+               VMValue params[1] = { (DObject*)this };
+               VMCall(func, params, 1, nullptr, 0);
+            }
+         }
+
+         // Avoid deadlock during shutdown
+         MutexDestroy.unlock();
+         OnDestroy();
+         MutexDestroy.lock();
+
+         ObjectFlags = (ObjectFlags & ~OF_Fixed) | OF_EuthanizeMe;
       }
+   } catch(...) {
+      AlreadyDestroyed = false;
+      MutexDestroy.unlock();
+      throw;
    }
-   OnDestroy();
-   ObjectFlags = (ObjectFlags & ~OF_Fixed) | OF_EuthanizeMe;
+
+   MutexDestroy.unlock();
 }
 
 DEFINE_ACTION_FUNCTION(DObject, Destroy)
diff --git a/src/common/objects/dobject.h b/src/common/objects/dobject.h
index ce591b6d6..a24c5ac64 100644
--- a/src/common/objects/dobject.h
+++ b/src/common/objects/dobject.h
@@ -36,6 +36,7 @@
 
 #include <stdlib.h>
 #include <type_traits>
+#include <mutex>
 #include "m_alloc.h"
 #include "vectors.h"
 #include "name.h"
@@ -207,6 +208,8 @@ public:
    DObject *ObjNext;         // Keep track of all allocated objects
    DObject *GCNext;         // Next object in this collection list
    uint32_t ObjectFlags;         // Flags for this object
+   bool AlreadyDestroyed = false;
+   std::mutex MutexDestroy;
 
    void *ScriptVar(FName field, PType *type);
You do not have the required permissions to view the files attached to this post.
sigsegv
 
Joined: 22 Jun 2021
Operating System: RedHat-like Linux (RHEL, Fedora, CentOS, etc) 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Intel (Modern GZDoom)

Re: Crash with "Address not mapped to object (signal 11)" er

Postby _mental_ » Tue Jun 22, 2021 8:48 am

This crash isn't affected by the mutex you added as everything happens on the single thread. GZDoom doesn't use coroutines, fibers and stuff like that either.
I don't know what 'atomicity violation' is. If you meant a (data) race condition, this is not the case for sure.
The problem can be caused by a dangling pointer. An assertion for !AlreadyDestroyed would help to catch the moment of double destroy if it's really the case.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Crash with "Address not mapped to object (signal 11)" er

Postby sigsegv » Wed Jun 23, 2021 2:41 pm

Thanks for the clarification. I was interpreting DObject::Destroy() as an atomic operation, in the sense that the object shouldn't be partially destroyed when this gets called.

These are the changes with the assertion you mentioned:

Code: Select allExpand view
diff --git a/src/common/objects/dobject.cpp b/src/common/objects/dobject.cpp
index 9f4a164e4..54417cef8 100644
--- a/src/common/objects/dobject.cpp
+++ b/src/common/objects/dobject.cpp
@@ -316,6 +316,10 @@ void DObject::Release()
 
 void DObject::Destroy ()
 {
+   usleep(200);
+   assert(!AlreadyDestroyed);
+   AlreadyDestroyed = true;
+
    // We cannot call the VM during shutdown because all the needed data has been or is in the process of being deleted.
    if (PClass::bVMOperational)
    {
@@ -325,6 +329,7 @@ void DObject::Destroy ()
          VMCall(func, params, 1, nullptr, 0);
       }
    }

    OnDestroy();
    ObjectFlags = (ObjectFlags & ~OF_Fixed) | OF_EuthanizeMe;
 }
diff --git a/src/common/objects/dobject.h b/src/common/objects/dobject.h
index ce591b6d6..0deeb3981 100644
--- a/src/common/objects/dobject.h
+++ b/src/common/objects/dobject.h
@@ -36,6 +36,7 @@
 
 #include <stdlib.h>
 #include <type_traits>
+#include <unistd.h>
 #include "m_alloc.h"
 #include "vectors.h"
 #include "name.h"
@@ -207,6 +208,7 @@ public:
    DObject *ObjNext;         // Keep track of all allocated objects
    DObject *GCNext;         // Next object in this collection list
    uint32_t ObjectFlags;         // Flags for this object
+   bool AlreadyDestroyed = false;
 
    void *ScriptVar(FName field, PType *type);


Sleeping at the beginning seems to make this a bit easier to reproduce.

The assertion always fails during shutdown, but only when "AlreadyDestroyed = true" is placed before "OnDestroy()", generating this backtrace:
gzdoom-crash-shutdown.log


During gameplay, I don't hit the added assertion. I ended up getting another assertion fail, which also happens during a call to DObject::Destroy():

Code: Select allExpand view
gzdoom: /home/sigsegv/opt/gzdoom/src/common/objects/dobject.h:256: PClass* DObject::GetClass() const: Assertion `Class != nullptr' failed.


Backtrace:
gzdoom-crash-2-class-null.log


I also got the previous "Address not mapped to object (signal 11)" error once more. Backtrace:
gzdoom-crash-3.log
You do not have the required permissions to view the files attached to this post.
sigsegv
 
Joined: 22 Jun 2021
Operating System: RedHat-like Linux (RHEL, Fedora, CentOS, etc) 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Intel (Modern GZDoom)

Re: Crash with "Address not mapped to object (signal 11)" er

Postby _mental_ » Fri Jun 25, 2021 1:52 am

If you are able to reproduce the issue reliably, you can add the following code after this line. Please let us know if it changes anything.
Code: Select allExpand view
GC::WriteBarrier(self);
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Crash with "Address not mapped to object (signal 11)" er

Postby sigsegv » Sun Jun 27, 2021 7:44 am

Gave it a few tries, but haven't had a crash so far, either with or without that barrier call. It's still very non-deterministic.

I'm curious what the underlying issue could be. I was looking at AActor::UnlinkFromWorld(), where that 0xbeefcafe value is set to an actor's sprev field, but somehow during a crash, ends up in an actor's class field, as we see in the backtrace of gzdoom-crash-3.log. Seems like AActor::UnlinkFromWorld() is being called on a dangling reference, then ends up setting some other thing's field, which happens to be the class field. Would that barrier call help prevent such cases?
sigsegv
 
Joined: 22 Jun 2021
Operating System: RedHat-like Linux (RHEL, Fedora, CentOS, etc) 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Intel (Modern GZDoom)

Re: Crash with "Address not mapped to object (signal 11)" er

Postby _mental_ » Sun Jun 27, 2021 9:06 am

If I got it right, a dangling pointer in corpse queue may appear if actor is added to the queue when garbage collector propagates object states. Corpse actor remains ready-for-collection (white), and if it’s destroyed and garbage collected before dequeue, a dangling pointer will be accessed during its removal from queue.
I would ask Graf to take a look at that code in order to validate this logic.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Crash with "Address not mapped to object (signal 11)" er

Postby _mental_ » Wed Jun 30, 2021 1:50 am

_mental_
 
 
 
Joined: 07 Aug 2011


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests