[MDEV-335] Valgrind warning "Invalid read of size 8" in lock_rec_validate_page on DML flow Created: 2012-06-13  Updated: 2012-08-28  Resolved: 2012-08-28

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.5.27

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None


 Description   

== Invalid read of size 8
==26274==    at 0xB6EC68: lock_rec_validate_page (lock0lock.c:4962)
==26274==    by 0xB6EF87: lock_validate (lock0lock.c:5068)
==26274==    by 0xB6DD86: lock_print_info_all_transactions (lock0lock.c:4577)
==26274==    by 0xA6ACD8: srv_printf_innodb_monitor (srv0srv.c:2246)
==26274==    by 0xA6B88D: srv_monitor_thread (srv0srv.c:2563)
==26274==    by 0x503EEFB: start_thread (pthread_create.c:304)
==26274==    by 0x5CFF59C: clone (clone.S:112)
==26274==  Address 0x1f1753a0 is 688 bytes inside a block of size 872 free'd
==26274==    at 0x4C282E0: free (vg_replace_malloc.c:366)
==26274==    by 0xB82865: mem_area_free (mem0pool.c:523)
==26274==    by 0xB81214: mem_heap_block_free (mem0mem.c:511)
==26274==    by 0xB6219D: mem_heap_free_heap_top (mem0mem.ic:291)
==26274==    by 0xB62271: mem_heap_empty (mem0mem.ic:333)
==26274==    by 0xB6CEFD: lock_release_off_kernel (lock0lock.c:4150)
==26274==    by 0xA98A69: trx_commit_off_kernel (trx0trx.c:1043)
==26274==    by 0xA9A5C1: trx_commit_for_mysql (trx0trx.c:1774)
==26274==    by 0xA10271: innobase_commit_low(trx_struct*) (ha_innodb.cc:3164)
==26274==    by 0xA10464: innobase_commit_ordered_2(trx_struct*, THD*) (ha_innodb.cc:3250)
==26274==    by 0xA10829: innobase_commit(handlerton*, THD*, bool) (ha_innodb.cc:3364)
==26274==    by 0x7BFFEA: commit_one_phase_2(THD*, bool, THD_TRANS*, bool) (handler.cc:1373)
==26274==    by 0x7BFF49: ha_commit_one_phase(THD*, bool) (handler.cc:1356)
==26274==    by 0x7BFAB5: ha_commit_trans(THD*, bool) (handler.cc:1245)
==26274==    by 0x71A04A: trans_commit_stmt(THD*) (transaction.cc:299)
==26274==    by 0x6127C4: mysql_execute_command(THD*) (sql_parse.cc:4509)

Also once got an assertion failure (with the same test), not sure whether it's related or not:

InnoDB: Assertion failure in thread 539494144 in file read0read.ic line 36
InnoDB: Failing assertion: n < view->n_trx_ids

maria/5.5
bzr version-info

revision-id: timour@askmonty.org-20120604150600-1wsxbe8tqqidke1s
date: 2012-06-04 18:06:00 +0300
revno: 3426

Could not reproduce on maria/5.3, mysql-trunk, percona-server.
Could not reproduce with InnoDB plugin.

RQG command line:

perl ./runall.pl \
--threads=8 \
--duration=1200 \
--queries=100M \
--valgrind \
--grammar=conf/engines/many_indexes.yy \
--gendata=conf/engines/many_indexes.zz \
--engine=InnoDB \
--basedir=<your basedir> --vardir=<your vardir>

To see valgrind warnings, you'll need to check the server error log afterwards (or watch it while the test is running).

The command line above runs the test with 8 threads – in fact, concurrent flow is not required, it can be done with 1 thread only. But the issue seems to be sporadic, and it takes longer with one thread.

Happened every time I ran the test, but sometimes, depending on luck and the machine, although sometimes it took almost all 20 min given as test duration in the parameters. Normally it happens in 3-6 min after the real test flow starts (after RQG said "Loading Validator" for each thread).



 Comments   
Comment by Vladislav Vaintroub [ 2012-08-28 ]

Tried to reproduce with the latest 5.5. valgrind error did not popup. Reassigning to Elena to recheck. Perhaps the bug has just gone after the latest merge?

Comment by Elena Stepanova [ 2012-08-28 ]

Indeed, no valgrind warnings on the current revno 3513, while it's still easily reproducible on revno 3426 where it was first observed (same machine, same build options, same test). Ran the test 3 times, also with longer duration. Closing as fixed.

Generated at Thu Feb 08 06:27:59 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.