Comment 16 for bug 1079596

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

1)

The assertion failure in #12 and #13 is the effect and not the cause of the crash.

btr0btr.c:

 new_block = btr_page_alloc(cursor->index, hint_page_no, direction,
       btr_page_get_level(page, mtr), mtr, mtr);
 new_page = buf_block_get_frame(new_block);

btr_page_alloc returns NULL and buf_block_get_frame fails on that assertion.

It falls for this assertion

 ut_ad(block);

Interestingly, PS has non-debug assertions in place there:

 ut_a(srv_pass_corrupt_table || block);

 if (srv_pass_corrupt_table && !block) {
  return(0);
 }

 ut_ad(block);

Now, the reason why that assertion is not getting triggered in MySQL/PS release builds (and instead crashing with signal 11) is because:

=====================================================

#ifdef UNIV_DEBUG
/*********************************************************************//**
Gets a pointer to the memory frame of a block.
@return pointer to the frame */
UNIV_INLINE
buf_frame_t*
buf_block_get_frame(
/*================*/
 const buf_block_t* block) /*!< in: pointer to the control block */
 __attribute__((pure));
#else /* UNIV_DEBUG */
# define buf_block_get_frame(block) (block ? (block)->frame : 0)
#endif /* UNIV_DEBUG */

==============================================================

ie. in non UNIV_DEBUG builds, it is a macro, hence the backtrace just shows only upto btr_page_split_and_insert

2) Regarding 'The table ... is full', fsp_reserve_free_extents used by btr_cur_pessimistic_insert returns that (and not proceed to btr_page_split_and_insert later). fsp_reserve_free_extents is also used by btr_page_alloc. However, fsp_reserve_free_extents doesn't always try to extend the file, it tries to reuse the free extents in the tablespace (and/or reuse free pages for small single tablespaces).
    @Ovais, can you provide the cnf file you used for the MySQL/PS instances mentioned above? (also was it a shared tablespace (spaceid=0) or single tablespace)