[MDEV-22253] best_access_path: Conditional jump or move depends on uninitialised value Created: 2020-04-15  Updated: 2023-11-29  Resolved: 2023-11-29

Status: Closed
Project: MariaDB Server
Component/s: Optimizer, Tests
Affects Version/s: 10.3
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Igor Babaev
Resolution: Won't Fix Votes: 0
Labels: not-10.4, valgrind


 Description   

$ perl ./mtr binlog.binlog_stm_blackhole --valgrind

10.3 9aacda40

binlog.binlog_stm_blackhole 'stmt'       [ fail ]  Found warnings/errors in server log file!
        Test ended at 2020-04-16 00:16:28
line
==20490== Thread 7:
==20490== Conditional jump or move depends on uninitialised value(s)
==20490==    at 0x847746: best_access_path(JOIN*, st_join_table*, unsigned long long, st_position const*, unsigned int, bool, double, st_position*, st_position*) (sql_select.cc:6963)
==20490==    by 0x84CEAA: best_extension_by_limited_search(JOIN*, unsigned long long, unsigned int, double, double, unsigned int, unsigned int, unsigned int) (sql_select.cc:8892)
==20490==    by 0x84AE8E: greedy_search(JOIN*, unsigned long long, unsigned int, unsigned int, unsigned int) (sql_select.cc:8103)
==20490==    by 0x84A17C: choose_plan(JOIN*, unsigned long long) (sql_select.cc:7679)
==20490==    by 0x8428EA: make_join_statistics(JOIN*, List<TABLE_LIST>&, st_dynamic_array*) (sql_select.cc:5147)
==20490==    by 0x837076: JOIN::optimize_inner() (sql_select.cc:1942)
==20490==    by 0x835526: JOIN::optimize() (sql_select.cc:1488)
==20490==    by 0x83F74B: mysql_select(THD*, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) (sql_select.cc:4287)
==20490==    by 0x830CCD: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:370)
==20490==    by 0x7F7B72: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:6293)
==20490==    by 0x7EE498: mysql_execute_command(THD*) (sql_parse.cc:3820)
==20490==    by 0x7FBE6A: mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) (sql_parse.cc:7817)
==20490==    by 0x7E88AD: dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) (sql_parse.cc:1856)
==20490==    by 0x7E71F2: do_command(THD*) (sql_parse.cc:1401)
==20490==    by 0x964B11: do_handle_one_connection(CONNECT*) (sql_connect.cc:1403)
==20490==    by 0x964873: handle_one_connection (sql_connect.cc:1308)
^ Found warnings in /data/bld/10.3-valgrind-nightly/mysql-test/var/log/mysqld.1.err

Not reproducible on 10.2 or 10.4.

There are more tests failing the same way on 10.3, especially in main and mroonga/storage suites, but also elsewhere.



 Comments   
Comment by Marko Mäkelä [ 2020-04-16 ]

igor, elenst, the indicated 10.3 commit has not been merged to 10.4 yet as of now (c1bdf62452139e9310d3234266802748ba4c74b8).
Currently, the latest 10.3 revision that has been merged to 10.4 is b092d35f13ceae37cda26478635b127f9b401e2c. It might be interesting to test that one. If the bug is not repeatable with that, then it ought to be a recent regression in 10.3, and the culprit should be listed by the following:

git log b092d35f13ceae37cda26478635b127f9b401e2c..9aacda409db8606b985a93f675487943846cbc86

Comment by Elena Stepanova [ 2020-04-16 ]

marko, before filing this report I went as far back as 10.3.17, and the failure was still reproducible (didn't go further, so can't say anything about earlier versions). So it's not anything introduced recently.

Comment by Marko Mäkelä [ 2020-04-16 ]

The mentioned commit has now been merged to 10.4 (af912664989e0c3ee9cdb6caf8ec439029e7405c).

Generated at Thu Feb 08 09:13:21 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.