Crashes after upgrade from xtradb 5.1.31 -> 5.1.33

Bug #358980 reported by Sander
2
Affects Status Importance Assigned to Milestone
Percona-XtraDB
Fix Released
Critical
Unassigned

Bug Description

I had a 'reasonalbly' stable 5.1.31-xtradb, downloaded .deb from percona, which I could crash only with specific queries, but the latest 5.1.33 build crashes at startup after the upgrade:

Version: '5.1.33-xtradb4-log' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
090410 11:06:05 - 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=16777216
read_buffer_size=131072
max_used_connections=5
max_threads=400
threads_connected=5
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 890846 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0xf98b220
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 = 0x4118d100 thread_stack 0x20000
/usr/sbin/mysqld(my_print_stacktrace+0x29) [0x88a2b9]
/usr/sbin/mysqld(handle_segfault+0x383) [0x5b4803]
/lib/libpthread.so.0 [0x7fe8576f0a80]
/lib/libc.so.6(strlen+0x30) [0x7fe856610050]
/usr/sbin/mysqld [0x8034cc]
/usr/sbin/mysqld [0x807f94]
/usr/sbin/mysqld [0x808cbb]
/usr/sbin/mysqld [0x73a131]
/usr/sbin/mysqld(ha_commit_one_phase(THD*, bool)+0x7e) [0x69691e]
/usr/sbin/mysqld(ha_commit_trans(THD*, bool)+0x1ce) [0x6973ee]
/usr/sbin/mysqld(ha_autocommit_or_rollback(THD*, int)+0x28) [0x697658]
/usr/sbin/mysqld(dispatch_command(enum_server_command, THD*, char*, unsigned int)+0x12c) [0x5c7f8c]
/usr/sbin/mysqld(do_command(THD*)+0xe8) [0x5c94a8]
/usr/sbin/mysqld(handle_one_connection+0x21e) [0x5bcafe]
/lib/libpthread.so.0 [0x7fe8576e8fc7]
/lib/libc.so.6(clone+0x6d) [0x7fe8566645ad]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0xf9a0340 = INSERT INTO Managementboek_Nieuwsbrieven.Nieuwsbrief_Views VALUES( '672377d6.773b.0094.a8ea.0cef29353b25', NOW() )
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.
090410 11:06:05 mysqld_safe Number of processes running now: 0
090410 11:06:05 mysqld_safe mysqld restarted
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins.
090410 11:06:06 InnoDB: highest supported file format is Barracuda.

Changed in percona-xtradb:
assignee: nobody → yasufumi-kinoshita
importance: Undecided → Critical
status: New → Confirmed
Revision history for this message
Yasufumi Kinoshita (yasufumi-kinoshita) wrote :

Evgeniy,

I have tried to analyze. But,

I need symbol information of
"
/usr/sbin/mysqld [0x8034cc]
/usr/sbin/mysqld [0x807f94]
/usr/sbin/mysqld [0x808cbb]
/usr/sbin/mysqld [0x73a131]
"
If there is no symbol information, it is nearly impossible to analyze.

I don't have not stripped binary of the executable.

Can someone extract the addresses to symbols?
Or, where the not stripped binary is?

Best,
Yasufumi

Revision history for this message
Evgeniy Firsov (evgeniy-percona) wrote : Re: [Bug 358980] Re: Crashes after upgrade from xtradb 5.1.31 -> 5.1.33

Yasufumi,

The crash is bacause of uninitalized use of file_name in trx_sys_update_mysql_binlog_offset

(gdb) frame 4
#4 0x00000000007e6c61 in trx_sys_update_mysql_binlog_offset (file_name_in=0xc9e518 "./mysql-bin.000003", offset=1212, field=15384, mtr=0x408f3e00) at ../../storage/innobase/include/ut0mem.ic:60
60 return(strlen(str));
(gdb) info locals
file_name = 0x0
(gdb) info args
file_name_in = 0xc9e518 "./mysql-bin.000003"
offset = 1212
field = 15384
mtr = (mtr_t *) 0x408f3e00

Suggested fix:

diff -r c0231bbdda69 storage/innobase/trx/trx0sys.c
--- a/storage/innobase/trx/trx0sys.c Mon Apr 13 15:04:50 2009 +0700
+++ b/storage/innobase/trx/trx0sys.c Mon Apr 13 15:17:05 2009 +0700
@@ -673,7 +673,7 @@
  trx_sysf_t* sys_header;
  const char* file_name;

- if (ut_strlen(file_name) >= TRX_SYS_MYSQL_MASTER_LOG_NAME_LEN) {
+ if (ut_strlen(file_name_in) >= TRX_SYS_MYSQL_MASTER_LOG_NAME_LEN) {

   /* We cannot fit the name to the 512 bytes we have reserved */
   /* -> To store relay log file information, file_name must fit to the 480 bytes */

On Mon, 13 Apr 2009 09:37:57 +0700, Yasufumi Kinoshita <email address hidden> wrote:

> Evgeniy,
>
> I have tried to analyze. But,
>
> I need symbol information of
> "
> /usr/sbin/mysqld [0x8034cc]
> /usr/sbin/mysqld [0x807f94]
> /usr/sbin/mysqld [0x808cbb]
> /usr/sbin/mysqld [0x73a131]
> "
> If there is no symbol information, it is nearly impossible to analyze.
>
> I don't have not stripped binary of the executable.
>
> Can someone extract the addresses to symbols?
> Or, where the not stripped binary is?
>
> Best,
> Yasufumi
>

--
WBR, Evgeniy.

Revision history for this message
Yasufumi Kinoshita (yasufumi-kinoshita) wrote :

Evgeniy,

Thank you!
I have pushed your fix.

lp:~percona-dev/percona-xtradb/bug-fix-358980

Changed in percona-xtradb:
status: Confirmed → Fix Committed
Changed in percona-xtradb:
milestone: none → 1.0.3-4.1
Changed in percona-xtradb:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.