PDA

View Full Version : Seg Fault


Rezbee
02-01-2009, 12:57 AM
Hiya again,

I was using the release build on the front of the website, everything runs fine.

After running through, updating the DB and upgrading EQEMU to the latest SVN rev I'm running into Segementation Faults on a FC5 setup when a client logs in form the char select to A_ZONE_NAME .

I'm not sure whats causing this, but reverting back to the release build everything works fine again.

I've tried about everything to get around it from starting the world manually, zones manually in the terminal, but every time someone tries to zone into any zone from char-select world gets hit with the seg fault and reboots.

Again not sure whats causing it, and I'm stumped why the older build works but the new CVN doesn't.

Any help is much appreciated.

** UPDATE : It seems that it has something to do with the chat/mail servers. If everything is started the above senerio happens. If the chat/mail servers aren't started there is no problem with the latest rev. I don't know why or how the mail/chat servers are causing segmentation faults for the world server... Any ideas? (chat/mail servers are configured correctly and should be working by the wiki documentation) **

Rezbee
02-01-2009, 04:42 AM
Correction to my edit above. The problem does indeed persist even if the mail and chat servers are stoped entirely.

Looking at the logs, this happens percisely as soon as someone hits the "Enter World" button.
And of course this is walled across the entire server:
./persist_world: line 14: 10159 Segmentation fault (core dumped) ./world "$@"

Derision
02-01-2009, 05:03 AM
If you've got a core dump, post a gdb backtrace which might help us explain what the problem is:


$ gdb ./world <core file>
...
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
Reading symbols from /home/entwisd/eqemu/libEMuShareMem.so...done.
Loaded symbols for /home/entwisd/eqemu/libEMuShareMem.so
Core was generated by `./world'.
Program terminated with signal 11, Segmentation fault.
#0 0xb7f3a410 in ?? ()
(gdb) bt
<post what gets output here after entering the bt command>

Rezbee
02-01-2009, 05:26 AM
Program terminated with signal 11, Segmentation fault.
#0 0x0055efbb in ?? ()
(gdb) bt
#0 0x0055efbb in ?? ()
#1 0xbfddf3c8 in ?? ()
#2 0x006ab880 in ?? ()
#3 0xbfddf3d8 in ?? ()
#4 0x08072eb3 in GetEQClassName (class_=0 '\0', level=160 '*') at ../common/classes.cpp:121
#5 0x0055ed1f in ?? ()
#6 0x00000000 in ?? ()

Rezbee
02-01-2009, 05:50 AM
This should tell us a bit more I think.

Core was generated by `./world'.
Program terminated with signal 11, Segmentation fault.
#0 0x0055efbb in ____strtol_l_internal () from /lib/libc.so.6
(gdb) bt
#0 0x0055efbb in ____strtol_l_internal () from /lib/libc.so.6
#1 0x0055ed1f in __strtol_internal () from /lib/libc.so.6
#2 0x08097faa in Database::GetCharInstZOrgID (this=0x816e1c4, charID=1) at /usr/include/stdlib.h:336
#3 0x0809c004 in Database::GetInstZoneID (this=0x816e1c4, zoneID=189, charName=0x9ad989c "Cetin")
at ../common/database.cpp:2345
#4 0x0807aada in Client::EnterWorld (this=0x9ad9890, TryBootup=true) at client.cpp:685
#5 0x0807c773 in Client::HandlePacket (this=0x9ad9890, app=0x9ad9da8) at client.cpp:583
#6 0x0807ca31 in Client::Process (this=0x9ad9890) at client.cpp:654
#7 0x080d9ac6 in ClientList::Process (this=0x816d540) at clientlist.cpp:59
#8 0x0807ffe3 in main (argc=Cannot access memory at address 0x0
) at net.cpp:390
(gdb)

Derision
02-01-2009, 06:03 AM
Yeah that ties in with the DB structure you PMed me. Your instZflagNum and instZOrgID columns in the character_ table having a default of NULL rather than 0 is most likely the cause of that.

Rezbee
02-01-2009, 07:34 AM
Yep it fixed it... I know one thing... if I ever go awol again and come back 3 years later, I'm just nerfing the old db... lol.