Raised This Month: $ Target: $400
 0% 

Deadlock?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bucky0
Junior Member
Join Date: May 2005
Old 06-03-2010 , 16:51   Deadlock?
Reply With Quote #1

Hey all,

I've managed to get a bug in a plugin I'm writing that I can't really find. Basically, at some point, the server will lock and become unresponsive to the console. Is there a signal or something I can send HLDS to cause it to dump a backtrace? I can't really think of any other way to figure out where my error is.

best,
Buck
bucky0 is offline
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 06-04-2010 , 13:49   Re: Deadlock?
Reply With Quote #2

Comment parts of code that may be related to that "some point" until you find it.
__________________
Impossible is Nothing
Sylwester is offline
bucky0
Junior Member
Join Date: May 2005
Old 06-04-2010 , 15:18   Re: Deadlock?
Reply With Quote #3

I'm making changes to a giant bit of code (War3FT), so even thinking of where it's happening is difficult. I can code c++, I'm not opposed to putting in a watchdog to see if pawn doesn't return control to AMXX in n seconds and bombing out from there.
bucky0 is offline
Drak
Veteran Member
Join Date: Jul 2005
Old 06-04-2010 , 16:01   Re: Deadlock?
Reply With Quote #4

Usually when it locks, it's because of an infinite loop, could be caused by a query or a socket problem too But most likley infinite loop.
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
bucky0
Junior Member
Join Date: May 2005
Old 06-04-2010 , 17:40   Re: Deadlock?
Reply With Quote #5

Quote:
Originally Posted by Drak View Post
Usually when it locks, it's because of an infinite loop, could be caused by a query or a socket problem too But most likley infinite loop.
right, so it'd be nice to be able hit something and see where that loop is
bucky0 is offline
bucky0
Junior Member
Join Date: May 2005
Old 06-25-2010 , 15:11   Re: Deadlock?
Reply With Quote #6

Any suggestions?
bucky0 is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 06-25-2010 , 19:36   Re: Deadlock?
Reply With Quote #7

Quote:
Originally Posted by Drak View Post
Usually when it locks, it's because of an infinite loop, could be caused by a query or a socket problem too But most likley infinite loop.
Same opinion.

Try to debug the plugin, get the error logs ( and if ur not able to fix it, post the error log and maybe also the code )
__________________
I am out of order!
grimvh2 is offline
bucky0
Junior Member
Join Date: May 2005
Old 06-29-2010 , 10:59   Re: Deadlock?
Reply With Quote #8

Quote:
Originally Posted by grimvh2 View Post
Same opinion.

Try to debug the plugin, get the error logs ( and if ur not able to fix it, post the error log and maybe also the code )
If it infinite loops somewhere, and no error gets printed out, how do I know where to look?

In c, you can just run it in GDB and send a signal that will raise an exception. Then, you catch the exception, and the traceback will show you where it's stuck. Is there no similar thing in AMXX?
bucky0 is offline
Drak
Veteran Member
Join Date: Jul 2005
Old 06-29-2010 , 20:09   Re: Deadlock?
Reply With Quote #9

No, there's not. The easiest way, is check all the files you edited with "while(" and make sure it looks right. Since it's not an internal error, and if you know what you edited. I'm guessing it's a while() loop, since sockets would eventually free the server. And not to many people use do() loops, so i can cancel that out.
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:27.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode