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

CMAKE_BUILD_TYPE=Debug build failure with SUX_LOCK_GENERIC

Details

    Description

      Attempt to build server on MacOS fails with error like the following ones:

      server-10.6/storage/innobase/trx/trx0purge.cc:855:21: error: no member named 'is_write_locked' in 'srw_lock_impl<true>'
        ut_ad(rseg->latch.is_write_locked());
              ~~~~~~~~~~~ ^
      server-10.6/storage/innobase/include/ut0dbg.h:62:15: note: expanded from macro 'ut_ad'
      #define ut_ad   DBUG_SLOW_ASSERT
       
      server-10.6/storage/innobase/trx/trx0purge.cc:971:21: error: no member named 'is_write_locked' in 'srw_lock_impl<true>'
        ut_ad(rseg->latch.is_write_locked());
              ~~~~~~~~~~~ ^
      server-10.6/storage/innobase/include/ut0dbg.h:62:15: note: expanded from macro 'ut_ad'
      #define ut_ad   DBUG_SLOW_ASSERT
      

      Attachments

        Issue Links

          Activity

            I think that this affects CMAKE_BUILD_TYPE=Debug builds of platforms where futex-like system calls (MDEV-26476) have not been implemented.

            I can reproduce this on GNU/Linux if I add -DSUX_LOCK_GENERIC to CMAKE_CXX_FLAGS. I will fix this.

            marko Marko Mäkelä added a comment - I think that this affects CMAKE_BUILD_TYPE=Debug builds of platforms where futex-like system calls ( MDEV-26476 ) have not been implemented. I can reproduce this on GNU/Linux if I add -DSUX_LOCK_GENERIC to CMAKE_CXX_FLAGS . I will fix this.

            diff --git a/storage/innobase/trx/trx0purge.cc b/storage/innobase/trx/trx0purge.cc
            index 592b8a5371c..0f55892a105 100644
            --- a/storage/innobase/trx/trx0purge.cc
            +++ b/storage/innobase/trx/trx0purge.cc
            @@ -852,7 +852,9 @@ void purge_sys_t::rseg_get_next_history_log()
             {
               fil_addr_t prev_log_addr;
             
            +#ifndef SUX_LOCK_GENERIC
               ut_ad(rseg->latch.is_write_locked());
            +#endif
               ut_a(rseg->last_page_no != FIL_NULL);
             
               tail.trx_no= rseg->last_trx_no() + 1;
            @@ -968,7 +970,9 @@ inline trx_purge_rec_t purge_sys_t::get_next_rec(roll_ptr_t roll_ptr)
             {
               ut_ad(next_stored);
               ut_ad(tail.trx_no < low_limit_no());
            +#ifndef SUX_LOCK_GENERIC
               ut_ad(rseg->latch.is_write_locked());
            +#endif
             
               if (!offset)
               {
            

            marko Marko Mäkelä added a comment - diff --git a/storage/innobase/trx/trx0purge.cc b/storage/innobase/trx/trx0purge.cc index 592b8a5371c..0f55892a105 100644 --- a/storage/innobase/trx/trx0purge.cc +++ b/storage/innobase/trx/trx0purge.cc @@ -852,7 +852,9 @@ void purge_sys_t::rseg_get_next_history_log() { fil_addr_t prev_log_addr; +#ifndef SUX_LOCK_GENERIC ut_ad(rseg->latch.is_write_locked()); +#endif ut_a(rseg->last_page_no != FIL_NULL); tail.trx_no= rseg->last_trx_no() + 1; @@ -968,7 +970,9 @@ inline trx_purge_rec_t purge_sys_t::get_next_rec(roll_ptr_t roll_ptr) { ut_ad(next_stored); ut_ad(tail.trx_no < low_limit_no()); +#ifndef SUX_LOCK_GENERIC ut_ad(rseg->latch.is_write_locked()); +#endif if (!offset) {
            shulga Dmitry Shulga added a comment -

            The branch for review is bb-10.6-MDEV-32788

            shulga Dmitry Shulga added a comment - The branch for review is bb-10.6- MDEV-32788

            People

              marko Marko Mäkelä
              shulga Dmitry Shulga
              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.