Valgrind warnings in maria-5.3-mwl34

Bug #778917 reported by Philip Stoev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Fix Released
Critical
Michael Widenius

Bug Description

A simple RQG test produced the misc valgrind warnings from the attached file. Most seem to be related to handling malformed datetimes, however note that there are 2 warnings about innodb and myisam using an undefined value for some internal operations.

Let me know if individual test cases are required -- I can provide the RQG grammar and/or MTR.

Revision history for this message
Philip Stoev (pstoev-askmonty) wrote :

valgrind warnings

Changed in maria:
milestone: none → 5.3
assignee: nobody → Michael Widenius (monty)
Michael Widenius (monty)
Changed in maria:
status: New → In Progress
Revision history for this message
Michael Widenius (monty) wrote :

I looked at the valgrind result, but unfortunately without the test cases that caused the failures there is not much I can do.
So please provide the RQG and MTR grammar so that I can test this myself.

I think that I manged to fix a couple of the valgrind errors as part of other bug fixes, but looking at the log there are some left that would be nice to get rid off.

Changed in maria:
importance: Undecided → Medium
status: In Progress → Incomplete
Revision history for this message
Philip Stoev (pstoev-askmonty) wrote :
Download full text (5.0 KiB)

Unsimplified test case. When run without valgrind, causes the following crash as well:

# 2011-05-11T13:15:59 Error: Memory allocated at string.c:39 was overrun, discovered at 'string.c:84'
# 2011-05-11T13:15:59 Error: Memory allocated at string.c:39 was overrun, discovered at 'string.c:84'
# 2011-05-11T13:15:59 Error: Memory allocated at string.c:39 was overrun, discovered at 'string.c:84'

# 2011-05-11T13:15:59 #0 0x00857424 in __kernel_vsyscall ()
# 2011-05-11T13:15:59 #0 0x00857424 in __kernel_vsyscall ()
# 2011-05-11T13:15:59 #1 0x008263c3 in pthread_kill () from /lib/libpthread.so.0
# 2011-05-11T13:15:59 #2 0x0878175c in my_write_core (sig=11) at stacktrace.c:426
# 2011-05-11T13:15:59 #3 0x0828ebf4 in handle_segfault (sig=11) at mysqld.cc:2776
# 2011-05-11T13:15:59 #4 <signal handler called>
# 2011-05-11T13:15:59 #5 0x006cfc91 in vfprintf () from /lib/libc.so.6
# 2011-05-11T13:15:59 #6 0x006d1572 in buffered_vfprintf () from /lib/libc.so.6
# 2011-05-11T13:15:59 #7 0x006cc5a3 in vfprintf () from /lib/libc.so.6
# 2011-05-11T13:15:59 #8 0x006d6b9f in fprintf () from /lib/libc.so.6
# 2011-05-11T13:15:59 #9 0x087658b7 in _checkchunk (irem=0xae585be8, filename=0x89746ff "string.c", lineno=84) at safemalloc.c:492
# 2011-05-11T13:15:59 #10 0x08765aa2 in _sanity (filename=0x89746ff "string.c", lineno=84) at safemalloc.c:535
# 2011-05-11T13:15:59 #11 0x087650b9 in _myfree (ptr=0xae5859b0, filename=0x89746ff "string.c", lineno=84, myflags=0) at safemalloc.c:280
# 2011-05-11T13:15:59 #12 0x08764fc8 in _myrealloc (ptr=0xae5859b0, size=353, filename=0x89746ff "string.c", lineno=84, MyFlags=16) at safemalloc.c:258
# 2011-05-11T13:15:59 #13 0x0877326f in dynstr_realloc (str=0xae89ec98, additional_size=10) at string.c:84
# 2011-05-11T13:15:59 #14 0x0875b9ee in dynamic_column_var_uint_store (str=0xae89ec98, val=8) at ma_dyncol.c:132
# 2011-05-11T13:15:59 #15 0x0875bfb5 in dynamic_column_string_store (str=0xae89ec98, string=0xae5079d4, charset=0x8ab5360) at ma_dyncol.c:409
# 2011-05-11T13:15:59 #16 0x0875ca3a in data_store (str=0xae89ec98, value=0xae5079d0) at ma_dyncol.c:816
# 2011-05-11T13:15:59 #17 0x0875ebc8 in dynamic_column_update_many (str=0xae89ed84, add_column_count=1, column_numbers=0xae507a10, values=0xae5079d0) at ma_dyncol.c:2010
# 2011-05-11T13:15:59 #18 0x082211b4 in Item_func_dyncol_add::val_str (this=0xae5075c8, str=0xae89ef30) at item_strfunc.cc:3745
# 2011-05-11T13:15:59 #19 0x082213d2 in Item_dyncol_get::get_dyn_value (this=0xae5076d8, val=0xae89eec4, tmp=0xae89ef30) at item_strfunc.cc:3808
# 2011-05-11T13:15:59 #20 0x082217fc in Item_dyncol_get::val_int (this=0xae5076d8) at item_strfunc.cc:3915
# 2011-05-11T13:15:59 #21 0x081eed11 in Item_func_signed::val_int (this=0xae507758) at item_func.cc:996
# 2011-05-11T13:15:59 #22 0x081daeb6 in Item::update_null_value (this=0xae507758) at item.h:909
# 2011-05-11T13:15:59 #23 0x081ff268 in Item_func::is_null (this=0xae507758) at item_func.h:159
# 2011-05-11T13:15:59 #24 0x0820f35c in Item_func_isnull::val_int (this=0xae5077d8) at item_cmpfunc.cc:4748
# 2011-05-11T13:15:59 #25 0x0832f44a in evaluate_join_record (join=0xae547d98, join_tab=0xae507d60, error=0) at sql_select.cc:14061
# 2...

Read more...

Changed in maria:
status: Incomplete → Confirmed
importance: Medium → Critical
Revision history for this message
Michael Widenius (monty) wrote :

The problem was using a wrong (too short) strong to column_add().
I have now added a check to detect this + a test case.

Michael Widenius (monty)
Changed in maria:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.