View Issue Details

IDProjectCategoryView StatusLast Update
0004646Spring engineGeneralpublic2015-01-12 04:34
Reporterabma Assigned Toabma  
PrioritynormalSeveritycrashReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version98.0.1+git 
Summary0004646: double free in rts/System/Platform/Linux/CrashHandler.cpp:737 (=crash handler crashes)
Descriptioncode is:

ExtractSymbols(lines, stacktrace)
{
...
free(lines);
}



737: ExtractSymbols(lines, stacktrace)
739: free(lines);



sadly removing the double-free() makes the crashhandler not work anymore :-|


Stacktrace is always empty when removing it.
TagsNo tags attached.
Attached Files
infolog.txt (Attachment missing)
Checked infolog.txt for Errors

Activities

lamer

2015-01-10 19:17

reporter   ~0013909

How to reproduce? I never had anything but HaltedStacktrace().

I see only references to Stacktrace() in
rts/System/SafeVector.cpp:19
rts/System/SafeVector.cpp:33
rts/System/Platform/Linux/CrashHandler.cpp:1042

739: free(lines);
looks wrong.
Is stacktrace empty on remove or it hangs until manual kill?

Just curious.

cleanrock

2015-01-10 19:43

reporter   ~0013910

I may be off here but to me it looks like libunwind stack trace is garbage for spring static builds, if so its pretty useless imo.

lamer

2015-01-10 22:10

reporter   ~0013911

@cleanrock:
LocateSymbolFile (rts/System/Platform/Linux/CrashHandler.cpp:160) will try to locate symbols in different places, so one have to provide those symbols/files too with static build.

But i have no idea whats the benefits of libunwind vs old style (i don't know crashhandler before libunwind), looks like new crashhandler is WIP as it didn't work for archlinux/osx OOB.

abma

2015-01-11 18:55

administrator   ~0013912

set DebugGLStacktraces=1 and hope that you find an opengl error :)

setting ForceShaders = 1 triggers this for me.

else you could try to use config from 0004644...

abma

2015-01-11 19:24

administrator   ~0013913

https://github.com/spring/spring/blob/develop/rts/Rendering/GL/myGL.cpp#L160

lamer

2015-01-11 19:51

reporter   ~0013914

Last edited: 2015-01-11 19:51

Got it. DebugGLStacktraces=1 was sufficient (except that i copied old config from 91 engine).

Stacktrace() is definitely broken, got quickfix (tested), can make PR a bit later.

lamer

2015-01-11 23:09

reporter   ~0013915

https://github.com/spring/spring/pull/153

lamer

2015-01-12 00:45

reporter   ~0013917

Still can't figure out what was wrong with old CrashHandler without libunwind. Less dependencies is better, and the golden rule: if it ain't broke, don't fix it.

abma

2015-01-12 04:34

administrator   ~0013918

thanks a lot!

fixed by

https://github.com/spring/spring/pull/153

Issue History

Date Modified Username Field Change
2015-01-10 17:08 abma New Issue
2015-01-10 17:10 abma Description Updated
2015-01-10 17:11 abma Summary double free in rts/System/Platform/Linux/CrashHandler.cpp:737 => double free in rts/System/Platform/Linux/CrashHandler.cpp:737 (=crash handler crashes)
2015-01-10 19:17 lamer Note Added: 0013909
2015-01-10 19:43 cleanrock Note Added: 0013910
2015-01-10 22:10 lamer Note Added: 0013911
2015-01-11 18:55 abma Note Added: 0013912
2015-01-11 19:24 abma Note Added: 0013913
2015-01-11 19:33 abma File Added: infolog.txt
2015-01-11 19:51 lamer Note Added: 0013914
2015-01-11 19:51 lamer Note Edited: 0013914
2015-01-11 23:09 lamer Note Added: 0013915
2015-01-12 00:45 lamer Note Added: 0013917
2015-01-12 04:34 abma Note Added: 0013918
2015-01-12 04:34 abma Status new => resolved
2015-01-12 04:34 abma Resolution open => fixed
2015-01-12 04:34 abma Assigned To => abma