This might be 1/0 magic…
I got a deadlock. Rendering stops. Simulation stops (CPU load drops to 13% of a single core.). Autosaves stop being saved.
It now happened the second time, the first time was several versions ago, but I don’t remember which 0.16.x version that was.
After I got the deadlock, I attached gdb to the factorio PID and dumped backtraces using thread apply all bt, included in gdb.txt
(I needed 2 attempts to attach gdb to factorio. During the first attempt, gdb hang after running attach. I hope that killing gdb and then attaching another instance did not destroy the gathered backtraces.)
If this deadlock happens again, what can I do to produce more useful debug output?
log
Code: Select all
0.000 2018-03-27 22:52:36; Factorio 0.16.35 (build 36215, linux64, steam)
0.145 Operating system: Linux (Ubuntu 17.10)
0.145 Program arguments: "/mnt/Spiele/Steam/steamapps/common/Factorio/bin/x64/factorio"
0.145 Read data path: /mnt/Spiele/Steam/steamapps/common/Factorio/data
0.145 Write data path: /home/thomas/.factorio [18950/100665MB]
0.145 Binaries path: /mnt/Spiele/Steam/steamapps/common/Factorio/bin
0.243 System info: [CPU: AMD Phenom(tm) II X6 1055T Processor, 6 cores, RAM: 16039 MB]
0.243 Environment: DISPLAY=:0, WAYLAND_DISPLAY=<unset>
0.246 Display options: [FullScreen: 1] [VSync: 0] [UIScale: system (100.0%)] [MultiSampling: X 8] [Screen: 255] [Lang: de]
0.279 Available display adapters: 2
0.279 [0]: resolution 1680x1050px at [0,0]
0.279 [1]: resolution 1680x1050px at [1680,0]
0.279 Create display on adapter 0. Size 1280x720 at position [190, 147].
0.810 Initialised OpenGL:[0] GeForce GTX 1070/PCIe/SSE2; driver: 4.5.0 NVIDIA 384.111
0.811 Video memory size (dedicated/total available/current available): 8192/8192/7537 MB
0.937 Graphics settings preset: extreme
0.937 Graphics options: [Graphics quality: high] [Video memory usage: all] [Light scale: 100%] [DXT: false] [Shader: 1]
0.937 [Parallel sprite loading: 1] [Max texture size: 0/8192] [Bmp cache: 0] [Sprite slicing: 0] [Low quality rotation: 0]
1.492 Error GlobalModSettings.cpp:107: Failed to migrate mod settings file: Error when opening /home/thomas/.factorio/mods/mod-settings.json for reading: No such file or directory
1.495 Loading mod core 0.0.0 (data.lua)
1.620 Loading mod base 0.16.35 (data.lua)
2.868 Loading mod base 0.16.35 (data-updates.lua)
3.022 Checksum for core: 1316978547
3.022 Checksum of base: 4140083139
3.329 Loading sounds...
5.355 Info PlayerData.cpp:67: Local player-data.json unavailable
5.355 Info PlayerData.cpp:70: Cloud player-data.json available, timestamp 1522008552
5.803 Loaded shader file /mnt/Spiele/Steam/steamapps/common/Factorio/data/core/graphics/shaders/game.glsl
5.812 Loaded shader file /mnt/Spiele/Steam/steamapps/common/Factorio/data/core/graphics/shaders/zoom-to-world.glsl
5.832 Loaded shader file /mnt/Spiele/Steam/steamapps/common/Factorio/data/core/graphics/shaders/alpha-mask.glsl
5.865 Initial atlas bitmap size is 16384
5.915 Created atlas bitmap 16384x16379 [none]
5.920 Created atlas bitmap 16384x6835 [none]
5.927 Created atlas bitmap 16384x8382 [shadow]
5.929 Created atlas bitmap 16384x2615 [decal]
5.932 Created atlas bitmap 8192x5576 [mipmap]
5.932 Created atlas bitmap 8192x800 [mipmap, smoke]
5.943 Created atlas bitmap 8192x8192 [linear-minification, mipmap, terrain]
5.944 Created atlas bitmap 8192x1200 [linear-minification, mipmap, terrain]
5.945 Created atlas bitmap 8192x2092 [no-crop, trilinear-filtering, icon, light]
5.946 Created atlas bitmap 8192x924 [alpha-mask]
38.492 Sprites loaded
38.492 Convert atlas 8192x5576 to: mipmap
39.310 Convert atlas 8192x800 to: mipmap
39.415 Convert atlas 8192x8192 to: min-linear
40.633 Convert atlas 8192x1200 to: min-linear
40.811 Convert atlas 8192x2092 to: trilinear-filtering
41.104 Convert atlas 8192x924 to: alpha-mask
41.217 Custom inputs active: 0
41.324 Factorio initialised
46.080 Loading map /home/thomas/.factorio/saves/2.zip: 20161127 bytes.
46.130 Loading Level.dat: 50269464 bytes.
46.151 Info Scenario.cpp:136: Map version 0.16.35-0
48.346 Loading script.dat: 175 bytes.
48.371 Checksum for script /home/thomas/.factorio/temp/currently-playing/control.lua: 55817070
190.527 Info AppManager.cpp:260: Saving to _autosave2 (blocking).
192.331 Info AppManagerStates.cpp:1642: Saving finished
495.965 Info AppManager.cpp:260: Saving to _autosave3 (blocking).
497.682 Info AppManagerStates.cpp:1642: Saving finished
797.790 Info AppManager.cpp:260: Saving to _autosave1 (blocking).
799.500 Info AppManagerStates.cpp:1642: Saving finished
1099.532 Info AppManager.cpp:260: Saving to _autosave2 (blocking).
1101.385 Info AppManagerStates.cpp:1642: Saving finished
1401.383 Info AppManager.cpp:260: Saving to _autosave3 (blocking).
1403.132 Info AppManagerStates.cpp:1642: Saving finished
1704.338 Info AppManager.cpp:260: Saving to _autosave1 (blocking).
1706.043 Info AppManagerStates.cpp:1642: Saving finished
2006.121 Info AppManager.cpp:260: Saving to _autosave2 (blocking).
2007.978 Info AppManagerStates.cpp:1642: Saving finished
3797.060 Received SIGINT, shutting down
3801.956 Info GlobalContext.cpp:694: Waiting for child processes to exit:
3802.600 Steam API shutdown.
3802.607 Goodbye
Backtraces generated using gdb
Code: Select all
Thread 13 (Thread 0x7ff5f89a2700 (LWP 16746)):
#0 0x00007ff6e8de6072 in futex_wait_cancelable (private=<optimized out>, expected=0,
futex_word=0x7ff5ad26a580) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1 __pthread_cond_wait_common (abstime=0x0, mutex=0x7ff5ad26a530, cond=0x7ff5ad26a558)
at pthread_cond_wait.c:502
#2 __pthread_cond_wait (cond=0x7ff5ad26a558, mutex=0x7ff5ad26a530) at pthread_cond_wait.c:655
#3 0x00000000014fe14c in std::condition_variable::wait(std::unique_lock<std::mutex>&) ()
#4 0x0000000000665c80 in MapGenerationHelper::consumeTasks ()
at /tmp/factorio-build-ANpZow/src/Map/MapGenerationHelper.cpp:154
#5 0x0000000001500d8f in execute_native_thread_routine ()
#6 0x00007ff6e8ddf7fc in start_thread (arg=0x7ff5f89a2700) at pthread_create.c:465
#7 0x00007ff6e71b4b5f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 12 (Thread 0x7ff6bdb7e700 (LWP 16743)):
#0 0x00007ff6e8de6072 in futex_wait_cancelable (private=<optimized out>, expected=0,
futex_word=0x7ffd44c0fb54) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1 __pthread_cond_wait_common (abstime=0x0, mutex=0x7ffd44c0fae0, cond=0x7ffd44c0fb28)
at pthread_cond_wait.c:502
#2 __pthread_cond_wait (cond=0x7ffd44c0fb28, mutex=0x7ffd44c0fae0) at pthread_cond_wait.c:655
#3 0x00000000014fe14c in std::condition_variable::wait(std::unique_lock<std::mutex>&) ()
#4 0x000000000095fc8b in WorkerThread::loop ()
at /tmp/factorio-build-ANpZow/src/Util/WorkerThread.cpp:30
#5 0x0000000001500d8f in execute_native_thread_routine ()
#6 0x00007ff6e8ddf7fc in start_thread (arg=0x7ff6bdb7e700) at pthread_create.c:465
#7 0x00007ff6e71b4b5f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 11 (Thread 0x7ff5f39a0700 (LWP 16742)):
#0 0x00007ff6e8de6072 in futex_wait_cancelable (private=<optimized out>, expected=0,
futex_word=0x9f2f4e0) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1 __pthread_cond_wait_common (abstime=0x0, mutex=0x9f2f490, cond=0x9f2f4b8)
at pthread_cond_wait.c:502
#2 __pthread_cond_wait (cond=0x9f2f4b8, mutex=0x9f2f490) at pthread_cond_wait.c:655
#3 0x00000000014fe14c in std::condition_variable::wait(std::unique_lock<std::mutex>&) ()
#4 0x0000000000b60f5b in ModPortal::processRequestsLoop ()
at /tmp/factorio-build-ANpZow/src/ModPortal/ModPortal.cpp:210
#5 0x0000000001500d8f in execute_native_thread_routine ()
#6 0x00007ff6e8ddf7fc in start_thread (arg=0x7ff5f39a0700) at pthread_create.c:465
#7 0x00007ff6e71b4b5f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 10 (Thread 0x7ff6d0c66700 (LWP 16707)):
#0 0x00007ff6e71a8951 in __GI___poll (fds=0x7ff6d0c65330, nfds=1, timeout=10)
at ../sysdeps/unix/sysv/linux/poll.c:29
#1 0x00007ff6e8b1f91e in ?? () from /usr/lib/x86_64-linux-gnu/libasound.so.2
#2 0x00007ff6e8b1fbeb in snd_pcm_wait () from /usr/lib/x86_64-linux-gnu/libasound.so.2
#3 0x00000000011f0edd in alsa_update_rw (self=0x3792680, arg=0x36c8e50)
at addons/audio/alsa.c:416
#4 0x00000000011b4e98 in thread_func_trampoline (inner=<optimized out>, _outer=0x3792680)
at src/threads.c:80
#5 0x00000000011b4c1b in thread_proc_trampoline (data=<optimized out>) at src/unix/uxthread.c:44
#6 0x00007ff6e8ddf7fc in start_thread (arg=0x7ff6d0c66700) at pthread_create.c:465
#7 0x00007ff6e71b4b5f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 9 (Thread 0x7ff6d1467700 (LWP 16706)):
#0 0x00007ff6e71a8951 in __GI___poll (fds=0x7ff6cc004700, nfds=3, timeout=1374)
at ../sysdeps/unix/sysv/linux/poll.c:29
#1 0x00007ff6d7de2451 in ?? () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#2 0x00007ff6d7dd3e10 in pa_mainloop_poll () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#3 0x00007ff6d7dd44a0 in pa_mainloop_iterate () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#4 0x00007ff6d7dd4530 in pa_mainloop_run () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#5 0x00007ff6d7de2399 in ?? () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#6 0x00007ff6d7b83ed8 in ?? () from /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-10.0.so
#7 0x00007ff6e8ddf7fc in start_thread (arg=0x7ff6d1467700) at pthread_create.c:465
#8 0x00007ff6e71b4b5f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 8 (Thread 0x7ff6ddab1700 (LWP 16701)):
#0 0x00007ff6e71aa8c0 in __GI___select (nfds=nfds@entry=28,
readfds=readfds@entry=0x7ff6ddab0230, writefds=writefds@entry=0x0,
exceptfds=exceptfds@entry=0x0, timeout=timeout@entry=0x7ff6ddab0220)
at ../sysdeps/unix/sysv/linux/select.c:41
#1 0x000000000120c176 in _al_xwin_background_thread (self=0x34c6220, arg=0x34c61c0)
at src/x/xevents.c:263
#2 0x00000000011b4c1b in thread_proc_trampoline (data=<optimized out>) at src/unix/uxthread.c:44
#3 0x00007ff6e8ddf7fc in start_thread (arg=0x7ff6ddab1700) at pthread_create.c:465
#4 0x00007ff6e71b4b5f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 7 (Thread 0x7ff6de2b2700 (LWP 16700)):
#0 0x00007ff6e8de6072 in futex_wait_cancelable (private=<optimized out>, expected=0,
futex_word=0x33aaca4) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1 __pthread_cond_wait_common (abstime=0x0, mutex=0x33aac30, cond=0x33aac78)
at pthread_cond_wait.c:502
#2 __pthread_cond_wait (cond=0x33aac78, mutex=0x33aac30) at pthread_cond_wait.c:655
#3 0x00000000014fe14c in std::condition_variable::wait(std::unique_lock<std::mutex>&) ()
#4 0x000000000095fc8b in WorkerThread::loop ()
at /tmp/factorio-build-ANpZow/src/Util/WorkerThread.cpp:30
#5 0x0000000001500d8f in execute_native_thread_routine ()
#6 0x00007ff6e8ddf7fc in start_thread (arg=0x7ff6de2b2700) at pthread_create.c:465
#7 0x00007ff6e71b4b5f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 6 (Thread 0x7ff6deab3700 (LWP 16699)):
#0 0x00007ff6e8de6072 in futex_wait_cancelable (private=<optimized out>, expected=0,
futex_word=0x33aaaa0) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1 __pthread_cond_wait_common (abstime=0x0, mutex=0x33aaa30, cond=0x33aaa78)
at pthread_cond_wait.c:502
#2 __pthread_cond_wait (cond=0x33aaa78, mutex=0x33aaa30) at pthread_cond_wait.c:655
#3 0x00000000014fe14c in std::condition_variable::wait(std::unique_lock<std::mutex>&) ()
#4 0x000000000095fc8b in WorkerThread::loop ()
at /tmp/factorio-build-ANpZow/src/Util/WorkerThread.cpp:30
#5 0x0000000001500d8f in execute_native_thread_routine ()
#6 0x00007ff6e8ddf7fc in start_thread (arg=0x7ff6deab3700) at pthread_create.c:465
#7 0x00007ff6e71b4b5f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 5 (Thread 0x7ff6df2b4700 (LWP 16698)):
#0 0x00007ff6e8de6072 in futex_wait_cancelable (private=<optimized out>, expected=0,
futex_word=0x33b1180) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1 __pthread_cond_wait_common (abstime=0x0, mutex=0x33b1110, cond=0x33b1158)
at pthread_cond_wait.c:502
#2 __pthread_cond_wait (cond=0x33b1158, mutex=0x33b1110) at pthread_cond_wait.c:655
#3 0x00000000014fe14c in std::condition_variable::wait(std::unique_lock<std::mutex>&) ()
#4 0x000000000095fc8b in WorkerThread::loop ()
at /tmp/factorio-build-ANpZow/src/Util/WorkerThread.cpp:30
#5 0x0000000001500d8f in execute_native_thread_routine ()
#6 0x00007ff6e8ddf7fc in start_thread (arg=0x7ff6df2b4700) at pthread_create.c:465
#7 0x00007ff6e71b4b5f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 4 (Thread 0x7ff6dfab5700 (LWP 16697)):
#0 0x00007ff6e8de6072 in futex_wait_cancelable (private=<optimized out>, expected=0,
futex_word=0x33f0b94) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1 __pthread_cond_wait_common (abstime=0x0, mutex=0x33f0b20, cond=0x33f0b68)
at pthread_cond_wait.c:502
#2 __pthread_cond_wait (cond=0x33f0b68, mutex=0x33f0b20) at pthread_cond_wait.c:655
#3 0x00000000014fe14c in std::condition_variable::wait(std::unique_lock<std::mutex>&) ()
#4 0x000000000095fc8b in WorkerThread::loop ()
at /tmp/factorio-build-ANpZow/src/Util/WorkerThread.cpp:30
#5 0x0000000001500d8f in execute_native_thread_routine ()
#6 0x00007ff6e8ddf7fc in start_thread (arg=0x7ff6dfab5700) at pthread_create.c:465
#7 0x00007ff6e71b4b5f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 3 (Thread 0x7ff6e02b6700 (LWP 16696)):
#0 0x00007ff6e8de6072 in futex_wait_cancelable (private=<optimized out>, expected=0,
futex_word=0x33dc884) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1 __pthread_cond_wait_common (abstime=0x0, mutex=0x33dc810, cond=0x33dc858)
at pthread_cond_wait.c:502
#2 __pthread_cond_wait (cond=0x33dc858, mutex=0x33dc810) at pthread_cond_wait.c:655
#3 0x00000000014fe14c in std::condition_variable::wait(std::unique_lock<std::mutex>&) ()
#4 0x000000000095fc8b in WorkerThread::loop ()
at /tmp/factorio-build-ANpZow/src/Util/WorkerThread.cpp:30
#5 0x0000000001500d8f in execute_native_thread_routine ()
#6 0x00007ff6e8ddf7fc in start_thread (arg=0x7ff6e02b6700) at pthread_create.c:465
#7 0x00007ff6e71b4b5f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 2 (Thread 0x7ff6e0ab7700 (LWP 16692)):
#0 0x00007ff6e8de6072 in futex_wait_cancelable (private=<optimized out>, expected=0,
futex_word=0x3303d40) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1 __pthread_cond_wait_common (abstime=0x0, mutex=0x3303cf0, cond=0x3303d18)
at pthread_cond_wait.c:502
#2 __pthread_cond_wait (cond=0x3303d18, mutex=0x3303cf0) at pthread_cond_wait.c:655
#3 0x00000000014fe14c in std::condition_variable::wait(std::unique_lock<std::mutex>&) ()
#4 0x00000000005dd4a3 in TaskManager::run ()
at /tmp/factorio-build-ANpZow/src/Util/TaskManager.cpp:61
#5 0x0000000001500d8f in execute_native_thread_routine ()
#6 0x00007ff6e8ddf7fc in start_thread (arg=0x7ff6e0ab7700) at pthread_create.c:465
#7 0x00007ff6e71b4b5f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 1 (Thread 0x7ff6e944a1c0 (LWP 16689)):
#0 syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1 0x00007ff6e90014bb in ?? () from /home/thomas/.steam/Steam/ubuntu12_64/gameoverlayrenderer.so
#2 0x00007ff6e90018aa in ?? () from /home/thomas/.steam/Steam/ubuntu12_64/gameoverlayrenderer.so
#3 0x00007ff6e90078b1 in ?? () from /home/thomas/.steam/Steam/ubuntu12_64/gameoverlayrenderer.so
#4 0x00007ff6e9007b54 in ?? () from /home/thomas/.steam/Steam/ubuntu12_64/gameoverlayrenderer.so
#5 0x00007ff6e9010ed9 in ?? () from /home/thomas/.steam/Steam/ubuntu12_64/gameoverlayrenderer.so
#6 0x00007ff6e9012ba0 in ?? () from /home/thomas/.steam/Steam/ubuntu12_64/gameoverlayrenderer.so
#7 0x00007ff6e900c22e in glXSwapBuffers ()
from /home/thomas/.steam/Steam/ubuntu12_64/gameoverlayrenderer.so
#8 0x0000000000c64b44 in MainLoop::mainLoopStep ()
at /tmp/factorio-build-ANpZow/src/MainLoop.cpp:553
#9 0x0000000000c65856 in MainLoop::run(Filesystem::Path const&, Filesystem::Path const&, bool, bool, std::function<void ()>, Filesystem::Path const&, MainLoop::HeavyMode) ()
at /tmp/factorio-build-ANpZow/src/MainLoop.cpp:332
#10 0x0000000000429e73 in main () at /tmp/factorio-build-ANpZow/src/Main.cpp:1138
Detaching from program: /mnt/Spiele/Steam/steamapps/common/Factorio/bin/x64/factorio, process 16689