Assertion data_length < ((block_size) *3 / 4) in write_block_record() at ma_blockrec.c:3483 with --maria-block-size=1K

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

Bug Description

Aria storage engine asserted as follows:

mysqld: ma_blockrec.c:2907: write_block_record: Assertion `data_length < ((block_size) *3 / 4)' failed.

backtrace:

#6 0x000000307b62b945 in __assert_fail (assertion=0xdb07f8 "data_length < ((block_size) *3 / 4)", file=<value optimized out>, line=2907,
    function=<value optimized out>) at assert.c:81
#7 0x00000000009a9f9f in write_block_record (info=0x7ff7e80edc80, old_record=0x0, record=0x7ff7e80e9728 "", row=0x7ff7e80edce0,
    bitmap_blocks=0x7ff7e80edce0, head_block_is_read=0 '\000', row_pos=0x7ff8500cb120, undo_lsn=1, old_record_checksum=0) at ma_blockrec.c:2907
#8 0x00000000009ab861 in allocate_and_write_block_record (info=0x7ff7e80edc80, record=0x7ff7e80e9728 "", row=0x7ff7e80edce0, undo_lsn=1)
    at ma_blockrec.c:3443
#9 0x00000000009ab973 in _ma_write_init_block_record (info=0x7ff7e80edc80, record=0x7ff7e80e9728 "") at ma_blockrec.c:3483
#10 0x00000000009bc689 in maria_write (info=0x7ff7e80edc80, record=0x7ff7e80e9728 "") at ma_write.c:148
#11 0x0000000000971bb4 in ha_maria::write_row (this=0x7ff7e80e80c8, buf=0x7ff7e80e9728 "") at ha_maria.cc:1037
#12 0x00000000007ca7c4 in handler::ha_write_row (this=0x7ff7e80e80c8, buf=0x7ff7e80e9728 "") at handler.cc:4655
#13 0x00000000007288a2 in write_record (thd=0x7ff7e80e80c8, table=0x7ff7e80e9728, info=0x971bb4) at sql_insert.cc:1632
#14 0x000000000072673b in mysql_insert (thd=0x3a67ae0, table_list=0x7ff7e805fb08, fields=..., values_list=..., update_fields=..., update_values=...,
    duplic=DUP_ERROR, ignore=true) at sql_insert.cc:860
#15 0x00000000006886c5 in mysql_execute_command (thd=0x3a67ae0) at sql_parse.cc:3287
#16 0x000000000069103f in mysql_parse (thd=0x3a67ae0,
    inBuf=0x7ff7e802d918 "INSERT /*! IGNORE */ INTO table100_maria_int_autoinc VALUES ('we', 'that\\'s', 'n', 'g', 'hey', 'q', 'v', 'f', 'l', 'had', 'f', 'p', 'ehlcaixarofabyscitcqroigawvngafqnkbustpuuanjhftklreyobmkegfmqgjzoz"..., length=24610, found_semicolon=0x7ff8500ccc80) at sql_parse.cc:6081
#17 0x00000000006832e4 in dispatch_command (command=COM_QUERY, thd=0x3a67ae0,
    packet=0x3a6a781 "INSERT /*! IGNORE */ INTO table100_maria_int_autoinc VALUES ('we', 'that\\'s', 'n', 'g', 'hey', 'q', 'v', 'f', 'l', 'had', 'f', 'p', 'ehlcaixarofabyscitcqroigawvngafqnkbustpuuanjhftklreyobmkegfmqgjzoz"..., packet_length=24611) at sql_parse.cc:1268
#18 0x0000000000682332 in do_command (thd=0x3a67ae0) at sql_parse.cc:894
#19 0x000000000067ee8b in handle_one_connection (arg=0x3a67ae0) at sql_connect.cc:1138
#20 0x000000307ba07761 in start_thread (arg=0x7ff8500cd710) at pthread_create.c:301
#21 0x000000307b6e150d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

bzr version-info:

revision-id: <email address hidden>
date: 2010-08-12 20:55:00 +0300
build-date: 2010-08-16 11:24:11 +0300
revno: 2905
branch-nick: maria-5.1

Revision history for this message
Philip Stoev (pstoev-askmonty) wrote :
Revision history for this message
Philip Stoev (pstoev-askmonty) wrote :
summary: Assertion data_length < ((block_size) *3 / 4) in write_block_record() at
- ma_blockrec.c:3483
+ ma_blockrec.c:3483 with --maria-block-size=1K
Revision history for this message
Philip Stoev (pstoev-askmonty) wrote :

Also observed with block size 4K .RQG command line:

 /home/buildbot/randgen/runall.pl \
 --queries=1M \
 --engine=Maria \
 --mysqld=--log-output=file \
 --reporters=ErrorLog,Backtrace,Recovery,Shutdown \
 --duration=30 \
 --threads=10 \
 --rows=100 \
 --mask-level=0 \
 --mysqld=--maria-repair-threads=2 \
 --mysqld=--loose-maria-group-commit=hard \
 --mysqld=--loose-maria_group_commit_interval=1 \
 --mysqld=--maria-checkpoint-interval=0 \
 --mysqld=--maria-block-size=4K \
 --grammar=conf/engines/varchar.yy \
 --gendata=conf/engines/varchar.zz \
 --mask=58562 \
 --queries=100000000 \
 --basedir=. \
 --seed=time

will crash during the data loading stage.

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

Also observed with:

revno: 2951
committer: Michael Widenius <email address hidden>
branch nick: maria-5.1
timestamp: Wed 2010-10-13 18:15:43 +0300
message:
  Fixes for bugs found by running test case for LP#608369 "Page: 1 Found wrong page type 0' on CHECK TABLE EXTENDED"
  Fixed overflow when using long --debug=xxxxxx line.
  Fixed that "mysqld --disable-debug --debug" works.
  Ensure that MariaDB doesn't start if the Aria engine didn't start and we are using Aria for temporary tables.
  More DBUG_ASSERT() and more info in debug log.

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

Actually the assertion observed with revno 2951 was

mysqld: ma_bitmap.c:1019: allocate_tail: Assertion `size <= ((bitmap->block_size) *3 / 4)' failed.

so I will file a separate bug about it.

Revision history for this message
Michael Widenius (monty) wrote :

Both reported bugs are likely to have been already fixed in MariaDB with my latest push (revnr:2964) . I will however run the given RQG test for some hours to see if I can repeat it.

Changed in maria:
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Michael Widenius (monty) wrote :

Test case found assert/crashing bugs in the log handler and page cache, both fixed in 5.1 tree.
Can't repeat the above or the original issue (Did run the test case for 12 hours), so this bug can be closed.

Changed in maria:
status: In Progress → Fix Committed
Michael Widenius (monty)
Changed in maria:
status: Fix Committed → Fix Released
Revision history for this message
Philip Stoev (pstoev-askmonty) wrote :

Another test case for the same bug. Run with --mysqld=--maria-block-size=1K

Changed in maria:
status: Fix Released → Confirmed
Revision history for this message
Michael Widenius (monty) wrote :

I did run the new test case, but it worked for MariaDB 5.3 without any problems.
I also did run the original test case, without any problems.

One thing that has been fixed since the test cases is that Aria key length has been limited to avoid an overrun bug. This may have affected this test case.

Changed in maria:
status: Confirmed → Fix Released
milestone: 5.1 → 5.3
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.