Bug #42302 Server crash while loading plugin for 'pbxt'
Submitted: 23 Jan 2009 12:04 Modified: 31 Jan 2009 16:23
Reporter: Nidhi Shrotriya Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Storage Engine API Severity:S3 (Non-critical)
Version:6.0.8-alpha/5.1 OS:Linux
Assigned to: Assigned Account CPU Architecture:Any

[23 Jan 2009 12:04] Nidhi Shrotriya
Description:
MySQL server crashes while loading 'pbxt' plugin.

090123 12:31:13 [Note] /home/nidhi/mysql-builds/mysql-6.0.8-alpha/libexec/mysqld: ready for connections.
Version: '6.0.8-alpha-debug'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
090123 12:31:36 [Note] PrimeBase XT (PBXT) Engine 1.0.07 RC loaded...
090123 12:31:36 [Note] Paul McCullagh, PrimeBase Technologies GmbH, http://www.primebase.org
mysqld: field.cc:6266: virtual int Field_string::store(const char*, uint, CHARSET_INFO*): Assertion `table->in_use == _current_thd()' failed.
090123 12:31:36 - mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

key_buffer_size=8388600
read_buffer_size=131072
max_used_connections=1
max_threads=151
thread_count=1
connection_count=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 337764 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = (nil) thread_stack 0x30c00
/home/nidhi/mysql-builds/mysql-6.0.8-alpha/libexec/mysqld(my_print_stacktrace+0x22) [0x86a31ec]
/home/nidhi/mysql-builds/mysql-6.0.8-alpha/libexec/mysqld(handle_segfault+0x2d1) [0x8248fe6]
[0xb7f4a400]
/lib/tls/i686/cmov/libc.so.6(abort+0x188) [0xb7c59248]
/lib/tls/i686/cmov/libc.so.6(__assert_fail+0xee) [0xb7c5072e]
/home/nidhi/mysql-builds/mysql-6.0.8-alpha/libexec/mysqld(Field_string::store(char const*, unsigned int, charset_info_st*)+0xbf) [0x82265c7]
/home/nidhi/mysql-builds/mysql-6.0.8-alpha/libexec/mysqld(mysql_install_plugin(THD*, st_mysql_lex_string const*, st_mysql_lex_string const*)+0x2af) [0x83e2c28]
/home/nidhi/mysql-builds/mysql-6.0.8-alpha/libexec/mysqld(mysql_execute_command(THD*)+0x6755) [0x825d702]
/home/nidhi/mysql-builds/mysql-6.0.8-alpha/libexec/mysqld(mysql_parse(THD*, char const*, unsigned int, char const**)+0x191) [0x825ff17]
/home/nidhi/mysql-builds/mysql-6.0.8-alpha/libexec/mysqld(dispatch_command(enum_server_command, THD*, char*, unsigned int)+0x83a) [0x82608b2]
/home/nidhi/mysql-builds/mysql-6.0.8-alpha/libexec/mysqld(do_command(THD*)+0x260) [0x8261b41]
/home/nidhi/mysql-builds/mysql-6.0.8-alpha/libexec/mysqld(handle_one_connection+0x100) [0x82523fc]
/lib/tls/i686/cmov/libpthread.so.0 [0xb7f0e50f]
/lib/tls/i686/cmov/libc.so.6(clone+0x5e) [0xb7d0d7ee]
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
090123 12:31:37 mysqld_safe Number of processes running now: 0
090123 12:31:37 mysqld_safe mysqld restarted
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
090123 12:31:37  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
090123 12:31:37  InnoDB: Started; log sequence number 0 46409
090123 12:31:37 [Note] Event Scheduler: Loaded 0 events
090123 12:31:37 [Note] /home/nidhi/mysql-builds/mysql-6.0.8-alpha/libexec/mysqld: ready for connections.
Version: '6.0.8-alpha-debug'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution

How to repeat:
Install MySQL from source ->
- Pick mysql-6.0.8-alpha from dev.mysql.
/home/nidhi/mysql-sources/mysql-6.0.8-alpha >
- autoreconf --force --install
- ./configure --with-debug --prefix=/home/nidhi/mysql-builds/mysql-6.0.8-alpha
- make
- make install

Install pbxt ->
- Pick pbxt-1.0.07-RC from primebase.
./configure --with-mysql=/home/nidhi/mysql-sources/mysql-6.0.8-alpha
make install

Start MySQL Server ->
/home/nidhi/mysql-builds/mysql-6.0.8-alpha > 
- bin/mysql_install_db --no-defaults
- bin/mysqld_safe --no-defaults &
- bin/mysql --user=root

Install plugin pbxt ->
mysql> show plugins;
+------------+--------+----------------+---------+---------+
| Name       | Status | Type           | Library | License |
+------------+--------+----------------+---------+---------+
| binlog     | ACTIVE | STORAGE ENGINE | NULL    | GPL     | 
| MyISAM     | ACTIVE | STORAGE ENGINE | NULL    | GPL     | 
| CSV        | ACTIVE | STORAGE ENGINE | NULL    | GPL     | 
| MEMORY     | ACTIVE | STORAGE ENGINE | NULL    | GPL     | 
| MARIA      | ACTIVE | STORAGE ENGINE | NULL    | GPL     | 
| MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL    | GPL     | 
+------------+--------+----------------+---------+---------+
6 rows in set (0.01 sec)

mysql> install plugin innodb soname 'ha_innodb.so';
Query OK, 0 rows affected (0.64 sec)

mysql> show plugins;
+------------+--------+----------------+--------------+---------+
| Name       | Status | Type           | Library      | License |
+------------+--------+----------------+--------------+---------+
| binlog     | ACTIVE | STORAGE ENGINE | NULL         | GPL     | 
| MyISAM     | ACTIVE | STORAGE ENGINE | NULL         | GPL     | 
| CSV        | ACTIVE | STORAGE ENGINE | NULL         | GPL     | 
| MEMORY     | ACTIVE | STORAGE ENGINE | NULL         | GPL     | 
| MARIA      | ACTIVE | STORAGE ENGINE | NULL         | GPL     | 
| MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL         | GPL     | 
| InnoDB     | ACTIVE | STORAGE ENGINE | ha_innodb.so | GPL     | 
+------------+--------+----------------+--------------+---------+
7 rows in set (0.00 sec)

mysql> install plugin pbxt soname 'libpbxt.so';
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql> 090123 17:28:54 mysqld_safe Number of processes running now: 0
090123 17:28:54 mysqld_safe mysqld restarted

mysql>
[23 Jan 2009 13:34] MySQL Verification Team
Thank you for the bug report. I couldn't repeat with current source server:

miguel@hegel:~/dbs/6.0pbxt> bin/mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 6.0.10-alpha-debug Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> install plugin pbxt soname 'libpbxt.so';
Query OK, 0 rows affected (0.56 sec)

mysql> show plugins;
+------------------------------+--------+--------------------+------------+---------+
| Name                         | Status | Type               | Library    | License |
+------------------------------+--------+--------------------+------------+---------+
| binlog                       | ACTIVE | STORAGE ENGINE     | NULL       | GPL     | 
| MyISAM                       | ACTIVE | STORAGE ENGINE     | NULL       | GPL     | 
| partition                    | ACTIVE | STORAGE ENGINE     | NULL       | GPL     | 
| ARCHIVE                      | ACTIVE | STORAGE ENGINE     | NULL       | GPL     | 
| BLACKHOLE                    | ACTIVE | STORAGE ENGINE     | NULL       | GPL     | 
| CSV                          | ACTIVE | STORAGE ENGINE     | NULL       | GPL     | 
| Falcon                       | ACTIVE | STORAGE ENGINE     | NULL       | GPL     | 
| FALCON_SYSTEM_MEMORY_DETAIL  | ACTIVE | INFORMATION SCHEMA | NULL       | GPL     | 
| FALCON_SYSTEM_MEMORY_SUMMARY | ACTIVE | INFORMATION SCHEMA | NULL       | GPL     | 
| FALCON_RECORD_CACHE_DETAIL   | ACTIVE | INFORMATION SCHEMA | NULL       | GPL     | 
| FALCON_RECORD_CACHE_SUMMARY  | ACTIVE | INFORMATION SCHEMA | NULL       | GPL     | 
| FALCON_TRANSACTIONS          | ACTIVE | INFORMATION SCHEMA | NULL       | GPL     | 
| FALCON_TRANSACTION_SUMMARY   | ACTIVE | INFORMATION SCHEMA | NULL       | GPL     | 
| FALCON_SYNCOBJECTS           | ACTIVE | INFORMATION SCHEMA | NULL       | GPL     | 
| FALCON_SERIAL_LOG_INFO       | ACTIVE | INFORMATION SCHEMA | NULL       | GPL     | 
| FALCON_TABLESPACE_IO         | ACTIVE | INFORMATION SCHEMA | NULL       | GPL     | 
| FALCON_VERSION               | ACTIVE | INFORMATION SCHEMA | NULL       | GPL     | 
| MEMORY                       | ACTIVE | STORAGE ENGINE     | NULL       | GPL     | 
| InnoDB                       | ACTIVE | STORAGE ENGINE     | NULL       | GPL     | 
| MARIA                        | ACTIVE | STORAGE ENGINE     | NULL       | GPL     | 
| MRG_MYISAM                   | ACTIVE | STORAGE ENGINE     | NULL       | GPL     | 
| PBXT                         | ACTIVE | STORAGE ENGINE     | libpbxt.so | GPL     | 
+------------------------------+--------+--------------------+------------+---------+
22 rows in set (0.04 sec)

mysql>
[23 Jan 2009 18:58] MySQL Verification Team
Changing to verified, the crash on my side happens when the server is re-started:

miguel@hegel:~/dbs> 6.0pbxt/libexec/mysqld
090123 16:52:07 - mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

key_buffer_size=8384512
read_buffer_size=131072
max_used_connections=0
max_threads=151
thread_count=0
connection_count=0
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 338432 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0x7fff8c5d3c80
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x7fff8c5d68e0 thread_stack 0x40000
6.0pbxt/libexec/mysqld(my_print_stacktrace+0x32) [0xd97850]
6.0pbxt/libexec/mysqld(handle_segfault+0x2a6) [0x75539c]
/lib64/libpthread.so.0 [0x7f9d83d8ca90]
/lib64/libc.so.6(strlen+0x20) [0x7f9d82ccf560]
6.0pbxt/libexec/mysqld [0x977a50]
6.0pbxt/libexec/mysqld(mdl_release_locks(MDL_CONTEXT*)+0xc1) [0x977e4b]
6.0pbxt/libexec/mysqld(close_thread_tables(THD*, bool)+0x383) [0x7bccde]
6.0pbxt/libexec/mysqld [0x9644e2]
6.0pbxt/libexec/mysqld(plugin_init(int*, char**, int)+0x521) [0x964dcc]
6.0pbxt/libexec/mysqld [0x758bcb]
6.0pbxt/libexec/mysqld(main+0x1ec) [0x7596b2]
/lib64/libc.so.6(__libc_start_main+0xe6) [0x7f9d82c71586]
6.0pbxt/libexec/mysqld [0x661519]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at (nil) is an invalid pointer
thd->thread_id=0
thd->killed=NOT_KILLED
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
miguel@hegel:~/dbs>
[28 Jan 2009 15:22] MySQL Verification Team
5.1 is too affected, see: http://bugs.mysql.com/bug.php?id=41516.
[31 Jan 2009 15:38] MySQL Verification Team
090131 13:32:50 [Note] 6.0/libexec/mysqld: ready for connections.
Version: '6.0.10-alpha-debug'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
090131 13:34:19 [Note] PrimeBase XT (PBXT) Engine 1.0.07i RC loaded...
090131 13:34:19 [Note] Paul McCullagh, PrimeBase Technologies GmbH, http://www.primebase.org
090131 13:34:19 - mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

key_buffer_size=8384512
read_buffer_size=131072
max_used_connections=1
max_threads=151
thread_count=1
connection_count=1
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 337815 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0xa016200
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0xaac6afb0 thread_stack 0x30c00
6.0/libexec/mysqld(my_print_stacktrace+0x32) [0x89950c9]
6.0/libexec/mysqld(handle_segfault+0x2cd) [0x834f337]
[0xb7f59400]
/home/miguel/dbs/6.0/lib/mysql/plugin/libpbxt.so(XTXactRestart::xres_bytes_to_read(XTThread*, XTDatabase*, unsigned int*, unsigned int*)+0xe6) [0xaabebf48]
/home/miguel/dbs/6.0/lib/mysql/plugin/libpbxt.so(XTXactRestart::xres_restart(XTThread*, unsigned int*, long long*, unsigned int, long long, unsigned int*)+0x1df) [0xaabf05cf]
/home/miguel/dbs/6.0/lib/mysql/plugin/libpbxt.so(XTXactRestart::xres_init(XTThread*, XTDatabase*, unsigned int*, long long*, unsigned int*)+0xb9b) [0xaabf200f]
/home/miguel/dbs/6.0/lib/mysql/plugin/libpbxt.so(xt_xres_init(XTThread*, XTDatabase*)+0x99) [0xaabf21dc]
/home/miguel/dbs/6.0/lib/mysql/plugin/libpbxt.so(xt_xn_init_db(XTThread*, XTDatabase*)+0x201) [0xaac1c625]
/home/miguel/dbs/6.0/lib/mysql/plugin/libpbxt.so(xt_get_database(XTThread*, char*, int)+0x475) [0xaabb141a]
/home/miguel/dbs/6.0/lib/mysql/plugin/libpbxt.so(xt_open_database(XTThread*, char*, int)+0x3e) [0xaabb15fc]
/home/miguel/dbs/6.0/lib/mysql/plugin/libpbxt.so [0xaabcfd7b]
6.0/libexec/mysqld(ha_initialize_handlerton(st_plugin_int*)+0xbd) [0x84a2714]
6.0/libexec/mysqld [0x855fee0]
6.0/libexec/mysqld(mysql_install_plugin(THD*, st_mysql_lex_string const*, st_mysql_lex_string const*)+0x274) [0x8562a91]
6.0/libexec/mysqld(mysql_execute_command(THD*)+0x8e8d) [0x836a877]
6.0/libexec/mysqld(mysql_parse(THD*, char const*, unsigned int, char const**)+0x22f) [0x836b0cf]
6.0/libexec/mysqld(dispatch_command(enum_server_command, THD*, char*, unsigned int)+0x9f2) [0x836bc51]
6.0/libexec/mysqld(do_command(THD*)+0x244) [0x836d22c]
6.0/libexec/mysqld(handle_one_connection+0x11d) [0x83593af]
/lib/tls/i686/cmov/libpthread.so.0 [0xb7ef650f]
/lib/tls/i686/cmov/libc.so.6(clone+0x5e) [0xb7d057ee]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0xa103fa8 = install plugin pbxt soname 'libpbxt.so'
thd->thread_id=1
thd->killed=NOT_KILLED
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
miguel@skybr:~/dbs$
[31 Jan 2009 16:23] MySQL Verification Team
Duplicate of bug: http://bugs.mysql.com/bug.php?id=40757.