Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Debugging deadlocks
Goto page Previous  1, 2
 
Post new topic   Reply to topic Printable version
 View previous topic  Random values from PDATA Post :: Post python module experts?  View next topic  
Author Message
Arnk Kilo Dylie
Seasoned Helper


Age:36
Gender:Gender:Male
Joined: Jul 14 2006
Posts: 108
Offline

PostPosted: Sun Feb 20, 2011 2:27 pm    Post subject: Reply to topic Reply with quote

That one is not the most helpful backtrace. Could you determine what specific event causes it?
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Sun Feb 20, 2011 2:57 pm    Post subject: Reply to topic Reply with quote

Here's my module...

http://pastebin.com/pYK5FLuj
_________________
(Insert a bunch of dead links here)
Back to top
View users profile Send private message Add User to Ignore List
JoWie
Server Help Squatter


Gender:Gender:Male
Joined: Feb 25 2004
Posts: 215
Offline

PostPosted: Sun Feb 20, 2011 3:33 pm    Post subject: Reply to topic Reply with quote

Have you tried valgrind --tool=helgrind

If all else fails and you know how to reliably trigger the bug, start uncommenting and unloading stuff until you know where it comes from.
Back to top
View users profile Send private message Add User to Ignore List
Dr Brain
Flip-flopping like a wind surfer


Age:38
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Sun Feb 20, 2011 4:38 pm    Post subject: Reply to topic Reply with quote

Line 1043, you return inside a lock. Unlock before the return.

EDIT: knew to look for this because the deadlock only had one thread waiting for a lock. All the others were happy. So it was clearly not a locking order issue, it was a case of a forgotten unlock.
_________________
Hyperspace Owner

Smong> so long as 99% deaths feel lame it will always be hyperspace to me
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Sun Feb 20, 2011 5:10 pm    Post subject: Reply to topic Reply with quote

aaaaaaaaaaaaaah


... i was searching for exactly these kinds of things...... the eyes of someone else always see more clearly tongue.gif

thanks
Back to top
View users profile Send private message Add User to Ignore List
Arnk Kilo Dylie
Seasoned Helper


Age:36
Gender:Gender:Male
Joined: Jul 14 2006
Posts: 108
Offline

PostPosted: Sun Feb 20, 2011 6:19 pm    Post subject: Reply to topic Reply with quote

good practice would probably dictate to not return in the middle of a function, or at least not in the middle of a lock. then you just write lock, unlock, operations in between, and return a result at the end, and never worry.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Sun Feb 20, 2011 7:21 pm    Post subject: Reply to topic Reply with quote

I added the locks afterwards, which is probably why I didn't notice this at the time... But yeah, obviously tongue.gif
Back to top
View users profile Send private message Add User to Ignore List
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> ASSS Questions All times are GMT - 5 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 641 page(s) served in previous 5 minutes.

phpBB Created this page in 0.428251 seconds : 32 queries executed (94.0%): GZIP compression disabled