Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ Copyover Problems...again?

Copyover Problems...again?

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Nick Cash   USA  (626 posts)  Bio
Date Wed 10 Mar 2004 06:17 AM (UTC)
Message
Hmmm, seams my mud has come to hate my copyover/warmboots. I just installed Greven's version of this, and he will no doubt respond to this post! Anyways, I just had a little problem with mine. If you search back into my first problems on this forum, it was related to the locking up of after my copyovers. However, I was able to fix those. Now, after this, I did not manage to fix it. Now it is when I boot up the mud, and most likely when I hotboot also. Here's what its doing.

[odis@percy src]$ ps uxc
USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
odis      8057  0.0  0.1  2960  796 ?        S    Mar04   0:00 hubstart
odis      8141  0.0  0.4 13936 2204 ?        S    Mar04   0:00 router
odis     18637  0.0  0.4  3556 2396 pts/12   S    21:54   0:00 bash
odis     20670  0.0  0.2  2976 1272 pts/12   SN   22:05   0:00 startup
odis     21459  1.0  0.4  4548 2420 pts/12   SN   22:05   0:00 gwa
odis     21490  0.0  0.1  2632  708 pts/12   R    22:06   0:00 ps

Now, notice the cpu usage when nothing is happening and the mud has just booted. Seems alright to me..so lets try and login. I connect and enter my name, all goes well. Next, password! Lets have a look at that cpu usage...


[odis@percy src]$ ps uxc
USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
odis      8057  0.0  0.1  2960  796 ?        S    Mar04   0:00 hubstart
odis      8141  0.0  0.4 13936 2204 ?        S    Mar04   0:00 router
odis     18637  0.0  0.4  3556 2396 pts/12   S    21:54   0:00 bash
odis     20670  0.0  0.2  2976 1272 pts/12   SN   22:05   0:00 startup
odis     21459  4.6  0.5  4552 2688 pts/12   RN   22:05   0:02 gwa
odis     21493  0.0  0.1  2632  708 pts/12   R    22:06   0:00 ps
[odis@percy src]$ ps uxc
USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
odis      8057  0.0  0.1  2960  796 ?        S    Mar04   0:00 hubstart
odis      8141  0.0  0.4 13936 2204 ?        S    Mar04   0:00 router
odis     18637  0.0  0.4  3556 2396 pts/12   S    21:54   0:00 bash
odis     20670  0.0  0.2  2976 1272 pts/12   SN   22:05   0:00 startup
odis     21459  6.2  0.5  4552 2716 pts/12   RN   22:05   0:03 gwa
odis     21497  0.0  0.1  2640  712 pts/12   R    22:06   0:00 ps
[odis@percy src]$ ps uxc
USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
odis      8057  0.0  0.1  2960  796 ?        S    Mar04   0:00 hubstart
odis      8141  0.0  0.4 13936 2204 ?        S    Mar04   0:00 router
odis     18637  0.0  0.4  3556 2396 pts/12   S    21:54   0:00 bash
odis     20670  0.0  0.2  2976 1272 pts/12   SN   22:05   0:00 startup
odis     21459  7.1  0.5  4552 2728 pts/12   RN   22:05   0:03 gwa
odis     21498  0.0  0.1  2636  712 pts/12   R    22:06   0:00 ps
[odis@percy src]$ ps uxc
USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
odis      8057  0.0  0.1  2960  796 ?        S    Mar04   0:00 hubstart
odis      8141  0.0  0.4 13936 2204 ?        S    Mar04   0:00 router
odis     18637  0.0  0.4  3556 2396 pts/12   S    21:54   0:00 bash
odis     20670  0.0  0.2  2976 1272 pts/12   SN   22:05   0:00 startup
odis     21459  8.6  0.5  4552 2748 pts/12   RN   22:05   0:04 gwa
odis     21503  0.0  0.1  2636  712 pts/12   R    22:06   0:00 ps

The important thing to note is that the cpu usage will continually go up until the game crashes (I watched it reach some 80% or so before I killed it).

I did rename my executable in hotboot.h. I have done everything according to the snippet, everything compiles fine, and now, this. I've tried getting rid of conjava and those (which were the evil little baddies last time), but to no prevail.

I'm off to tinker for a few minutes, please reply with suggestions.

By the way, the snippet can be found under the Resouces->Snippets section of darwars.wolfpaw.net and also at http://dementiasystems.com/swr/log.html, our SWR Snippets page.

~Nick Cash
http://www.nick-cash.com
Top

Posted by Greven   Canada  (835 posts)  Bio
Date Reply #1 on Wed 10 Mar 2004 07:49 AM (UTC)
Message
Why it would lock up on copyover is quite baffling to me. Are you getting the "Enter your password" message, or is it just freezing after your enter your character name? If this is the case, sounds like something got messed up with load_char_obj, perhaps your supposed to have FALSE in comm.c as the extra bool, but instead have TRUE? Only a guess why this would happen during password...

Now, since this does not see to be a problem with the hotboot function itself, since you can't log in, I would say that load_char_obj is the most likely culprit.

How to figure out where its getting stuck:
go into your /area dir
enter "gdb ../src/<executable". This will load gdb and be targetting your executable in your source directory.
enter "run <port>" this SHOULD boot your mud normally, displaying the boot log to you.

Next, connect to your mud. You should, from what you said, get your greeting and be prompted for your name. Enter it, and follow what you did to cause the loop. When your sure that its frozen, go back to gdb, at hit "ctrl+z". This should stop the program where ever it happened to be during the loop. You can do a backtrace, "bt", and see where it got called from, and it should also give you the line that it was currently at. using "frame <number>", "up" and "down", you can go the place that it seems its looping, and print your variables using "print <variable>", or see the surrounding code with "list".

For a much more thourough and complete instruction on gdb, you can check Nicks guide, just do a search for it.

That should track it down for you, or give you better insight into the problem. I installed it on a stock SWR 1.0 with no problems at all, but since I wrote part of this version of the snippet, I may have missed a step in the instructions.

Please let me know what the problem was. Hope this helps.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
Top

Posted by Nick Cash   USA  (626 posts)  Bio
Date Reply #2 on Wed 10 Mar 2004 10:27 PM (UTC)
Message
I'll run it through gdb when I get home. Something else I forgot to mention, it doesn't generate a core file.

~Nick Cash
http://www.nick-cash.com
Top

Posted by Greven   Canada  (835 posts)  Bio
Date Reply #3 on Wed 10 Mar 2004 10:52 PM (UTC)
Message
If its locking up, it won't create a core. Thats why the best way here is gdb.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
Top

Posted by Typhon   USA  (112 posts)  Bio
Date Reply #4 on Thu 11 Mar 2004 09:39 AM (UTC)
Message
gdb doesnt like hotboot too much. it will crash the mud as soon as it goes into the hotboot recovery.
Top

Posted by Nick Cash   USA  (626 posts)  Bio
Date Reply #5 on Fri 12 Mar 2004 10:56 PM (UTC)

Amended on Fri 12 Mar 2004 10:59 PM (UTC) by Nick Cash

Message
Here's the backtrace.


#0  0x42061414 in flockfile () from /lib/i686/libc.so.6
#1  0x0809ee86 in bug (str=0x8158a75 "Fread_obj: too many layers %d") at db.c:3708
#2  0x080d38e3 in fread_obj (ch=0x829f1f8, fp=0x829b4b0, os_type=0) at save.c:1949
#3  0x080d0462 in load_char_obj (d=0x82a35e0, name=0xbfffd2c0 "Odis", preload=0 '\0',
    copyover=0 '\0') at save.c:904
#4  0x08093ff6 in nanny (d=0x82a35e0, argument=0xbfffe310 "MyPassWord") at comm.c:1595
#5  0x08092731 in game_loop () at comm.c:589
#6  0x08091e61 in main (argc=2, argv=0xbfffe7b4) at comm.c:243
#7  0x42017589 in __libc_start_main () from /lib/i686/libc.so.6
(gdb) bt
#0  0x42061414 in flockfile () from /lib/i686/libc.so.6
#1  0x0809ee86 in bug (str=0x8158a75 "Fread_obj: too many layers %d") at db.c:3708
#2  0x080d38e3 in fread_obj (ch=0x829f1f8, fp=0x829b4b0, os_type=0) at save.c:1949
#3  0x080d0462 in load_char_obj (d=0x82a35e0, name=0xbfffd2c0 "Odis", preload=0 '\0',
    copyover=0 '\0') at save.c:904
#4  0x08093ff6 in nanny (d=0x82a35e0, argument=0xbfffe310 "R1o2H3a4N5") at comm.c:1595
#5  0x08092731 in game_loop () at comm.c:589
#6  0x08091e61 in main (argc=2, argv=0xbfffe7b4) at comm.c:243
#7  0x42017589 in __libc_start_main () from /lib/i686/libc.so.6


Along with that I get tons of this:


Fri Mar 12 14:55:03 2004 :: [*****] FILE: ../player/o/Odis LINE: 6810
Fri Mar 12 14:55:03 2004 :: [*****] BUG: Fread_obj: too many layers 5
Fri Mar 12 14:55:03 2004 :: [*****] FILE: ../player/o/Odis LINE: 6827
Fri Mar 12 14:55:03 2004 :: [*****] BUG: Fread_obj: too many layers 5
Fri Mar 12 14:55:03 2004 :: [*****] FILE: ../player/o/Odis LINE: 6834
Fri Mar 12 14:55:03 2004 :: [*****] BUG: Fread_obj: too many layers 7
Fri Mar 12 14:55:03 2004 :: [*****] FILE: ../player/o/Odis LINE: 6840
Fri Mar 12 14:55:03 2004 :: [*****] BUG: Fread_obj: too many layers 17
Fri Mar 12 14:55:03 2004 :: [*****] FILE: ../player/o/Odis LINE: 6846
Fri Mar 12 14:55:03 2004 :: [*****] BUG: Fread_obj: too many layers 17
Fri Mar 12 14:55:03 2004 :: [*****] FILE: ../player/o/Odis LINE: 6857
Fri Mar 12 14:55:03 2004 :: [*****] BUG: Fread_obj: too many layers 17
Fri Mar 12 14:55:03 2004 :: [*****] FILE: ../player/o/Odis LINE: 6863
Fri Mar 12 14:55:03 2004 :: [*****] BUG: Fread_obj: too many layers 17
Fri Mar 12 14:55:03 2004 :: [*****] FILE: ../player/o/Odis LINE: 6875
Fri Mar 12 14:55:03 2004 :: [*****] BUG: Fread_obj: too many layers 5
Fri Mar 12 14:55:03 2004 :: [*****] FILE: ../player/o/Odis LINE: 6881
Fri Mar 12 14:55:03 2004 :: [*****] BUG: Fread_obj: too many layers 17


Off to investigate.

~Nick Cash
http://www.nick-cash.com
Top

Posted by Nick Cash   USA  (626 posts)  Bio
Date Reply #6 on Sat 13 Mar 2004 09:24 PM (UTC)
Message
I think I found the problem. My pfile was HUGE! It turns out it saved my equipment a couple hundred times, so I think its a save problem. Off to investigate again.

~Nick Cash
http://www.nick-cash.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


22,687 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.