Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-33048

Assertion `info->end_of_file - (info->append_read_pos-info->write_buffer) == (res= inline_mysql_file_tell("/test/bb-11.4-MDEV-7850_dbg/mysys/mf_iocache2.c", 151, info->file, (myf) (0)))' failed.

Details

    Description

      I first thought this was another iteration of MDEV-30176. However, this new testcase reproduces the issue only in bb-11.4-MDEV-7850 and not in the latest 11.3 (at 9e76d94ef0f3f1a8d222a23c7922f806d00777b5) nor in the latest 11.4 (at 9bd95e914f3f12d0d9d93e7a1f2c49e6e8841f17).

      SET SESSION collation_connection=utf32_sinhala_ci;
      SET default_master_connection='my_slave';
      CHANGE MASTER TO master_use_gtid=current_pos;
      SET SESSION default_master_connection='@!*/"';
      CHANGE MASTER TO master_use_gtid=current_pos;
      FLUSH RELAY LOGS;
      SHUTDOWN;
      

      Leads to:

      bb-11.4-MDEV-7850 57618265ad914824ce78108729829df13c75e224 (Debug)

      mariadbd: /test/bb-11.4-MDEV-7850_dbg/mysys/mf_iocache2.c:150: my_b_append_tell: Assertion `info->end_of_file - (info->append_read_pos-info->write_buffer) == (res= inline_mysql_file_tell("/test/bb-11.4-MDEV-7850_dbg/mysys/mf_iocache2.c", 151, info->file, (myf) (0)))' failed.
      

      bb-11.4-MDEV-7850 57618265ad914824ce78108729829df13c75e224 (Debug)

      Core was generated by `/test/MDEV-7850_MD161223-mariadb-11.4.0-linux-x86_64-dbg/bin/mariadbd --no-defa'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=22999004778496)
          at ./nptl/pthread_kill.c:44
      [Current thread is 1 (Thread 0x14eadf829000 (LWP 2043653))]
      (gdb) bt
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=22999004778496) at ./nptl/pthread_kill.c:44
      #1  __pthread_kill_internal (signo=6, threadid=22999004778496) at ./nptl/pthread_kill.c:78
      #2  __GI___pthread_kill (threadid=22999004778496, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
      #3  0x000014eadf642476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
      #4  0x000014eadf6287f3 in __GI_abort () at ./stdlib/abort.c:79
      #5  0x000014eadf62871b in __assert_fail_base (fmt=0x14eadf7dd130 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55cddfa952e8 "info->end_of_file - (info->append_read_pos-info->write_buffer) == (res= inline_mysql_file_tell(\"/test/bb-11.4-MDEV-7850_dbg/mysys/mf_iocache2.c\", 151, info->file, (myf) (0)))", file=0x55cddfa95248 "/test/bb-11.4-MDEV-7850_dbg/mysys/mf_iocache2.c", line=150, function=<optimized out>) at ./assert/assert.c:92
      #6  0x000014eadf639e96 in __GI___assert_fail (assertion=assertion@entry=0x55cddfa952e8 "info->end_of_file - (info->append_read_pos-info->write_buffer) == (res= inline_mysql_file_tell(\"/test/bb-11.4-MDEV-7850_dbg/mysys/mf_iocache2.c\", 151, info->file, (myf) (0)))", file=file@entry=0x55cddfa95248 "/test/bb-11.4-MDEV-7850_dbg/mysys/mf_iocache2.c", line=line@entry=150, function=function@entry=0x55cddfa95460 <__PRETTY_FUNCTION__.1> "my_b_append_tell") at ./assert/assert.c:101
      #7  0x000055cddf5dcfab in my_b_append_tell (info=0x14ea2c0399d8) at /test/bb-11.4-MDEV-7850_dbg/mysys/mf_iocache2.c:150
      #8  0x000055cddf5dd051 in my_b_safe_tell (info=<optimized out>) at /test/bb-11.4-MDEV-7850_dbg/mysys/mf_iocache2.c:163
      #9  0x000055cddf03d6a7 in Log_event_writer::pos (this=0x7ffe386ebcd0) at /test/bb-11.4-MDEV-7850_dbg/sql/log_event.h:1007
      #10 Log_event::write_header (this=this@entry=0x7ffe386ebd60, writer=writer@entry=0x7ffe386ebcd0, event_data_length=<optimized out>) at /test/bb-11.4-MDEV-7850_dbg/sql/log_event_server.cc:863
      #11 0x000055cddf033467 in Log_event::write (this=0x7ffe386ebd60, writer=0x7ffe386ebcd0) at /test/bb-11.4-MDEV-7850_dbg/sql/log_event.h:1481
      #12 0x000055cddf00cd7e in Log_event_writer::write (ev=0x7ffe386ebd60, this=0x7ffe386ebcd0) at /test/bb-11.4-MDEV-7850_dbg/sql/log_event.h:5431
      #13 Event_log::write_event (this=this@entry=0x14ea2c039640, ev=ev@entry=0x7ffe386ebd60, checksum_alg=checksum_alg@entry=BINLOG_CHECKSUM_ALG_CRC32, cache_data=cache_data@entry=0x0, file=file@entry=0x14ea2c0399d8) at /test/bb-11.4-MDEV-7850_dbg/sql/log.cc:5840
      #14 0x000055cddf0168b2 in MYSQL_BIN_LOG::write_event (checksum_alg=BINLOG_CHECKSUM_ALG_CRC32, ev=0x7ffe386ebd60, this=0x14ea2c039638) at /test/bb-11.4-MDEV-7850_dbg/sql/log.h:1000
      #15 MYSQL_BIN_LOG::close (this=this@entry=0x14ea2c039638, exiting=exiting@entry=5) at /test/bb-11.4-MDEV-7850_dbg/sql/log.cc:9486
      #16 0x000055cddeaf7601 in end_relay_log_info (rli=rli@entry=0x14ea2c039110) at /test/bb-11.4-MDEV-7850_dbg/sql/slave.cc:7028
      #17 0x000055cdded21bcf in free_key_master_info (mi=0x14ea2c037050) at /test/bb-11.4-MDEV-7850_dbg/sql/rpl_mi.cc:894
      #18 0x000055cddf5d77be in my_hash_free_elements (hash=0x55cde2e3b740) at /test/bb-11.4-MDEV-7850_dbg/mysys/hash.c:135
      #19 my_hash_reset (hash=0x55cde2e3b740) at /test/bb-11.4-MDEV-7850_dbg/mysys/hash.c:178
      #20 0x000055cdded2211e in Master_info_index::free_connections (this=0x55cde2e3b3d0) at /test/bb-11.4-MDEV-7850_dbg/sql/rpl_mi.cc:1068
      #21 0x000055cddeaedcca in slave_prepare_for_shutdown () at /test/bb-11.4-MDEV-7850_dbg/sql/slave.cc:1298
      #22 0x000055cddeaa365b in close_connections () at /test/bb-11.4-MDEV-7850_dbg/sql/mysqld.cc:1801
      #23 mysqld_main (argc=<optimized out>, argv=<optimized out>) at /test/bb-11.4-MDEV-7850_dbg/sql/mysqld.cc:6068
      #24 0x000055cddea94c76 in main (argc=<optimized out>, argv=<optimized out>) at /test/bb-11.4-MDEV-7850_dbg/sql/main.cc:34
      

      No special mysqld options required, inc. binary logging. Apparently not sporadic. Debug builds only.

      Attachments

        Issue Links

          Activity

            Roel Roel Van de Paar added a comment - - edited

            The testcase, as given, produces the same crash under MTR.
            Also confirmed that trunk 11.3/11.4 (versions listed above) do not fail under MTR either.

            Roel Roel Van de Paar added a comment - - edited The testcase, as given, produces the same crash under MTR. Also confirmed that trunk 11.3/11.4 (versions listed above) do not fail under MTR either.
            Roel Roel Van de Paar added a comment - - edited

            Issue seen regularly during testing of MDEV-7850.
            It is possible that somehow MDEV-30176 is brought out in a new way due to the changes in bb-11.4-MDEV-7850.

            Roel Roel Van de Paar added a comment - - edited Issue seen regularly during testing of MDEV-7850 . It is possible that somehow MDEV-30176 is brought out in a new way due to the changes in bb-11.4-MDEV-7850.

            Closing as this is a duplicate of MDEV-30176. To summarize the problem, the string value set for default_master_connection ends up being translated into an empty string at parse time for both master connections, which causes the two master connections to invalidly use the same relay log file on disk.

            bnestere Brandon Nesterenko added a comment - Closing as this is a duplicate of MDEV-30176 . To summarize the problem, the string value set for default_master_connection ends up being translated into an empty string at parse time for both master connections, which causes the two master connections to invalidly use the same relay log file on disk.

            People

              bnestere Brandon Nesterenko
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.