Ok... What did I do??

Login to reply  Page: « < 1 of 1 > »
02 May 2010 - 02:212554
Ok... What did I do??
So I was removing all the STR_ADD code, and updating it to let PCs have up to 25 in stats like Imms can. So it compiles fine, and it runs fine. But after these last changes, the mud crashes. It will sometimes let a few people log in and be up for a minute or two, and sometimes it will crash in a few seconds. I have no idea where to start looking at this point... Anyone?

Little update.. It does seem to happen randomly while the mud is UP anywhere from about 10 secs to about 15 mins uptime... But it almost always happens when a second player logs in or out unless they log in within a few secs of the first person... then it seems fine until it randomly dies...


__________________
Al'Aman Shadar (Shadows of the Dragon)
Wheel of Time based MUD
tbaMUD base code (of course)
shadowmud.org:8086 (not live just yet)

Last edited by mrurl42 (02 May 2010 - 02:44)
02 May 2010 - 04:032555
Sounds like you are crashing when strength is being checked. Probably when wielding or changing inventory. Grep for anywhere strength is used in the code to help narrow it down. You may also want to check CWG's code since I know Ziz has already done what you mentioned.


__________________
Rumble
The Builder Academy
tbamud.com 9091
02 May 2010 - 04:452556
Yea... I was thinking that it wouldnt COMPILE tho if it was looking for str_add sine I took those functions out. And it didnt for a while until I tracked down all the pieces they were in, but now that it compiles, it dosent run... *sigh*


__________________
Al'Aman Shadar (Shadows of the Dragon)
Wheel of Time based MUD
tbaMUD base code (of course)
shadowmud.org:8086 (not live just yet)
02 May 2010 - 10:592557
Interesting question.

Have a look here: http://www.tbamud.com/forum/thread/513

Then post again.


__________________
You know who I am.
02 May 2010 - 15:322558
It happens at random times it seems.. heres one that happened while zresetting:

 Program received signal SIGSEGV, Segmentation fault.
0x08173970 in mudlog (type=2, level=103, file=1,
    str=0x8184e9e "(GC) %s reset zone %d (%s)") at utils.c:330
330         if (type > (PRF_FLAGGED(i->character, PRF_LOG1) ? 1 : 0) + (PRF_FLAGGED(i->character, PRF_LOG2) ? 2 : 0))
(gdb) bt
#0  0x08173970 in mudlog (type=2, level=103, file=1,
    str=0x8184e9e "(GC) %s reset zone %d (%s)") at utils.c:330
#1  0x0808dbf1 in do_zreset (ch=0x9a32560, argument=0xbfefe4ce "", cmd=778,
    subcmd=0) at act.wizard.c:2253
#2  0x081114d0 in command_interpreter (ch=0x9a32560,
    argument=0xbfefe4c8 "zreset") at interpreter.c:615
#3  0x080c0850 in game_loop (local_mother_desc=6) at comm.c:859
#4  0x080c1ab7 in main (argc=1, argv=0xbfefe844) at comm.c:507

Ill post more later.. like when it happens while just idling...


__________________
Al'Aman Shadar (Shadows of the Dragon)
Wheel of Time based MUD
tbaMUD base code (of course)
shadowmud.org:8086 (not live just yet)
02 May 2010 - 20:592559
I can see only one reason for the code to crash there - you've got a stray pointer in your descriptor_list.
I hope you're using source control (if not, google git or svn NOW!). Try looking at your changes, and see if you're messing with descriptors anywhere.

If you aren't (and there's a good chance of that, too), it's probably an issue with overwriting your pointers with data.

This can be really tough to debug. However, check the other thing first.



__________________
You know who I am.
03 May 2010 - 16:462560
This is crazy... I have been using backtrace to see where it is crashing. It seems to always be crashing when trying to write something to the mudlog, although it doesnt crast EVERYTIME something is written to it. I went through and looked at the commands near what called the mudlog, but cannot find anything I have changed or anything that should have been affected by what I changed... >_<


__________________
Al'Aman Shadar (Shadows of the Dragon)
Wheel of Time based MUD
tbaMUD base code (of course)
shadowmud.org:8086 (not live just yet)
03 May 2010 - 17:532561
could you have possibly done something to affect the file it self? try resetting the permissions for the target file, to rwx for all.


03 May 2010 - 20:342562
It's not the syslog function or the code calling it that's the problem.

Using your corefile, go down to the crashing function and type in "info local". Also print out contents of passed parameters and of involved variables: 'print *i', 'print *i->character' and 'print *i->character->player_specials' and also 'print *i->character->player_specials.saved'. If any of those gives a seg fault, you know which pointer is bad.


__________________
You know who I am.
04 May 2010 - 15:322563
Thx welcor!! Now i just have to figure out why i->character->player_specials is pointing to mmry location 0x0... Any thoughts on THAT? Heh

Hmm... It lets me type score (and stat) and brings up all my stats, so that pointer is not lost until just before it crashes it seems...


__________________
Al'Aman Shadar (Shadows of the Dragon)
Wheel of Time based MUD
tbaMUD base code (of course)
shadowmud.org:8086 (not live just yet)

Last edited by mrurl42 (04 May 2010 - 16:00)
17 May 2010 - 23:432597
Quote tristen620:
could you have possibly done something to affect the file it self? try resetting the permissions for the target file, to rwx for all.


I advise against setting the x part of that.... unless you know the file is supposed to be executable.


__________________
There's no place like /home.
27 May 2010 - 17:282629
Yea.. I gave up on figuring out what I did... But thanks to a certain post above, I've now installed a version control system, and am rewriting (thanks to good old diff) the OTHER changes I had made up to that point....


__________________
Al'Aman Shadar (Shadows of the Dragon)
Wheel of Time based MUD
tbaMUD base code (of course)
shadowmud.org:8086 (not live just yet)
Login to reply  Page: « < 1 of 1 > »