We have a high-end server, 128GB RAM, 32 Core , Xeon, SSD RAID 10 - running Ubuntu 12.04 with MySQL 5.5.28 . Doing random imports to large InnoDB tables, over 50+ gigs, randomly after a few hours of heavy load, mysql does a Signal 11 and crashes.

We have tried to move hardware. Doing a full dump (but not a restore yet) gives no issues. Usually on corrupted tables, a dump would fail no?

Below is the crash log and my.cnf .

17:48:34 UTC - 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.

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

Thread pointer: 0x7fc7eb1b5040
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 = 7fadf6abfe60 thread_stack 0x30000

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7faa4c18e440): is an invalid pointer
Connection ID (thread ID): 2286

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.
121120 12:48:48 [Note] Plugin 'FEDERATED' is disabled.
121120 12:48:48 InnoDB: The InnoDB memory heap is disabled
121120 12:48:48 InnoDB: Mutexes and rw_locks use GCC atomic builtins
121120 12:48:48 InnoDB: Compressed tables use zlib
121120 12:48:48 InnoDB: Initializing buffer pool, size = 96.0G
121120 12:48:56 InnoDB: Completed initialization of buffer pool
121120 12:48:57 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 1341738337497
121120 12:48:58  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...
InnoDB: Doing recovery: scanned up to log sequence number 1341743580160
InnoDB: Doing recovery: scanned up to log sequence number 1341748823040
InnoDB: Doing recovery: scanned up to log sequence number 1341754065920
InnoDB: Doing recovery: scanned up to log sequence number 1341759308800
InnoDB: Doing recovery: scanned up to log sequence number 1341764551680


port            = 3306
socket          = /var/run/mysqld/mysqld.sock

socket          = /var/run/mysqld/mysqld.sock
nice            = 0


user            = mysql
socket          = /var/run/mysqld/mysqld.sock
port            = 3306
basedir         = /usr
datadir         = /data/mysql
tmpdir          = /tmp

key_buffer              = 512M
max_allowed_packet      = 128M
thread_stack            = 192K
thread_cache_size       = 64

myisam-recover         = BACKUP
max_connections        = 500
table_cache            = 812
table_definition_cache = 812

#query_cache_limit       = 4M
#query_cache_size        = 512M
join_buffer_size        = 512K

innodb_additional_mem_pool_size = 20M
innodb_buffer_pool_size = 96G
#innodb_file_io_threads = 4
#innodb_thread_concurrency = 12
innodb_flush_log_at_trx_commit = 1
innodb_log_buffer_size = 8M
innodb_log_file_size = 1024M
innodb_log_files_in_group = 2
innodb_max_dirty_pages_pct = 90
innodb_lock_wait_timeout = 120

log_error                = /var/log/mysql/error.log

long_query_time =       5
slow_query_log  =       1
slow_query_log_file     =       /var/log/mysql/slowlog.log

max_allowed_packet      = 16M


key_buffer              = 16M

Memory usage, disk space is fine. This only happens during high I/O.

Would anything in the my.cnf file be causing this issue?



It seems theoretically possible that table could still dump properly if the corruption were in the indexes, which aren't dumped.

It should not be possible for anything in your configuration to cause MySQL to crash with a Signal 11, a segmentation fault.

I've been staring at this for a while, now, and I haven't come up with answers... just questions (in no particular order):

  • have you run memory diagnostics on your server? You mentioned that you "tried to move hardware" but you also mention having not tried a restore of your dump, so I'm not clear exactly what you tried moving. Resist the temptation to think "it can't be that." Test the memory.
  • is your system using any swap space at all? Hopefully not -- but if (and only if) it is, then you should reduce the innodb_buffer_pool_size to the point that it isn't ... because there's not really a point in buffering to memory that gets swapped, and the swap partition could be introducing problems. This one is a stretch, but worth eliminating, I think.
  • is this a problem that occurred after an upgrade to 5.5.28 or is this a new application or deployment?
  • if it's new, have you tried replicating the problem with MySQL 5.6?
  • is partitioning involved? That means touching more code.
  • are you using a binary distribution of MySQL that you downloaded from Oracle (tar/deb/rpm)? Or is it from Ubuntu (I always use generic tar binaries, so I don't know what the current version of MySQL 5.5 is, in 12.04LTS) or another source? Or compiled from source code?
  • are you using any unusual plugins or UDFs?

This could be a bug, but when you hear the sound of hooves, suspect horses before zebras (at least where I come from).

update (from comments):

"Another" memory bug?

Checking the memory would be the first thing I would try, for sure.

The snapshots should be getting you a reliable backup, I agree, but if there's any kind of binary wierdness going on in your files, it would be perfectly replicated. It will take some time, but restoring to a fresh system using mysqldump files would be a better test, since all of the table structures would all be absolutely rebuilt from scratch. Since the table structures seem to be valid, it may be unlikely that this will change anything, but it feels like you're kind of at the point where every possibility needs to be pinned down... clearly, what you're seeing should not be happening.

For a new test system, though, I would install the server using the "Linux - Generic 2.6 (x86, 64-bit), Compressed TAR Archive" package from the download site. Download the tarball, verify it's md5 checksum, then tar xvzf it into /usr/local and symlink the resulting directory to /usr/local/mysql. (I think Ubuntu still puts it in /var/lib/mysql, so you can probably do this even without removing the distro version, as long as you don't have the other copy running). Then move the "data" directory from inside /usr/local/mysql to whatever partition it needs to live on (if different), and symlink it back into /usr/local/mysql/data. Put your config file at /usr/local/mysql/my.cnf and pass that as the first option ... using --defaults-file=/usr/local/mysql/my.cnf when using the install scripts and when starting the server -- this will cause any other my.cnf's (such as those in /etc) to not be read.

The rest of the setup is pretty straightforward. It's more work, but it completely eliminates the "black box" of using the package manager. The real motivation here, though, is that the disto packages may have been compiled from source, and the resulting binaries could have slight variations from the "official" Oracle binaries.

  • To answer your questions: We are hosted with a third party provider running under KVM dedicated hardware. - for snapshot/imaging purposes. We are using KVM snapshots - which should be 100% compatible with Innodb live tables. see: innodb_flush_log_at_trx_commit = 1 . This is how we were able to move the filesystem onto different hardware. After every 'restore' we do a mysqlcheck , even innochecksum shows NO errors on all .idb tables. During the crashes, the swap did seem to go up just 1 hour before the crash - From the regular steady 10% to ~20% within 2 hours then the crash occured. – Tom Geee Nov 22 '12 at 3:59
  • This is a new application deployment which apparently hits the DB hard for a while before it stablizes again. The DB was freshly dumped from 5.1 to 5.5 one month ago - we are running on the standard ubuntu 12.04 APT repo's/distrubution. No partitioning invovled. No extra plugins. I am wondering if this could be another memory bug on the new hardware our host dedicated to us. – Tom Geee Nov 22 '12 at 4:00
  • Thanks for the help. If the problem continues - I'll be debating between doing a memory check (a good few hours of downtime, IF the host agree's to do this for us) - or a complete dump (6-10 hours of downtime), then probably compile a 'generic" mysql version. – Tom Geee Nov 23 '12 at 3:56
  • Did you find more on the problem ? I am posting a similar problem ... – Shrey Nov 21 '16 at 9:35
  • I pasted a similar problem : dba.stackexchange.com/questions/155863/… – Shrey Nov 21 '16 at 10:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.