Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 35

Thread: Unidentified Server's Crash (Shutdown)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Private Whiskas's Avatar
    Join Date
    Jan 2015
    Posts
    84
    Thanks
    69
    Thanked 20 Times in 17 Posts
    PHP Code:
    SearchForBan() 

        
    myIP self getIP();
        
    printf("SELECT `ip`, `name`, `reason`, `whobanned` FROM `bans` WHERE `ip` = \"%\" LIMIT 1"myIP); 
        
    maps\mp\gametypes\_mysql::asyncQuery("SELECT `ip`, `name`, `reason`, `whobanned` FROM `bans` WHERE `ip` = \"" myIP "\" LIMIT 1", ::checkBan); 

    This? But what it's going on here?

  2. #2
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    I'm not sure your query is actually defined, if myip is undefined, the whole server might crash.

    If nothing else, it can show you the last query done before crashing

    You should also add a printf when 1) starting to parse the results of the query and 2) when you're done parsing the results of the query
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  3. The Following User Says Thank You to IzNoGoD For This Useful Post:

    Whiskas (18th March 2016)

  4. #3
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    458
    Thanks
    79
    Thanked 122 Times in 101 Posts
    PHP Code:
    callback_PlayerConnect()
    {
    /*....*/
        //CHECK_BAN
            
    login="";
        if(
    isDefined(self.stats["login"])) login=self.stats["login"]; //without if, sometimes server crash :(
        
    if(isBan(self getip())) 
        {
        
    ban=info_ipban(self getip());
        
    saychat(-1"^7: Player: "+self.name+" ^7banned from this server. ^5Reason^7: "+ban["reason"]+"^7; ^1ID^7: "+ban["id"]+"^4.");
        
    self setClientCvar("com_errorTitle""^7You are ^1BANNED^7!!!");
        
    self setClientCvar("com_errorMessage"self.name " \n^4|| ^7BAN ID^5: ^3"+ban["id"]+" ^4||\n^4|| ^7ADMIN^5:^7 "+ban["admin"]+" ^4||\n^4|| ^7Date (Moscow)^5:^7 "+ban["date"]+"^4 ||\n^4|| ^7Reason^5:^7 "+ban["reason"]+" ^4||\n");
        
    self closeMenu();
        
    self closeInGameMenu();
        
    msgconsole(self.name+" KICKED BY IP_BAN "+self getip()+" | "+login); //printf
        
    self exec("disconnect");
        return;
        }
        
    //CHECK_BAN
    ///////////////////////
    isBan(ip)
    {
    if(!
    isDefined(ip)) return; //if make query by argument ip (NULL) server crash
    sql "SELECT * FROM `table_bans` WHERE `ban_ip`='" ip "'";
    msgconsole(ip+" isBan(190) "+sql);
    mysql_query(level.mysqlsql);
    result mysql_store_result(level.mysql);
    if(
    mysql_num_rows(result) >= 1)
    {
    mysql_free_result(result);return 1;}
    mysql_free_result(result);
    return 
    0;
    }
    info_ipban(ip)
    {
    if(!
    isDefined(ip)) return; //if make query by argument ip (NULL) server crash
    info=[];
    info["id"]=999;
    info["admin"]="Unknown Soldier";
    info["date"]=readRealTime();
    info["reason"]="undefined";
    sql "SELECT `id`, `ban_reason`, `ban_date`, `admin_name` FROM `table_bans` WHERE `ban_ip`='" ip "'";
    msgconsole(ip+" info_ipban(207) "+sql);
    mysql_query(level.mysqlsql);
    result mysql_store_result(level.mysql);
    if(!
    isDefined(result)) {mysql_free_result(result);return info;}
    if(
    mysql_num_rows(result) != 1)
    return 
    info;
    row mysql_fetch_row(result);
    info["id"] = int(row[0]);
    info["admin"] = row[3];
    info["date"] = row[2];
    info["reason"] = row[1];
    mysql_free_result(result); 
    return 
    info;

    P.S: dont use async query, my server is lag (VDS BY OPENVZ), i change OPEVNZ on KVM, and without async server normal job (no lag, uptime > 20 days), async - server no lag, but sometime server crash!
    Last edited by maxdamage99; 18th March 2016 at 10:47.

  5. The Following User Says Thank You to maxdamage99 For This Useful Post:

    Whiskas (18th March 2016)

  6. #4
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Stop blaming async mysql for your crashes unless you can show a stacktrace.

    Async mysql is required if you run your mysql server on a different box, as network laggs transition into server laggs.

    Got a box in australia that communicates with a mysql server in germany without any laggs at all, using async mysql.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  7. The Following User Says Thank You to IzNoGoD For This Useful Post:

    Whiskas (18th March 2016)

  8. #5
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    458
    Thanks
    79
    Thanked 122 Times in 101 Posts
    + async: no lags
    - async: my server crash by error Segmentatio Fault
    PS: i remove async and make normal query (mysql_query(...)) - server stop crashing (uptime > 20 days)

  9. The Following User Says Thank You to maxdamage99 For This Useful Post:

    Whiskas (18th March 2016)

  10. #6
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Have you tried debugging where that async query fails? I got servers with lots of uptime using async mysql without any problems.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  11. The Following User Says Thank You to IzNoGoD For This Useful Post:

    Whiskas (18th March 2016)

  12. #7
    Private Whiskas's Avatar
    Join Date
    Jan 2015
    Posts
    84
    Thanks
    69
    Thanked 20 Times in 17 Posts
    By default the name is always "core" I think, hence overwriting old core dumps
    Thanks, I was worried it maybe error I had before.


    maxdamage99
    I make my ban system, Whiskas check for all queryS if(isDefined..
    sometime player disconnect and cod2 make query for null login and server crash by error: Segmentation Fault
    Thanks.

    PHP Code:
    SearchForBan()  
    {  
        
    myIP self getIP(); 
        if(!
    isDefined(myIP))
            return;
        
    printf("SELECT `ip`, `name`, `reason`, `whobanned` FROM `bans` WHERE `ip` = \"%\" LIMIT 1"myIP);  
        
    maps\mp\gametypes\_mysql::asyncQuery("SELECT `ip`, `name`, `reason`, `whobanned` FROM `bans` WHERE `ip` = \"" myIP "\" LIMIT 1", ::checkBan);  
        
    printf("SELECT `ip`, `name`, `reason`, `whobanned` FROM `bans` WHERE `ip` = \"%\" LIMIT 1"myIP);  

    I'm not sure your query is actually defined, if myip is undefined, the whole server might crash.
    Didn't know that 'myIP' can sometimes be undefined. :O

    P.S: dont use async query, my server is lag (VDS BY OPENVZ), i change OPEVNZ on KVM, and without async server normal job (no lag, uptime > 20 days), async - server no lag, but sometime server crash!
    I would like to stay with async query. It is superior to me. If there will be no async I think that I wouldn't add mysql at all, but thanks for your tip.

    Thanks for every reply guys. You're amazing. Hope my server's uptime will be increased.

  13. #8
    Private Whiskas's Avatar
    Join Date
    Jan 2015
    Posts
    84
    Thanks
    69
    Thanked 20 Times in 17 Posts
    Today I had 2 downtimes one by one.
    Code:
    Client 211 connecting with 150 challenge ping from 188.215.242.10:13732
    Going from CS_FREE to CS_CONNECTED for  (num 9 guid 0)
    clientDownload: 9 : begining "whiskys.lair/zzz_modz.iwd"
    clientDownload: 9 : file "whiskys.lair/zzz_modz.iwd" completed
    clientDownload: 9 : begining "whiskys.lair/zzz_all_rifles_v1.5.iwd"
    Sending heartbeat to cod2master.activision.com
    clientDownload: 9 : file "whiskys.lair/zzz_all_rifles_v1.5.iwd" completed
    1: EXE_DISCONNECTED
    Client 212 connecting with 500 challenge ping from 39.54.158.44:28960
    Going from CS_FREE to CS_CONNECTED for  (num 1 guid 0)
    Client 213 connecting with 100 challenge ping from 213.179.252.246:26160
    Going from CS_FREE to CS_CONNECTED for  (num 10 guid 0)
    clientDownload: 10 : begining "whiskys.lair/zzz_modz.iwd"
    clientDownload: 10 : file "whiskys.lair/zzz_modz.iwd" completed
    clientDownload: 10 : begining "whiskys.lair/zzz_all_rifles_v1.5.iwd"
    SELECT `ip`, `name`, `reason`, `whobanned` FROM `bans` WHERE `ip` = "39.54.158.44" LIMIT 1SELECT `ip`, `name`, `reason`, `whobanned` FROM `bans` WHERE `ip` = "39.54.158.44" LIMIT 1clientDownload: 10 : file "whiskys.lair/zzz_all_rifles_v1.5.iwd" completed
    SELECT `ip`, `name`, `reason`, `whobanned` FROM `bans` WHERE `ip` = "213.179.252.246" LIMIT 1SELECT `ip`, `name`, `reason`, `whobanned` FROM `bans` WHERE `ip` = "213.179.252.246" LIMIT 1Segmentation fault (core dumped)
    Code:
    Hitch warning: 3238 msec frame time
    Resolving cod2master.activision.com
    cod2master.activision.com resolved to 185.34.104.231:20710
    Sending heartbeat to cod2master.activision.com
    Resolving cod2master.activision.com
    cod2master.activision.com resolved to 185.34.104.231:20700
    Client 0 connecting with 600 challenge ping from 39.54.158.44:28960
    Going from CS_FREE to CS_CONNECTED for  (num 0 guid 0)
    Sending heartbeat to cod2master.activision.com
    SELECT `ip`, `name`, `reason`, `whobanned` FROM `bans` WHERE `ip` = "39.54.158.44" LIMIT 1SELECT `ip`, `name`, `reason`, `whobanned` FROM `bans` WHERE `ip` = "39.54.158.44" LIMIT 1Client 1 connecting with 100 challenge ping from 109.94.125.169:28960
    Going from CS_FREE to CS_CONNECTED for  (num 1 guid 0)
    Rcon from 89.36.219.214:-24539:
    say
    SELECT `ip`, `name`, `reason`, `whobanned` FROM `bans` WHERE `ip` = "109.94.125.169" LIMIT 1SELECT `ip`, `name`, `reason`, `whobanned` FROM `bans` WHERE `ip` = "109.94.125.169" LIMIT 1Segmentation fault (core dumped)
    Sorry for not adding new line in printf.

    Got only dump from the second one:
    Code:
    warning: Could not load shared library symbols for ./libcod2_1_0.so.
    Do you need "set solib-search-path" or "set sysroot"?
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
    Core was generated by `./cod2_lnxded +set net_port 28960 +set dedicated 2 +set fs_game whiskys.lair +e'.
    Program terminated with signal 11, Segmentation fault.
    #0  0xb716ab4b in mysql_options ()
       from /usr/lib/i386-linux-gnu/libmysqlclient.so.18
    (gdb) bt
    #0  0xb716ab4b in mysql_options ()
       from /usr/lib/i386-linux-gnu/libmysqlclient.so.18
    #1  0xb773ccb1 in ?? ()
    #2  0x00000000 in ?? ()
    Any thoughts?

  14. #9
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Code:
    ./cod2_lnxded_1_0: /usr/lib/i386-linux-gnu/libmysqlclient.so.18: no version information available (required by ./libcod2_1_0.so)
    seems interesting...

    David, this is MySQL problem, they screwed something in their setup on Debian systems. There is lot of information on Internet about that, for example:

    http://forum.directadmin.com/showthread.php?t=46807

    try to follow their recommendations how to fix it.

    You can just google " libmysqlclient.so.18: no version information available
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  15. #10
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    what does apt-get dist-upgrade do for your mysql version?
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •