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
➜ Problematic "CPU Leak" with Smaug 1.6 FUSS
Problematic "CPU Leak" with Smaug 1.6 FUSS
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Atrox
USA (18 posts) Bio
|
Date
| Sun 07 Mar 2010 10:15 PM (UTC) |
Message
| I've recently been having some problems with my MUD freezing and taking up ridiculous amounts of the CPU. I'm assuming it's some kind of infinite recursion, but have NO idea where to start tracking it. I haven't recently added any for or while loops either. I'm running Smaug 1.6 FUSS. It only happens when a player's online, so I'm thinking it might be update_char, but I don't see any loops without exit conditions. I was wondering if anyone else has had any kind of problem like this, or knows some kind of debugging tool that might help me find it, GDB just doesn't do it for this kind of problem, unless it has some feature I'm not aware of. | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #1 on Mon 08 Mar 2010 12:02 AM (UTC) |
Message
| Yes you can solve that with gdb.
Run the MUD under gdb, something like this:
cd ../area
gdb ../src/smaug
(in gdb)
run 4020 # or whatever port you want
It will just start up and run normally, since you haven't put any breakpoints or anything in, it should be pretty fast. Then when the MUD freezes, go to the terminal window where you have gdb running and hit Ctrl+C to interrupt it.
Then type "bt" to get the backtrace. This should give a good idea of roughly where the problem is, and if you can't work it out directly, just keep stepping through and watch what happens. |
- Nick Gammon
www.gammon.com.au, www.mushclient.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.
8,690 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top