[MDEV-7921] main.sp_sync fails in buildbot with valgrind Created: 2015-04-06  Updated: 2015-05-28  Resolved: 2015-05-20

Status: Closed
Project: MariaDB Server
Component/s: Data Definition - Procedure, Tests
Affects Version/s: 10.1
Fix Version/s: 10.1.5

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


 Description   

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

main.sp_sync                             w6 [ fail ]  Found warnings/errors in server log file!
        Test ended at 2015-04-04 07:55:31
line
==32018== Thread 6:
==32018== Conditional jump or move depends on uninitialised value(s)
==32018==    at 0x5EB69E: lex_end(LEX*) (sql_lex.cc:550)
==32018==    by 0x92AAB9: db_load_routine(THD*, stored_procedure_type, sp_name*, sp_head**, unsigned long long, char const*, char const*, char const*, st_sp_chistics&, st_mysql_lex_string*, st_mysql_lex_string*, long long, long long, Stored_program_creation_ctx*) (sp.cc:911)
==32018==    by 0x92B1D3: db_find_routine(THD*, stored_procedure_type, sp_name*, sp_head**) (sp.cc:665)
==32018==    by 0x92B36C: sp_cache_routine(THD*, stored_procedure_type, sp_name*, bool, sp_head**) (sp.cc:2122)
==32018==    by 0x92B506: sp_cache_routine(THD*, Sroutine_hash_entry*, bool, sp_head**) (sp.cc:2075)
==32018==    by 0x59E019: open_and_process_routine(THD*, Query_tables_list*, Sroutine_hash_entry*, Prelocking_strategy*, bool, Open_table_context*, bool*, bool*) (sql_base.cc:3725)
==32018==    by 0x5A9C3C: open_tables(THD*, DDL_options_st const&, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*) (sql_base.cc:4565)
==32018==    by 0x5ABC93: open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) (sql_base.cc:5150)
==32018==    by 0x608A26: open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int) (sql_base.h:526)
==32018==    by 0x5FF2F6: mysql_execute_command(THD*) (sql_parse.cc:5122)
==32018==    by 0x603E69: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:7165)
==32018==    by 0x607091: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1462)
==32018==    by 0x60761A: do_command(THD*) (sql_parse.cc:1090)
==32018==    by 0x6FAF1B: do_handle_one_connection(THD*) (sql_connect.cc:1347)
==32018==    by 0x6FB0C4: handle_one_connection (sql_connect.cc:1258)
==32018==    by 0x9C7E86: pfs_spawn_thread (pfs.cc:1860)
^ Found warnings in /dev/shm/var_auto_Axsl/6/log/mysqld.1.err
ok



 Comments   
Comment by Oleksandr Byelkin [ 2015-05-19 ]

Above is fixed, I am investigating now this one:

==32517== 592 bytes in 1 blocks are possibly lost in loss record 1 of 1
==32517== at 0x4C2DC90: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==32517== by 0x40134B4: allocate_dtv (dl-tls.c:322)
==32517== by 0x40134B4: _dl_allocate_tls (dl-tls.c:544)
==32517== by 0x54970D2: allocate_stack (allocatestack.c:588)
==32517== by 0x54970D2: pthread_create@@GLIBC_2.2.5 (pthread_create.c:537)
==32517== by 0xF04AD2: spawn_thread_v1 (pfs.cc:1910)
==32517== by 0xD8AA1E: inline_mysql_thread_create (mysql_thread.h:1255)
==32517== by 0xD8B28B: ma_checkpoint_init (ma_checkpoint.c:337)
==32517== by 0xD60FC4: ha_maria_init(void*) (ha_maria.cc:3594)
==32517== by 0x8A9E10: ha_initialize_handlerton(st_plugin_int*) (handler.cc:512)
==32517== by 0x67EBEB: plugin_initialize(st_mem_root*, st_plugin_int*, int*, char**, bool) (sql_plugin.cc:1403)
==32517== by 0x67F785: plugin_init(int*, char**, int) (sql_plugin.cc:1676)
==32517== by 0x597A0F: init_server_components() (mysqld.cc:5041)
==32517== by 0x598B62: mysqld_main(int, char**) (mysqld.cc:5631)
==32517== by 0x58E1F5: main (main.cc:25)

Comment by Oleksandr Byelkin [ 2015-05-19 ]

above problem looks like system related, if it appear on buildbot then it should be different bug.

Comment by Oleksandr Byelkin [ 2015-05-19 ]

revision-id: 6b62f14c01e6faded80a3f497e639a78a302fc26
parent(s): 476dfb16034f1af4c99e683fd612eec16ab1661a
committer: Oleksandr Byelkin
branch nick: server
timestamp: 2015-05-18 17:34:50 +0200
message:

MDEV-7921: main.sp_sync fails in buildbot with valgrind

Part 1: first 2 cases of valgrind complain. context_analysis_only can be used on non-started LEX (opening tables)

obviouse fixes in DBUG and is_lex_started assignment.

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