<?xml version="1.0" encoding="utf-8"?>
<launchpad-bug id="635559">
  <date_last_updated>2011-07-18 06:07:47.810371+00:00</date_last_updated>
  <api_links>
    <bug_api_link>https://api.launchpad.net/1.0/bugs/635559</bug_api_link>
    <bug_owner_link>https://api.launchpad.net/1.0/~pstoev-askmonty</bug_owner_link>
    <milestone_link>https://api.launchpad.net/1.0/maria/+milestone/5.1</milestone_link>
    <linked_branches_collection_link>https://api.launchpad.net/1.0/bugs/635559/linked_branches</linked_branches_collection_link>
    <activity_link>https://api.launchpad.net/1.0/bugs/635559/activity</activity_link>
  </api_links>
  <bug_web_link>https://bugs.launchpad.net/bugs/635559</bug_web_link>
  <owner>Philip Stoev</owner>
  <assignee>Michael Widenius</assignee>
  <milestone_title>Maria 5.1</milestone_title>
  <duplicate_link></duplicate_link>
  <duplicate_bug_id></duplicate_bug_id>
  <title>ma_blockrec.c:1747: get_head_or_tail_page: Assertion `(uint) (res-&gt;buff[7] &amp; 7) == page_type' failed.</title>
  <status>Fix Released</status>
  <importance>High</importance>
  <created>2010-09-11 07:16:39.144268+00:00</created>
  <description>
<![CDATA[When executing the varchar RQG scenario, the server asserted as follows:

ma_blockrec.c:1747: get_head_or_tail_page: Assertion `(uint) (res->buff[7] & 7) == page_type' failed.

The original assert is

    DBUG_ASSERT((uint) (res->buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) == page_type);

Backtrace:

#6  0x000000307b62b945 in __assert_fail (assertion=0xd5df18 "(uint) (res->buff[7] & 7) == page_type", file=<value optimized out>, line=1747,
    function=<value optimized out>) at assert.c:81
#7  0x0000000000986651 in get_head_or_tail_page (info=0x7f1ed0165978, block=0x7f1ed00a2730, buff=0x7f1ed0166030 "", length=209, page_type=1,
    lock=PAGECACHE_LOCK_WRITE, res=0x7f1f38084040) at ma_blockrec.c:1746
#8  0x000000000098b22e in allocate_and_write_block_record (info=0x7f1ed0165978, record=0x7f1ed00c3ad0  <incomplete sequence \375>, row=0x7f1ed01659d8,
    undo_lsn=1) at ma_blockrec.c:3488
#9  0x000000000098b4ab in _ma_write_init_block_record (info=0x7f1ed0165978, record=0x7f1ed00c3ad0  <incomplete sequence \375>) at ma_blockrec.c:3547
#10 0x000000000099c09f in maria_write (info=0x7f1ed0165978, record=0x7f1ed00c3ad0  <incomplete sequence \375>) at ma_write.c:148
#11 0x0000000000953a24 in ha_maria::write_row (this=0x7f1ed00c3870, buf=0x7f1ed00c3ad0  <incomplete sequence \375>) at ha_maria.cc:1040
#12 0x00000000007c241e in handler::ha_write_row (this=0x7f1ed00c3870, buf=0x7f1ed00c3ad0  <incomplete sequence \375>) at handler.cc:4655
#13 0x00000000007cb329 in ha_partition::write_row (this=0x7f1ed00c3220, buf=0x7f1ed00c3ad0  <incomplete sequence \375>) at ha_partition.cc:3093
#14 0x00000000007c241e in handler::ha_write_row (this=0x7f1ed00c3220, buf=0x7f1ed00c3ad0  <incomplete sequence \375>) at handler.cc:4655
#15 0x00000000007233be in write_record (thd=0x80044a00, table=0x16, info=0x3ee3638) at sql_insert.cc:1632
#16 0x000000000072124d in mysql_insert (thd=0x3ee3638, table_list=0x7f1ecc014d68, fields=..., values_list=..., update_fields=..., update_values=...,
    duplic=DUP_ERROR, ignore=false) at sql_insert.cc:860
#17 0x0000000000683d9e in mysql_execute_command (thd=0x3ee3638) at sql_parse.cc:3288
#18 0x000000000068c719 in mysql_parse (thd=0x3ee3638,
    rawbuf=0x7f1ecc014910 "INSERT INTO `table10_maria_key_pk_parts_2_varchar_1024_not_null` ( `col_varchar_1024_latin1` , `col_varchar_1024_latin1_not_null` ) VALUES ( 'bgrgypkmsehyvleoigscubzpvrtwletotwfomhfjvxeghshyfxbnqpnhnq"..., length=344, found_semicolon=0x7f1f38085c70) at sql_parse.cc:6092
#19 0x000000000067e920 in dispatch_command (command=COM_QUERY, thd=0x3ee3638,
    packet=0x3ee6239 "INSERT INTO `table10_maria_key_pk_parts_2_varchar_1024_not_null` ( `col_varchar_1024_latin1` , `col_varchar_1024_latin1_not_null` ) VALUES ( 'bgrgypkmsehyvleoigscubzpvrtwletotwfomhfjvxeghshyfxbnqpnhnq"..., packet_length=344) at sql_parse.cc:1269
#20 0x000000000067d92b in do_command (thd=0x3ee3638) at sql_parse.cc:895
#21 0x000000000067a949 in handle_one_connection (arg=0x3ee3638) at sql_connect.cc:1138
#22 0x000000307ba07761 in start_thread (arg=0x7f1f38086710) at pthread_create.c:301
#23 0x000000307b6e150d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

bzr version-info:

revision-id: <email address hidden>
date: 2010-09-10 23:27:26 +0300
build-date: 2010-09-11 10:13:42 +0300
revno: 2929
branch-nick: 5.1

RQG command line:

 /home/buildbot/randgen/runall.pl \
 --queries=1M \
 --engine=Maria \
 --mysqld=--safe-mode \
 --mysqld=--sync-sys=0 \
 --mysqld=--log-output=file \
 --mysqld=--maria_log_purge_type=at_flush \
 --reporters=ErrorLog,Backtrace,Recovery,Shutdown \
 --duration=30 \
 --threads=5 \
 --rows=10 \
 --mask-level=2 \
 --mysqld=--loose-maria-group-commit=soft \
 --mysqld=--loose-maria_group_commit_interval=10 \
 --mysqld=--maria-checkpoint-interval=0 \
 --mysqld=--maria-block-size=16K \
 --mask=60283 \
 --queries=100000000 \
 --mask=60283 \
 --seed=1284187595 \
 --vardir=/home/buildbot/rqg-buildbot-slave/rqg-weekend/vardir-maria_recovery_weekend/current \
 --basedir=. \
 --grammar=conf/engines/varchar.yy \
 --gendata=conf/engines/varchar.zz]]>  </description>
  <activities>
    <activity datechanged="2010-09-11T07:16:39.144268+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[]]>      </newvalue>
      <whatchanged>bug</whatchanged>
      <person>Philip Stoev</person>
      <message>added bug</message>
    </activity>
    <activity datechanged="2010-09-11T07:29:35.550551+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[core binary datadir https://bugs.launchpad.net/maria/+bug/635559/+attachment/1569650/+files/var-bug635559.zip]]>      </newvalue>
      <whatchanged>attachment added</whatchanged>
      <person>Philip Stoev</person>
      <message></message>
    </activity>
    <activity datechanged="2010-09-11T07:31:04.365226+00:00">
      <oldvalue>
<![CDATA[Undecided]]>      </oldvalue>
      <newvalue>
<![CDATA[High]]>      </newvalue>
      <whatchanged>maria: importance</whatchanged>
      <person>Philip Stoev</person>
      <message></message>
    </activity>
    <activity datechanged="2010-09-11T07:32:10.546202+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[Michael Widenius (monty)]]>      </newvalue>
      <whatchanged>maria: assignee</whatchanged>
      <person>Philip Stoev</person>
      <message></message>
    </activity>
    <activity datechanged="2010-11-30T14:40:58.750408+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[5.1]]>      </newvalue>
      <whatchanged>maria: milestone</whatchanged>
      <person>Sergei</person>
      <message></message>
    </activity>
    <activity datechanged="2011-07-16T13:55:18.875449+00:00">
      <oldvalue>
<![CDATA[New]]>      </oldvalue>
      <newvalue>
<![CDATA[In Progress]]>      </newvalue>
      <whatchanged>maria: status</whatchanged>
      <person>Michael Widenius</person>
      <message></message>
    </activity>
    <activity datechanged="2011-07-18T06:07:46.990815+00:00">
      <oldvalue>
<![CDATA[In Progress]]>      </oldvalue>
      <newvalue>
<![CDATA[Fix Released]]>      </newvalue>
      <whatchanged>maria: status</whatchanged>
      <person>Michael Widenius</person>
      <message></message>
    </activity>
  </activities>
  <comments>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/635559/comments/0" datecreated="2010-09-11T07:16:39.144268+00:00">
      <person>Philip Stoev</person>
      <subject>
<![CDATA[ma_blockrec.c:1747: get_head_or_tail_page: Assertion `(uint) (res->buff[7] & 7) == page_type' failed.]]>      </subject>
      <content>
<![CDATA[When executing the varchar RQG scenario, the server asserted as follows:

ma_blockrec.c:1747: get_head_or_tail_page: Assertion `(uint) (res->buff[7] & 7) == page_type' failed.

The original assert is

    DBUG_ASSERT((uint) (res->buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) == page_type);

Backtrace:

#6  0x000000307b62b945 in __assert_fail (assertion=0xd5df18 "(uint) (res->buff[7] & 7) == page_type", file=<value optimized out>, line=1747,
    function=<value optimized out>) at assert.c:81
#7  0x0000000000986651 in get_head_or_tail_page (info=0x7f1ed0165978, block=0x7f1ed00a2730, buff=0x7f1ed0166030 "", length=209, page_type=1,
    lock=PAGECACHE_LOCK_WRITE, res=0x7f1f38084040) at ma_blockrec.c:1746
#8  0x000000000098b22e in allocate_and_write_block_record (info=0x7f1ed0165978, record=0x7f1ed00c3ad0  <incomplete sequence \375>, row=0x7f1ed01659d8,
    undo_lsn=1) at ma_blockrec.c:3488
#9  0x000000000098b4ab in _ma_write_init_block_record (info=0x7f1ed0165978, record=0x7f1ed00c3ad0  <incomplete sequence \375>) at ma_blockrec.c:3547
#10 0x000000000099c09f in maria_write (info=0x7f1ed0165978, record=0x7f1ed00c3ad0  <incomplete sequence \375>) at ma_write.c:148
#11 0x0000000000953a24 in ha_maria::write_row (this=0x7f1ed00c3870, buf=0x7f1ed00c3ad0  <incomplete sequence \375>) at ha_maria.cc:1040
#12 0x00000000007c241e in handler::ha_write_row (this=0x7f1ed00c3870, buf=0x7f1ed00c3ad0  <incomplete sequence \375>) at handler.cc:4655
#13 0x00000000007cb329 in ha_partition::write_row (this=0x7f1ed00c3220, buf=0x7f1ed00c3ad0  <incomplete sequence \375>) at ha_partition.cc:3093
#14 0x00000000007c241e in handler::ha_write_row (this=0x7f1ed00c3220, buf=0x7f1ed00c3ad0  <incomplete sequence \375>) at handler.cc:4655
#15 0x00000000007233be in write_record (thd=0x80044a00, table=0x16, info=0x3ee3638) at sql_insert.cc:1632
#16 0x000000000072124d in mysql_insert (thd=0x3ee3638, table_list=0x7f1ecc014d68, fields=..., values_list=..., update_fields=..., update_values=...,
    duplic=DUP_ERROR, ignore=false) at sql_insert.cc:860
#17 0x0000000000683d9e in mysql_execute_command (thd=0x3ee3638) at sql_parse.cc:3288
#18 0x000000000068c719 in mysql_parse (thd=0x3ee3638,
    rawbuf=0x7f1ecc014910 "INSERT INTO `table10_maria_key_pk_parts_2_varchar_1024_not_null` ( `col_varchar_1024_latin1` , `col_varchar_1024_latin1_not_null` ) VALUES ( 'bgrgypkmsehyvleoigscubzpvrtwletotwfomhfjvxeghshyfxbnqpnhnq"..., length=344, found_semicolon=0x7f1f38085c70) at sql_parse.cc:6092
#19 0x000000000067e920 in dispatch_command (command=COM_QUERY, thd=0x3ee3638,
    packet=0x3ee6239 "INSERT INTO `table10_maria_key_pk_parts_2_varchar_1024_not_null` ( `col_varchar_1024_latin1` , `col_varchar_1024_latin1_not_null` ) VALUES ( 'bgrgypkmsehyvleoigscubzpvrtwletotwfomhfjvxeghshyfxbnqpnhnq"..., packet_length=344) at sql_parse.cc:1269
#20 0x000000000067d92b in do_command (thd=0x3ee3638) at sql_parse.cc:895
#21 0x000000000067a949 in handle_one_connection (arg=0x3ee3638) at sql_connect.cc:1138
#22 0x000000307ba07761 in start_thread (arg=0x7f1f38086710) at pthread_create.c:301
#23 0x000000307b6e150d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

bzr version-info:

revision-id: monty@askmonty.org-20100910202726-yic84gpzydgijhqa
date: 2010-09-10 23:27:26 +0300
build-date: 2010-09-11 10:13:42 +0300
revno: 2929
branch-nick: 5.1

RQG command line:

 /home/buildbot/randgen/runall.pl \
 --queries=1M \
 --engine=Maria \
 --mysqld=--safe-mode \
 --mysqld=--sync-sys=0 \
 --mysqld=--log-output=file \
 --mysqld=--maria_log_purge_type=at_flush \
 --reporters=ErrorLog,Backtrace,Recovery,Shutdown \
 --duration=30 \
 --threads=5 \
 --rows=10 \
 --mask-level=2 \
 --mysqld=--loose-maria-group-commit=soft \
 --mysqld=--loose-maria_group_commit_interval=10 \
 --mysqld=--maria-checkpoint-interval=0 \
 --mysqld=--maria-block-size=16K \
 --mask=60283 \
 --queries=100000000 \
 --mask=60283 \
 --seed=1284187595 \
 --vardir=/home/buildbot/rqg-buildbot-slave/rqg-weekend/vardir-maria_recovery_weekend/current \
 --basedir=. \
 --grammar=conf/engines/varchar.yy \
 --gendata=conf/engines/varchar.zz]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/635559/comments/1" datecreated="2010-09-11T07:29:35.550551+00:00">
      <person>Philip Stoev</person>
      <subject>
<![CDATA[Re: ma_blockrec.c:1747: get_head_or_tail_page: Assertion `(uint) (res->buff[7] & 7) == page_type' failed.]]>      </subject>
      <content>
<![CDATA[]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/635559/comments/2" datecreated="2011-07-18T06:06:44.258670+00:00">
      <person>Michael Widenius</person>
      <subject>
<![CDATA[Re: ma_blockrec.c:1747: get_head_or_tail_page: Assertion `(uint) (res->buff[7] & 7) == page_type' failed.]]>      </subject>
      <content>
<![CDATA[Have tested this for 24 hours on 5.2 without any problems, so assume this issue is now solved.]]>      </content>
    </comment>
  </comments>
  <messages>
    <message created="2010-09-11 07:29:35.550551+00:00" owner="Philip Stoev">
<![CDATA[]]>      <attachment link="https://bugs.launchpad.net/bugs/635559/+attachment/1569650" type="Unspecified">
        <title>core binary datadir</title>
        <file>LPexportBug635559_var-bug635559.zip</file>
      </attachment>
    </message>
  </messages>
</launchpad-bug>
