Skip to content

Commit 406fe77

Browse files
author
Jan Lindström
committed
Add more diagnostic to find out the problem on
innodb_shutdown_for_mysql in ppc64el on test case innodb_fts.innodb_fts_stopword_charset.
1 parent 0fdb17e commit 406fe77

File tree

6 files changed

+84
-4
lines changed

6 files changed

+84
-4
lines changed

storage/innobase/buf/buf0buf.cc

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4408,10 +4408,20 @@ buf_all_freed_instance(
44084408
const buf_block_t* block = buf_chunk_not_freed(chunk);
44094409

44104410
if (UNIV_LIKELY_NULL(block)) {
4411-
fprintf(stderr,
4412-
"Page %lu %lu still fixed or dirty\n",
4411+
fil_space_t* space = fil_space_get(block->page.space);
4412+
ib_logf(IB_LOG_LEVEL_ERROR,
4413+
"Page %lu %lu still fixed or dirty.",
44134414
(ulong) block->page.space,
44144415
(ulong) block->page.offset);
4416+
ib_logf(IB_LOG_LEVEL_ERROR,
4417+
"Page oldest_modification %lu fix_count %d io_fix %d.",
4418+
block->page.oldest_modification,
4419+
block->page.buf_fix_count,
4420+
buf_page_get_io_fix(&block->page));
4421+
ib_logf(IB_LOG_LEVEL_ERROR,
4422+
"Page space_id %lu name %s.",
4423+
(ulong)block->page.space,
4424+
(space && space->name) ? space->name : "NULL");
44154425
ut_error;
44164426
}
44174427
}

storage/innobase/fil/fil0fil.cc

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1299,6 +1299,28 @@ fil_space_free(
12991299
return(TRUE);
13001300
}
13011301

1302+
/*******************************************************************//**
1303+
Returns a pointer to the file_space_t that is in the memory cache
1304+
associated with a space id.
1305+
@return file_space_t pointer, NULL if space not found */
1306+
fil_space_t*
1307+
fil_space_get(
1308+
/*==========*/
1309+
ulint id) /*!< in: space id */
1310+
{
1311+
fil_space_t* space;
1312+
1313+
ut_ad(fil_system);
1314+
1315+
mutex_enter(&fil_system->mutex);
1316+
1317+
space = fil_space_get_by_id(id);
1318+
1319+
mutex_exit(&fil_system->mutex);
1320+
1321+
return (space);
1322+
}
1323+
13021324
/*******************************************************************//**
13031325
Returns a pointer to the file_space_t that is in the memory cache
13041326
associated with a space id. The caller must lock fil_system->mutex.

storage/innobase/include/fil0fil.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,5 +1210,13 @@ fil_user_tablespace_restore_page(
12101210
ulint page_no); /* in: page_no to obtain from double
12111211
write buffer */
12121212

1213+
/*******************************************************************//**
1214+
Returns a pointer to the file_space_t that is in the memory cache
1215+
associated with a space id.
1216+
@return file_space_t pointer, NULL if space not found */
1217+
fil_space_t*
1218+
fil_space_get(
1219+
/*==========*/
1220+
ulint id); /*!< in: space id */
12131221
#endif /* !UNIV_INNOCHECKSUM */
12141222
#endif /* fil0fil_h */

storage/xtradb/buf/buf0buf.cc

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4694,10 +4694,20 @@ buf_all_freed_instance(
46944694
mutex_exit(&buf_pool->LRU_list_mutex);
46954695

46964696
if (UNIV_LIKELY_NULL(block)) {
4697-
fprintf(stderr,
4698-
"Page %lu %lu still fixed or dirty\n",
4697+
fil_space_t* space = fil_space_get(block->page.space);
4698+
ib_logf(IB_LOG_LEVEL_ERROR,
4699+
"Page %lu %lu still fixed or dirty.",
46994700
(ulong) block->page.space,
47004701
(ulong) block->page.offset);
4702+
ib_logf(IB_LOG_LEVEL_ERROR,
4703+
"Page oldest_modification %lu fix_count %d io_fix %d.",
4704+
block->page.oldest_modification,
4705+
block->page.buf_fix_count,
4706+
buf_page_get_io_fix(&block->page));
4707+
ib_logf(IB_LOG_LEVEL_ERROR,
4708+
"Page space_id %lu name %s.",
4709+
(ulong)block->page.space,
4710+
(space && space->name) ? space->name : "NULL");
47014711
ut_error;
47024712
}
47034713
}

storage/xtradb/fil/fil0fil.cc

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1342,6 +1342,28 @@ fil_space_free(
13421342
return(TRUE);
13431343
}
13441344

1345+
/*******************************************************************//**
1346+
Returns a pointer to the file_space_t that is in the memory cache
1347+
associated with a space id.
1348+
@return file_space_t pointer, NULL if space not found */
1349+
fil_space_t*
1350+
fil_space_get(
1351+
/*==========*/
1352+
ulint id) /*!< in: space id */
1353+
{
1354+
fil_space_t* space;
1355+
1356+
ut_ad(fil_system);
1357+
1358+
mutex_enter(&fil_system->mutex);
1359+
1360+
space = fil_space_get_by_id(id);
1361+
1362+
mutex_exit(&fil_system->mutex);
1363+
1364+
return (space);
1365+
}
1366+
13451367
/*******************************************************************//**
13461368
Returns a pointer to the file_space_t that is in the memory cache
13471369
associated with a space id. The caller must lock fil_system->mutex.

storage/xtradb/include/fil0fil.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,6 +1210,14 @@ fil_user_tablespace_restore_page(
12101210
ulint page_no); /* in: page_no to obtain from double
12111211
write buffer */
12121212

1213+
/*******************************************************************//**
1214+
Returns a pointer to the file_space_t that is in the memory cache
1215+
associated with a space id.
1216+
@return file_space_t pointer, NULL if space not found */
1217+
fil_space_t*
1218+
fil_space_get(
1219+
/*==========*/
1220+
ulint id); /*!< in: space id */
12131221
#endif /* !UNIV_INNOCHECKSUM */
12141222

12151223
/*************************************************************************

0 commit comments

Comments
 (0)