[MDEV-12900] spider tests failed in buildbot with valgrind Created: 2017-05-24  Updated: 2020-08-25  Resolved: 2018-05-22

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - Spider, Tests
Affects Version/s: 10.1
Fix Version/s: 10.1.34, 10.2.16, 10.3.7

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Jacob Mathew (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
is duplicated by MDEV-15936 Crashes with varying stack trace on W... Closed
Relates
relates to MDEV-7914 spider/bg.ha, spider/bg.ha_part crash... Closed
relates to MDEV-15936 Crashes with varying stack trace on W... Closed
relates to MDEV-16348 the suddenly crashing in MariaDB10.1.29 Closed

 Description   

http://buildbot.askmonty.org/buildbot/builders/work-amd64-valgrind/builds/10052/steps/test/logs/stdio

spider.spider_fixes_part                 w2 [ fail ]  Found warnings/errors in server log file!
        Test ended at 2017-05-14 13:23:23
line
==15440== Thread 25:
==15440== Invalid read of size 8
==15440==    at 0x5E0BC6: thd_increment_bytes_sent (sql_class.cc:4054)
==15440==    by 0x55B5E6: net_real_write (net_serv.cc:710)
==15440==    by 0x55AAE3: net_flush (net_serv.cc:363)
==15440==    by 0x55AEFE: net_write_command (net_serv.cc:501)
==15440==    by 0x82A82E: cli_advanced_command (client.c:701)
==15440==    by 0x831950: mysql_close_slow_part (client.c:3949)
==15440==    by 0x8319C5: mysql_close (client.c:3961)
==15440==    by 0x1375115F: spider_db_mysql::disconnect() (spd_db_mysql.cc:1644)
==15440==    by 0x136A798D: spider_db_disconnect(st_spider_conn*) (spd_db_conn.cc:275)
==15440==    by 0x136C96AE: spider_free_conn_alloc(st_spider_conn*) (spd_conn.cc:156)
==15440==    by 0x136CB6D0: spider_free_conn(st_spider_conn*) (spd_conn.cc:1112)
==15440==    by 0x136C9B7E: spider_free_conn_from_trx(st_spider_transaction*, st_spider_conn*, bool, bool, int*) (spd_conn.cc:268)
==15440==  Address 0x13b6e6e0 is 4,352 bytes inside a block of size 21,912 free'd
==15440==    at 0x4C291ED: free (vg_replace_malloc.c:530)
==15440==    by 0xF18DB2: my_free (my_malloc.c:217)
==15440==    by 0x558D63: ilink::operator delete(void*, unsigned long) (sql_list.h:638)
==15440==    by 0x5DA2D2: THD::~THD() (sql_class.cc:1707)
==15440==    by 0x136D131F: spider_bg_sts_action(void*) (spd_conn.cc:2893)
==15440==    by 0x4E3C0DA: start_thread (in /lib64/libpthread-2.18.so)
==15440==    by 0x6B28E3C: clone (in /lib64/libc-2.18.so)
==15440==  Block was alloc'd at
==15440==    at 0x4C280F3: malloc (vg_replace_malloc.c:299)
==15440==    by 0xF188C6: my_malloc (my_malloc.c:101)
==15440==    by 0x136A631A: ilink::operator new(unsigned long) (sql_list.h:634)
==15440==    by 0x136D0B5C: spider_bg_sts_action(void*) (spd_conn.cc:2773)
==15440==    by 0x4E3C0DA: start_thread (in /lib64/libpthread-2.18.so)
==15440==    by 0x6B28E3C: clone (in /lib64/libc-2.18.so)
==15440== Invalid write of size 8
==15440==    at 0x5E0BD8: thd_increment_bytes_sent (sql_class.cc:4054)
==15440==    by 0x55B5E6: net_real_write (net_serv.cc:710)
==15440==    by 0x55AAE3: net_flush (net_serv.cc:363)
==15440==    by 0x55AEFE: net_write_command (net_serv.cc:501)
==15440==    by 0x82A82E: cli_advanced_command (client.c:701)
==15440==    by 0x831950: mysql_close_slow_part (client.c:3949)
==15440==    by 0x8319C5: mysql_close (client.c:3961)
==15440==    by 0x1375115F: spider_db_mysql::disconnect() (spd_db_mysql.cc:1644)
==15440==    by 0x136A798D: spider_db_disconnect(st_spider_conn*) (spd_db_conn.cc:275)
==15440==    by 0x136C96AE: spider_free_conn_alloc(st_spider_conn*) (spd_conn.cc:156)
==15440==    by 0x136CB6D0: spider_free_conn(st_spider_conn*) (spd_conn.cc:1112)
==15440==    by 0x136C9B7E: spider_free_conn_from_trx(st_spider_transaction*, st_spider_conn*, bool, bool, int*) (spd_conn.cc:268)
==15440==  Address 0x13b6e6e0 is 4,352 bytes inside a block of size 21,912 free'd
==15440==    at 0x4C291ED: free (vg_replace_malloc.c:530)
==15440==    by 0xF18DB2: my_free (my_malloc.c:217)
==15440==    by 0x558D63: ilink::operator delete(void*, unsigned long) (sql_list.h:638)
==15440==    by 0x5DA2D2: THD::~THD() (sql_class.cc:1707)
==15440==    by 0x136D131F: spider_bg_sts_action(void*) (spd_conn.cc:2893)
==15440==    by 0x4E3C0DA: start_thread (in /lib64/libpthread-2.18.so)
==15440==    by 0x6B28E3C: clone (in /lib64/libc-2.18.so)
==15440==  Block was alloc'd at
==15440==    at 0x4C280F3: malloc (vg_replace_malloc.c:299)
==15440==    by 0xF188C6: my_malloc (my_malloc.c:101)
==15440==    by 0x136A631A: ilink::operator new(unsigned long) (sql_list.h:634)
==15440==    by 0x136D0B5C: spider_bg_sts_action(void*) (spd_conn.cc:2773)
==15440==    by 0x4E3C0DA: start_thread (in /lib64/libpthread-2.18.so)
==15440==    by 0x6B28E3C: clone (in /lib64/libc-2.18.so)

spider.spider_fixes, spider.spider_fixes_part, spider/bg.function, spider/bg.spider_fixes, spider/bg.basic_sql



 Comments   
Comment by Jacob Mathew (Inactive) [ 2018-05-18 ]

Kentoku, please review my fix for this problem in commit 903e111 on my branch.

Comment by Kentoku Shiba (Inactive) [ 2018-05-21 ]

Please remove spider_global_trx and spider_global_trx_mutex.

Comment by Jacob Mathew (Inactive) [ 2018-05-22 ]

As per the review comments, I have also removed spider_global_trx, spider_global_trx_mutex and spd_key_mutex_global_trx.

Fix is pushed to 10.3, 10.2 and 10.1.

Generated at Thu Feb 08 08:01:22 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.