Bug #43827 | Server closes connections and restarts | ||
---|---|---|---|
Submitted: | 24 Mar 2009 9:49 | Modified: | 29 Jun 2009 19:42 |
Reporter: | Francesco Battaglia | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S1 (Critical) |
Version: | 5.1.31, 5.0, 5.1 bzr | OS: | Linux |
Assigned to: | Alexander Barkov | CPU Architecture: | Any |
[24 Mar 2009 9:49]
Francesco Battaglia
[24 Mar 2009 10:23]
Sveta Smirnova
Thank you for the report. There are several links in bug #4745. Please describe step-by-step how you created utf8_vietnamese1_ci collation or provide your share/mysql/charsets/Index.xml file
[24 Mar 2009 10:37]
Francesco Battaglia
Hi Sveta! Thanks for your reply! I used the file http://vietunicode.sourceforge.net/howto/Index.xml I copied this file in the folder mysql/share/charsets/ of mysql server
[24 Mar 2009 11:03]
Francesco Battaglia
Changed title
[24 Mar 2009 11:55]
Sveta Smirnova
Thank you for the feedback. Verified as described. Backtrace in my environment: Thread 1 (process 32086): #0 0x002ce402 in __kernel_vsyscall () #1 0x0046264f in pthread_kill () from /lib/libpthread.so.0 #2 0x085a46c5 in my_write_core (sig=11) at stacktrace.c:310 #3 0x0824c685 in handle_segfault (sig=11) at mysqld.cc:2513 #4 <signal handler called> #5 0x085b9c32 in my_scan_8bit (cs=0x968eec8, str=0x970e3ca "1", end=0x970e3cb "", sq=2) at ctype-simple.c:1115 #6 0x082146d3 in test_if_important_data (cs=0x968eec8, str=0x970e3ca "1", strend=0x970e3cb "") at field.cc:994 #7 0x08221158 in Field_longstr::report_if_important_data (this=0x970c9f0, ptr=0x970e3ca "1", end=0x970e3cb "", count_spaces=true) at field.cc:6354 #8 0x08222a40 in Field_varstring::store (this=0x970c9f0, from=0x970e3c0 "01234567891", length=11, cs=0x8866760) at field.cc:7050 #9 0x08183fdf in Item::save_str_value_in_field (this=0x970e3d0, field=0x970c9f0, result=0x970e3d8) at item.cc:373 #10 0x0818f69c in Item_string::save_in_field (this=0x970e3d0, field=0x970c9f0, no_conversions=false) at item.cc:4918 #11 0x082b047e in fill_record (thd=0x96b83a0, ptr=0x970c9ec, values=@0x970e3b0, ignore_errors=false) at sql_base.cc:8195 #12 0x082b0569 in fill_record_n_invoke_before_triggers (thd=0x96b83a0, ptr=0x970c9e8, values=@0x970e3b0, ignore_errors=false, triggers=0x0, event=TRG_EVENT_INSERT) at sql_base.cc:8238 #13 0x082f5291 in mysql_insert (thd=0x96b83a0, table_list=0x970e1d0, fields=@0x96b99d8, values_list=@0x96b99fc, update_fields=@0x96b99f0, update_values=@0x96b99e4, duplic=DUP_ERROR, ignore=false) at sql_insert.cc:778 #14 0x08264632 in mysql_execute_command (thd=0x96b83a0) at sql_parse.cc:3088 #15 0x0826af74 in mysql_parse (thd=0x96b83a0, inBuf=0x970e108 "insert into prova values ('01234567891')", length=40, found_semicolon=0xb73e62fc) at sql_parse.cc:5831 #16 0x0826bbb0 in dispatch_command (command=COM_QUERY, thd=0x96b83a0, packet=0x96fb1e9 "insert into prova values ('01234567891')", packet_length=40) at sql_parse.cc:1216 #17 0x0826cdce in do_command (thd=0x96b83a0) at sql_parse.cc:857 #18 0x08259a05 in handle_one_connection (arg=0x96b83a0) at sql_connect.cc:1115 #19 0x0045fbd4 in start_thread () from /lib/libpthread.so.0 #20 0x003b74fe in clone () from /lib/libc.so.6
[8 Apr 2009 6:21]
Alexander Barkov
This is a generic problem. MySQL will crash in this case with any User-defined Unicode collation, with any storage engine. An easier script to reproduce this: mysql> create table t1 (nome varchar(10))character set utf8 collate utf8_vietnamese1_ci; Query OK, 0 rows affected (0.01 sec) mysql> insert into t1 values (repeat('a',11)); ERROR 2006 (HY000): MySQL server has gone away
[8 Apr 2009 7:04]
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/71608 2855 Alexander Barkov 2009-04-08 Bug#43827 Server closes connections and restarts Problem: Crash happened with a user-defined utf8 collation, on attempt to insert a value longer than the column to store. Reason: The "ctype" member was not initialized (NULL) when allocating a user-defined utf8 collation, so an attempt to call my_ctype(cs, *str) to check if we loose any important data when truncating the value made the server crash. Fix: Initializing tge "ctype" member to a proper value. mysql-test/r/ctype_ldml.result Adding tests mysql-test/t/ctype_ldml.test Adding tests strings/ctype-uca.c Adding initialization of "ctype" member.
[8 Apr 2009 10:32]
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/71628 2855 Alexander Barkov 2009-04-08 Bug#43827 Server closes connections and restarts Problem: Crash happened with a user-defined utf8 collation, on attempt to insert a value longer than the column to store. Reason: The "ctype" member was not initialized (NULL) when allocating a user-defined utf8 collation, so an attempt to call my_ctype(cs, *str) to check if we loose any important data when truncating the value made the server crash. Fix: Initializing tge "ctype" member to a proper value. mysql-test/r/ctype_ldml.result Adding tests mysql-test/t/ctype_ldml.test Adding tests strings/ctype-uca.c Adding initialization of "ctype" member.
[4 Jun 2009 9:44]
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/75592 2926 Alexander Barkov 2009-06-04 Bug#43827 Server closes connections and restarts Problem: Crash happened with a user-defined utf8 collation, on attempt to insert a value longer than the column to store. Reason: The "ctype" member was not initialized (NULL) when allocating a user-defined utf8 collation, so an attempt to call my_ctype(cs, *str) to check if we loose any important data when truncating the value made the server crash. Fix: Initializing tge "ctype" member to a proper value. mysql-test/r/ctype_ldml.result Adding tests mysql-test/t/ctype_ldml.test Adding tests strings/ctype-uca.c Adding initialization of "ctype" member. modified: mysql-test/r/ctype_ldml.result mysql-test/t/ctype_ldml.test strings/ctype-uca.c
[4 Jun 2009 9:46]
Alexander Barkov
Pushed into mysql-5.1.36-bugteam
[16 Jun 2009 11:05]
Bugs System
Pushed into 5.1.36 (revid:joro@sun.com-20090616102155-3zhezogudt4uxdyn) (version source revid:azundris@mysql.com-20090606160500-zm37psz7u1m96y5l) (merge vers: 5.1.36) (pib:6)
[17 Jun 2009 19:28]
Bugs System
Pushed into 5.4.4-alpha (revid:alik@sun.com-20090616183122-chjzbaa30qopdra9) (version source revid:azundris@mysql.com-20090606160423-aym8s5rn51nmg387) (merge vers: 6.0.12-alpha) (pib:11)
[18 Jun 2009 11:07]
Francesco Battaglia
I had another problem with vietnamese collation. I added this comment here because I don't know if my new problem is linked to this bug. to reproduce: CREATE DATABASE prova CHARACTER SET utf8 COLLATE utf8_vietnamese1_ci; create table prova (nome varchar(10))Engine=InnoDB; insert into prova (nome) values ('hello!'); select * from prova where lower(nome)=lower('N'); When I use the function lower on a field created with vietnamese collation db closes all connection and restarts thi is the log: 090618 12:48:57 - 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=11 max_threads=151 threads_connected=11 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 337720 K bytes of memory Hope that's ok; if not, decrease some variables in the equation. thd: 0xac03828 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 = 0xb15ff210 thread_stack 0x30000 Trying to get some variables. Some pointers may be invalid and cause the dump to abort... thd->query at 0xab2d0c0 = select * from prova where lower(nome)=lower('N') thd->thread_id=15 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. I found this issue on MySQL 5.1.32 SO: Red Hat Enterprise Linux Server release 5.2
[29 Jun 2009 19:42]
Paul DuBois
Noted in 5.1.36, 5.4.4 changelogs. For user-defined utf8 collations, attempts to store values too long for a column could cause a server crash.
[1 Jul 2009 6:12]
Donnie To
for version 5.0.83: ALTER TABLE [tablename] CONVERT TO CHARACTER SET utf8 COLLATE utf8_vietnamese1_ci; ERROR 2013 (HY000): Lost connection to MySQL server during query
[12 Aug 2009 22:39]
Paul DuBois
Noted in 5.4.2 changelog because next 5.4 version will be 5.4.2 and not 5.4.4.
[15 Aug 2009 1:55]
Paul DuBois
Ignore previous comment about 5.4.2.
[26 Aug 2009 13:46]
Bugs System
Pushed into 5.1.37-ndb-7.0.8 (revid:jonas@mysql.com-20090826132541-yablppc59e3yb54l) (version source revid:jonas@mysql.com-20090826132541-yablppc59e3yb54l) (merge vers: 5.1.37-ndb-7.0.8) (pib:11)
[26 Aug 2009 13:46]
Bugs System
Pushed into 5.1.37-ndb-6.3.27 (revid:jonas@mysql.com-20090826105955-bkj027t47gfbamnc) (version source revid:jonas@mysql.com-20090826105955-bkj027t47gfbamnc) (merge vers: 5.1.37-ndb-6.3.27) (pib:11)
[26 Aug 2009 13:48]
Bugs System
Pushed into 5.1.37-ndb-6.2.19 (revid:jonas@mysql.com-20090825194404-37rtosk049t9koc4) (version source revid:jonas@mysql.com-20090825194404-37rtosk049t9koc4) (merge vers: 5.1.37-ndb-6.2.19) (pib:11)
[27 Aug 2009 16:33]
Bugs System
Pushed into 5.1.35-ndb-7.1.0 (revid:magnus.blaudd@sun.com-20090827163030-6o3kk6r2oua159hr) (version source revid:jonas@mysql.com-20090826132541-yablppc59e3yb54l) (merge vers: 5.1.37-ndb-7.0.8) (pib:11)
[8 Oct 2009 2:47]
Paul DuBois
The 5.4 fix has been pushed to 5.4.2.