View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001554 | Spring engine | General | public | 2009-08-16 00:50 | 2009-08-17 01:04 |
| Reporter | abma | Assigned To | Kloot | ||
| Priority | normal | Severity | crash | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Product Version | 0.79.1.0+git | ||||
| Summary | 0001554: Crash, with an Java-AI when Factory is finished | ||||
| Description | console output is different from infolog.txt: Segmentation fault (SIGSEGV) in spring 0.80.0.0 Stacktrace: /home/matze/local/bin/spring [0xcf7322] /etc/java-config-2/current-system-vm/jre/lib/amd64/server/libjvm.so [0x2aaab1152a0d] /etc/java-config-2/current-system-vm/jre/lib/amd64/server/libjvm.so [0x2aaab114ffcb] /etc/java-config-2/current-system-vm/jre/lib/amd64/server/libjvm.so(JVM_handle_linux_signal+0x170) [0x2aaab11535a0] /etc/java-config-2/current-system-vm/jre/lib/amd64/server/libjvm.so [0x2aaab114fede] /lib/libpthread.so.0 [0x385ce0ea00] /home/matze/local/bin/spring [0xabf6f1] /home/matze/local/bin/spring [0xabf80d] /home/matze/local/bin/spring [0xc566a9] /home/matze/local/bin/spring [0xc2e283] /home/matze/local/bin/spring [0xbc1b14] /home/matze/local/bin/spring [0xc55fc5] /home/matze/local/bin/spring [0xbad566] /home/matze/local/bin/spring [0x725359] /home/matze/local/bin/spring [0x72c03a] /home/matze/local/bin/spring [0x72f2cf] /home/matze/local/bin/spring [0xcca16e] /home/matze/local/bin/spring [0xcd255f] /home/matze/local/bin/spring [0xcececc] /home/matze/local/bin/spring [0xced2c4] /lib/libc.so.6(__libc_start_main+0xe6) [0x385c21e5c6] /home/matze/local/bin/spring(_ZNK5boost15program_options29value_semantic_codecvt_helperIcE5parseERNS_3anyERKSt6vectorISsSaISsEEb+0x1b9) [0x6a3519] Warning: SIGINT handler expected:libjvm.so+0x5973e0 found:0x0000000000000001 Signal Handlers: SIGSEGV: [libjvm.so+0x594ed0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGBUS: [libjvm.so+0x594ed0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGFPE: [libjvm.so+0x594ed0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGPIPE: [libjvm.so+0x594ed0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGXFSZ: [libjvm.so+0x594ed0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGILL: [libjvm.so+0x594ed0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000 SIGUSR2: [libjvm.so+0x597690], sa_mask[0]=0x00000000, sa_flags=0x10000004 SIGHUP: [libjvm.so+0x5973e0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGINT: SIG_IGN, sa_mask[0]=0x00000000, sa_flags=0x00000000 SIGTERM: [libjvm.so+0x5973e0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGQUIT: SIG_IGN, sa_mask[0]=0x00000000, sa_flags=0x00000000 Warning: SIGQUIT handler expected:libjvm.so+0x5973e0 found:0x0000000000000001 Signal Handlers: SIGSEGV: [libjvm.so+0x594ed0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGBUS: [libjvm.so+0x594ed0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGFPE: [libjvm.so+0x594ed0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGPIPE: [libjvm.so+0x594ed0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGXFSZ: [libjvm.so+0x594ed0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGILL: [libjvm.so+0x594ed0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000 SIGUSR2: [libjvm.so+0x597690], sa_mask[0]=0x00000000, sa_flags=0x10000004 SIGHUP: [libjvm.so+0x5973e0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGINT: SIG_IGN, sa_mask[0]=0x00000000, sa_flags=0x00000000 SIGTERM: [libjvm.so+0x5973e0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGQUIT: SIG_IGN, sa_mask[0]=0x00000000, sa_flags=0x00000000 GDB backtrace: #0 0x000000385ce0e55f in waitpid () from /lib/libpthread.so.0 #1 0x0000000000cf98fd in X_MessageBox () #2 0x0000000000cf7052 in ErrorMessageBox () 0000003 0x0000000000cf9394 in ErrorMessageBox () 0000004 0x0000000000cf778d in CrashHandler::HandleSignal () 0000005 0x00002aaab1152a0d in call_chained_handler () from /etc/java-config-2/current-system-vm/jre/lib/amd64/server/libjvm.so #6 0x00002aaab114ffcb in os::Linux::chained_handler () from /etc/java-config-2/current-system-vm/jre/lib/amd64/server/libjvm.so #7 0x00002aaab11535a0 in JVM_handle_linux_signal () from /etc/java-config-2/current-system-vm/jre/lib/amd64/server/libjvm.so #8 0x00002aaab114fede in signalHandler () from /etc/java-config-2/current-system-vm/jre/lib/amd64/server/libjvm.so #9 <signal handler called> 0000010 0x0000000000abf6f1 in CGroundBlockingObjectMap::AddGroundBlockingObject () #11 0x0000000000abf80d in CGroundBlockingObjectMap::OpenBlockingYard () 0000012 0x0000000000c566a9 in CFactory::StartBuild () 0000013 0x0000000000c2e283 in CFactoryCAI::SlowUpdate () 0000014 0x0000000000bc1b14 in CUnit::SlowUpdate () #15 0x0000000000c55fc5 in CFactory::SlowUpdate () #16 0x0000000000bad566 in CUnitHandler::Update () #17 0x0000000000725359 in CGame::SimFrame () #18 0x000000000072c03a in CGame::ClientReadNet () ---Type <return> to continue, or q <return> to quit--- #19 0x000000000072f2cf in CGame::Update () 0000020 0x0000000000cca16e in SpringApp::Update () #21 0x0000000000cd255f in SpringApp::Run () #22 0x0000000000cececc in Run () #23 0x0000000000ced2c4 in main () | ||||
| Tags | No tags attached. | ||||
| Attached Files | |||||
| Checked infolog.txt for Errors | |||||
|
|
Sorry for the bad headline: the crash occurs, when the AI finished the armlab. |
|
|
...and the factory begins to build a unit already in queue. when only building a fab without a unit in queue gives no crash. |
|
|
In case you did not know... When running spring with a java AI, SIGSEGV can occure wihtout anny crash. The JVM uses SIGSEGV as a memory management signal, so when running in gdb, just use cont, and if it goes on fine, it was this. when the crash also happens when running spring normally (not in a debugger), then it is a crash for sure. |
|
|
I didn't know but: this is a real crash, because i've attached gdb after the crash... |
|
|
backtrace with a debug3 build: #0 0x000000385ce0e55f in waitpid () from /lib/libpthread.so.0 #1 0x0000000000cf9bf5 in X_MessageBox ( msg=0x900eec8 "Segmentation fault (SIGSEGV)", caption=0xb901fa8 "Spring crashed", flags=0) at /home/matze/Projects/AGAI/spring_0.80.0/rts/System/Platform/Linux/X_MessageBox.cpp:94 #2 0x0000000000cf734a in ErrorMessageBox ( msg=0x900eec8 "Segmentation fault (SIGSEGV)", caption=0xb901fa8 "Spring crashed", flags=0) at /home/matze/Projects/AGAI/spring_0.80.0/rts/System/Platform/errorhandler.cpp:54 0000003 0x0000000000cf968c in ErrorMessageBox (msg=@0x7fff132ddd90, caption=@0x7fff132dde40, flags=0) at /home/matze/Projects/AGAI/spring_0.80.0/rts/System/Platform/errorhandler.h:31 0000004 0x0000000000cf7a85 in CrashHandler::HandleSignal (signal=11) at /home/matze/Projects/AGAI/spring_0.80.0/rts/System/Platform/CrashHandler.cpp:92 0000005 0x00002aaab1152a0d in call_chained_handler () from /etc/java-config-2/current-system-vm/jre/lib/amd64/server/libjvm.so #6 0x00002aaab114ffcb in os::Linux::chained_handler () from /etc/java-config-2/current-system-vm/jre/lib/amd64/server/libjvm.so #7 0x00002aaab11535a0 in JVM_handle_linux_signal () ---Type <return> to continue, or q <return> to quit--- from /etc/java-config-2/current-system-vm/jre/lib/amd64/server/libjvm.so #8 0x00002aaab114fede in signalHandler () from /etc/java-config-2/current-system-vm/jre/lib/amd64/server/libjvm.so #9 <signal handler called> 0000010 0x0000000000abfef9 in CGroundBlockingObjectMap::AddGroundBlockingObject ( this=0x4da77f0, object=0x9a4aa20, yardMap=0x0, mask=2 '\002') at /home/matze/Projects/AGAI/spring_0.80.0/rts/Sim/Misc/GroundBlockingObjectMap.cpp:96 #11 0x0000000000ac0015 in CGroundBlockingObjectMap::OpenBlockingYard ( this=0x4da77f0, yard=0x9a4aa20, yardMap=0x0) at /home/matze/Projects/AGAI/spring_0.80.0/rts/Sim/Misc/GroundBlockingObjectMap.cpp:201 0000012 0x0000000000c57029 in CFactory::StartBuild (this=0x9a4aa20, ud=0x6c1fbe8) at /home/matze/Projects/AGAI/spring_0.80.0/rts/Sim/Units/UnitTypes/Factory.cpp:258 0000013 0x0000000000c2ec03 in CFactoryCAI::SlowUpdate (this=0x99fb9e0) at /home/matze/Projects/AGAI/spring_0.80.0/rts/Sim/Units/CommandAI/FactoryCAI.cpp:388 0000014 0x0000000000bc2492 in CUnit::SlowUpdate (this=0x9a4aa20) at /home/matze/Projects/AGAI/spring_0.80.0/rts/Sim/Units/Unit.cpp:759 #15 0x0000000000c56945 in CFactory::SlowUpdate (this=0x9a4aa20) at /home/matze/Projects/AGAI/spring_0.80.0/rts/Sim/Units/UnitTypes/Factory.cpp:319 ---Type <return> to continue, or q <return> to quit--- #16 0x0000000000badd6e in CUnitHandler::Update (this=0x82ac410) at /home/matze/Projects/AGAI/spring_0.80.0/rts/Sim/Units/UnitHandler.cpp:324 #17 0x00000000007253c5 in CGame::SimFrame (this=0x48a6f70) at /home/matze/Projects/AGAI/spring_0.80.0/rts/Game/Game.cpp:3417 #18 0x000000000072c204 in CGame::ClientReadNet (this=0x48a6f70) at /home/matze/Projects/AGAI/spring_0.80.0/rts/Game/Game.cpp:3714 #19 0x000000000072f499 in CGame::Update (this=0x48a6f70) at /home/matze/Projects/AGAI/spring_0.80.0/rts/Game/Game.cpp:2742 0000020 0x0000000000cca926 in SpringApp::Update (this=0x7fff132df600) at /home/matze/Projects/AGAI/spring_0.80.0/rts/System/SpringApp.cpp:835 #21 0x0000000000cd2c19 in SpringApp::Run (this=0x7fff132df600, argc=7, argv=0x7fff132df738) at /home/matze/Projects/AGAI/spring_0.80.0/rts/System/SpringApp.cpp:959 #22 0x0000000000ced573 in Run (argc=7, argv=0x7fff132df738) at /home/matze/Projects/AGAI/spring_0.80.0/rts/System/Main.cpp:115 #23 0x0000000000ced5cd in main (argc=7, argv=0x7fff132df738) at /home/matze/Projects/AGAI/spring_0.80.0/rts/System/Main.cpp:132 |
|
|
Klot suggested: 0x64 is a illegal value for facing. build facings that are not in the range [0, 3] (decimal) can cause out-of-bound memory reads when the engine creates a unit and selects its yardmap, and at various later points. damn! i don't know if the interface or the engine should catch this invalid value... now it's your turn :-) |
|
|
I'll add some safeguards to the engine, thanks for finding this. (involuntarily as it may have been :)) |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2009-08-16 00:50 | abma | New Issue | |
| 2009-08-16 00:50 | abma | File Added: infolog.txt | |
| 2009-08-16 00:52 | abma | Note Added: 0003919 | |
| 2009-08-16 15:36 | abma | Note Added: 0003923 | |
| 2009-08-16 16:33 | hoijui | Note Added: 0003924 | |
| 2009-08-16 16:36 | hoijui | Project | Spring engine => AI |
| 2009-08-16 16:39 | abma | Note Added: 0003925 | |
| 2009-08-16 17:07 | abma | Note Added: 0003926 | |
| 2009-08-16 22:18 | hoijui | Project | AI => Spring engine |
| 2009-08-17 00:13 | abma | Note Added: 0003930 | |
| 2009-08-17 00:45 | Kloot | Note Added: 0003931 | |
| 2009-08-17 01:04 | Kloot | Status | new => resolved |
| 2009-08-17 01:04 | Kloot | Resolution | open => fixed |
| 2009-08-17 01:04 | Kloot | Assigned To | => Kloot |