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

Warning about assertion failure marked_for_write_or_computed() printed by release build with DBUG_ASSERT_AS_PRINTF, but no failure on debug build

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.4(EOL)
    • 10.4.5
    • Compiling, Debug
    • None

    Description

      CREATE TABLE t1 (n BLOB, UNIQUE(n));
      INSERT INTO t1 VALUES (1);
      DELETE FROM t1 WHERE n = 1;
       
      # Cleanup
      DROP TABLE t1;
      

      10.4 3e89e0f2 -DCMAKE_C_FLAGS="-DDBUG_ASSERT_AS_PRINTF" -DCMAKE_CXX_FLAGS="-DDBUG_ASSERT_AS_PRINTF" -DCMAKE_BUILD_TYPE=RelWithDebInfo

      Warning: assertion failed: marked_for_write_or_computed() at /data/src/10.4-bug/sql/field.cc line 4331
      Attempting backtrace to find out the reason for the assert:
      stack_bottom = 0x0 thread_stack 0x49000
      mysys/stacktrace.c:270(my_print_stacktrace)[0x5557736fa539]
      sql/field.cc:4334(Field_longlong::store(long long, bool))[0x5557731d273b]
      sql/item.cc:6493(Item::save_in_field(Field*, bool))[0x5557731feffc]
      sql/table.cc:8203(TABLE::update_virtual_fields(handler*, enum_vcol_update_mode))[0x55577308bf2a]
      sql/handler.cc:2997(handler::ha_rnd_next(unsigned char*))[0x5557731ee35b]b
      sql/records.cc:481(rr_sequential(READ_RECORD*))[0x555773310564]
      sql/sql_delete.cc:804(mysql_delete(THD*, TABLE_LIST*, Item*, SQL_I_List<st_order>*, unsigned long long, unsigned long long, select_result*))[0x555773326913]
      sql/sql_parse.cc:4985(mysql_execute_command(THD*))[0x555772fc7767]
      sql/sql_class.h:2359(THD::enter_stage(PSI_stage_info_v1 const*, char const*, char const*, unsigned int))[0x555772fcdd74]
      sql/sql_audit.h:168(mysql_audit_general)[0x555772fd1319]
      sql/sql_parse.cc:1366(do_command(THD*))[0x555772fd28e2]
      sql/sql_connect.cc:1398(do_handle_one_connection(CONNECT*))[0x5557730b641c]
      sql/sql_connect.cc:1303(handle_one_connection)[0x5557730b6584]
      perfschema/pfs.cc:1865(pfs_spawn_thread)[0x5557734141c4]
      nptl/pthread_create.c:333(start_thread)[0x7f793cf28494]
      x86_64/clone.S:99(clone)[0x7f793aef093f]
      

      The warning is produced twice upon execution of the test case above.

      No failure on debug or debug-ASAN builds.
      No failure with limited key length.
      Not applicable to 10.3 because of the unlimited key length.

      Attachments

        Issue Links

          Activity

            elenst Elena Stepanova created issue -
            elenst Elena Stepanova made changes -
            Field Original Value New Value
            monty Michael Widenius made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            monty Michael Widenius made changes -
            Description {code:sql}
            CREATE TABLE t1 (n BLOB, UNIQUE(n));
            INSERT INTO t1 VALUES (1);
            DELETE FROM t1 WHERE n = 1;

            # Cleanup
            DROP TABLE t1;
            {code}

            {noformat:title=10.4 3e89e0f2 -DCMAKE_C_FLAGS="-DDBUG_ASSERT_AS_PRINTF" -DCMAKE_CXX_FLAGS="-DDBUG_ASSERT_AS_PRINTF" -DCMAKE_BUILD_TYPE=RelWithDebInfo}
            Warning: assertion failed: marked_for_write_or_computed() at /data/src/10.4-bug/sql/field.cc line 4331
            Attempting backtrace to find out the reason for the assert:
            stack_bottom = 0x0 thread_stack 0x49000
            mysys/stacktrace.c:270(my_print_stacktrace)[0x5557736fa539]
            sql/field.cc:4334(Field_longlong::store(long long, bool))[0x5557731d273b]
            sql/item.cc:6493(Item::save_in_field(Field*, bool))[0x5557731feffc]
            sql/table.cc:8203(TABLE::update_virtual_fields(handler*, enum_vcol_update_mode))[0x55577308bf2a]
            sql/handler.cc:2997(handler::ha_rnd_next(unsigned char*))[0x5557731ee35b]
            sql/records.cc:481(rr_sequential(READ_RECORD*))[0x555773310564]
            sql/sql_delete.cc:804(mysql_delete(THD*, TABLE_LIST*, Item*, SQL_I_List<st_order>*, unsigned long long, unsigned long long, select_result*))[0x555773326913]
            sql/sql_parse.cc:4985(mysql_execute_command(THD*))[0x555772fc7767]
            sql/sql_class.h:2359(THD::enter_stage(PSI_stage_info_v1 const*, char const*, char const*, unsigned int))[0x555772fcdd74]
            sql/sql_audit.h:168(mysql_audit_general)[0x555772fd1319]
            sql/sql_parse.cc:1366(do_command(THD*))[0x555772fd28e2]
            sql/sql_connect.cc:1398(do_handle_one_connection(CONNECT*))[0x5557730b641c]
            sql/sql_connect.cc:1303(handle_one_connection)[0x5557730b6584]
            perfschema/pfs.cc:1865(pfs_spawn_thread)[0x5557734141c4]
            nptl/pthread_create.c:333(start_thread)[0x7f793cf28494]
            x86_64/clone.S:99(clone)[0x7f793aef093f]
            {noformat}

            The warning is produced twice upon execution of the test case above.

            No failure on debug or debug-ASAN builds.
            No failure with limited key length.
            Not applicable to 10.3 because of the unlimited key length.
            {code:sql}
            CREATE TABLE t1 (n BLOB, UNIQUE(n));
            INSERT INTO t1 VALUES (1);
            DELETE FROM t1 WHERE n = 1;

            # Cleanup
            DROP TABLE t1;
            {code}

            {noformat:title=10.4 3e89e0f2 -DCMAKE_C_FLAGS="-DDBUG_ASSERT_AS_PRINTF" -DCMAKE_CXX_FLAGS="-DDBUG_ASSERT_AS_PRINTF" -DCMAKE_BUILD_TYPE=RelWithDebInfo}
            Warning: assertion failed: marked_for_write_or_computed() at /data/src/10.4-bug/sql/field.cc line 4331
            Attempting backtrace to find out the reason for the assert:
            stack_bottom = 0x0 thread_stack 0x49000
            mysys/stacktrace.c:270(my_print_stacktrace)[0x5557736fa539]
            sql/field.cc:4334(Field_longlong::store(long long, bool))[0x5557731d273b]
            sql/item.cc:6493(Item::save_in_field(Field*, bool))[0x5557731feffc]
            sql/table.cc:8203(TABLE::update_virtual_fields(handler*, enum_vcol_update_mode))[0x55577308bf2a]
            sql/handler.cc:2997(handler::ha_rnd_next(unsigned char*))[0x5557731ee35b]b
            sql/records.cc:481(rr_sequential(READ_RECORD*))[0x555773310564]
            sql/sql_delete.cc:804(mysql_delete(THD*, TABLE_LIST*, Item*, SQL_I_List<st_order>*, unsigned long long, unsigned long long, select_result*))[0x555773326913]
            sql/sql_parse.cc:4985(mysql_execute_command(THD*))[0x555772fc7767]
            sql/sql_class.h:2359(THD::enter_stage(PSI_stage_info_v1 const*, char const*, char const*, unsigned int))[0x555772fcdd74]
            sql/sql_audit.h:168(mysql_audit_general)[0x555772fd1319]
            sql/sql_parse.cc:1366(do_command(THD*))[0x555772fd28e2]
            sql/sql_connect.cc:1398(do_handle_one_connection(CONNECT*))[0x5557730b641c]
            sql/sql_connect.cc:1303(handle_one_connection)[0x5557730b6584]
            perfschema/pfs.cc:1865(pfs_spawn_thread)[0x5557734141c4]
            nptl/pthread_create.c:333(start_thread)[0x7f793cf28494]
            x86_64/clone.S:99(clone)[0x7f793aef093f]
            {noformat}

            The warning is produced twice upon execution of the test case above.

            No failure on debug or debug-ASAN builds.
            No failure with limited key length.
            Not applicable to 10.3 because of the unlimited key length.

            Problem was that DBUG_FIX_WRITE_SET was not enabled when using DBUG_ASSERT_AS_PRINTF

            monty Michael Widenius added a comment - Problem was that DBUG_FIX_WRITE_SET was not enabled when using DBUG_ASSERT_AS_PRINTF
            monty Michael Widenius made changes -
            issue.field.resolutiondate 2019-04-19 11:41:48.0 2019-04-19 11:41:48.394
            monty Michael Widenius made changes -
            Component/s Debug [ 14208 ]
            Component/s Data types [ 13906 ]
            Fix Version/s 10.4.5 [ 23311 ]
            Fix Version/s 10.4 [ 22408 ]
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 95370 ] MariaDB v4 [ 156071 ]

            People

              monty Michael Widenius
              elenst Elena Stepanova
              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.