Second valgrind warning /crash in hp_process_field_data_to_chunkset with an out-of-memory situation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
percona-projects-qa |
New
|
Low
|
Alexey Kopytov |
Bug Description
When executing a RQG stress test under valgrind, memory consumption grew suddenly (most likely due to trying to insert too ma ny 2MB blobs in a table) and the following was produced in the server error log file:
110531 17:12:08 [ERROR] /home/philips/
==16380== Thread 19:
==16380== Invalid write of size 1
==16380== at 0x4007634: memcpy (mc_replace_
==16380== by 0x8617123: hp_process_
==16380== by 0x861733D: hp_process_
==16380== by 0x86173C4: hp_copy_
==16380== by 0x8618172: heap_update (hp_update.c:66)
==16380== by 0x860FEB8: ha_heap:
==16380== by 0x835A24A: handler:
==16380== by 0x8293F8F: mysql_update(THD*, TABLE_LIST*, List<Item>&, List<Item>&, Item*, unsigned int, st_order*, unsigned long long, enum_duplicates, bool
, unsigned long long*, unsigned long long*) (sql_update.cc:713)
==16380== by 0x8204368: mysql_execute_
==16380== by 0x820C025: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:5503)
==16380== by 0x82006ED: dispatch_
==16380== by 0x81FFBDB: do_command(THD*) (sql_parse.cc:771)
==16380== by 0x82D03B8: do_handle_
==16380== by 0x82D007B: handle_
==16380== by 0x821918: start_thread (in /lib/libpthread
==16380== by 0x76ACCD: clone (in /lib/libc-
==16380== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==16380==
I interpret this to mean that a certain memory operation could not be completed, returned 0 and this 0 was subsequently used by the heap storage engine. A cursory code inspection showed that most of the return value of most memory management calls is checked, but not for all.
I can provide a test case for this bug, however a code inspection may be the best way to fix this situation.
The core and the binary are available if needed both locally and remotely -- compressed size is 2gb.
Related branches
description: | updated |
description: | updated |
Changed in percona-projects-qa: | |
milestone: | none → 5.5.13-eb |
mysql bzr version-info
revision-id: <email address hidden>
date: 2011-05-31 11:33:25 +0300
build-date: 2011-05-31 21:44:55 +0300
revno: 3483
branch-nick: mysql-55-eb
RQG bzr version-info
revision-id: <email address hidden>
date: 2011-05-31 14:18:45 +0200
build-date: 2011-05-31 21:45:08 +0300
revno: 809
branch-nick: randgen-heap
RQG command line:
perl runall.pl --queries=100000000 --validator=None --queries=100M --mysqld= --log-output= file --seed=time --mysqld= --max_heap_ table_size= 3Gb --threads=2 --grammar= conf/engines/ heap/heap_ ddl_multi. yy --basedir1= /home/philips/ bzr/mysql- 55-eb --valgrind --duration=21600