mysqld: ma_blockrec.c:2998: write_block_record: Assertion `cur_block[1].page_count == 0' failed with aria-block-size=2K

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

Bug Description

When loading a table with large indexes and field sizes under maria-block-size=2K, the server asserted as follows:

mysqld: ma_blockrec.c:2998: write_block_record: Assertion `cur_block[1].page_count == 0' failed.

#8 0x006b0d98 in __assert_fail () from /lib/libc.so.6
#9 0x084f2cd6 in write_block_record (info=0x915b6800, old_record=0x0,
    record=0x915a6740 "\360\034\003rialgqmkmdcesfgqjgotgothcjkwsudrpknsxjxjxccvjwarmwlaaskwluooxhijnihuxhfmvzqnkplnldmpawbzosnvunqqpushgphfkedcxyiiinlgnrosdekjylyjrrfnbwcvviybutqoyrqiuvfrrgupmlvqndhksyzbvoklpmukeznigcurcbiwvjopjtmjq"..., row=0x915b684c, bitmap_blocks=0x915b684c, head_block_is_read=0 '\000',
    row_pos=0xa74b6410, undo_lsn=1, old_record_checksum=0) at ma_blockrec.c:2998
#10 0x084f416f in allocate_and_write_block_record (info=0x915b6800,
    record=0x915a6740 "\360\034\003rialgqmkmdcesfgqjgotgothcjkwsudrpknsxjxjxccvjwarmwlaaskwluooxhijnihuxhfmvzqnkplnldmpawbzosnvunqqpushgphfkedcxyiiinlgnrosdekjylyjrrfnbwcvviybutqoyrqiuvfrrgupmlvqndhksyzbvoklpmukeznigcurcbiwvjopjtmjq"..., row=0x915b684c, undo_lsn=1) at ma_blockrec.c:3515
#11 0x084f42b3 in _ma_write_init_block_record (info=0x915b6800,
    record=0x915a6740 "\360\034\003rialgqmkmdcesfgqjgotgothcjkwsudrpknsxjxjxccvjwarmwlaaskwluooxhijnihuxhfmvzqnkplnldmpawbzosnvunqqpushgphfkedcxyiiinlgnrosdekjylyjrrfnbwcvviybutqoyrqiuvfrrgupmlvqndhksyzbvoklpmukeznigcurcbiwvjopjtmjq"...) at ma_blockrec.c:3555
#12 0x0851a6e4 in maria_write (info=0x915b6800,
    record=0x915a6740 "\360\034\003rialgqmkmdcesfgqjgotgothcjkwsudrpknsxjxjxccvjwarmwlaaskwluooxhijnihuxhfmvzqnkplnldmpawbzosnvunqqpushgphfkedcxyiiinlgnrosdekjylyjrrfnbwcvviybutqoyrqiuvfrrgupmlvqndhksyzbvoklpmukeznigcurcbiwvjopjtmjq"...) at ma_write.c:146
#13 0x084ddaf9 in ha_maria::write_row (this=0xa73da168,
    buf=0x915a6740 "\360\034\003rialgqmkmdcesfgqjgotgothcjkwsudrpknsxjxjxccvjwarmwlaaskwluooxhijnihuxhfmvzqnkplnldmpawbzosnvunqqpushgphfkedcxyiiinlgnrosdekjylyjrrfnbwcvviybutqoyrqiuvfrrgupmlvqndhksyzbvoklpmukeznigcurcbiwvjopjtmjq"...) at ha_maria.cc:1040
#14 0x08396556 in handler::ha_write_row (this=0xa73da168,
    buf=0x915a6740 "\360\034\003rialgqmkmdcesfgqjgotgothcjkwsudrpknsxjxjxccvjwarmwlaaskwluooxhijnihuxhfmvzqnkplnldmpawbzosnvunqqpushgphfkedcxyiiinlgnrosdekjylyjrrfnbwcvviybutqoyrqiuvfrrgupmlvqndhksyzbvoklpmukeznigcurcbiwvjopjtmjq"...) at handler.cc:4708
#15 0x0830c2f0 in write_record (thd=0xaa41c50, table=0xa7397da0, info=0xa74b6758) at sql_insert.cc:1630
#16 0x0830a5ae in mysql_insert (thd=0xaa41c50, table_list=0xa7372d70, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR,
    ignore=true) at sql_insert.cc:860
#17 0x0827e5f7 in mysql_execute_command (thd=0xaa41c50) at sql_parse.cc:3275
#18 0x08287074 in mysql_parse (thd=0xaa41c50,
    rawbuf=0x91533ac8 "INSERT /*! IGNORE */ INTO table1000_maria_varchar_378_not_null VALUES ('sudrpknsxjxjxccvjwarmwlaaskwluooxhijnihuxhfmvzqnkplnldmpawbzosnvunqqpushgphfkedcxyiiinlgnrosdekjylyjrrfnbwcvviybutqoyrqiuvfrrgu"..., length=137415, found_semicolon=0xa74b721c) at sql_parse.cc:6156
#19 0x082797b3 in dispatch_command (command=COM_QUERY, thd=0xaa41c50,
    packet=0x91511a91 "INSERT /*! IGNORE */ INTO table1000_maria_varchar_378_not_null VALUES ('sudrpknsxjxjxccvjwarmwlaaskwluooxhijnihuxhfmvzqnkplnldmpawbzosnvunqqpushgphfkedcxyiiinlgnrosdekjylyjrrfnbwcvviybutqoyrqiuvfrrgu"..., packet_length=137416) at sql_parse.cc:1273
#20 0x08278a22 in do_command (thd=0xaa41c50) at sql_parse.cc:899
#21 0x08275b31 in handle_one_connection (arg=0xaa41c50) at sql_connect.cc:1138
#22 0x00821919 in start_thread () from /lib/libpthread.so.0
#23 0x0076acce in clone () from /lib/libc.so.6

Related branches

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

Unsimplified test case . Please run with --maria-block-size=2K

Changed in maria:
milestone: none → 5.1
assignee: nobody → Michael Widenius (monty)
Revision history for this message
Michael Widenius (monty) wrote :

I have tested this with MariaDB 5.1 and 5.2 and both worked for me.

Changed in maria:
status: New → Incomplete
Revision history for this message
Philip Stoev (pstoev-askmonty) wrote :

The test case from this bug is still reproducible, but now with maria_block_size=1K

 perl mysql-test-run.pl --record --no-check-testcases t/bug726374.test --mysqld=--maria_block_size=1K

 bzr version-info
revision-id: <email address hidden>
date: 2011-07-21 15:21:22 +0300
build-date: 2011-07-23 13:14:58 +0300
revno: 3004
branch-nick: maria-5.2

Changed in maria:
status: Incomplete → Confirmed
Revision history for this message
Philip Stoev (pstoev-askmonty) wrote :

See also bug 815022

Michael Widenius (monty)
Changed in maria:
importance: Undecided → High
milestone: 5.1 → 5.2
Revision history for this message
Michael Widenius (monty) wrote :

Fixed in 5.2 (the fix for bug 815022 also fixed this issue)

Changed in maria:
status: Confirmed → Fix Committed
Michael Widenius (monty)
Changed in maria:
status: Fix Committed → 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.