Details
-
Type:
Bug
-
Status: Closed
-
Resolution: Not a Bug
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:
Description
What I think is the latest MariaDB release (mariadb-5.1.42) gets many valgrind warnings from xtradb while running innodb regression tests.
mysqld was built using:
./configure --enable-thread-safe-client --with-plugins=partition,csv,blackhole,myisam,heap,innobase --with-fast-mutexes --with-extra-charsets=all --with-debug C_EXTRA_FLAGS="-fno-omit-frame-pointer -fno-strict-aliasing -DHAVE_purify -Wall"
The server is centos 5.2, gcc 4.1.2, valgrind-3.2.1, 64-bit x86
These warnings occur for most or all of the tests:
==12503== Conditional jump or move depends on uninitialised value(s)
==12503== at 0x7FDD33: rw_lock_x_lock_func (sync0rw.ic:283)
==12503== by 0x7B1358: log_groups_write_checkpoint_info (log0log.c:1871)
==12503== by 0x7B2B1B: log_checkpoint (log0log.c:2069)
==12503== by 0x7B2CC0: log_fsp_current_free_limit_set_and_checkpoint (log0log.c:194)
==12503== by 0x8656C1: fsp_fill_free_list (fsp0fsp.c:1406)
==12503== by 0x86630E: fsp_header_init (fsp0fsp.c:1008)
==12503== by 0x7FC676: innobase_start_or_create_for_mysql (srv0start.c:1507)
==12503== by 0x79887F: innobase_init(void*) (ha_innodb.cc:2417)
==12503== by 0x69D0BD: ha_initialize_handlerton(st_plugin_int*) (handler.cc:434)
==12503== by 0x731E08: plugin_initialize(st_plugin_int*) (sql_plugin.cc:1014)
==12503== by 0x73501A: plugin_init(int*, char**, int) (sql_plugin.cc:1239)
==12503== by 0x5A1984: init_server_components() (mysqld.cc:4069)
==12503== by 0x5A212E: main (mysqld.cc:4541)
==12503==
==12503== Conditional jump or move depends on uninitialised value(s)
==12503== at 0x7FDE80: rw_lock_x_lock_func (sync0rw.c:569)
==12503== by 0x86D916: fseg_create_general (mtr0mtr.ic:268)
==12503== by 0x86E393: fseg_create (fsp0fsp.c:2380)
==12503== by 0x8196ED: btr_create (btr0btr.c:750)
==12503== by 0x86634E: fsp_header_init (fsp0fsp.c:1009)
==12503== by 0x7FC676: innobase_start_or_create_for_mysql (srv0start.c:1507)
==12503== by 0x79887F: innobase_init(void*) (ha_innodb.cc:2417)
==12503== by 0x69D0BD: ha_initialize_handlerton(st_plugin_int*) (handler.cc:434)
==12503== by 0x731E08: plugin_initialize(st_plugin_int*) (sql_plugin.cc:1014)
==12503== by 0x73501A: plugin_init(int*, char**, int) (sql_plugin.cc:1239)
==12503== by 0x5A1984: init_server_components() (mysqld.cc:4069)
==12503== by 0x5A212E: main (mysqld.cc:4541)
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Re: valgrind warnings for innodb in mariadb-5.1.42
For the sync0rw.ic warning, valgrind claims the warning occurs from ut_a(success)
os_compare_and_swap_thread_id expands to __sync_bool_compare_and_swap
It isn't obvious why this has a warning.
local_thread = lock->writer_thread;
success = os_compare_and_swap_thread_id(
&lock->writer_thread, local_thread, curr_thread);
ut_a(success) <---- warning comes from here
output from the preprocessor of one caller:
static _inline_
void
mtr_x_lock_func(
rw_lock_t* lock,
const char* file,
ulint line,
mtr_t* mtr)
{
;
;
rw_lock_x_lock_func(lock, 0, file, line);
.............
void
rw_lock_x_lock_func(
rw_lock_t* lock,
ulint pass,
const char* file_name,
ulint line)
{
ulint index;
ulint i;
ulint spinning = (0);
;
i = 0;
lock_loop:
if (rw_lock_x_lock_low(lock, pass, file_name, line))
{ rw_x_spin_round_count += i; return; }else {
if (!spinning)
{ spinning = (1); rw_x_spin_wait_count++; }while (i < srv_n_spin_wait_rounds
{ ut_delay(ut_rnd_interval(0, srv_spin_wait_delay)); }&& lock->lock_word <= 0) {
if (srv_spin_wait_delay)
i++;
{ os_thread_yield(); }}
if (i == srv_n_spin_wait_rounds)
else
{ goto lock_loop; }}
rw_x_spin_round_count += i;
if ((0))
{ fprintf(stderr, "Thread %lu spin wait rw-x-lock at %p" " '%s' rnds %lu\n", os_thread_pf(os_thread_get_curr_id()), (void*) lock, lock->lock_name, (ulong) i); }sync_array_reserve_cell(sync_primary_wait_array,
lock,
351,
file_name, line,
&index);
rw_lock_set_waiter_flag(lock);
if (rw_lock_x_lock_low(lock, pass, file_name, line))
{ sync_array_free_cell(sync_primary_wait_array, index); return; }if ((0))
{ fprintf(stderr, "Thread %lu OS wait for rw-x-lock at %p" " '%s'\n", os_thread_pf(os_thread_get_curr_id()), (void*) lock, lock->lock_name); }lock->count_os_wait++;
rw_x_os_wait_count++;
sync_array_wait_event(sync_primary_wait_array, index);
i = 0;
goto lock_loop;
}
......
tatic _inline_
void
rw_lock_set_writer_id_and_recursion_flag(
rw_lock_t* lock,
ulint recursive)
{
os_thread_id_t curr_thread = os_thread_get_curr_id();
os_thread_id_t local_thread;
ulint success;
do {} while(0);
local_thread = lock->writer_thread;
success = __sync_bool_compare_and_swap(&lock->writer_thread, local_thread, curr_thread);
do { if (__builtin_expect(!((ulint)(success)), (0)))
{ ut_dbg_assertion_failed("success", "./include/sync0rw.ic", (ulint) 283); abort(); }do {} while (0); } while (0);
lock->recursive = recursive;
}