The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Simutrans-Extended bug reports => Topic started by: jamespetts on May 25, 2024, 02:26:25 PM

Title: Thread deadlocks
Post by: jamespetts on May 25, 2024, 02:26:25 PM
I believe that I have managed by chance to reproduce a thread deadlock, which occurs on unloading a map, which I believe is the cause of the frequent downtime on the server.

Unfortunately, I am about to go away for a week, so I cannot debug it now. I will give an overview of what lines that each of the threads are on at the point that I paused the game for future reference.

Main thread: simworld.cc line 2294
Thread 1 (dr_flush_screen): simsys_w.cc line 354
Thread 2 (world_xy_loop_thread): simworld.cc line 224
Thread 3 (world_xy_loop_thread): simworld.cc line 224 
Thread 4 (world_xy_loop_thread): simworld.cc line 224 
Thread 5 (world_xy_loop_thread): simworld.cc line 224   
Thread 6 (world_xy_loop_thread): simworld.cc line 224    
Thread 7 (check_road_connexions_threaded): simworld.cc line 1632
Thread 8 (check_road_connexions_threaded): simworld.cc line 1632
Thread 9 (display_region_thread): simview.cc line 75
Thread 10 (display_region_thread): simview.cc line 75 
Thread 11 (display_region_thread): simview.cc line 75  
Thread 12 (display_region_thread): simview.cc line 75  
Thread 13 (display_region_thread): simview.cc line 75 
Thread 14 (load_thread): loadsave.cc line 100