[MDEV-3544] LP:618558 - Assertion data_length < ((block_size) *3 / 4) in write_block_record() at ma_blockrec.c:3483 with --maria-block-size=1K Created: 2010-08-16  Updated: 2015-02-02  Resolved: 2012-10-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Philip Stoev (Inactive) Assignee: Michael Widenius
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug618558.xml     File LPexportBug618558_bug618558-2.test     File LPexportBug618558_bug618558.test     Zip Archive LPexportBug618558_var-bug618558.zip    

 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



 Comments   
Comment by Philip Stoev (Inactive) [ 2010-08-16 ]

Re: Assertion data_length < ((block_size) *3 / 4) in write_block_record() at ma_blockrec.c:3483

Comment by Philip Stoev (Inactive) [ 2010-08-16 ]

core, binary, query log
LPexportBug618558_var-bug618558.zip

Comment by Philip Stoev (Inactive) [ 2010-08-16 ]

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

Comment by Philip Stoev (Inactive) [ 2010-08-16 ]

Unsimplified test case, run with --maria-block-size=1K
LPexportBug618558_bug618558.test

Comment by Philip Stoev (Inactive) [ 2010-08-26 ]

Re: Assertion data_length < ((block_size) *3 / 4) in write_block_record() at ma_blockrec.c:3483 with --maria-block-size=1K
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.

Comment by Philip Stoev (Inactive) [ 2010-10-14 ]

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

revno: 2951
committer: Michael Widenius <monty@askmonty.org>
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.

Comment by Philip Stoev (Inactive) [ 2010-10-14 ]

Re: Assertion data_length < ((block_size) *3 / 4) in write_block_record() at ma_blockrec.c:3483 with --maria-block-size=1K
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.

Comment by Michael Widenius [ 2010-11-02 ]

Re: Assertion data_length < ((block_size) *3 / 4) in write_block_record() at ma_blockrec.c:3483 with --maria-block-size=1K
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.

Comment by Michael Widenius [ 2010-11-16 ]

Re: Assertion data_length < ((block_size) *3 / 4) in write_block_record() at ma_blockrec.c:3483 with --maria-block-size=1K
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.

Comment by Philip Stoev (Inactive) [ 2011-02-28 ]

Re: Assertion data_length < ((block_size) *3 / 4) in write_block_record() at ma_blockrec.c:3483 with --maria-block-size=1K
Another test case for the same bug. Run with -mysqld=-maria-block-size=1K

Comment by Philip Stoev (Inactive) [ 2011-02-28 ]

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

Comment by Michael Widenius [ 2012-03-27 ]

Re: Assertion data_length < ((block_size) *3 / 4) in write_block_record() at ma_blockrec.c:3483 with --maria-block-size=1K
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.

Comment by Rasmus Johansson (Inactive) [ 2012-03-27 ]

Launchpad bug id: 618558

Generated at Thu Feb 08 06:49:24 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.