Hi All,
 I am having a problem running a srcds instance under the python
based process manager supervisord (http://supervisord.org). [1] The
problem seems to be srcds specific, as hlds works fine, and every
other program I have tried.
 I have setup a basic program definition to run "./srcds_i686 -game
cstrike +map de_train", the same as I would from a shell but the
program stalls at startup without producing any output. An strace on
the program shows it appears to be stuck in a loop calling select on
stdout and timing out, eg:
 select(1, [0], NULL, NULL, {0, 0})      = 0 (Timeout)
 gettimeofday({1236551671, 990386}, NULL) = 0
 nanosleep({0, 1000000}, NULL)           = 0
 select(1, [0], NULL, NULL, {0, 0})      = 0 (Timeout)
 gettimeofday({1236551671, 991581}, NULL) = 0
 gettimeofday({1236551671, 991634}, NULL) = 0
 gettimeofday({1236551671, 991686}, NULL) = 0
 gettimeofday({1236551671, 991737}, NULL) = 0
 gettimeofday({1236551671, 991788}, NULL) = 0
 accept(7, 0xbff9c020, [16])             = -1 EAGAIN (Resource
temporarily unavailable)
 gettimeofday({1236551671, 991910}, NULL) = 0
 gettimeofday({1236551671, 991961}, NULL) = 0
 recvfrom(4, 0xbff85940, 96016, 0, 0xbff858d0, 0xbff858cc) = -1
EAGAIN (Resource temporarily unavailable)
 This to me looks like it's sitting in a loop waiting for stdout to
be readable, but I'm not really sure. The way supervisor spawns the
process is rather simple; it forks, dups stdin and stdout to a pipe
(which has O_NDELAY set) then calls execve with the appropriate args
and environment variables (I have LD_LIBRARY_PATH set to .:bin as
srcds_run does). I have tried duplicating this by writing my own
script:
 r...@blackout:~/agcp/games/css# cat srcds_test.py 
 #!/usr/bin/env python
 from fcntl import fcntl, F_SETFL, F_GETFL
 import os
 env = {'LD_LIBRARY_PATH':".:bin"}
 fcntl(1, F_SETFL, fcntl(1, F_GETFL) | os.O_NDELAY)
 os.execve("./srcds_i686", ["./srcds_i686", "-game", "cstrike",
"+map", "de_train"], env)
 r...@blackout:~/agcp/games/css# ./srcds_test.py 
 Console initialized.
 Game.dll loaded for "Counter-Strike: Source"
 maxplayers set to 32
 Network: IP 127.0.1.1, mode MP, dedicated Yes, ports 27015 SV /
27005 CL
 Executing dedicated server config file
 Incorrect price blob version! Update your server!
 ERROR: mp_dynamicpricing set to 1 but couldn't download the price
list!
 Error: Material "sprites/bubble" : proxy "AnimatedTexture" not
found!
 Error: Material "particle/smokestack" : proxy "ParticleSphereProxy"
not found!
 Error: Material "sprites/glow_test02" : proxy "lampbeam" not found!
 Section [Scenes]: 0 resources total 0 bytes, 0.00 % of limit (2.10
MB)
 appdatacache.cpp (311) : Assertion Failed: !"Implement me"
 couldn't exec server.cfg
 Adding master server 68.142.72.250:27011
 Adding master server 69.28.140.247:27011
 Connection to Steam servers successful.
    VAC secure mode is activated.
 But as you can see it works fine. I've hit a brick wall and am kinda
stuck. Can anyone suggest what the cause of this problem could be?
What is srcds doing differently with the pipes than other programs?
What is srcds sitting waiting for?
 Cheers for any help,
 Sam Collinson
 BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }

Links:
------
[1] http://supervisord.org).
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux

Reply via email to