[odb-users] ODB or mysql crash issue

Scott Zhang macromarship at gmail.com
Wed Jul 6 03:45:06 EDT 2016


I am using ODB2.3 or ODB 2.4 on our server application which now handles
about 300+ connections at same time. The server is a 4 CPUS 8G memory
Centos 6.4.
The mysql cpu load is about 25%.

Now we get a problem is periodly we get db connection crash which calls
'abort" so our program crashed following.
the gdb's bt dump is :

 #0  0x00000038d8232625 in raise () from /lib64/libc.so.6
#1  0x00000038d8233e05 in abort () from /lib64/libc.so.6
#2  0x00000038d8270537 in __libc_message () from /lib64/libc.so.6
#3  0x00000038d8275e66 in malloc_printerr () from /lib64/libc.so.6
#4  0x00000038d8279cdf in _int_malloc () from /lib64/libc.so.6
#5  0x00000038d827a751 in malloc () from /lib64/libc.so.6
#6  0x00007f5e07d4ed72 in my_malloc (size=240, my_flags=16) at
my_malloc.c:37
#7  0x00007f5e07d7b1cf in vio_new (sd=688, type=VIO_TYPE_SOCKET, flags=3)
at vio.c:152
#8  0x00007f5e07d78760 in mysql_real_connect (mysql=0x7f5ddc20a5c0,
host=0x7f5e07d7d180 "localhost", user=0x22a0c98 "root", passwd=0x22a0b78
"smarthome", db=0x22a0b18 "jim_monitor2", port=0,
    unix_socket=0x7f5e07d7d0f4 "/var/lib/mysql/mysql.sock", client_flag=2)
at client.c:2000
#9  0x00007f5e0959990b in odb::mysql::connection::connection
(this=0x7f5ddc20a540, db=...) at connection.cxx:44
#10 0x00007f5e0959a0b9 in
odb::mysql::connection_pool_factory::pooled_connection::pooled_connection
(this=0x7f5ddc20a540, db=<value optimized out>) at
connection-factory.cxx:293
#11 0x00007f5e0959a133 in odb::mysql::connection_pool_factory::create
(this=0x7f5ddcb75580) at connection-factory.cxx:165
#12 0x00007f5e0959ad94 in odb::mysql::connection_pool_factory::connect
(this=0x7f5ddcb75580) at connection-factory.cxx:220
#13 0x00007f5e0959b7c3 in odb::mysql::database::connection_ (this=<value
optimized out>) at database.cxx:243
#14 0x00007f5e095a73aa in connection (this=0x7f5ddc19b880) at
../../odb/mysql/database.ixx:18


So no idea why this issue comes up. I guess maybe caused by stack
corruption. Any suggestion to prevent this from happening?

Thanks.
Scott


More information about the odb-users mailing list