Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 25

Thread: Asynchronous mysql queries

  1. #11
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    ulimit -c unlimited
    start ur cod2 serv here
    gdb /path/to/cod2_lnxded /home/user/core
    bt
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

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

    Whiskas (7th March 2016)

  3. #12
    Private Whiskas's Avatar
    Join Date
    Jan 2015
    Posts
    84
    Thanks
    69
    Thanked 20 Times in 17 Posts
    Got output like this, something wrong with mysql_real_connect()?
    Code:
    Program terminated with signal 11, Segmentation fault.
    #0  0xb71b3b4b in mysql_options ()
       from /usr/lib/i386-linux-gnu/libmysqlclient.so.18
    (gdb) bt
    #0  0xb71b3b4b in mysql_options ()
       from /usr/lib/i386-linux-gnu/libmysqlclient.so.18
    #1  0xb7785cb1 in gsc_mysql_real_connect () from ./libcod2_1_0.so
    #2  0x080806a0 in ?? ()
    #3  0x080838ca in ?? ()
    #4  0x080839eb in ?? ()
    #5  0x08115eaf in ?? ()
    #6  0x0810700e in ?? ()
    #7  0x08090d12 in ?? ()
    #8  0x08090dbf in ?? ()
    #9  0x08091f94 in ?? ()
    #10 0x0808ad5f in ?? ()
    #11 0x08060724 in ?? ()
    #12 0x0805fc79 in ?? ()
    #13 0x0808b228 in ?? ()
    #14 0x08060724 in ?? ()
    #15 0x0805fdf5 in ?? ()
    #16 0x0805fe07 in ?? ()
    #17 0x08061ff1 in ?? ()
    #18 0x08062038 in ?? ()
    #19 0x080d2ace in ?? ()
    #20 0xb74c14d3 in __libc_start_main () from /lib/i386-linux-gnu/libc.so.6
    #21 0x0804a4d1 in ?? ()

  4. #13
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    What is the output this command?
    PHP Code:
    ldd libcod2_1_0.so 

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

    Whiskas (7th March 2016)

  6. #14
    Private Whiskas's Avatar
    Join Date
    Jan 2015
    Posts
    84
    Thanks
    69
    Thanked 20 Times in 17 Posts
    Quote Originally Posted by Mitch View Post
    What is the output this command?
    PHP Code:
    ldd libcod2_1_0.so 
    Code:
    ./libcod2_1_0.so: /usr/lib/i386-linux-gnu/libmysqlclient.so.18: no version information available (required by ./libcod2_1_0.so)
            linux-gate.so.1 =>  (0xb7787000)
            libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb7749000)
            libmysqlclient.so.18 => /usr/lib/i386-linux-gnu/libmysqlclient.so.18 (0xb7431000)
            libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb7415000)
            libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xb73ff000)
            libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb73d3000)
            librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xb73ca000)
            libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb73ac000)
            libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb7202000)
            /lib/ld-linux.so.2 (0xb7788000)

  7. #15
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Can you debug wether the problem is in initMysql() or in initAsyncMysql?
    "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 (7th March 2016)

  9. #16
    Private Whiskas's Avatar
    Join Date
    Jan 2015
    Posts
    84
    Thanks
    69
    Thanked 20 Times in 17 Posts

    Post

    Sure I can!

    Of course:
    level.JH_mysql = initMySQL();
    and
    initAsyncMySQL();
    had login params inside them like in my first post.

    Solution 1.
    PHP Code:
    init()
    {
        
    //get your host, user, pass, db, port here
        
    level.JH_mysql mysql_reuse_connection();
        if(!
    isDefined(level.JH_mysql))
            
    level.JH_mysql initMySQL();
        
    //initAsyncMySQL();

    Solution 2.
    PHP Code:
    init()
    {
        
    //get your host, user, pass, db, port here
        
    level.JH_mysql mysql_reuse_connection();
        
    //if(!isDefined(level.JH_mysql))
        //    level.JH_mysql = initMySQL();
        
    initAsyncMySQL();

    Both gives erorr.

    Debugging 1. solution:
    Code:
    Program terminated with signal 11, Segmentation fault.
    #0  0xb71b3b4b in mysql_options ()
       from /usr/lib/i386-linux-gnu/libmysqlclient.so.18
    (gdb) bt
    #0  0xb71b3b4b in mysql_options ()
       from /usr/lib/i386-linux-gnu/libmysqlclient.so.18
    #1  0xb7785cb1 in gsc_mysql_real_connect () from ./libcod2_1_0.so
    #2  0x080806a0 in ?? ()
    #3  0x080838ca in ?? ()
    #4  0x080839eb in ?? ()
    #5  0x08115eaf in ?? ()
    #6  0x0810700e in ?? ()
    #7  0x08090d12 in ?? ()
    #8  0x08090dbf in ?? ()
    #9  0x08091f94 in ?? ()
    #10 0x0808ad5f in ?? ()
    #11 0x08060724 in ?? ()
    #12 0x0805fc79 in ?? ()
    #13 0x0808b228 in ?? ()
    #14 0x08060724 in ?? ()
    #15 0x0805fdf5 in ?? ()
    #16 0x0805fe07 in ?? ()
    #17 0x08061ff1 in ?? ()
    #18 0x08062038 in ?? ()
    #19 0x080d2ace in ?? ()
    #20 0xb74c14d3 in __libc_start_main () from /lib/i386-linux-gnu/libc.so.6
    #21 0x0804a4d1 in ?? ()
    2. solution
    Code:
    Program terminated with signal 11, Segmentation fault.
    #0  0xb71b3b4b in mysql_options ()
       from /usr/lib/i386-linux-gnu/libmysqlclient.so.18
    (gdb) bt
    #0  0xb71b3b4b in mysql_options ()
       from /usr/lib/i386-linux-gnu/libmysqlclient.so.18
    #1  0xb7785cb1 in gsc_mysql_real_connect () from ./libcod2_1_0.so
    #2  0x080806a0 in ?? ()
    #3  0x080838ca in ?? ()
    #4  0x080839eb in ?? ()
    #5  0x08115eaf in ?? ()
    #6  0x0810700e in ?? ()
    #7  0x08090d12 in ?? ()
    #8  0x08090dbf in ?? ()
    #9  0x08091f94 in ?? ()
    #10 0x0808ad5f in ?? ()
    #11 0x08060724 in ?? ()
    #12 0x0805fc79 in ?? ()
    #13 0x0808b228 in ?? ()
    #14 0x08060724 in ?? ()
    #15 0x0805fdf5 in ?? ()
    #16 0x0805fe07 in ?? ()
    #17 0x08061ff1 in ?? ()
    #18 0x08062038 in ?? ()
    #19 0x080d2ace in ?? ()
    #20 0xb74c14d3 in __libc_start_main () from /lib/i386-linux-gnu/libc.so.6
    #21 0x0804a4d1 in ?? ()
    Edit:
    If both are disabled, server works. :P
    Last edited by Whiskas; 7th March 2016 at 21:21.

  10. #17
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Looks almost like your connection is failing hard and/or your mysqlclient is buggy.

    Can you try compiling libcod from source (mitch's git) and doublecheck your mysql parameters?
    "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 (7th March 2016)

  12. #18
    Private Whiskas's Avatar
    Join Date
    Jan 2015
    Posts
    84
    Thanks
    69
    Thanked 20 Times in 17 Posts
    God I'm the most dumbest in the world!

    I'm running mysql on same machine as my codserver. Tried with "localhost" instead of my machine's ip and it worked! (I thought i did this before ._.).

    Sorry for loosing your time and big THANK YOU for you guys!

  13. #19
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    You should set your listen ip in my.conf
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  14. #20
    Private Whiskas's Avatar
    Join Date
    Jan 2015
    Posts
    84
    Thanks
    69
    Thanked 20 Times in 17 Posts
    Quote Originally Posted by IzNoGoD View Post
    You should set your listen ip in my.conf
    Never heard of it before, thanks!

Posting Permissions

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