[MDEV-7054] Sporadic Invalid read valgrind errors in mariadb_dbug_id Created: 2014-11-09  Updated: 2019-01-24  Resolved: 2019-01-24

Status: Closed
Project: MariaDB Server
Component/s: OTHER
Affects Version/s: 10.0
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Elena Stepanova
Resolution: Cannot Reproduce Votes: 0
Labels: valgrind
Environment:

Linux wheezy-64 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u1 x86_64 GNU/Linux valgrind-3.10.0



 Description   

The following test case sometimes causes valgrind warnings on a normal debug build (non-valgrind).

# Run via MTR with 
# ./mtr t1 --mysqld=--innodb  --mysqld=--default-storage-engine=InnoDB --mysqld=--innodb-file-format=Barracuda --mysqld=--innodb-file-per-table=1 --valgrind-mysqld
# I doubt that InnoDB parameters are anyhow important, but anyway that's how I ran it when it was happening
 
DROP DATABASE test;CREATE DATABASE test;USE test;
create temporary table t1(a int)SELECT 1 a;
HANDLER t1 OPEN;
handler t1 read next;
BINLOG ' SOgWTg8BAAAAbgAAAHIAAAAAAAQANS42LjMtbTUtZGVidWctbG9nAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAABI6BZOEzgNAAgAEgAEBAQEEgAAVgAEGggAAAAICAgCAAAAAAVAYI8=';

==20826== Thread 20:
==20826== Invalid read of size 8
==20826==    at 0x5C0C66: mariadb_dbug_id (mysqld.cc:3853)
==20826==    by 0xE53E88: sf_malloc (safemalloc.c:129)
==20826==    by 0xE42FF6: my_malloc (my_malloc.c:100)
==20826==    by 0xE36CA8: my_multi_malloc (mulalloc.c:51)
==20826==    by 0xE4D571: safe_mutex_lazy_init_deadlock_detection (thr_mutex.c:160)
==20826==    by 0xE4DAC1: safe_mutex_lock (thr_mutex.c:320)
==20826==    by 0x5DE7FA: inline_mysql_mutex_lock (mysql_thread.h:672)
==20826==    by 0x5DF42A: handle_slave_init (slave.cc:322)
==20826==    by 0xCCB4A5: pfs_spawn_thread (pfs.cc:1860)
==20826==    by 0x4E37B4F: start_thread (pthread_create.c:304)
==20826==    by 0x697C20C: clone (clone.S:112)
==20826==  Address 0x1565cd10 is 14,848 bytes inside a block of size 21,748 free'd
==20826==    at 0x4C283C4: free (vg_replace_malloc.c:474)
==20826==    by 0xE5441E: free_memory (safemalloc.c:276)
==20826==    by 0xE540E2: sf_free (safemalloc.c:194)
==20826==    by 0xE4345D: my_free (my_malloc.c:216)
==20826==    by 0x5CA645: ilink::operator delete(void*, unsigned long) (sql_list.h:633)
==20826==    by 0x63F780: THD::~THD() (sql_class.cc:1637)
==20826==    by 0x5DF3EF: handle_slave_init (slave.cc:318)
==20826==    by 0xCCB4A5: pfs_spawn_thread (pfs.cc:1860)
==20826==    by 0x4E37B4F: start_thread (pthread_create.c:304)
==20826==    by 0x697C20C: clone (clone.S:112)
==20826== Invalid read of size 8
==20826==    at 0x5C0C66: mariadb_dbug_id (mysqld.cc:3853)
==20826==    by 0xE53E88: sf_malloc (safemalloc.c:129)
==20826==    by 0xE42FF6: my_malloc (my_malloc.c:100)
==20826==    by 0xE1CB33: init_dynamic_array2 (array.c:67)
==20826==    by 0xE2223C: my_hash_init2 (hash.c:97)
==20826==    by 0xE4D639: safe_mutex_lazy_init_deadlock_detection (thr_mutex.c:173)
==20826==    by 0xE4DAC1: safe_mutex_lock (thr_mutex.c:320)
==20826==    by 0x5DE7FA: inline_mysql_mutex_lock (mysql_thread.h:672)
==20826==    by 0x5DF42A: handle_slave_init (slave.cc:322)
==20826==    by 0xCCB4A5: pfs_spawn_thread (pfs.cc:1860)
==20826==    by 0x4E37B4F: start_thread (pthread_create.c:304)
==20826==    by 0x697C20C: clone (clone.S:112)
==20826==  Address 0x1565cd10 is 14,848 bytes inside a block of size 21,748 free'd
==20826==    at 0x4C283C4: free (vg_replace_malloc.c:474)
==20826==    by 0xE5441E: free_memory (safemalloc.c:276)
==20826==    by 0xE540E2: sf_free (safemalloc.c:194)
==20826==    by 0xE4345D: my_free (my_malloc.c:216)
==20826==    by 0x5CA645: ilink::operator delete(void*, unsigned long) (sql_list.h:633)
==20826==    by 0x63F780: THD::~THD() (sql_class.cc:1637)
==20826==    by 0x5DF3EF: handle_slave_init (slave.cc:318)
==20826==    by 0xCCB4A5: pfs_spawn_thread (pfs.cc:1860)
==20826==    by 0x4E37B4F: start_thread (pthread_create.c:304)
==20826==    by 0x697C20C: clone (clone.S:112)

Stack trace from

revision-id: sergii@pisem.net-20141103164737-457hfby1eg82zol9
date: 2014-11-03 17:47:37 +0100
build-date: 2014-11-09 04:11:12 +0400
revno: 4471
branch-nick: 10.0



 Comments   
Comment by Elena Stepanova [ 2019-01-24 ]

Can't reproduce, probably the problem is long gone.

Generated at Thu Feb 08 07:16:36 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.