Raised This Month: $32 Target: $400
 8% 

Segmentation fault on Quit


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
infofarmer
Junior Member
Join Date: May 2005
Location: moscow
Old 06-06-2005 , 22:04   Segmentation fault on Quit
Reply With Quote #1

I've just got sourcemm working, and:
Quote:
quit
L 06/07/2005 - 04:54:27: [META] Loaded 0 plugins from file.
L 06/07/2005 - 04:54:27: server_message: "quit"
L 06/07/2005 - 04:54:27: Log file closed
L 06/07/2005 - 04:54:27: server_message: "restart"
./srcds_run: line 344: 16419 Segmentation fault $HL_CMD
Add "-debug" to the ./srcds_run command line to generate a debug.log to help with solving this problem
Tue Jun 7 04:54:27 MSD 2005: Server restart in 10 seconds
And with -debug:
Quote:
quit
L 06/07/2005 - 04:59:42: [META] Loaded 0 plugins from file.
L 06/07/2005 - 04:59:42: server_message: "quit"
L 06/07/2005 - 04:59:42: Log file closed
L 06/07/2005 - 04:59:42: server_message: "restart"
./srcds_run: line 344: 16467 Segmentation fault (core dumped) $HL_CMD
cat: srcds.pid: No such file or directory
email debug.log to [email protected]
Tue Jun 7 04:59:42 MSD 2005: Server restart in 10 seconds
From gdb:
Quote:
(gdb) core core.16448
Core was generated by `./srcds_amd -pingboost 1 -game cstrike -port 28015 +sv_lan 1 +ip csme.ru +map d'.
Program terminated with signal 11, Segmentation fault.
#0 0x5a0c617d in ?? ()
infofarmer is offline
Send a message via ICQ to infofarmer Send a message via MSN to infofarmer
BAILOPAN
Join Date: Jan 2004
Old 06-06-2005 , 23:25  
Reply With Quote #2

If you can, load the server_i486.so files within gdb so the symbols are inserted. Then do "bt" to see the full stack. To load a file with symbols use "sym <path>".
__________________
egg
BAILOPAN is offline
infofarmer
Junior Member
Join Date: May 2005
Location: moscow
Old 06-07-2005 , 05:01  
Reply With Quote #3

Quote:
Originally Posted by BAILOPAN
If you can, load the server_i486.so files within gdb so the symbols are inserted. Then do "bt" to see the full stack. To load a file with symbols use "sym <path>".
I'm afraid I'm too lame for that. I tried to load both cstrike/bin/server_i486.so and metamod/bin/server_i486.so, but "bt" failed either way. Here's the output:
Quote:
(gdb) core core.16774
Core was generated by `./srcds_amd -pingboost 1 -game cstrike -port 28015 +sv_lan 1 +ip csme.ru +map d'.
Program terminated with signal 11, Segmentation fault.
#0 0x5a0c617d in ?? ()
(gdb) bt
#0 0x5a0c617d in ?? ()
Cannot access memory at address 0xffffb410
(gdb) sym cstrike/bin/server_i486.so
Reading symbols from /home/csn/src2/cstrike/bin/server_i486.so...done.
Using host libthread_db library "/lib64/tls/libthread_db.so.1".
(gdb) bt
#0 0x5a0c617d in ?? ()
Cannot access memory at address 0xffffb410
(gdb) sym cstrike/addons/metamod/bin/server_i486.so
Load new symbol table from "/home/csn/src2/cstrike/addons/metamod/bin/server_i486.so"? (y or n) y
Reading symbols from /home/csn/src2/cstrike/addons/metamod/bin/server_i486.so...(no debugging symbols found)...done.
(gdb) bt
#0 0x5a0c617d in ?? ()
Cannot access memory at address 0xffffb410
I'm trying to contact you via ICQ so that I could give you temporary shell access, if it can help.

After some googling:
Quote:
(gdb) bt
#0 0x5a0c617d in ?? ()
Cannot access memory at address 0xffffb410
(gdb) f 0
#0 0x5a0c617d in ?? ()
(gdb) i reg
eax 0x0 0
ecx 0x1 1
edx 0xffffb40c -19444
ebx 0x5a0d12e8 1510806248
esp 0xffffb410 0xffffb410
ebp 0xffffb428 0xffffb428
esi 0x5a0d2060 1510809696
edi 0x80de900 135129344
eip 0x5a0c617d 0x5a0c617d
eflags 0x10297 66199
cs 0x23 35
ss 0x2b 43
ds 0x2b 43
es 0x2b 43
fs 0x0 0
gs 0x5b 91
(gdb) x/10i $pc
0x5a0c617d: Cannot access memory at address 0x5a0c617d
(gdb) x/10i $eax
0x0: Cannot access memory at address 0x0
(gdb) x/10i $ecx
0x1: Cannot access memory at address 0x1
(gdb) x/10i $edx
0xffffb40c: Cannot access memory at address 0xffffb40c
(gdb) x/10i $ebx
0x5a0d12e8: Cannot access memory at address 0x5a0d12e8
(gdb) x/10i $esi
0x5a0d2060: Cannot access memory at address 0x5a0d2060
(gdb) x/10i $edi
0x80de900: shl %cl
0x80de902: or $0xdfd0008,%eax
0x80de907: or %dl,%al
0x80de909: adc %ecx,0xdeb905a
0x80de90f: or %cl,0x80dc7(%eax)
0x80de915: jmp 0x80df127
0x80de91a: add %al,(%eax)
0x80de91c: inc %eax
0x80de91d: jmp 0x80de92c
0x80de91f: or %al,(%eax)
infofarmer is offline
Send a message via ICQ to infofarmer Send a message via MSN to infofarmer
jakerosoft
Junior Member
Join Date: Jan 2007
Old 01-29-2007 , 05:28   Re: Segmentation fault on Quit
Reply With Quote #4

I am having the same problem.. the server crashes when any plugin that uses a ConVar or ConCommand is unloaded... here is the backtrace..

Is this a known issue? I'm running linux 2.6, gcc-4.1.1

Quote:
jkupersm@oscar /usr/gog/games/srcds_dev $ gdb ./srcds_i686 ./core
GNU gdb 6.4
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".

Core was generated by `./srcds_i686 -game cstrike +map de_dust +ip 64.29.173.134 -port 30005 -norestar'.
Program terminated with signal 11, Segmentation fault.

warning: Can't read pathname for load map: Input/output error.
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/gog/games/srcds_dev/bin/tier0_i486.so...done.
Loaded symbols for bin/tier0_i486.so
Reading symbols from /lib/libpthread.so.0...done.
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /usr/gog/games/srcds_dev/bin/vstdlib_i486.so...done.
Loaded symbols for bin/vstdlib_i486.so
Reading symbols from /usr/gog/games/srcds_dev/bin/dedicated_i686.so...done.
Loaded symbols for bin/dedicated_i686.so
Reading symbols from /usr/gog/games/srcds_dev/bin/soundemittersystem_i486.so...done.
Loaded symbols for bin/soundemittersystem_i486.so
Reading symbols from /usr/gog/games/srcds_dev/bin/materialsystem_i486.so...done.
Loaded symbols for bin/materialsystem_i486.so
Reading symbols from /usr/gog/games/srcds_dev/bin/studiorender_i486.so...done.
Loaded symbols for bin/studiorender_i486.so
Reading symbols from /usr/gog/games/srcds_dev/bin/vphysics_i486.so...done.
Loaded symbols for bin/vphysics_i486.so
Reading symbols from /usr/gog/games/srcds_dev/bin/datacache_i486.so...done.
Loaded symbols for bin/datacache_i486.so
Reading symbols from /usr/gog/games/srcds_dev/bin/engine_i686.so...done.
Loaded symbols for bin/engine_i686.so
Reading symbols from /usr/gog/games/srcds_dev/bin/libsteamvalidateuseridtickets_i486.so...done.
Loaded symbols for bin/libsteamvalidateuseridtickets_i486.so
Reading symbols from /usr/gog/games/srcds_dev/bin/steam_api_i486.so...done.
Loaded symbols for bin/steam_api_i486.so
Reading symbols from /usr/gog/games/srcds_dev/bin/shaderapiempty_i486.so...done.
Loaded symbols for bin/shaderapiempty_i486.so
Reading symbols from /usr/gog/games/srcds_dev/cstrike/addons/metamod/bin/server_i486.so...done.
Loaded symbols for /usr/gog/games/srcds_dev/cstrike/addons/metamod/bin/server_i486.so
Reading symbols from /usr/gog/games/srcds_dev/cstrike/bin/server_i486.so...done.
Loaded symbols for /usr/gog/games/srcds_dev/cstrike/bin/server_i486.so
Reading symbols from /usr/gog/games/srcds_dev/bin/scenefilecache_i486.so...done.
Loaded symbols for /usr/gog/games/srcds_dev/bin/scenefilecache_i486.so
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
Reading symbols from /lib/libnss_dns.so.2...done.
Loaded symbols for /lib/libnss_dns.so.2
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
#0 0xb6e43202 in ConCommandBase::GetNext (this=0xb1fe97e0) at convar.cpp:481
481 return m_pNext;
(gdb) bt
#0 0xb6e43202 in ConCommandBase::GetNext (this=0xb1fe97e0) at convar.cpp:481
#1 0xb6e46dc0 in CAlwaysRegisterableCommand::BringToFront (this=0xb6e5daa0) at concommands.cpp:639
#2 0xb6e46ec8 in SMConVarAccessor::UnregisterGameDLLCommands (this=0xb6e5dabc) at concommands.cpp:100
#3 0xb6e4a448 in DLLShutdown_handler () at sourcemm.cpp:472
#4 0xb6e4e5ff in fastdelegate::FastDelegate0<void>::InvokeStat icFunction (this=0xb6e4a40a) at FastDelegate.h:937
#5 0xb6e4c743 in fastdelegate::FastDelegate0<void>:perator() (this=0x80d855c) at FastDelegate.h:909
#6 0xb6e4c929 in __SourceHook_FHCls_IServerGameDLLDLLShutdownf alse::Func (this=0xb6c5b844) at sourcemm.cpp:29
#7 0xb72a9a2d in SV_ShutdownGameDLL () from bin/engine_i686.so
#8 0xb72c6ef3 in CModAppSystemGroup::Main () from bin/engine_i686.so
#9 0xb73c93b3 in CAppSystemGroup::Run () from bin/engine_i686.so
#10 0xb72c80ff in CDedicatedServerAPI::ModInit () from bin/engine_i686.so
#11 0xb7d3728a in CDedicatedAppSystemGroup::Main () from bin/dedicated_i686.so
#12 0xb7d64dc3 in CAppSystemGroup::Run () from bin/dedicated_i686.so
#13 0xb7d64dc3 in CAppSystemGroup::Run () from bin/dedicated_i686.so
#14 0xb7d37668 in main () from bin/dedicated_i686.so
#15 0x0804909e in main ()
Current language: auto; currently c++
(gdb)
jakerosoft is offline
el hippo
Member
Join Date: Jan 2006
Location: Texas
Old 01-29-2007 , 13:20   Re: Segmentation fault on Quit
Reply With Quote #5

I get the same error when I use sourcemm + bailopan's stripper. My entity grabber plugin also seems to have the same problem. I tried all sorts of things, but I couldn't figure out why it is crashing. (I tried updated my hl2sdk and sourcemm sdk with no luck..)

I posted a related error that happens when I try to query the value of a cvar from console: http://forums.alliedmods.net/showpos...&postcount=144 . My issue seems to be related to some sort of libc or gcc mismatch, but I am not sure.

Hippo
__________________
el hippo is offline
BAILOPAN
Join Date: Jan 2004
Old 01-29-2007 , 19:44   Re: Segmentation fault on Quit
Reply With Quote #6

el hippo: You get this with just my stripper plugin loaded? Anything else loaded (MM or non-MM?)
__________________
egg
BAILOPAN is offline
jakerosoft
Junior Member
Join Date: Jan 2007
Old 01-29-2007 , 22:15   Re: Segmentation fault on Quit
Reply With Quote #7

bail, i started with stub_mm and have added very little. I current have a Var class (IConCommandBaseAccessor). I register this with
Quote:
ConCommandBaseMgr::OneTimeInit(&g_GogVars);
in
Quote:
Plugin::Load()
.

here's my cvars.cpp ... if i uncomment any of the commented lines, the server segfaults when i run meta unload 1. With the lines commented out, does not crash.

Quote:
#include "gog_mm.h"
#include "cvars.h"

GogVars g_GogVars;

//ConVar g_VarGOGVersion( "gog_version", GOG_MM_VERSION, FCVAR_PLUGIN | FCVAR_PROTECTED );

bool GogVars::RegisterConCommandBase(ConCommandBas e *pVar)
{
//this will work on any type of concmd!
return META_REGCVAR(pVar);
}

/*CON_COMMAND(gog_test, "Gog Test command")
{
META_CONPRINT("This sentence is in Spanish when you're not looking.\n");
}*/

Last edited by jakerosoft; 01-29-2007 at 22:17.
jakerosoft is offline
jakerosoft
Junior Member
Join Date: Jan 2007
Old 01-29-2007 , 22:50   Re: Segmentation fault on Quit
Reply With Quote #8

Quote:
Originally Posted by el hippo View Post
I get the same error when I use sourcemm + bailopan's stripper. My entity grabber plugin also seems to have the same problem. I tried all sorts of things, but I couldn't figure out why it is crashing. (I tried updated my hl2sdk and sourcemm sdk with no luck..)

I posted a related error that happens when I try to query the value of a cvar from console: http://forums.alliedmods.net/showpos...&postcount=144 . My issue seems to be related to some sort of libc or gcc mismatch, but I am not sure.

Hippo
This error goes away when I `svn update` the sources. even metamod_version crashes the server.

Here's what doesn't work..
.. Download sourcemm-1.3-source.tar.gz from sourcemm.net
.. change MAX_GAMEDLL_VERSION from 5 to 6 in sourcemm.h (to prevent crash from This mod version requires a SourceMM update)
.. make

Quote:
# ./srcds_run -game cstrike
Auto detecting CPU
...
Network: IP 10.0.0.34, mode MP, dedicated Yes, ports 27015 SV / 27005 CL
meta list
-Id- Name Version Author Status
meta version
Metamod:Source version 1.3
Compiled on: Jan 29 2007
Plugin interface version: 9:7
SourceHook version: 4
http://www.sourcemm.net/
metamod_version
./srcds_run: line 344: 8235 Segmentation fault $HL_CMD
Add "-debug" to the ./srcds_run command line to generate a debug.log to help with solving this problem
Mon Jan 29 21:48:21 EST 2007: Server restart in 10 seconds
Mon Jan 29 21:48:22 EST 2007: Server Quit
jakerosoft is offline
el hippo
Member
Join Date: Jan 2006
Location: Texas
Old 01-29-2007 , 23:54   Re: Segmentation fault on Quit
Reply With Quote #9

Quote:
Originally Posted by BAILOPAN View Post
el hippo: You get this with just my stripper plugin loaded? Anything else loaded (MM or non-MM?)
I removed everything except for sourcemm 1.3d and stripper. I still get the same crash when trying to query stripper_version.

Code:
meta list
-Id- Name                  Version     Author           Status
[01] Stripper              1.1a        BAILOPAN         RUN
stripper_version
./srcds_run: line 344: 13788 Segmentation fault      (core dumped) $HL_CMD
cat: hlds.13774.pid: No such file or directory
email debug.log to [email protected]
Mon Jan 29 18:53:05 EST 2007: Server restart in 10 seconds
Code:
#0  __dynamic_cast (src_ptr=0xb1fd0600, src_type=0xb7dbe434, dst_type=0xb73dbc6c, src2dst=0) at ../../.././libstdc++-v3/libsupc++/tinfo.cc:717
717     ../../.././libstdc++-v3/libsupc++/tinfo.cc: No such file or directory.
        in ../../.././libstdc++-v3/libsupc++/tinfo.cc
(gdb) bt
#0  __dynamic_cast (src_ptr=0xb1fd0600, src_type=0xb7dbe434, dst_type=0xb73dbc6c, src2dst=0) at ../../.././libstdc++-v3/libsupc++/tinfo.cc:717
#1  0xb71ea072 in CCvar::PrintConCommandBaseDescription () from bin/engine_i686.so
#2  0xb71eb3b8 in CCvar::IsCommand () from bin/engine_i686.so
#3  0xb71da432 in Cmd_ExecuteString () from bin/engine_i686.so
#4  0xb71da926 in Cbuf_Execute () from bin/engine_i686.so
#5  0xb723d13e in _Host_RunFrame () from bin/engine_i686.so
#6  0xb723d70d in Host_RunFrame () from bin/engine_i686.so
#7  0xb72476ec in CHostState::State_Run () from bin/engine_i686.so
#8  0xb7247991 in CHostState::FrameUpdate () from bin/engine_i686.so
#9  0xb7247b17 in HostState_Frame () from bin/engine_i686.so
#10 0xb72d5874 in CEngine::Frame () from bin/engine_i686.so
#11 0xb72d350e in CDedicatedServerAPI::RunFrame () from bin/engine_i686.so
#12 0xb7d4303d in RunServer () from bin/dedicated_i686.so
#13 0xb72d2eee in CModAppSystemGroup::Main () from bin/engine_i686.so
#14 0xb73d53b3 in CAppSystemGroup::Run () from bin/engine_i686.so
#15 0xb72d40ff in CDedicatedServerAPI::ModInit () from bin/engine_i686.so
#16 0xb7d4328a in CDedicatedAppSystemGroup::Main () from bin/dedicated_i686.so
#17 0xb7d70dc3 in CAppSystemGroup::Run () from bin/dedicated_i686.so
#18 0xb7d70dc3 in CAppSystemGroup::Run () from bin/dedicated_i686.so
#19 0xb7d43668 in main () from bin/dedicated_i686.so
#20 0x0804909e in main ()
Current language:  auto; currently c++
(gdb)
Hippo
__________________
el hippo is offline
BAILOPAN
Join Date: Jan 2004
Old 02-04-2007 , 03:25   Re: Segmentation fault on Quit
Reply With Quote #10

I cannot reproduce this for the life of me. What mod are you running under?

jakersoft: I will make sure that the source tarball gets properly updated next release.
__________________
egg
BAILOPAN is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:37.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode