Bug #27404 | util thd mysql_parse sig11 when mysqld default multibyte charset | ||
---|---|---|---|
Submitted: | 23 Mar 2007 16:41 | Modified: | 31 Jul 2007 6:08 |
Reporter: | Jonathan Miller | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Cluster: Cluster (NDB) storage engine | Severity: | S1 (Critical) |
Version: | mysql-5.1-telco, 5.1.18bk | OS: | Linux (Linux 32 Bit OS) |
Assigned to: | Stewart Smith | CPU Architecture: | Any |
[23 Mar 2007 16:41]
Jonathan Miller
[26 Mar 2007 13:00]
Jonathan Miller
mysql-test-run.pl patch
Attachment: tomas.patch (application/octet-stream, text), 1.28 KiB.
[5 Apr 2007 5:51]
Stewart Smith
Also reproduced in 5.1.18bk tree
[15 May 2007 12:28]
Stewart Smith
new version of tomas.patch for latest 5.1 bk
Attachment: test_run_use_ndbcluster.patch (text/x-patch), 1.50 KiB.
[15 May 2007 15:10]
Stewart Smith
NDB util thread calls mysql_parse internally with plain old c strings (7bit ascii) to create tables (e.g. mysql.ndb_schema). With mysqld default charset set to a multibyte one (e.g. ucs2) mysql_parse would try to interpret the 7bit string as UCS2 and promptly explode in a heap. Solution is to set the util thread to be using utf8 charset.
[15 May 2007 15:10]
Stewart Smith
patch for util thread
Attachment: bug27404_cs_util_thread.patch (text/x-patch), 1.30 KiB.
[15 May 2007 15:10]
Stewart Smith
Tomas - may this also be needed for the injector thread? Gut feeling says yes...
[8 Jun 2007 7:00]
Stewart Smith
test for ndb master ucs2, slave default
Attachment: ndb_rpl_ctype_ucs2_def_test.patch (text/x-patch), 2.28 KiB.
[8 Jun 2007 7:03]
Stewart Smith
backtrace of slave: #0 0xffffe410 in __kernel_vsyscall () #1 0xb7f15617 in pthread_kill () from /lib/tls/i686/cmov/libpthread.so.0 #2 0x0837492b in write_core (sig=6) at stacktrace.c:229 #3 0x081e4763 in handle_segfault (sig=6) at mysqld.cc:2237 #4 <signal handler called> #5 0xffffe410 in __kernel_vsyscall () #6 0xb7ca3770 in raise () from /lib/tls/i686/cmov/libc.so.6 #7 0xb7ca4ef3 in abort () from /lib/tls/i686/cmov/libc.so.6 #8 0xb7c9cdbb in __assert_fail () from /lib/tls/i686/cmov/libc.so.6 #9 0x082a99da in Rows_log_event::do_apply_event (this=0x87f8f28, rli=0x8805e90) at log_event.cc:6040 #10 0x083607b0 in exec_relay_log_event (thd=0x88038d8, rli=0x8805e90) at log_event.h:815 #11 0x08361398 in handle_slave_sql (arg=0x8805010) at slave.cc:2403 #12 0xb7f11504 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0 #13 0xb7d4751e in clone () from /lib/tls/i686/cmov/libc.so.6 bit of *rli: name = 0x87e6f70 "/home/stewart/Documents/MySQL/5.1/ndb-work/mysql-test/var/log/slave-relay-bin", log_file_name = "/home/stewart/Documents/MySQL/5.1/ndb-work/mysql-test/var/log/slave-relay-bin.000003\000\000\000\000\000\000\000\000l+\200\b�]\200\b", '\0' <repeats 20 times>, "xl\200\b\000\000\000\000xl\200\bxl\200\b\000\000\000\000xl\200\b\000\000\000\000X_\200\b\\_\200\b", '\0' <repeats 68 times>, "��J\b߿J\b\001", '\0' <repeats 35 times>, "\037", '\0' <repeats 12 times>, "@\000\000\000@\000\000 ", '\0' <repeats 18 times>..., time_buff = '\0' <repeats 19 times>, db = '\0' <repeats 192 times>, write_error = false, inited = true, log_file = {pos_in_file = 728, end_of_file = 1068, read_pos = 0x8812eaf "��hF\027\001", read_end = 0x8812f24 "", buffer = 0x8812dd0 "��hF\002\001", bit of the relay log: # at 1003 #768 16:40:16 server id 1 end_log_pos 922 # Position Timestamp Type Master ID Size Master Pos Flags # 3eb d0 f9 68 46 02 01 00 00 00 41 00 00 00 9a 03 00 00 00 00 # 3fe 00 00 00 00 01 00 00 00 00 00 00 1a 00 00 00 40 |................| # 40e 00 00 01 00 00 00 00 00 00 00 00 06 03 73 74 64 |.............std| # 41e 04 21 00 21 00 80 00 00 43 4f 4d 4d 49 54 |........COMMIT| # Query thread_id=0 exec_time=1 error_code=0 SET TIMESTAMP=1181284816/*!*/; COMMIT/*!*/; DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
[8 Jun 2007 7:08]
Stewart Smith
patch for binlog thread
Attachment: bug27404_cs_binlog_thread.patch (text/x-patch), 830 bytes.
[8 Jun 2007 7:08]
Stewart Smith
patch for binlog thread
Attachment: bug27404_cs_binlog_thread.patch (text/x-patch), 830 bytes.
[8 Jun 2007 7:09]
Stewart Smith
patch for binlog thread
Attachment: bug27404_cs_binlog_thread.patch (text/x-patch), 830 bytes.
[8 Jun 2007 7:38]
Stewart Smith
(gdb) bt #0 0xffffe410 in __kernel_vsyscall () #1 0xb7f6a617 in pthread_kill () from /lib/tls/i686/cmov/libpthread.so.0 #2 0x083748eb in write_core (sig=11) at stacktrace.c:229 #3 0x081e4763 in handle_segfault (sig=11) at mysqld.cc:2237 #4 <signal handler called> #5 0x0813017b in MYSQLlex (arg=0xb7234184, yythd=0x88038d0) at sql_lex.cc:596 #6 0x0820bb8c in MYSQLparse (yythd=0x88038d0) at sql_yacc.cc:14840 #7 0x081fb9a6 in mysql_parse (thd=0x88038d0, inBuf=0x884de55 "BEGIN", length=5, found_semicolon=0xb72342c0) at sql_parse.cc:5325 #8 0x082ab0f4 in Query_log_event::do_apply_event (this=0x87f5670, rli=0x8805e90, query_arg=0x884de55 "BEGIN", q_len_arg=5) at log_event.cc:2057 #9 0x082ab7fa in Query_log_event::do_apply_event (this=0x87f5670, rli=0x8805e90) at log_event.cc:1907 #10 0x08360770 in exec_relay_log_event (thd=0x88038d0, rli=0x8805e90) at log_event.h:815 #11 0x08361358 in handle_slave_sql (arg=0x8805010) at slave.cc:2403 #12 0xb7f66504 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0 #13 0xb7d9c51e in clone () from /lib/tls/i686/cmov/libc.so.6
[30 Jun 2007 8:02]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/30005 ChangeSet@1.2543, 2007-06-30 18:02:38+10:00, stewart@flamingspork.com +1 -0 [PATCH] BUG#27404 util thd mysql_parse sig11 when mysqld default multibyte charset NDB util thread calls mysql_parse internally with plain old c strings (7bit ascii) to create tables (e.g. mysql.ndb_schema). With mysqld default charset set to a multibyte one (e.g. ucs2) mysql_parse would try to interpret the 7bit string as UCS2 and promptly explode in a heap. Solution is to set the util thread to be using utf8 charset. Index: ndb-work/sql/ha_ndbcluster.cc ===================================================================
[30 Jun 2007 8:03]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/30006 ChangeSet@1.2544, 2007-06-30 18:02:54+10:00, stewart@flamingspork.com +3 -0 [PATCH] Test for BUG#27404 util thd mysql_parse sig11 when default multibyte charset Test that we can start a MySQL Server with a default multibyte charset with NDB running. Test *really* basic functionality too. Index: ndb-work/mysql-test/r/rpl_ndb_ctype_ucs2_def.result ===================================================================
[30 Jun 2007 8:05]
Stewart Smith
pushed to 5.1-ndb
[3 Jul 2007 18:57]
Bugs System
Pushed into 5.1.21-beta
[5 Jul 2007 6:26]
Stewart Smith
This bug (well, the re-enabling of the test case) is on hold at least until these bugs are fixed: BUG#29562, BUG#29563 and BUG#29564 which is likely rpl team.
[27 Jul 2007 5:08]
Stewart Smith
Document this fix, things don't 100% work yet (see other bugs).
[31 Jul 2007 6:08]
Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release. If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at http://dev.mysql.com/doc/en/installing-source.html Documented bugfix in 5.1.21 changelog. Noted limitations for Cluster replication in Cluster chapter as suggested by Stewart.