|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
Support::Linux Servers Support forum for Linux EQEMu users. |
 |
|
 |

12-03-2012, 11:33 PM
|
 |
Hill Giant
|
|
Join Date: Aug 2010
Location: UT
Posts: 215
|
|
Segmentation Fault
I am new to Linux, and my server has a segmentation fault when I try to start it, which I've been researching so I sorta understand what it is and what's happened. But I am at a loss at things to try in order to get it fixed.
Here's the output if it helps:
Code:
eqemu@xxxxxxxx:~/server$ ./start
+ LNAME=zone
+ '[' '' = test ']'
+ P=/home/eqemu/server
+ export LD_LIBRARY_PATH=:/home/eqemu/server
+ LD_LIBRARY_PATH=:/home/eqemu/server
+ mkdir -p logs
+ '[' '!' -e .lock-zones -a '!' -e .lock-world ']'
+ for f in 'logs/eqemu_*.log'
+ '[' logs/eqemu_commands_zone.log = logs/eqemu_commands_zone.log ']'
+ continue
+ for f in 'logs/eqemu_*.log'
+ '[' logs/eqemu_debug_2134.log = logs/eqemu_commands_zone.log ']'
+ rm -f logs/eqemu_debug_2134.log
+ for f in 'logs/eqemu_*.log'
+ '[' logs/eqemu_debug_world.log = logs/eqemu_commands_zone.log ']'
+ rm -f logs/eqemu_debug_world.log
+ for f in 'logs/eqemu_*.log'
+ '[' logs/eqemu_world.log = logs/eqemu_commands_zone.log ']'
+ rm -f logs/eqemu_world.log
+ '[' '!' -e .lock-world ']'
+ touch .lock-world
+ '[' ']'
+ sleep 15
+ ./world
./start: line 60: 2157 Segmentation fault ./world 2>&1 > logs/world
+ '[' '!' -e .lock-launcher ']'
+ touch .lock-launcher
+ '[' ']'
+ '[' ']'
+ ./eqlaunch zone
I'd appreciate any thoughts, ideas, or links to get me started figuring this out.
|
 |
|
 |

12-04-2012, 12:09 AM
|
 |
Dragon
|
|
Join Date: Dec 2009
Posts: 719
|
|
post the contents of your world log.
|
 |
|
 |

12-04-2012, 08:06 PM
|
 |
Hill Giant
|
|
Join Date: Aug 2010
Location: UT
Posts: 215
|
|
logs/world:
Code:
[Debug] Starting Log: logs/eqemu_debug_world.log
[Debug] [WORLD__INIT] Loading server configuration..
[Debug] [COMMON__THREADS] Starting TCPServerLoop with thread ID -1223750800
[Debug] [COMMON__THREADS] Starting TCPServerLoop with thread ID -1232143504
[Debug] [WORLD__INIT] Log settings loaded from log.ini
[Debug] [WORLD__INIT] CURRENT_WORLD_VERSION:EQEmulator 0.8.0
[Debug] [WORLD__INIT] Added loginserver eqemulator.net:5998
[Debug] [WORLD__INIT] Connecting to MySQL...
[Status] Starting Log: logs/eqemu_world.log
[Status] Using database 'peq' at localhost:3306
[Debug] [WORLD__INIT] HTTP world service disabled.
[Debug] [WORLD__INIT] Loading variables..
[Debug] [COMMON__THREADS] Starting DBAsyncLoop with thread ID -1242563728
[Debug] [WORLD__INIT] Loading zones..
[Debug] [WORLD__INIT] Clearing groups..
[Debug] [WORLD__INIT] Clearing raids..
[Debug] [WORLD__INIT] Loading items..
[Status] libEMuShareMem.so loaded
[Status] Loading items from database: count=94982
|
 |
|
 |

12-04-2012, 08:42 PM
|
Demi-God
|
|
Join Date: Aug 2010
Posts: 1,742
|
|
If you have a core.xxxxx (xxxxx is numbers) file in the directory where world is then you can open it with gdb and get a trace of where the crash happened.
In that directory type gdb world core.xxxx, then type bt after it loads and post that stack trace.
If there is no core file then you can run world in gdb by navigating to the directory where it is, typing gdb world, then run once it starts. If it crashes type bt to get the stack trace.
|
 |
|
 |

12-04-2012, 09:09 PM
|
 |
Hill Giant
|
|
Join Date: Aug 2010
Location: UT
Posts: 215
|
|
Wow, gdb, who knew. I had to go find it and install it, but now I've got it to use. Thanks!
There was not core file of any sort that you mentioned so I ran gdb world.
Code:
eqemu@xxxxxx:~/server$ gdb world
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/eqemu/server/world...done.
(gdb) run
Starting program: /home/eqemu/server/world
[Thread debugging using libthread_db enabled]
[New Thread 0xb7989b70 (LWP 2156)]
[New Thread 0xb7188b70 (LWP 2157)]
[Debug] Starting Log: logs/eqemu_debug_world.log
[Debug] [COMMON__THREADS] Starting TCPServerLoop with thread ID -1214735504
[Debug] [COMMON__THREADS] Starting TCPServerLoop with thread ID -1223128208
[Debug] [WORLD__INIT] Loading server configuration..
[Debug] [WORLD__INIT] Log settings loaded from log.ini
[Debug] [WORLD__INIT] CURRENT_WORLD_VERSION:EQEmulator 0.8.0
[Debug] [WORLD__INIT] Added loginserver eqemulator.net:5998
[Debug] [WORLD__INIT] Connecting to MySQL...
[Status] Starting Log: logs/eqemu_world.log
[Status] Using database 'peq' at localhost:3306
[New Thread 0xb6987b70 (LWP 2158)]
[Debug] [WORLD__INIT] HTTP world service disabled.
[Debug] [WORLD__INIT] Loading variables..
[Debug] [COMMON__THREADS] Starting DBAsyncLoop with thread ID -1231520912
[Debug] [WORLD__INIT] Loading zones..
[Debug] [WORLD__INIT] Clearing groups..
[Debug] [WORLD__INIT] Clearing raids..
[Debug] [WORLD__INIT] Loading items..
[Status] libEMuShareMem.so loaded
[Status] Loading items from database: count=94982
Program received signal SIGSEGV, Segmentation fault.
0xb7a2f8dc in ?? () from /lib/i686/cmov/libc.so.6
(gdb) bt
#0 0xb7a2f8dc in ?? () from /lib/i686/cmov/libc.so.6
#1 0xb7a2f640 in strtol () from /lib/i686/cmov/libc.so.6
#2 0x080e2b9f in atoi (this=0x81ec240, iItemCount=94982, iMaxItemID=154102) at /usr/include/stdlib.h:286
#3 SharedDatabase::DBLoadItems (this=0x81ec240, iItemCount=94982, iMaxItemID=154102) at ../common/shareddb.cpp:950
#4 0x080e3af7 in SharedDatabase::extDBLoadItems (iItemCount=94982, iMaxItemID=154102) at ../common/shareddb.cpp:787
#5 0xb617abac in DLLLoadItems (cbDBLoadItems=0x80e3ad6 <SharedDatabase::extDBLoadItems(int, unsigned int)>, iItemStructSize=1016, iItemCount=0xbffff2bc,
iMaxItemID=0x81ec66c) at Items.cpp:117
#6 0x080e17ac in SharedDatabase::LoadItems (this=0x81ec240) at ../common/shareddb.cpp:799
#7 0x0809a9b8 in main (argc=1, argv=0xbffff8e4) at net.cpp:291
(gdb)
|
 |
|
 |

12-04-2012, 11:19 PM
|
Demi-God
|
|
Join Date: Aug 2010
Posts: 1,742
|
|
Ok, there's something wrong with your items database. If I had to guess I'd say one of the columns is NULL where it is using atoi to extract a number from a string.
Run it under gdb again and let it crash.
Type up until the SharedDatabase::DBLoadItems frame is selected.
Type list and hopefully it will show you the line in the source code where it crashed so you can tell what column it is.
You might be able to figure out exactly which item it is by typing print item, print item.Name, or print item.ID. That's assuming that those were parsed successfully before the crash happened.
It's been a while since I used gdb every day, so I might be a little fuzzy on the commands, but hopefully this will help you narrow it down a bit.
|

12-04-2012, 11:36 PM
|
 |
Hill Giant
|
|
Join Date: Aug 2010
Location: UT
Posts: 215
|
|
Thanks very much, this was very helpful.
I am still building this server, so I just re-sourced the whole db since it only takes a few minutes, and that fixed it.
I have never experienced a Segmentation Fault before and I was worried that the OS had broken or possibly a hardware problem. But it was just the db, no problem.
Thanks again.
|

12-05-2012, 07:03 PM
|
 |
Hill Giant
|
|
Join Date: Aug 2010
Location: UT
Posts: 215
|
|
Quote:
Originally Posted by revloc02c
Wow, gdb, who knew. I had to go find it and install it, but now I've got it to use. Thanks!
|
I just realized that I did something here that really bugs me, I accomplished something in the background without explaining how I did it. This is not very helpful for future reference if someone else reads this. So to clear that up here's how I installed gdb on a Debian Linux box:
Code:
apt-get install gdb
Super simple, and easy enough to Google, but it is the principle of it that matters.
|

12-05-2012, 10:11 PM
|
 |
Hill Giant
|
|
Join Date: Aug 2010
Location: UT
Posts: 215
|
|
Ok, so I got this same problem again, another Segmentation Fault. So I dived into gdb some more like you said lerxst and sure enough you were right.
In game I have a SQL sproc that adds an item to the db and I didn't do some of the columns right and they were coming out NULL, and it was trying to atoi one of those columns.
Thanks for the help, I would have never tracked that bug down without you. 
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 06:23 PM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |