Bug #72034 | MySQL Cluster: mysqld crashes with segmentation fault when joining cluster | ||
---|---|---|---|
Submitted: | 13 Mar 2014 15:22 | Modified: | 16 Mar 2014 20:03 |
Reporter: | Mario Beck | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Cluster: Cluster (NDB) storage engine | Severity: | S2 (Serious) |
Version: | 7.3.4 | OS: | Linux (OL 6) |
Assigned to: | CPU Architecture: | Any |
[13 Mar 2014 15:22]
Mario Beck
[14 Mar 2014 10:28]
MySQL Verification Team
Hello Mario, Thank you for the bug report. Verified as described. Thanks, Umesh
[16 Mar 2014 20:03]
Mario Beck
This problem does not occur when using the RHEL/OL RPM package. It seems only the generic Linux tar has this issue. I also tried 7.3.3, same problem.
[2 Jul 2014 8:45]
z z
Any update? I also encounter this problem, it even did not show a error when it crash, this is a really shit bug waste a whole day to found what's the problem it is. I am using mysql-cluster-gpl-7.3.5-linux-glibc2.5-x86_64 if I shutdown the management node and then I can make the mysqld work. How to resolve this problem?
[14 Jan 2015 14:51]
Jan Wedvik
Posted by developer: When trying to start cluster with thread_stack=128K (in my.cnf), get the following core dump: Program terminated with signal 11, Segmentation fault. #0 0x00000000007ad785 in build_table_filename ( buff=0x7f9e25ef93a0 "\210\207", bufflen=511, db=0x7f9e25efbbf0 "mysql", table_name=0x7f9e25efb9e0 "ndb_schema", ext=0xe65d48 ".ARZ", flags=0, was_truncated=0x7f9e25ef9678) at /export/home/pb2/build/sb_0-13403650-1412865504.46/mysql-cluster-gpl-7.3.7/sql/sql_table.cc:562 562 /export/home/pb2/build/sb_0-13403650-1412865504.46/mysql-cluster-gpl-7.3.7/sql/sql_table.cc: No such file or directory. in /export/home/pb2/build/sb_0-13403650-1412865504.46/mysql-cluster-gpl-7.3.7/sql/sql_table.cc Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.132.el6.x86_64 libaio-0.3.107-10.el6.x86_64 libgcc-4.4.7-4.el6.x86_64 libstdc++-4.4.7-4.el6.x86_64 nss-softokn-freebl-3.14.3-9.el6.x86_64 (gdb) where #0 0x00000000007ad785 in build_table_filename (buff=0x7f9e25ef93a0 "\210\207", bufflen=511, db=0x7f9e25efbbf0 "mysql", table_name=0x7f9e25efb9e0 "ndb_schema", ext=0xe65d48 ".ARZ", flags=0, was_truncated=0x7f9e25ef9678) at /export/home/pb2/build/sb_0-13403650-1412865504.46/mysql-cluster-gpl-7.3.7/sql/sql_table.cc:562 #1 0x0000000000cd371b in build_table_filename (hton=<value optimized out>, thd=<value optimized out>, db=0x200 <Address 0x200 out of bounds>, name=0x7f9e25efb9e0 "ndb_schema", frmblob=0x7f9e25efa750, frmlen=0x7f9e25efa748) at /export/home/pb2/build/sb_0-13403650-1412865504.46/mysql-cluster-gpl-7.3.7/sql/sql_table.h:165 #2 archive_discover (hton=<value optimized out>, thd=<value optimized out>, db=0x200 <Address 0x200 out of bounds>, name=0x7f9e25efb9e0 "ndb_schema", frmblob=0x7f9e25efa750, frmlen=0x7f9e25efa748) at /export/home/pb2/build/sb_0-13403650-1412865504.46/mysql-cluster-gpl-7.3.7/storage/archive/ha_archive.cc:256 #3 0x00000000006010c3 in discover_handlerton (thd=0x7f9dfc000990, plugin=<value optimized out>, arg=<value optimized out>) at /export/home/pb2/build/sb_0-13403650-1412865504.46/mysql-cluster-gpl-7.3.7/sql/handler.cc:5207 #4 0x0000000000775c24 in plugin_foreach_with_mask (thd=0x7f9dfc000990, func=0x601090 <discover_handlerton(THD*, plugin_ref, void*)>, type=13, state_mask=<value optimized out>, arg=0x7f9e25ef9800) at /export/home/pb2/build/sb_0-13403650-1412865504.46/mysql-cluster-gpl-7.3.7/sql/sql_plugin.cc:2162 #5 0x000000000060288d in ha_discover (thd=0x7f9dfc000990, db=<value optimized out>, name=<value optimized out>, frmblob=<value optimized out>, frmlen=<value optimized out>) at /export/home/pb2/build/sb_0-13403650-1412865504.46/mysql-cluster-gpl-7.3.7/sql/handler.cc:5227 #6 0x0000000000607e1b in ha_create_table_from_engine (thd=0x7f9dfc000990, db=0x7f9e25efbbf0 "mysql", name=0x7f9e25efb9e0 "ndb_schema") at /export/home/pb2/build/sb_0-13403650-1412865504.46/mysql-cluster-gpl-7.3.7/sql/handler.cc:4804 #7 0x0000000000bb7595 in ndb_create_table_from_engine (thd=0x7f9dfc000990, db=<value optimized out>, table_name=0xe3c2d2 "ndb_schema") at /export/home/pb2/build/sb_0-13403650-1412865504.46/mysql-cluster-gpl-7.3.7/sql/ha_ndbcluster.cc:11791 #8 0x0000000000bd2acd in ndb_binlog_setup (thd=0x7f9dfc000990) at /export/home/pb2/build/sb_0-13403650-1412865504.46/mysql-cluster-gpl-7.3.7/sql/ha_ndbcluster_binlog.cc:1573 #9 0x0000000000bb0e6c in Ndb_util_thread::do_run (this=<value optimized out>) at /export/home/pb2/build/sb_0-13403650-1412865504.46/mysql-cluster-gpl-7.3.7/sql/ha_ndbcluster.cc:15650 #10 0x0000000000be85e1 in Ndb_component::run_impl (this=0x15c60a0) at /export/home/pb2/build/sb_0-13403650-1412865504.46/mysql-cluster-gpl-7.3.7/sql/ndb_component.cc:92 #11 0x0000000000be86a9 in Ndb_component_run_C (arg=0x15c60a0) at /export/home/pb2/build/sb_0-13403650-1412865504.46/mysql-cluster-gpl-7.3.7/sql/ndb_component.cc:51 #12 0x00007f9e3ab7e9d1 in start_thread () from /lib64/libpthread.so.0 #13 0x00007f9e398e7b6d in clone () from /lib64/libc.so.6 Apparently, the stack was exhausted: (gdb) p $rsp $22 = (void *) 0x7f9e25eece30 (gdb) frame 13 #13 0x00007f9e398e7b6d in clone () from /lib64/libc.so.6 (gdb) p $rsp $23 = (void *) 0x7f9e25f0bfe0 (gdb) p (0x7f9e25f0bfe0 - 0x7f9e25eece30)/1024 $25 = 124 (gdb) The work around would be to leave thread_stack at the default 256K. Suggested fix: increase the minimum allowed value for thread_stack to 256K. Alternatively, modify some of the functions on the call stack above so that they use less stack space.
[15 Jan 2015 12:11]
Jan Wedvik
Posted by developer: In the core dump described above, archive_discover() uses about 49K of stack space, while ndb_binlog_setup() uses 63K. For archive_discover(), this can be explained by the local variables that it has. ndb_binlog_setup() only has a few bytes of local variables, but in this build there is extensive inlining of functions called by ndb_binlog_setup(). That means that the stack frame for ndb_binlog_setup() must have space for local variables of those inlined functions too, and this is probably the cause of the large stack footprint. If this assumption is correct, a fix could be to limit stack usage in inlineable functions called from ndb_binlog_setup(), or to somehow reduce inlining.