Bug #59876 | Valgrind warning in i_s_innodb_set_page_type() | ||
---|---|---|---|
Submitted: | 1 Feb 2011 18:08 | Modified: | 10 Feb 2011 19:55 |
Reporter: | Vasil Dimov | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S3 (Non-critical) |
Version: | trunk | OS: | Any |
Assigned to: | Jimmy Yang | CPU Architecture: | Any |
[1 Feb 2011 18:08]
Vasil Dimov
[2 Feb 2011 3:45]
Jimmy Yang
Looks like a bogus warning. Since we call "page_type = fil_page_get_type(frame)" to initialize page_type before passing to i_s_innodb_set_page_type(). However, to eliminate this bogus warning, we can add one additiona initialize "page_type = I_S_PAGE_TYPE_UNKNOWN", this makes all related valgrind warning disappear.
[2 Feb 2011 3:52]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/130164 3475 Jimmy Yang 2011-02-01 Fix Bug #59876 Valgrind warning in i_s_innodb_set_page_type()
[2 Feb 2011 6:57]
Marko Mäkelä
This seems to indicate a real bug. This block in the function i_s_innodb_buffer_page_get_info() is bogus, because it is reading blocks that are not allocated for file pages: } else if (page_info->page_state == BUF_BLOCK_MEMORY) { const byte* frame; const buf_block_t*block; ulint page_type; block = reinterpret_cast<const buf_block_t*>(bpage); frame = block->frame; page_type = fil_page_get_type(frame); i_s_innodb_set_page_type(page_info, page_type, frame); There are many uses of BUF_BLOCK_MEMORY blocks. Only one of them is buf0buddy.c, which uses the UNIV_PAGE_SIZE blocks as backing store. If the beginning of a UNIV_PAGE_SIZE block happened to be allocated for a compressed page frame by buf0buddy.c, this would be correct. In all other cases, this is entirely bogus. For accessing information about the compressed blocks in the buffer pool, there is i_s_innodb_fill_buffer_lru().
[2 Feb 2011 7:20]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/130171 3475 Jimmy Yang 2011-02-01 Fix Bug #59876 Valgrind warning in i_s_innodb_set_page_type()
[2 Feb 2011 7:24]
Jimmy Yang
Marko's point is that we should not look into the block frame if page state is BUF_BLOCK_MEMORY, as it could contain junk. The original idea for this block is to check some compressed page such as compress BLOB. The suggstion is that for compressed page info, user would look into "innodb_buf_page_lru" table.
[2 Feb 2011 7:30]
Marko Mäkelä
OK to push the removal of the else if () block, as in http://lists.mysql.com/commits/130171. The extra initialization of page_type is unnecessary and should not have any effect on Valgrind warnings.
[2 Feb 2011 7:31]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/130175 3475 Jimmy Yang 2011-02-01 Fix Bug #59876 Valgrind warning in i_s_innodb_set_page_type()
[8 Feb 2011 17:37]
Bugs System
Pushed into mysql-trunk 5.6.2 (revid:vasil.dimov@oracle.com-20110208173442-ocy58fdcuew3xvex) (version source revid:vasil.dimov@oracle.com-20110208173331-fu0j2s14jbg915zu) (merge vers: 5.6.2) (pib:24)