stacktrace translator

stacktrace translator

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

stacktrace translator

Post by Tobi »

I recently modified buildbot a bit so it stores debugging information from all DLLs too, e.g. AIs, unitsync.

Now I'd like someone to modify the stacktrace translator PHP script to support this :-)

Basically the directory structure looks like this:

Code: Select all

stacktrace/
|-- 0.75b2+svn5067
|   |-- AAI.dll
|   |-- CentralBuildAI.dll
|   |-- EconomyAI.dll
|   |-- JCAI.dll
|   |-- KAI-0.2.dll
|   |-- KAIK-0.13.dll
|   |-- MetalMakerAI.dll
|   |-- MexUpgraderAI.dll
|   |-- NTai.dll
|   |-- RadarAI.dll
|   |-- ReportIdleAI.dll
|   |-- SimpleFormationAI.dll
|   |-- TestGlobalAI.dll
|   |-- spring.exe
|   `-- unitsync.dll
|-- 0.75b2+svn5068
|   |-- AAI.dll
|   |-- CentralBuildAI.dll
|   |-- EconomyAI.dll
|   |-- JCAI.dll
|   |-- KAI-0.2.dll
|   |-- KAIK-0.13.dll
|   |-- MetalMakerAI.dll
|   |-- MexUpgraderAI.dll
|   |-- NTai.dll
|   |-- RadarAI.dll
|   |-- ReportIdleAI.dll
|   |-- SimpleFormationAI.dll
|   |-- TestGlobalAI.dll
|   |-- spring.exe
|   `-- unitsync.dll
One directory with Spring's version as name and all debugging builds in it as contents.

Basically it would need to loop through the infolog lines, and store a list of all symbols to look up per DLL, then call addr2line just like it does now for each of the DLLs for which any symbols need to be resolved, and then it would be practical if it could combine the results again in the same order as they appeared in the stacktrace.

So if you are bored and/or have some free time and know some PHP feel free to give it a go!

In particular AI developers will appreciate being able to get useful stacktraces from endusers ;-)

PS another feature that was requested sometime is a textbox input, next to the file upload function (for copy pasting stacktrace into it.)
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

+1 ;)

I'll rewrite it next week if nobody beats me to this.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

great, thanks in advance kloot!
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: stacktrace translator

Post by Kloot »

Here's the new version:
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Re: stacktrace translator

Post by rattle »

Made a quick batch script to parse infologs. Needs grep, bash (with awk), addr2line and a debug build.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: stacktrace translator

Post by Tobi »

I got Spring debugging symbols imported in a (PostgreSQL) database. 8)

(using a custom made tool based on binutils nm and addr2line, using libbfd (and libiberty))

May open up possibilities for the stacktrace translator, not in the least making it (much) easier to run on limited hosts, and making the PHP script much less demanding and more standard.

Also I made a class (part of the tool) that can possibly be integrated into Spring, which can read MinGW generated debugging symbols, just like addr2line can, and it's even better then addr2line! :-)
(It can read debugging symbols that contain only function names, no line numbers, contrary to addr2line itself.)

I'll try to put everything in a releasable, documented state soonish, so others can then work out nice and fluffy user/web interfaces etc. :-)
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: stacktrace translator

Post by AF »

Is this something I could integrate into AFLobby as automatic crash reporting?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: stacktrace translator

Post by Tobi »

Yes, since I got it in a database it shouldn't be too hard for anyone to make a simple service / CGI / PHP script that can be used to upload / translate a stacktrace.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: stacktrace translator

Post by FLOZi »

*bump*

The only stacktrace translator online i know of (http://buildbot.no-ip.org/~buildbot/spr ... slator.php) Doesn't seem to have symbols for 77b2.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: stacktrace translator

Post by imbaczek »

/join #buildserv
!help translate

sample usage: !translate file=<url> tag=spring_0.77b3
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: stacktrace translator

Post by smoth »

so I can set this up on my site as a backup stacktrace?
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: stacktrace translator

Post by imbaczek »

not sure what you mean by setting this up? there's a bot that does stacktrace translations now, so no need to set things up on any sites ^^
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: stacktrace translator

Post by FLOZi »

imbaczek wrote:/join #buildserv
!help translate

sample usage: !translate file=<url> tag=spring_0.77b3
Cheers, very handy. :-)
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: stacktrace translator

Post by smoth »

imbaczek wrote:not sure what you mean by setting this up? there's a bot that does stacktrace translations now, so no need to set things up on any sites ^^
was just thinking if it would help I could set it up as a failsafe. You know, for when the spring server goes down for a day.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: stacktrace translator

Post by Tobi »

I think you can download debugging symbols already from bibim's planetspring, so even if spring.clan-sy.com is down you can continue debugging.

I don't think it's really problematic BuildServ isn't online at such times because you wouldn't be able to post the trace in mantis or the forum anyway.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: stacktrace translator

Post by smoth »

yeah but it is handy in tracking down other errors that may just be scripting issues.
Post Reply

Return to “Engine”