assert for FK processing in client connection

Bug #1342959 reported by Seppo Jaakola on 2014-07-16
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
MySQL patches by Codership
Status tracked in 5.6
5.6
Medium
Seppo Jaakola
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
Status tracked in 5.6
5.5
Invalid
Undecided
Unassigned
5.6
Fix Released
Undecided
Unassigned

Bug Description

Following assert was thrown for a client session:

2014-07-11 14:08:25 7f3cf55d8700 InnoDB: Assertion failure in thread 139899791312640 in file row0upd.cc line 442
InnoDB: Failing assertion: foreign->referenced_table ->n_foreign_key_checks_running > 0

InnoDB: We intentionally generate a memory trap.
IInnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
12:08:25 UTC - mysqld got signal 6 ;

...

stack_bottom = 7f3cf55d7d38 thread_stack 0x40000
/usr/sbin/mysqld(my_print_stacktrace+0x35)[0x902645]
/usr/sbin/mysqld(handle_fatal_signal+0x4c4)[0x6801e4]
/lib64/libpthread.so.0(+0xf710)[0x7f3d3d636710]
/lib64/libc.so.6(gsignal+0x35)[0x7f3d3ba81925]
/lib64/libc.so.6(abort+0x175)[0x7f3d3ba83105]
/usr/sbin/mysqld[0xa17900]
/usr/sbin/mysqld[0xa1947e]
/usr/sbin/mysqld[0xa1994a]
/usr/sbin/mysqld[0x9fd3bb]
/usr/sbin/mysqld[0x96e33f]
/usr/sbin/mysqld(_ZN7handler13ha_update_rowEPKhPh+0xb6)[0x5c9436]
/usr/sbin/mysqld(_Z12mysql_updateP3THDP10TABLE_LISTR4ListI4ItemES6_PS4_jP8st_ordery15enum_duplicatesbPySB_+0x177e)[0x77393e]
/usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x239d)[0x7039ed]
/usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x608)[0x707908]
/usr/sbin/mysqld[0x707a31]
/usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x1ad4)[0x709cb4]
/usr/sbin/mysqld(_Z10do_commandP3THD+0x1e3)[0x70b083]
/usr/sbin/mysqld(_Z24do_handle_one_connectionP3THD+0x17f)[0x6d492f]
/usr/sbin/mysqld(handle_one_connection+0x47)[0x6d4b07]
/usr/sbin/mysqld(pfs_spawn_thread+0x12a)[0xb3c0da]
/lib64/libpthread.so.0(+0x79d1)[0x7f3d3d62e9d1]
/lib64/libc.so.6(clone+0x6d)[0x7f3d3bb37b6d]

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

Seppo Jaakola (seppo-jaakola) wrote :

This shows a potential race condition for foreign_table->n_foreign_key_checks_running when using a build made with option HAVE_ATOMIC_BUILTINS

Changed in codership-mysql:
importance: Undecided → Medium
status: New → In Progress
assignee: nobody → Seppo Jaakola (seppo-jaakola)
milestone: none → 5.6.19-25.6
Seppo Jaakola (seppo-jaakola) wrote :

a fix was pushed to remove the race for n_foreign_key_checks_running variable, in revision:

http://bazaar.launchpad.net/~codership/codership-mysql/5.6/revision/4111

Przemek (pmalkowski) on 2014-07-23
tags: added: i38269

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXC-1701

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers