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

hardware lock elision on ppc64{,le} failing to compile

Details

    Description

      From https://buildd.debian.org/status/fetch.php?pkg=mariadb-10.6&arch=ppc64&ver=1%3A10.6.7-1&stamp=1645322566&raw=0

      In file included from /<<PKGBUILDDIR>>/storage/innobase/include/transactional_lock_guard.h:73,
                       from /<<PKGBUILDDIR>>/storage/innobase/sync/srw_lock.cc:22:
      /usr/lib/gcc/powerpc64-linux-gnu/11/include/htmxlintrin.h: In function ‘void __TM_abort()’:
      /usr/lib/gcc/powerpc64-linux-gnu/11/include/htmxlintrin.h:94:3: error: ‘__builtin_tabort’ was not declared in this scope; did you mean ‘__builtin_abort’?
         94 |   __builtin_tabort (0);
            |   ^~~~~~~~~~~~~~~~
      

      Per https://gcc.gnu.org/onlinedocs/gcc/PowerPC-Hardware-Transactional-Memory-Built-in-Functions.html, the builtins are only available when -mhtm or -mcpu=power8 or later. Neither of these are used in the compile.

      bb-10.6-danielblack-MDEV-26769-htm-flag-for-ppc64 pushed, see how buildbots handle it. Proper fix might be to make the hardware lock ellision somehow dependent on compile flag detection. I'm also unsure if AIX supports it.

      HTM was introduced POWER8, so I'm unsure if older POWER will survive this change.

      Attachments

        Issue Links

          Activity

            danblack Daniel Black added a comment -

            otto wrong patch - its bd5f7f0f8930fa343ee676fdffa1cf26b5e12e70 that includes the storage/innobase/unittest/CMakeLists.txt change adding the htm cflag to ../sync/srw_lock.cc

            Succeeding on https://buildbot.mariadb.org/#/grid?branch=bb-10.6-danielblack-MDEV-27936-ppc64-htm-build-fail for the ppc64le sid builds. (test failures are something infrastructure related - MDBF-351)

            danblack Daniel Black added a comment - otto wrong patch - its bd5f7f0f8930fa343ee676fdffa1cf26b5e12e70 that includes the storage/innobase/unittest/CMakeLists.txt change adding the htm cflag to ../sync/srw_lock.cc Succeeding on https://buildbot.mariadb.org/#/grid?branch=bb-10.6-danielblack-MDEV-27936-ppc64-htm-build-fail for the ppc64le sid builds. (test failures are something infrastructure related - MDBF-351 )
            otto Otto Kekäläinen added a comment - danblack Updated Debian patch in https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/be847f26c4b5d2ecd6defa9db267a85dc84745ae - does this look good, shall I upload?
            danblack Daniel Black added a comment -

            otto, marko,

            I moved https://github.com/MariaDB/server/commit/11e68988d9698c3b1f79b8a3a41f81502b3e095c back to using the high level directives, checked the compile (locally under qemu), for less change and spelt elision right.

            Are the hot attributes or anything else unacceptable?

            danblack Daniel Black added a comment - otto , marko , I moved https://github.com/MariaDB/server/commit/11e68988d9698c3b1f79b8a3a41f81502b3e095c back to using the high level directives, checked the compile (locally under qemu), for less change and spelt elision right. Are the hot attributes or anything else unacceptable?

            Thank you, this looks OK to me. According to https://godbolt.org the hot function attribute is supported already by GCC 4.8.5 and the oldest version of clang that I tested.

            marko Marko Mäkelä added a comment - Thank you, this looks OK to me. According to https://godbolt.org the hot function attribute is supported already by GCC 4.8.5 and the oldest version of clang that I tested.
            otto Otto Kekäläinen added a comment - I changed the version in Debian now to latest version Daniel posted here: https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/e6f568bf63cbae53e25b7f10170d71c68a3c6e62 End result https://salsa.debian.org/mariadb-team/mariadb-server/-/blob/e6f568bf63cbae53e25b7f10170d71c68a3c6e62/debian/patches/1006527-fix-ppc64-ftbfs.patch equals https://github.com/MariaDB/server/commit/11e68988d9698c3b1f79b8a3a41f81502b3e095c . OK?

            People

              danblack Daniel Black
              danblack Daniel Black
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.