View Issue Details

IDProjectCategoryView StatusLast Update
0002170Spring engineGeneralpublic2010-12-13 20:15
Reporterabma Assigned Toabma  
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionunable to reproduce 
Summary0002170: current spring-master hangs on exit
Descriptionafters starting current spring/master and clicking "Test Game", the screen only flickers and after a while it crashes.
TagsNo tags attached.
Attached Files
infolog.txt (Attachment missing)
shot1.png (Attachment missing)
shot2.png (Attachment missing)
Checked infolog.txt for Errors

Relationships

related to 0002167 resolvedabma crash at start with 0.82.3-759-g17eb3f0 
related to 0002178 resolvedhoijui Content Error is not always thrown for missing s3o textures 

Activities

Kloot

2010-10-11 00:12

developer   ~0005714

Last edited: 2010-10-11 00:15

Caused by http://github.com/spring/spring/commit/f801d303cad52ca6dd752a4bbba97b78ef6f4777 (as is 2167).

abma

2010-10-11 00:18

administrator   ~0005715

Last edited: 2010-10-11 00:19

gdb stacktrace is slightly more verbose:

(gdb) bt all
#0 0x00007ffff4655a75 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1 0x00007ffff46595c0 in *__GI_abort () at abort.c:92
#2 0x00007ffff464e941 in *__GI___assert_fail (assertion=0xefdbf4 "!pthread_mutex_destroy(&m)",
    file=<value optimized out>, line=62, function=0xefe1a0 "boost::recursive_mutex::~recursive_mutex()") at assert.c:81
0000003 0x00000000007100a7 in ~recursive_mutex (this=0x7fffd417ac30, __in_chrg=<value optimized out>)
    at /usr/include/boost/thread/pthread/recursive_mutex.hpp:62
0000004 0x000000000070e57e in ~CLoadScreen (this=0x7fffd417abe0, __in_chrg=<value optimized out>)
    at /home/abma/dev/spring/master/rts/Game/LoadScreen.cpp:132
0000005 0x000000000070e78d in CLoadScreen::DeleteInstance () at /home/abma/dev/spring/master/rts/Game/LoadScreen.cpp:154
#6 0x000000000070e830 in CLoadScreen::Update (this=0x7fffd417abe0)
    at /home/abma/dev/spring/master/rts/Game/LoadScreen.cpp:209
#7 0x0000000000d89ab9 in SpringApp::Update (this=0x7fffde912c80)
    at /home/abma/dev/spring/master/rts/System/SpringApp.cpp:1064
#8 0x0000000000d89e77 in SpringApp::Run (this=0x7fffde912c80, argc=5, argv=0x7fffffffe7b8)
    at /home/abma/dev/spring/master/rts/System/SpringApp.cpp:1197
#9 0x0000000000d8e4be in MainFunc (argc=5, argv=0x7fffffffe7b8, ret=0x7fffffffe68c)
    at /home/abma/dev/spring/master/rts/System/Main.cpp:54
0000010 0x0000000000d8f1be in boost::_bi::list3<boost::_bi::value<int>, boost::_bi::value<char**>, boost::_bi::value<int*> >::operator()<void (*)(int, char**, int*), boost::_bi::list0> (this=0x24439a0, f=@0x2443998, a=...)
    at /usr/include/boost/bind/bind.hpp:385
#11 0x0000000000d8f131 in boost::_bi::bind_t<void, void (*)(int, char**, int*), boost::_bi::list3<boost::_bi::value<int>, boost::_bi::value<char**>, boost::_bi::value<int*> > >::operator() (this=0x2443998)
    at /usr/include/boost/bind/bind_template.hpp:20
---Type <return> to continue, or q <return> to quit---
0000012 0x0000000000d8f0f0 in boost::detail::thread_data<boost::_bi::bind_t<void, void (*)(int, char**, int*), boost::_bi::list3<boost::_bi::value<int>, boost::_bi::value<char**>, boost::_bi::value<int*> > > >::run (this=0x2443890)
    at /usr/include/boost/thread/detail/thread.hpp:56
0000013 0x00007ffff625cb70 in thread_proxy () from /usr/lib/libboost_thread.so.1.40.0
0000014 0x00007ffff792d9ca in start_thread (arg=<value optimized out>) at pthread_create.c:300
#15 0x00007ffff47086fd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#16 0x0000000000000000 in ?? ()

zerver

2010-10-11 18:04

reporter   ~0005717

Better now, but not fixed.

http://github.com/spring/spring/commit/65c386ad26586916d6b7259cf3ab965511d5e79a

I see some graphical glitches in the load screen during creation of unit textures. The glitch seems to be caused by the loading thread switching frame buffers. The code at FarTextureHandler.cpp:58 for instance. Can anyone else see some glithes, or is my driver bugged?

abma

2010-10-11 20:55

administrator   ~0005719

i got this "crash" once:
Loading LuaRules
X Error of failed request: BadGC (invalid GC parameter)
  Major opcode of failed request: 60 (X_FreeGC)
  Resource id in failed request: 0x3c0007e
  Serial number of failed request: 430
  Current serial number in output stream: 1846
Lua LoadCode pcall error = 2, LuaRules/main.lua, error = 2, LuaRules/gadgets.lua, error = 4, LuaGadgets/setupdefs.lua, not enough memory
Loading LuaGaia
AL lib: ALc.c:1879: exit(): closing 1 Device
AL lib: ALc.c:1808: alcCloseDevice(): destroying 1 Context(s)
AL lib: ALc.c:1420: alcDestroyContext(): deleting 128 Source(s)
AL lib: ALc.c:1818: alcCloseDevice(): deleting 251 Buffer(s)

abma

2010-10-11 20:56

administrator   ~0005720

Last edited: 2010-10-11 20:56

and after your patch it always hangs when shutting down spring: but it seems to work, i don't see glithes
(gdb) bt
#0 pthread_cond_wait@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1 0x00007f84028ac7f9 in boost::thread::join() ()
   from /usr/lib/libboost_thread.so.1.40.0
#2 0x0000000000d8e8b0 in Run (argc=1, argv=0x7fff488787d8)
    at /home/abma/dev/spring/master/rts/System/Main.cpp:71
0000003 0x0000000000d8e915 in main (argc=1, argv=0x7fff488787d8)
    at /home/abma/dev/spring/master/rts/System/Main.cpp:89

zerver

2010-10-11 21:31

reporter   ~0005721

Better now? Otherwise plz show me a "bt full".

abma

2010-10-11 23:22

administrator   ~0005722

Last edited: 2010-10-11 23:24

still hangs :-/

edit: with 100% cpu!

(gdb) bt full
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
No locals.
#1 0x00007f0708c847f9 in boost::thread::join() () from /usr/lib/libboost_thread.so.1.40.0
No symbol table info available.
#2 0x0000000000d8e8b0 in Run (argc=1, argv=0x7fff07498db8) at /home/abma/dev/spring/master/rts/System/Main.cpp:71
        ret = 0
        mainThread = 0x2dcd850
0000003 0x0000000000d8e915 in main (argc=1, argv=0x7fff07498db8) at /home/abma/dev/spring/master/rts/System/Main.cpp:89
No locals.
(gdb)

abma

2010-10-11 23:38

administrator   ~0005723

maybe this is more usefull:

(gdb) bt all
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1 0x00007f1ade1997f9 in boost::thread::join() () from /usr/lib/libboost_thread.so.1.40.0
#2 0x0000000000d8e8bc in Run (argc=1, argv=0x7fff6c2ccec8) at /home/abma/dev/spring/master/rts/System/Main.cpp:71
0000003 0x0000000000d8e921 in main (argc=1, argv=0x7fff6c2ccec8) at /home/abma/dev/spring/master/rts/System/Main.cpp:89
(gdb) step



^C
Program received signal SIGINT, Interrupt.
[Switching to Thread 0x7f1ac6850710 (LWP 3140)]
0x00007f1adc637f83 in *__GI___poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
87 ../sysdeps/unix/sysv/linux/poll.c: No such file or directory.
    in ../sysdeps/unix/sysv/linux/poll.c
(gdb) bt all
#0 0x00007f1adc637f83 in *__GI___poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1 0x00007f1adb11b29a in ?? () from /usr/lib/libxcb.so.1
#2 0x00007f1adb11b7d7 in ?? () from /usr/lib/libxcb.so.1
0000003 0x00007f1adb11ba85 in xcb_writev () from /usr/lib/libxcb.so.1
0000004 0x00007f1adec0e6fa in _XSend () from /usr/lib/libX11.so.6
0000005 0x00007f1adec0e839 in _XReply () from /usr/lib/libX11.so.6
#6 0x00007f1adec022c3 in XSync () from /usr/lib/libX11.so.6
#7 0x00007f1adfd75db7 in ?? () from /usr/lib/fglrx/libGL.so.1
#8 0x00007f1ac50339ac in ?? () from /usr/lib/fglrx/dri/fglrx_dri.so
#9 0x00007f1ac50340c9 in ?? () from /usr/lib/fglrx/dri/fglrx_dri.so
0000010 0x00007f1adfd7bd2d in ?? () from /usr/lib/fglrx/libGL.so.1
#11 0x00007f1adfd7bd6a in ?? () from /usr/lib/fglrx/libGL.so.1
0000012 0x00007f1adebe8295 in _XFreeExtData () from /usr/lib/libX11.so.6
0000013 0x00007f1adebf587d in _XFreeDisplayStructure () from /usr/lib/libX11.so.6
0000014 0x00007f1adebe0e7f in XCloseDisplay () from /usr/lib/libX11.so.6
#15 0x00007f1adfabd2f4 in ?? () from /usr/lib/libSDL-1.2.so.0
#16 0x00007f1adfaaec12 in SDL_VideoQuit () from /usr/lib/libSDL-1.2.so.0
#17 0x00007f1adfa87655 in SDL_QuitSubSystem () from /usr/lib/libSDL-1.2.so.0
#18 0x00007f1adfa876ee in SDL_Quit () from /usr/lib/libSDL-1.2.so.0
#19 0x0000000000d8a142 in SpringApp::Shutdown () at /home/abma/dev/spring/master/rts/System/SpringApp.cpp:1243
0000020 0x0000000000d8a02f in SpringApp::Run (this=0x7f1ac684fc80, argc=1, argv=0x7fff6c2ccec8) at /home/abma/dev/spring/master/rts/System/SpringApp.cpp:1221
#21 0x0000000000d8e4ba in MainFunc (argc=1, argv=0x7fff6c2ccec8, ret=0x7fff6c2ccd9c) at /home/abma/dev/spring/master/rts/System/Main.cpp:54
#22 0x0000000000d8f1ba in boost::_bi::list3<boost::_bi::value<int>, boost::_bi::value<char**>, boost::_bi::value<int*> >::operator()<void (*)(int, char**, int*), boost::_bi::list0> (this=0x2d099a0,
    f=@0x2d09998, a=...) at /usr/include/boost/bind/bind.hpp:385
#23 0x0000000000d8f12d in boost::_bi::bind_t<void, void (*)(int, char**, int*), boost::_bi::list3<boost::_bi::value<int>, boost::_bi::value<char**>, boost::_bi::value<int*> > >::operator() (this=0x2d09998)
    at /usr/include/boost/bind/bind_template.hpp:20
0000024 0x0000000000d8f0ec in boost::detail::thread_data<boost::_bi::bind_t<void, void (*)(int, char**, int*), boost::_bi::list3<boost::_bi::value<int>, boost::_bi::value<char**>, boost::_bi::value<int*> > > >::run (this=0x2d09890) at /usr/include/boost/thread/detail/thread.hpp:56
#25 0x00007f1ade198b70 in thread_proxy () from /usr/lib/libboost_thread.so.1.40.0
0000026 0x00007f1adf8699ca in start_thread (arg=<value optimized out>) at pthread_create.c:300
0000027 0x00007f1adc6446fd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#28 0x0000000000000000 in ?? ()

abma

2010-10-11 23:51

administrator   ~0005724

strange: i commented this line out:
rts/System/SpringApp.cpp:1243
SDL_Quit()

and it works...

abma

2010-10-16 13:40

administrator   ~0005748

Last edited: 2010-10-16 14:35

with this commit, hang is gone on shutdown in single threaded:
http://github.com/spring/spring/commit/2b45d558154233d3669e59d7f5e571e0a7bd217c

but i get an
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server "??"
      after 145 requests (144 known processed) with 0 events remaining.

but no stacktrace or so...

zerver, is this commit fine? (ok, this solves not the real reason for the hang, but maybe helps to find why it hangs...)

zerver

2010-10-17 02:58

reporter   ~0005750

Actually I have no idea, but that error message is a bit worrying. Maybe your graphics driver is the root cause of the whole problem. Did you try different drivers? It runs fine here, I did not have any hang on exit.

hoijui

2010-10-21 15:16

reporter   ~0005775

while abma has ATI, i do have NV. i get the hang still, when spring tries to exit after a content_error. see eg http://springrts.com/mantis/view.php?id=2178 for a bt full. i guess you can also reproduce it with a hard-coded content_error somewhere.

abma

2010-11-08 04:53

administrator   ~0005850

http://bugzilla.libsdl.org/show_bug.cgi?id=922

zerver, which version of sdl do you have installed?

$ lsb_release -d
Description: Ubuntu 10.04.1 LTS

$ grep SDL ~/.spring/infolog.txt
[ 0] SDL: 1.2.14

zerver

2010-11-09 02:08

reporter   ~0005852

[ 0] SDL: 1.2.10

hoijui

2010-11-09 11:42

reporter   ~0005853

i have SDL: 1.2.13

abma

2010-12-13 20:15

administrator   ~0006070

seems to be fixed... i didn't get a crash at exit/hang on start...

Issue History

Date Modified Username Field Change
2010-10-10 23:38 abma New Issue
2010-10-10 23:38 abma File Added: infolog.txt
2010-10-11 00:08 abma File Added: shot1.png
2010-10-11 00:08 abma File Added: shot2.png
2010-10-11 00:09 Kloot Relationship added related to 0002167
2010-10-11 00:12 Kloot Note Added: 0005714
2010-10-11 00:15 abma Note Edited: 0005714
2010-10-11 00:17 abma Summary current spring-master branch crashes when starting without parameters + clicking on "Test Game" => current spring-master branch crashes in loadscreen
2010-10-11 00:18 abma Note Added: 0005715
2010-10-11 00:19 abma Note Edited: 0005715
2010-10-11 18:04 zerver Note Added: 0005717
2010-10-11 20:55 abma Note Added: 0005719
2010-10-11 20:56 abma Note Added: 0005720
2010-10-11 20:56 abma Note Edited: 0005720
2010-10-11 21:31 zerver Note Added: 0005721
2010-10-11 23:22 abma Note Added: 0005722
2010-10-11 23:24 abma Note Edited: 0005722
2010-10-11 23:38 abma Note Added: 0005723
2010-10-11 23:51 abma Note Added: 0005724
2010-10-16 13:40 abma Note Added: 0005748
2010-10-16 14:30 abma Note Edited: 0005748
2010-10-16 14:33 abma Note Edited: 0005748
2010-10-16 14:35 abma Note Edited: 0005748
2010-10-17 02:58 zerver Note Added: 0005750
2010-10-21 15:07 hoijui Relationship added parent of 0002178
2010-10-21 15:07 hoijui Relationship deleted parent of 0002178
2010-10-21 15:07 hoijui Relationship added related to 0002178
2010-10-21 15:16 hoijui Note Added: 0005775
2010-11-08 04:53 abma Note Added: 0005850
2010-11-08 22:09 abma Summary current spring-master branch crashes in loadscreen => current spring-master hangs on exit
2010-11-09 02:08 zerver Note Added: 0005852
2010-11-09 11:42 hoijui Note Added: 0005853
2010-12-13 20:15 abma Note Added: 0006070
2010-12-13 20:15 abma Status new => resolved
2010-12-13 20:15 abma Resolution open => unable to reproduce
2010-12-13 20:15 abma Assigned To => abma