Bug #80333 Valgrind: Conditional jump or move in Rewriter::do_refresh
Submitted: 11 Feb 2016 1:32 Modified: 2 Mar 2016 17:51
Reporter: Roel Van de Paar Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S3 (Non-critical)
Version:5.7.10, 5.7.11 OS:Any
Assigned to: CPU Architecture:Any

[11 Feb 2016 1:32] Roel Van de Paar
Description:
==20982== Thread 30:
==20982== Conditional jump or move depends on uninitialised value(s)
==20982==    at 0x33E35960: Rewriter::do_refresh(THD*) (rewriter.cc:139)
==20982==    by 0x33E35C67: refresh_callback (rewriter.cc:188)
==20982==    by 0x16DA28E: parser_service_start_routine (parser_service.cc:182)
==20982==    by 0x184D90F: pfs_spawn_thread (pfs.cc:2192)
==20982==    by 0x4E3CDC4: start_thread (pthread_create.c:308)
==20982==    by 0x6A1621C: clone (clone.S:113)
==20982==
==20982== Conditional jump or move depends on uninitialised value(s)
==20982==    at 0x16E4449: rules_table_service::Cursor::had_serious_read_error() const (rules_table_service.cc:194)
==20982==    by 0x33E35B57: Rewriter::do_refresh(THD*) (rewriter.cc:166)
==20982==    by 0x33E35C67: refresh_callback (rewriter.cc:188)
==20982==    by 0x16DA28E: parser_service_start_routine (parser_service.cc:182)
==20982==    by 0x184D90F: pfs_spawn_thread (pfs.cc:2192)
==20982==    by 0x4E3CDC4: start_thread (pthread_create.c:308)
==20982==    by 0x6A1621C: clone (clone.S:113)

How to repeat:
INSTALL PLUGIN rewriter SONAME 'rewriter.so'; 
and use a Valgrind instrumented build
[11 Feb 2016 2:24] Roel Van de Paar
Another way of reproducing, but same idea. Bug bundle

Attachment: 1455065673_bug_bundle.tar.gz (application/x-gzip, text), 2.20 KiB.

[11 Feb 2016 2:25] Roel Van de Paar
As an alternative way of reproducing, the attached tarball (1455065673_bug_bundle.tar.gz) gives the testcase as an exact match of our system, including some handy utilities

$ vi 1455065673_mybase     # STEP1: Update the base path in this file (usually the only change required!). If you use a non-binary distribution, please update SOURCE_DIR location also
$ ./1455065673_init        # STEP2: Initializes the data dir
$ ./1455065673_start_valgrind   # STEP3: Starts mysqld under Valgrind (make sure to use a Valgrind instrumented build) (note: this can easily take 20-30 seconds or more)
$ ./1455065673_stop        # STEP4: Stop mysqld (and wait for Valgrind to write end-of-Valgrind-run details to the mysqld error log)
$ vi /dev/shm/1455065673/error.log.out  # STEP5: Verify the error log
[11 Feb 2016 8:54] MySQL Verification Team
Hello Roel,

Thank you for the report.

Thanks,
Umesh
[2 Mar 2016 17:51] Paul DuBois
Noted in 5.7.13, 5.8.0 changelogs.

Loading the Rewriter query rewrite plugin when there was no
query_rewrite database resulted in Valgrind warnings.