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

Thread: Unidentified Server's Crash (Shutdown)

  1. #21
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    Quote Originally Posted by Whiskas View Post

    Does Core store only new dump?
    By default the name is always "core" I think, hence overwriting old core dumps, but you can change the name pattern and add the PID for example: https://sigquit.wordpress.com/2009/0...-core-pattern/

    Kinda filthy to debug a C API crash, to be able to analyze those crashes in my MySQL part I added debug statements in every C glue function, like:

    https://github.com/kungfooman/libcod...mysql.cpp#L483
    Code:
    	#if DEBUG_MYSQL
    	printf("gsc_mysql_num_fields(result=%d)\n", result);
    	#endif
    If I would want to tackle the problem, I would first give every function a debug printf, starting with the functions which call mysql_options(), since that was mentioned in the gdb backtrace.
    timescale 0.01

  2. The Following User Says Thank You to kung foo man For This Useful Post:

    Whiskas (18th March 2016)

  3. #22
    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

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

    Whiskas (18th March 2016)

  5. #23
    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)

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

    Whiskas (18th March 2016)

  7. #24
    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

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

    Whiskas (18th March 2016)

  9. #25
    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.

  10. #26
    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?

  11. #27
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    Looks like the same crash, segmentation fault 11 in some function using mysql_options(), so the code is dereferencing a NULL pointer e.g., which causes the segfault.

    Probably still the easiest way to debug this:

    Quote Originally Posted by kung foo man View Post
    Kinda filthy to debug a C API crash, to be able to analyze those crashes in my MySQL part I added debug statements in every C glue function, like:

    https://github.com/kungfooman/libcod...mysql.cpp#L483
    Code:
        #if DEBUG_MYSQL
        printf("gsc_mysql_num_fields(result=%d)\n", result);
        #endif
    If I would want to tackle the problem, I would first give every function a debug printf, starting with the functions which call mysql_options(), since that was mentioned in the gdb backtrace.
    I would printf the lines here: https://github.com/kungfooman/libcod...mysql.cpp#L290

    Googling "mysql_options seg fault" shows some problems with mysql_options() too, but that stuff seems ancient. But could still be related to your libmysqlclient version maybe.
    timescale 0.01

  12. #28
    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

  13. #29
    Private Whiskas's Avatar
    Join Date
    Jan 2015
    Posts
    84
    Thanks
    69
    Thanked 20 Times in 17 Posts
    Quote Originally Posted by kung foo man View Post
    Kinda filthy to debug a C API crash, to be able to analyze those crashes in my MySQL part I added debug statements in every C glue function, like:

    https://github.com/kungfooman/libcod...mysql.cpp#L483
    Code:
    	#if DEBUG_MYSQL
    	printf("gsc_mysql_num_fields(result=%d)\n", result);
    	#endif
    If I would want to tackle the problem, I would first give every function a debug printf, starting with the functions which call mysql_options(), since that was mentioned in the gdb backtrace.
    I would like to adapt your idea, but I'm not sure I do this right way.

    PHP Code:
    SearchForBan()   
    {   
        
    myIP self getIP();  
        if(!
    isDefined(myIP)) 
            return; 
        
    printf("SELECT `ip`, `name`, `reason`, `whobanned` FROM `bans` WHERE `ip` = \"%\" LIMIT 1\n"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\n"myIP);
        
    printf("gsc_mysql_num_fields(result=%d)\n"checkBan);   

    Quote Originally Posted by IzNoGoD View Post
    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
    Yeah I googled it and found that AskUbuntu. I also run Ubuntu 12.04, but I have the ability to upgrade it to 14.04. Shall I do this?

    Silly question:

    If I run 'do-release-upgrade' to upgrade the ubuntu, I won't loose any private datas (/home/ or any other directory (/var/ is also important to me ) nor mysql database). ?
    Sorry for being too lazy to google it. Already did.

    EDIT:

    Seems that the mysql problem is only related to 5.5 verison and I have (5.5.47-0ubuntu0.12.04.1) :|
    Last edited by Whiskas; 19th March 2016 at 21:17.

  14. #30
    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
  •