[ut3] Random Crashes

Alex Orlov orlov at stars.ru
Mon Jan 7 04:55:53 EST 2008


Hi!

--------------------- ut3-killer.pl
#!/usr/bin/perl

print "Fuzzy killer&starter for UT3 linux server. v0.7\n";

# default random maps
my @MP=("Torlan","Avalanche","OnyxCoast");

my $cnt=0;
my $fname;
my $ftype;
my $maxgames=7; 

# if UT3 not run start it
&checksrv;

open(LOG,"tail -f killer.log|");

while(<LOG>){
my $buff=$_;

# get last map name (for map voting)
if($buff =~ /Log: Bringing World (\S+?)-(\S+?)\.TheWorld up/){
    $fname=$2;
    $ftype=$1;
    print "$ftype-$fname($cnt) >> $buff";
    # counter for games
    $cnt++;
    # map per cycle, and restart
    if($cnt>$maxgames){
        &utkiller;
        $cnt=0;
        &utstarter($ftype,$fname);
    }
}

}

close(LOG);
exit;

sub utkiller {
    # find pid
    my $pid = &findpid;
    if($pid>0){
        print "Kill UT3: $pid\n";
        `kill $pid`;
        sleep 10;
    } else {
        print "Error get pid\n";
    }
}

sub utstarter {
    my($type,$map)=@_;
    print "Start: $type-$map\n";
    my $ppid = fork;
    if($ppid==0){
        `ut3-starter.sh $type $map 2>>killer.log`;
        exit;
    }
}

sub checksrv {
    my $pid = &findpid;
    if($pid==0){
        # start random map
        my $num=int(rand(3));
        print "No UT3, start new @MP[$num]...\n";
        &utstarter("WAR", at MP[$num]);
    } else {
        print "UT3 running... wait tan sec.";
        sleep 10;
    }
}

sub findpid {
    my $pid = `ps -aef|grep ut3-bin|grep -v grep|awk '{print \$2}'`;
    $pid+=0;
    return $pid;
}
-------------- ut3-starter.sh
#!/bin/sh

if [ "$1" == "" ]; then
    echo "No game type";
    exit
fi

if [ "$2" == "" ]; then
    echo "No map name";
    exit
fi

cd Binaries

./ut3 server $1-$2?MaxSpectators=5?goalscore=3?MaxPlayers=14?ServerDescription=XXXXX?numplay=8?botskill=8?AdminPassword=XXXXX -login=XXXX -password=XXXXX -unattended
--------------
  ----- Original Message ----- 
  From: Marco 
  To: ut3 at icculus.org 
  Sent: Saturday, January 05, 2008 5:25 PM
  Subject: Re: [ut3] Random Crashes


  At least your server is running a couple of days, mine isent when we play 1 map and that map 
  is finished then people starting to vote for next map.
  After the vote the problem kicks in all players are hanging in awaiting status and after a period of time disconnected.
  So i took a look at the server and after my suprise seeing it running i thought what the hell, so going back to the game itself server is visable in the 
  online browser.
  But nobody cant connect to the server anymore, so that sux big time :(

  Any ideers how to fix this ?

  Regards,

  Marco
    ----- Original Message ----- 
    From: Chris Brunelle 
    To: ut3 at icculus.org 
    Sent: Saturday, January 05, 2008 4:40 AM
    Subject: [ut3] Random Crashes


    I'm still experiencing random crashes. Server will stay up for a couple days, then crash.  I restart it, it'll stay up for a day crash, repeat cycle..

    I've had a couple crashes with the "negative time delta" error as well.

     

    Any ETA for the next version?

     

    --Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/ut3/attachments/20080107/371f07ba/attachment.htm>


More information about the ut3 mailing list