[bf1942] Failure to open ports

ScratchMonkey ScratchMonkey at SewingWitch.com
Thu Jan 2 10:50:36 EST 2003


--On Thursday, January 02, 2003 3:26 PM +0000 Killing 
<killing at barrysworld.com> wrote:

> game.setServerIP 0.0.0.0

I tried that and it failed as well. I straced both good and bad restarts 
and see it fail when starting the server thread:

socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 48
setsockopt(48, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(48, {sin_family=AF_INET, sin_port=htons(14567), 
sin_addr=inet_addr("66.28.14.59")}}, 16) = 0
fcntl64(48, F_GETFL)                    = 0x2 (flags O_RDWR)
fcntl64(48, F_SETFL, O_RDWR|O_NONBLOCK) = 0
time(NULL)                              = 1041521099
write(2, "DBGSTR: *** Changing challenge# "..., 36) = 36
write(2, "DBGSTR: \n\n", 10)            = 10
time(NULL)                              = 1041521099
getrlimit(0x3, 0xbfffe5f8)              = 0
pipe([50, 51])                          = 0
clone(child_stack=0xb3454e8, 
flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND) = 20374
write(51, "\253\200\0@\5\0\0\0\0\0\0\0\0 \4@`\351\377\277T~\0@\232"..., 
148) = 148
rt_sigprocmask(SIG_SETMASK, NULL, [RTMIN], 8) = 0
write(51, "\2000\5@\0\0\0\0\0\0\0\0\364\271\373\10\20\370\322B\0\0"..., 
148) = 148
rt_sigprocmask(SIG_SETMASK, NULL, [RTMIN], 8) = 0
rt_sigsuspend([] <unfinished ...>
--- SIGRTMIN (Real-time signal 0) ---
<... rt_sigsuspend resumed> )           = -1 EINTR (Interrupted system call)
sigreturn()                             = ? (mask now [RTMIN])
write(2, "(0): Error: : serverReceiveThrea"..., 64) = 64
close(48)                               = 0

The good case finishes like this:

--- SIGRTMIN (Real-time signal 0) ---
<... rt_sigsuspend resumed> )           = -1 EINTR (Interrupted system call)
sigreturn()                             = ? (mask now [RTMIN])
gettimeofday({1041521035, 644451}, NULL) = 0
access("mods/BF1942/Settings/ServerAutoexec.con", F_OK) = -1 ENOENT (No 
such file or directory)

In the bad case, it closes the desired GS port and later opens it again but 
binding to 255.255.255.255, presumably as some kind of failsafe case, maybe 
to satisfy some later port-must-be-open-to-something constraint.

I can't see from the system calls why the program has decided that 
"serverReceiveThread was not created successfully". Maybe Ryan can shed 
some light on how the program makes that decision?



More information about the Bf1942 mailing list