Daniel Hofer wrote:
Hello,
I've tried everything and now take this mailing list as my last option.
We
seem to have a bug in our mod, which crashes the server after a random
uptime. The uptime goes from 1h to 50h. The amount of players playing
doesn't seem to have any influence. The crash is very severe because it
doesn't just crash the server and then restart it but it causes a
infinite
loop in the server engine hlds_amd.so or whatever .so is used (crashed
on
different machines although some machines have a generally higher uptime
than others).
and.. .Why you?
:D
The loop is in SV_TouchLinks in the server engine. The backtrace looks
always like that:
#0 0x400f390f in SV_TouchLinks () from /hlds_l/engine_i486.so
#1 0x400f3d5d in SV_LinkEdict () from /hlds_l/engine_i486.so
#2 0x400e7e51 in SV_PushEntity () from /hlds_l/engine_i486.so
#3 0x400e9935 in SV_Physics_Toss () from /hlds_l/engine_i486.so
#4 0x400ea9b2 in SV_Physics () from /hlds_l/engine_i486.so
#5 0x400df378 in SV_Frame () from /hlds_l/engine_i486.so
#6 0x400a5c14 in _Host_Frame () from /hlds_l/engine_i486.so
#7 0x400a5e5c in Host_Frame () from /hlds_l/engine_i486.so
#8 0x400cf118 in CEngine::Frame () from /hlds_l/engine_i486.so
#9 0x400cd51b in CDedicatedServerAPI::RunFrame () from
/hlds_l/engine_i486.so
#10 0x0804abb1 in RunServer ()
#11 0x0804b2cc in main ()
At QuakeWorld (somewhat similar to Half-Life), touchlinks is this
function:
void SV_TouchLinks ( edict_t *ent, areanode_t *node ) {
link_t *l, *next;
edict_t *touch;
int old_self, old_other;
// touch linked edicts
for (l = node->trigger_edicts.next; l != &node->trigger_edicts; l =
next) {
next = l->next;
touch = EDICT_FROM_AREA(l);
if (touch == ent)
continue;
if (!touch->v.touch || touch->v.solid != SOLID_TRIGGER)
continue;
if (
ent->v.absmin[0] > touch->v.absmax[0]
|| ent->v.absmin[1] > touch->v.absmax[1]
|| ent->v.absmin[2] > touch->v.absmax[2]
|| ent->v.absmax[0] < touch->v.absmin[0]
|| ent->v.absmax[1] < touch->v.absmin[1]
|| ent->v.absmax[2] < touch->v.absmin[2]
)
continue;
old_self = pr_global_struct->self;
old_other = pr_global_struct->other;
pr_global_struct->self = EDICT_TO_PROG(touch);
pr_global_struct->other = EDICT_TO_PROG(ent);
pr_global_struct->time = sv.time;
PR_ExecuteProgram (touch->v.touch);
pr_global_struct->self = old_self;
pr_global_struct->other = old_other;
}
// recurse down both sides
if (node->axis == -1)
return;
if (ent->v.absmax[node->axis] > node->dist)
SV_TouchLinks (ent, node->children[0]);
if (ent->v.absmin[node->axis] < node->dist)
SV_TouchLinks (ent, node->children[1]);
}
As you can see is a recursive function, and has something to do with
absmax and absmin, that is set with UTIL_setsize (or something similar)
and by setmodel and maybe by the engine itself (?)
or like that (seems to depend on the gdb version):
#0 0x4024f004 in SV_TouchLinks () from
/home/penemy/hlds_l/engine_amd.so
#1 0x40392d94 in __DTOR_END__ () from /home/penemy/hlds_l/engine_amd.so
heee... WHAT?
#2 0x40e587c0 in ?? ()
#3 0x40e8054c in ?? ()
#4 0x4080c160 in sv_areanodes () from /home/penemy/hlds_l/engine_amd.so
#5 0x40e80554 in ?? ()
#6 0x41707328 in ?? ()
#7 0x43b6c5cc in ?? ()
#8 0xc4f2b3a9 in ?? ()
#9 0xc4000128 in ?? ()
#10 0x00000000 in ?? ()
#11 0x00000000 in ?? ()
#12 0x00000000 in ?? ()
#13 0x40392d94 in __DTOR_END__ () from /home/penemy/hlds_l/engine_amd.so
#14 0x40e8054c in ?? ()
#15 0xbffff710 in ?? ()
#16 0x4024f1d1 in SV_TouchLinks () from
/home/penemy/hlds_l/engine_amd.so
#17 0x40e8054c in ?? ()
#18 0x4080c1e0 in sv_areanodes () from /home/penemy/hlds_l/engine_amd.so
#19 0xbffff5fc in ?? ()
#20 0x4024efc0 in SV_TouchLinks () from
/home/penemy/hlds_l/engine_amd.so
#21 0x40392d94 in __DTOR_END__ () from /home/penemy/hlds_l/engine_amd.so
#22 0x40e587c0 in ?? ()
#23 0x40e8054c in ?? ()
#24 0x4080c060 in sv_areanodes () from /home/penemy/hlds_l/engine_amd.so
#25 0x3f800000 in ?? ()
#26 0x43b6c5cc in ?? ()
#27 0xc4f2b3a9 in ?? ()
#28 0x4024f332 in SV_FindTouchedLeafs () from
/home/penemy/hlds_l/engine_amd.so
#29 0x40e8054c in ?? ()
#30 0x41703610 in ?? ()
#31 0xbffff5fc in ?? ()
#32 0x4024f1f0 in SV_FindTouchedLeafs () from
/home/penemy/hlds_l/engine_amd.so
#33 0x40392d94 in __DTOR_END__ () from /home/penemy/hlds_l/engine_amd.so
#34 0x416fdcd8 in ?? ()
#35 0x00000002 in ?? ()
#36 0x4024f1d1 in SV_TouchLinks () from
/home/penemy/hlds_l/engine_amd.so
#37 0x40e8054c in ?? ()
#38 0x4080c160 in sv_areanodes () from /home/penemy/hlds_l/engine_amd.so
#39 0x3f800000 in ?? ()
#40 0x4024efc0 in SV_TouchLinks () from
/home/penemy/hlds_l/engine_amd.so
#41 0x40392d94 in __DTOR_END__ () from /home/penemy/hlds_l/engine_amd.so
#42 0x40e26a08 in ?? ()
#43 0x40e8054c in ?? ()
#44 0x4080c040 in nummiptex () from /home/penemy/hlds_l/engine_amd.so
hummMMM??
#45 0x4080c070 in sv_areanodes () from /home/penemy/hlds_l/engine_amd.so
#46 0x416f5f38 in ?? ()
#47 0x00000002 in ?? ()
#48 0x40e8054c in ?? ()
#49 0x438ee277 in DispatchObjectCollsionBox () from
/home/penemy/hlds_l/penemy/dlls/pe_i386.so
Cool
#50 0x4024f332 in SV_FindTouchedLeafs () from
/home/penemy/hlds_l/engine_amd.so
#51 0x40e8054c in ?? ()
#52 0x416fdcd8 in ?? ()
#53 0xbffff5fc in ?? ()
#54 0x4024f1a6 in SV_TouchLinks () from
/home/penemy/hlds_l/engine_amd.so
#55 0x40e8054c in ?? ()
#56 0x4080c060 in sv_areanodes () from /home/penemy/hlds_l/engine_amd.so
#57 0x00000001 in ?? ()
#58 0x4024efc0 in SV_TouchLinks () from
/home/penemy/hlds_l/engine_amd.so
---Type <return> to continue, or q <return> to quit---
#59 0x40392d94 in __DTOR_END__ () from /home/penemy/hlds_l/engine_amd.so
#60 0x40e8054c in ?? ()
#61 0x00000001 in ?? ()
#62 0x40e8069c in ?? ()
#63 0x4080c050 in sv_areanodes () from /home/penemy/hlds_l/engine_amd.so
#64 0x416f5f38 in ?? ()
#65 0xbffff5fc in ?? ()
#66 0x4024f1f0 in SV_FindTouchedLeafs () from
/home/penemy/hlds_l/engine_amd.so
#67 0x40392d94 in __DTOR_END__ () from /home/penemy/hlds_l/engine_amd.so
#68 0x40e8054c in ?? ()
#69 0xbffff710 in ?? ()
#70 0xbffff648 in ?? ()
#71 0x43b6c5cc in ?? ()
#72 0xc4f2b3a9 in ?? ()
#73 0xc4000128 in ?? ()
#74 0x4024f5b5 in SV_LinkEdict () from /home/penemy/hlds_l/engine_amd.so
#75 0x40e8054c in ?? ()
#76 0x4080c040 in nummiptex () from /home/penemy/hlds_l/engine_amd.so
#77 0xbffff5fc in ?? ()
#78 0x4024f350 in SV_LinkEdict () from /home/penemy/hlds_l/engine_amd.so
#79 0x40392d94 in __DTOR_END__ () from /home/penemy/hlds_l/engine_amd.so
#80 0x40e8054c in ?? ()
#81 0xbffff710 in ?? ()
#82 0xbffff648 in ?? ()
#83 0x40392d94 in __DTOR_END__ () from /home/penemy/hlds_l/engine_amd.so
#84 0x4080c1e0 in sv_areanodes () from /home/penemy/hlds_l/engine_amd.so
#85 0x40e80690 in ?? ()
#86 0x00000560 in ?? ()
#87 0xbffff648 in ?? ()
#88 0x40e805d4 in ?? ()
#89 0x40e806a8 in ?? ()
#90 0x40243394 in SV_PushEntity () from
/home/penemy/hlds_l/engine_amd.so
#91 0x40e8054c in ?? ()
#92 0x00000001 in ?? ()
#93 0x40e8054c in ?? ()
#94 0x00000000 in ?? ()
#95 0x40392d94 in __DTOR_END__ () from /home/penemy/hlds_l/engine_amd.so
#96 0xbffff704 in ?? ()
#97 0xbffff710 in ?? ()
#98 0xbffff748 in ?? ()
#99 0x40392d94 in __DTOR_END__ () from /home/penemy/hlds_l/engine_amd.so
#100 0x00000000 in ?? ()
#101 0x438eea2a in SetObjectCollisionBox () from
/home/penemy/hlds_l/penemy/dlls/pe_i386.so
#102 0x00000000 in ?? ()
#103 0x3f800000 in ?? ()
#104 0x43b6c5cc in ?? ()
#105 0xc4f2b3a9 in ?? ()
#106 0xc4000128 in ?? ()
#107 0x00000000 in ?? ()
#108 0x00000000 in ?? ()
#109 0x00000000 in ?? ()
#110 0x00000000 in ?? ()
#111 0x00000000 in ?? ()
#112 0x00000000 in ?? ()
#113 0x40392d94 in __DTOR_END__ () from
/home/penemy/hlds_l/engine_amd.so
#114 0x43b6c54f in ?? ()
#115 0x40e80558 in ?? ()
#116 0x40245031 in SV_Physics_Toss () from
/home/penemy/hlds_l/engine_amd.so
Previous frame inner to this frame (corrupt stack?)
:/
And the logfile looks also similiar every time. It crashes after a
mapchange to "pe_darksun" which we recompiled due to this bug and
succesfully ran for over 250h with no crash on another server. And on
this
server it suddenly crashes again. Theres nothing special about darksun
compared to the other maps. Similiar ent count/size/complexity:
L 09/13/2004 - 02:57:06: Log file started (file "logs/L0913010.log")
(game
"penemy") (version "47/1.1.2.0/Stdio/2738")
L 09/13/2004 - 02:57:06: Loading map "pe_darksun"
L 09/13/2004 - 02:57:06: Server cvars start
L 09/13/2004 - 02:57:06: Server cvar "allow_spectators" = "1.0"
[...] all cvars [...]
L 09/13/2004 - 02:57:06: Server cvars end
L 09/13/2004 - 02:57:06: [META] (debug:3) user message registered again:
name=VoiceMask, msgid=64
L 09/13/2004 - 02:57:06: [META] (debug:3) user message registered again:
name=ReqState, msgid=65
L 09/13/2004 - 02:57:06: Public-Enemy Hacker Scenario...
L 09/13/2004 - 02:57:07: [META] (debug:3) Calling
pe_i386.so:ServerActivate()
L 09/13/2004 - 02:57:07: Preparing players...
L 09/13/2004 - 02:57:07: Started map "pe_darksun" (CRC "843844220")
L 09/13/2004 - 02:57:07: [META] (debug:3) Calling
hpb_bot_mm_i386.so:ClientConnect()
L 09/13/2004 - 02:57:07: [META] (debug:3) Calling
pe_i386.so:ClientConnect()
L 09/13/2004 - 02:57:07: [META] (debug:3) Calling
hpb_bot_mm_i386.so:ClientConnect()
L 09/13/2004 - 02:57:07: [META] (debug:3) Calling
pe_i386.so:ClientConnect()
L 09/13/2004 - 02:57:07: Rcon: "rcon ------------------ logaddress
62.---.---.--- 7130" from "62.---.---.---:7130"
L 09/13/2004 - 02:57:07: [META] (debug:3) Calling
hpb_bot_mm_i386.so:ClientConnect()
L 09/13/2004 - 02:57:07: [META] (debug:3) Calling
pe_i386.so:ClientConnect()
L 09/13/2004 - 02:57:13: [META] (debug:3) Calling
hpb_bot_mm_i386.so:ClientPutInServer()
L 09/13/2004 - 02:57:13: [META] (debug:3) Calling
pe_i386.so:ClientPutInServer()
L 09/13/2004 - 02:57:13: "KaMpFNuDeL<2><STEAM_0:-:-------><the
syndicate>"
entered the game
L 09/13/2004 - 02:57:13: Client initialized
L 09/13/2004 - 02:57:14: [META] (debug:3) Calling
hpb_bot_mm_i386.so:ClientPutInServer()
L 09/13/2004 - 02:57:14: [META] (debug:3) Calling
pe_i386.so:ClientPutInServer()
L 09/13/2004 - 02:57:14: "recon'de'sprayer<6><STEAM_0:-:------><security
corps>" entered the game
L 09/13/2004 - 02:57:14: Client initialized
L 09/13/2004 - 02:57:15: [META] (debug:3) Calling
hpb_bot_mm_i386.so:ClientPutInServer()
L 09/13/2004 - 02:57:15: [META] (debug:3) Calling
pe_i386.so:ClientPutInServer()
L 09/13/2004 - 02:57:15: "Lackey's Lackey<10><STEAM_0:-:------><security
corps>" entered the game
L 09/13/2004 - 02:57:15: Client initialized
L 09/13/2004 - 02:57:26: Round Draw: All the players are dead.
L 09/13/2004 - 02:57:26: New round starting...
L 09/13/2004 - 02:57:31: Preparing players...
L 09/13/2004 - 02:57:59: The Security Corps win: The Syndicate has been
wiped out.
L 09/13/2004 - 02:57:59: New round starting...
L 09/13/2004 - 02:58:05: Preparing players...
L 09/13/2004 - 02:58:55: [META] (debug:3) Calling
hpb_bot_mm_i386.so:ClientDisconnect()
L 09/13/2004 - 02:58:55: [META] (debug:3) Calling
pe_i386.so:ClientDisconnect()
L 09/13/2004 - 02:58:55: "KaMpFNuDeL<2><STEAM_0:-:-------><security
corps>" disconnected
L 09/13/2004 - 02:58:55: "<-1><><>" entered the game
L 09/13/2004 - 02:58:55: Client initialized
L 09/13/2004 - 02:59:06: "KaMpFNuDeL<12><STEAM_ID_PENDING><>" connected,
address "212.201.71.14:27005"
L 09/13/2004 - 02:59:07: [META] (debug:3) Calling
hpb_bot_mm_i386.so:ClientConnect()
L 09/13/2004 - 02:59:07: [META] (debug:3) Calling
pe_i386.so:ClientConnect()
L 09/13/2004 - 02:59:07: "KaMpFNuDeL<12><STEAM_0:-:-------><>" STEAM
USERID validated
L 09/13/2004 - 02:59:11: [META] (debug:3) Calling
hpb_bot_mm_i386.so:ClientPutInServer()
L 09/13/2004 - 02:59:11: [META] (debug:3) Calling
pe_i386.so:ClientPutInServer()
L 09/13/2004 - 02:59:11: "KaMpFNuDeL<12><STEAM_0:-:-------><>" entered
the
game
L 09/13/2004 - 02:59:11: Client initialized
L 09/13/2004 - 02:59:37: "Lackey's Lackey<10><STEAM_0:-:------><the
syndicate>" killed "recon'de'sprayer<6><STEAM_0:-:------><security
corps>"
with "IMI MicroUzi akimbo"
L 09/13/2004 - 03:00:19: "Lackey's Lackey<10><STEAM_0:-:-----
as Leise say, if the code not flush the log after every fprintf, the last
warning message will be still in memory, in the printf buffer area, and
never at disk
Will this buffer visible in a core file?
Can you repeat this error?
Can you repeat this error with developer set to 1 (if developer cvar
exist :D ?
My Con_Printf is this (its crap)
void Con_Printf (char *fmt, ...)
{
va_list argptr;
static char msg[MAXPRINTMSG];
va_start (argptr,fmt);
_vsnprintf(msg,MAXPRINTMSG,fmt,argptr);
va_end (argptr);
// also echo to debugging console
Sys_Printf ("%s", msg); // also echo to debugging console
// log all messages to file
if (con_debuglog)
Con_DebugLogFile( msg );
if (!con_initialized)
return;
if (cls.state == ca_dedicated)
return; // no graphics mode
// write it to the scrollable buffer
Con_Print (msg);
}
void Con_DebugLogFile(char *data)
{
int fd;
if (sv.active || cls.state == ca_dedicated)
fd = open("telejano_server.log", O_WRONLY | O_CREAT | O_APPEND, 0666);
else
fd = open("telejano_client.log", O_WRONLY | O_CREAT | O_APPEND, 0666);
write(fd, data, strlen(data));
close(fd);
}
as you can see, I am paranoid enough to open/close the file after every
writte. This is ridiculous to a cosmic scale, maybe Half-Life is not that
paranoid so data never write to memory :D
notice my code its not bugfree, its ugly and no-sense.
as you can see it stops in the middle of a line, so I can't really
determine the cause. But theres nothing special about this log, every pe
log looks like this and I haven't seen any message in this log that
wouldn't also appear in all the others.
Its a map dependant bug, anyway
It also happens that the server crashes before anyone could join:
[...] same as above[...]
L 09/13/2004 - 02:57:06: Server cvars end
L 09/13/2004 - 02:57:06: [META] (debug:3) user message registered again:
name=Voi
he..
I'm very clueless about this. I didn't change anything to the touching
or
physics code and the maps and entity setups look allright.
It has to be said that PE is very close to the 512 ents limit in nearly
every map because of the complexity of the maps, probably this maybe the
problem but I couldn't imagine why.
hehehe... the problem with submodels is that every submodel will eat a
new modelindex (IF this exist on Half-Life). The no of modelindex can be
512 or something similar, maybe, If you have 200 different models in your
mod + 512 submodels in pe_darksun, the result can be >512, and will cause
a ugly overflow error, a solution can be to use less models, with
different poses and skins to fake differnet models. (the same army guy,
but with different skin will be a official, sarge, private,.. ofice guy,
etc...), maybe... and maybe NO... I dont know,.. a good solution can be
to remove pe_darksun and never restore these file from your backups :D
Why the hell Half-Life use submodels for tiny decor details? HAaa!!!...
Maybe?? ..NOT!!! .. HAAAA!!!
Thanks for any help,
Spin
/me FLEE IN PANIC
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders