Networking bug in sdlquake?

Started by
2 comments, last by kerryhall 10 years, 6 months ago

Hi folks,

I'm trying to debug an issue with SDL quake. When trying to connect to a quake server over tcp/ip, I enter the ip address then press enter. The machine hangs, and I am unable to exit, change ttys, or run commands while connected via ssh. I ran strace to see what was going on, and here is the last output:


getsockname(5, {sa_family=AF_INET, sin_port=htons(2049), sin_addr=inet_addr("0.0.0.0")}, [16]) = 0  
setsockopt(5, SOL_SOCKET, SO_BROADCAST, [1], 4) = 0  
sendto(5, "\200\0\0\f\2QUAKE\0\3", 12, 0, {sa_family=AF_INET, sin_port=htons(26000), sin_addr=inet_addr("255.255.255.255")}, 16) = 12 
recvfrom(5,

And then the system hangs. SDLquake runs great besides that. Running svgalib as the video driver.

Running Debian 4.0. (I know, I know. It's old. Quake 1 is old too.)

Using sdl quake source found here: http://www.libsdl.org/projects/quake/

Advertisement

Maybe something to do with a socket being blocking when it is expected to be in non-blocking mode?

Thanks Peter, I'll try exploring that and see if I can reproduce the issue in a piece of test code.

I noticed the following issue as well: when I try to start a server:


kerry@debian:~$ sudo netstat -ltpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN     1727/portmap        
tcp        0      0 0.0.0.0:113             0.0.0.0:*               LISTEN     1925/inetd          
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN     2162/sshd 

Not seeing anything listening on 26000, the port used for Quake. It also shows my ip as 127.0.1.1, when it should be 192.168.196.152 in this case.

I can certainly dive into the source and see exactly how it is trying to get the local ip address. Thanks!

Also, I was incorrect about the system locking up. If I am sshd into my machine, I can issue a regular kill to the sdlquake process and have it exit as expected.

This topic is closed to new replies.

Advertisement