Bug 256 - Use of admin.enableRemoteConsole -> can't connect & segfault
Status: RESOLVED FIXED
Alias: None
Product: Battlefield 1942
Classification: Unclassified
Component: dedicated server
Version: beta1
Hardware: PC Linux
: P2 major
Assignee: Ryan C. Gordon
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2002-12-10 03:54 EST by Frank Hofmann
Modified: 2002-12-22 03:24:19 EST
0 users

See Also:



Description Frank Hofmann 2002-12-10 03:54:59 EST
If you enable the remote console by using admin.enableRemoteConsole in
ServerAutoexec.con the server won't run 100%. You can't ping it in a server
browser or connect to with the BF client. It will crash with a segmentation
fault as soon as you try to connect with a remote admin tool (BF's own admin
tool RemoteConsole.exe or BF1942 Remote Server Manager). Changing the port of
remote console doesn't help.

Last lines of server output:

STUB: Hope this isn't important {Engine/GeomBase/TreeMeshTemplate.cpp:324}.
STUB: Hope this isn't important {Engine/GeomBase/TreeMeshTemplate.cpp:324}.
STUB: Hope this isn't important {Engine/GeomBase/TreeMeshTemplate.cpp:324}.
DBGSTR: *** Changing challenge# ***
DBGSTR:

When connecting with an admin tool (-> + segfault):

STUB: Hope this isn't important {Engine/GeomBase/TreeMeshTemplate.cpp:324}.
STUB: Hope this isn't important {Engine/GeomBase/TreeMeshTemplate.cpp:324}.
STUB: Hope this isn't important {Engine/GeomBase/TreeMeshTemplate.cpp:324}.
DBGSTR: *** Changing challenge# ***
DBGSTR:

Segmentation fault
Comment 1 Brad Davidson 2002-12-14 18:58:33 EST
All of the following is done with debugging strings turned on.
Lines with the file path on them are not normally seen on the console without
debugging enabled.
Ones without the filename on them appear even with debugging turned off.

-------------------------

	-(Server loads normally)-
DBGSTR: *** Changing challenge# ***
DBGSTR:

	-(Normally, the level now loads, spawns objects, and waits for a user to connect)-
	-(Next part is only done when remote console is enabled.)-
	-(Appears to be creating a new thread for the console server)-

(no debugging symbols found)...(no debugging symbols found)...[New Thread 2049
(LWP 4006)]
[New Thread 1026 (LWP 4007)]
Engine/IoNetworkProtocolNew/NetServer.cpp(269): Debug:
Engine/IoNetworkProtocolNew/NetServer.cpp: Should we use threads 1
Engine/IoNetworkProtocolNew/NetServer.cpp(2178): Debug:
Engine/IoNetworkProtocolNew/NetServer.cpp: serverReceiveThread created successfully!
BFMultiPlayer/GameServer.cpp(1393): Warning: BFMultiPlayer/GameServer.cpp:
Server is up and running
Engine/Io/Server.cpp(137): Debug: Engine/Io/Server.cpp: Check for WinSock DLL
Engine/Io/Server.cpp(166): Warning: Engine/Io/Server.cpp: Creating a socket
Engine/Io/Server.cpp(182): Debug: Engine/Io/Server.cpp: Making socket unblockable

	-(Sits here until I connect with the admin tool. Admin tool says it's
connecting, but never does.)-
	-(Meanwhile, the server dies)- 

Engine/Io/Server.cpp(189): Warning: Engine/Io/Server.cpp: Binding socket and
listening to it
Engine/Io/Server.cpp(239): Info: Engine/Io/Server.cpp: RemoteConsole connected
from 10.0.0.131:1998
Engine/Io/Server.cpp(384): Warning: Engine/Io/Server.cpp: remote conn user admin
BFMainNewRend/Setup.cpp(3570): Warning: BFMainNewRend/Setup.cpp: initServices

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 4194)]
0x400390ef in dlerror () from /lib/libdl.so.2
(gdb) info stack
#0  0x400390ef in dlerror () from /lib/libdl.so.2
#1  0x08f6550c in LoadLibrary ()
#2  0x08f47561 in dice::matchmaking::ServiceContainer::ServiceContainer ()
#3  0x08f43dac in dice::matchmaking::HostMatchmaking::addBackendService ()
#4  0x08accc9a in dice::bf::BfMultiplayerLobby::host ()
#5  0x08b5ea84 in dice::bf::BfMenu::startHost ()
#6  0x08aaa6e8 in dice::bf::Setup::startHostGame ()
#7  0x08aa2d2d in dice::bf::Setup::initWorld ()
#8  0x08a9db07 in dice::bf::Setup::start ()
#9  0x08a81a4d in main ()
#10 0x4006914f in __libc_start_main () from /lib/libc.so.6
Comment 2 Ryan C. Gordon 2002-12-15 09:30:09 EST
Please verify this still happens with build #1039933525? The memory corruption
fixes might have nailed this, but maybe not.

Thanks,
--ryan.
Comment 3 Frank Hofmann 2002-12-15 10:28:36 EST
Still happens with build #1039933525.
System: RH8, Celeron 1.2, 384 MB RAM, glibc 2.2.93, Kernel 2.4.20

DBGSTR: *** Changing challenge# ***
DBGSTR:


(no debugging symbols found)...(no debugging symbols found)...[New Thread 16385
(LWP 9968)]
[New Thread 8194 (LWP 9969)]

// now i connect with a remote admin tool

(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 8192 (LWP 9967)]
0x4003f12b in dlerror () from /lib/libdl.so.2
(gdb) bt
#0  0x4003f12b in dlerror () from /lib/libdl.so.2
#1  0x08f6552c in LoadLibrary ()
#2  0x08f47581 in dice::matchmaking::ServiceContainer::ServiceContainer ()
#3  0x08f43dcc in dice::matchmaking::HostMatchmaking::addBackendService ()
#4  0x08accc6a in dice::bf::BfMultiplayerLobby::host ()
#5  0x08b5ea54 in dice::bf::BfMenu::startHost ()
#6  0x08aaa6a8 in dice::bf::Setup::startHostGame ()
#7  0x08aa2ced in dice::bf::Setup::initWorld ()
#8  0x08a9dac7 in dice::bf::Setup::start ()
#9  0x08a81a0d in main ()
#10 0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6
Comment 4 Andrzej Barganski 2002-12-21 11:58:27 EST
In build 1040442243 seems that Remote Console works ok.
In fact i'am using it, executing some commands and is ok.
Comment 5 Frank Hofmann 2002-12-21 12:29:14 EST
I can confirm it. Remote console works in build #1040442243.

Thanks Ryan :-)
Comment 6 Ryan C. Gordon 2002-12-22 03:24:19 EST
Cool. Resolving bug entry...

--ryan.