Assert fail in field.cc

Bug #1735185 reported by Robert Golebiowski
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.5
New
Undecided
Unassigned
5.6
New
Undecided
Unassigned
5.7
Incomplete
High
Sveta Smirnova

Bug Description

The easiest way to reproduce this bug is to copy the whole directory rpl_encryption from branch 57_binlog_encryption_2ndPR. Modify rpl_encryption/my.cnf and disable encypt-binlog option (server does not provide this option as binlog feature is not yet merged in). Run rpl_encryption.encrypted_master, you will see the stack trace:

#0 __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:62
#1 0x00000000019c5c32 in my_write_core (sig=6) at /home/rob/git/percona-server/mysys/stacktrace.c:249
#2 0x0000000000f43594 in handle_fatal_signal (sig=6) at /home/rob/git/percona-server/sql/signal_handler.cc:223
#3 <signal handler called>
#4 0x00007f5ed7e39428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#5 0x00007f5ed7e3b02a in __GI_abort () at abort.c:89
#6 0x00007f5ed7e31bd7 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x1fecdb8 "!table || (!table->write_set || bitmap_is_set(table->write_set, field_index))", file=file@entry=0x1fecc00 "/home/rob/git/percona-server/sql/field.cc", line=line@entry=4121, function=function@entry=0x1fef680 <Field_long::store(long long, bool)::__PRETTY_FUNCTION__> "virtual type_conversion_status Field_long::store(longlong, bool)") at assert.c:92
#7 0x00007f5ed7e31c82 in __GI___assert_fail (assertion=0x1fecdb8 "!table || (!table->write_set || bitmap_is_set(table->write_set, field_index))", file=0x1fecc00 "/home/rob/git/percona-server/sql/field.cc", line=4121, function=0x1fef680 <Field_long::store(long long, bool)::__PRETTY_FUNCTION__> "virtual type_conversion_status Field_long::store(longlong, bool)") at assert.c:101
#8 0x0000000000fa15fd in Field_long::store (this=0x7f5e600ad658, nr=9, unsigned_val=false) at /home/rob/git/percona-server/sql/field.cc:4121
#9 0x0000000001007675 in Item::save_in_field_inner (this=0x7f5e600aed70, field=0x7f5e600ad658, no_conversions=false) at /home/rob/git/percona-server/sql/item.cc:6884
#10 0x0000000001006c74 in Item::save_in_field (this=0x7f5e600aed70, field=0x7f5e600ad658, no_conversions=false) at /home/rob/git/percona-server/sql/item.cc:6750
#11 0x000000000176948d in update_generated_read_fields (buf=0x7f5e60064130 "\364W\002", table=0x7f5e600afc50, active_index=64) at /home/rob/git/percona-server/sql/table.cc:7899
#12 0x0000000000fdb895 in handler::ha_rnd_pos (this=0x7f5e600638b0, buf=0x7f5e60064130 "\364W\002", pos=0x7f5e600b4608 "\002") at /home/rob/git/percona-server/sql/handler.cc:3181
#13 0x0000000001a5b08c in ha_innopart::rnd_pos_by_record (this=0x7f5e600638b0, record=0x7f5e60064130 "\364W\002") at /home/rob/git/percona-server/storage/innobase/handler/ha_innopart.cc:4549
#14 0x00000000018f81a0 in Rows_log_event::do_index_scan_and_update (this=0x7f5e600a9f00, rli=0x4fa6d80) at /home/rob/git/percona-server/sql/log_event.cc:10339
#15 0x00000000018fa727 in Rows_log_event::do_apply_event (this=0x7f5e600a9f00, rli=0x4fa6d80) at /home/rob/git/percona-server/sql/log_event.cc:11227
#16 0x00000000018e1480 in Log_event::apply_event (this=0x7f5e600a9f00, rli=0x4fa6d80) at /home/rob/git/percona-server/sql/log_event.cc:3447
#17 0x000000000195d47e in apply_event_and_update_pos (ptr_ev=0x7f5ed12998a0, thd=0x7f5e600008c0, rli=0x4fa6d80) at /home/rob/git/percona-server/sql/rpl_slave.cc:4760
#18 0x000000000195ec46 in exec_relay_log_event (thd=0x7f5e600008c0, rli=0x4fa6d80) at /home/rob/git/percona-server/sql/rpl_slave.cc:5275
#19 0x0000000001966036 in handle_slave_sql (arg=0x4f50aa0) at /home/rob/git/percona-server/sql/rpl_slave.cc:7490
#20 0x0000000001eb83a3 in pfs_spawn_thread (arg=0x7f5e741974f0) at /home/rob/git/percona-server/storage/perfschema/pfs.cc:2190
#21 0x00007f5ed8a766ba in start_thread (arg=0x7f5ed129a700) at pthread_create.c:333
#22 0x00007f5ed7f0b3dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

From initial investigation problem is that newly added function : int
ha_innopart::rnd_pos_by_record(uchar* record) is initializing only partition where record was found. The old version of this function did ha_rnd_init() when called from int Rows_log_event::do_index_scan_and_update(Relay_log_info const *rli)

Changed in percona-server:
importance: Undecided → High
milestone: none → 5.7.20-18
Revision history for this message
Sveta Smirnova (svetasmirnova) wrote :
Revision history for this message
Sveta Smirnova (svetasmirnova) wrote :

I cannot repeat described behavior with current trunk sources. With which branch were you able to see the crash?

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

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

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.