Project

General

Profile

Actions

Bug #43747

closed

master FTBFS on s390x in openSUSE Build Service due to presence of -O2 in RPM_OPT_FLAGS

Added by Nathan Cutler over 4 years ago. Updated about 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

For some time, master s390x build has been failing with:

[ 5288s] [ 89%] Linking CXX executable ../../../bin/rbd
[ 5293s] /usr/lib64/gcc/s390x-suse-linux/7/../../../../s390x-suse-linux/bin/ld: ../../../lib/librbd.so.1.12.0: undefined reference to `__atomic_store_16'
[ 5293s] /usr/lib64/gcc/s390x-suse-linux/7/../../../../s390x-suse-linux/bin/ld: ../../../lib/librbd.so.1.12.0: undefined reference to `__atomic_load_16'
[ 5293s] /usr/lib64/gcc/s390x-suse-linux/7/../../../../s390x-suse-linux/bin/ld: ../../../lib/librbd.so.1.12.0: undefined reference to `__atomic_compare_exchange_16'
[ 5293s] collect2: error: ld returned 1 exit status
[ 5293s] make[2]: *** [src/tools/rbd/CMakeFiles/rbd.dir/build.make:783: bin/rbd] Error 1
[ 5293s] make[1]: *** [CMakeFiles/Makefile2:5781: src/tools/rbd/CMakeFiles/rbd.dir/all] Error 2

So far, we suspect that this is due to the use of boost::lockfree in the Ceph code base. Although the build failure occurs when linking bin/rbd, the problem is almost certainly not limited to RBD.


Files

s390x_build.log (255 KB) s390x_build.log Nathan Cutler, 01/21/2020 05:59 PM
test.s (8.79 KB) test.s assembly from test program Nathan Cutler, 01/22/2020 12:26 PM
new_build.log (323 KB) new_build.log Nathan Cutler, 01/22/2020 02:55 PM

Related issues 1 (0 open1 closed)

Copied to RADOS - Backport #44413: nautilus: FTBFS on s390x in openSUSE Build Service due to presence of -O2 in RPM_OPT_FLAGSResolvedKefu ChaiActions
Actions #2

Updated by Nathan Cutler over 4 years ago

As suggested by Kefu and Ulrich, I compiled the following program on a s390x machine running SLE-15-SP1 (gcc-7-3.3.22.s390x):

#include <atomic>
#include <cstdint>
int main() {
  std::atomic<uint8_t> w1;
  std::atomic<uint16_t> w2;
  std::atomic<uint32_t> w4;
  std::atomic<uint64_t> w8;
#ifdef __s390x__
  // Boost needs 16-byte atomics for tagged pointers.
  std::atomic<unsigned __int128> w16;
#else
  #define w16 0
#endif
  return w1 + w2 + w4 + w8 + w16;
}

I am attaching the resulting test.s to this ticket.

Actions #3

Updated by Nathan Cutler over 4 years ago

On top of master, I added the following patch to the spec file:

--- a/ceph.spec.in
+++ b/ceph.spec.in
@@ -1190,6 +1190,9 @@ ${CMAKE} .. \
     -DBOOST_J=$CEPH_SMP_NCPUS \
     -DWITH_GRAFANA=ON

+cat ./CMakeFiles/CMakeOutput.log
+cat ./CMakeFiles/CMakeError.log
+
 make "$CEPH_MFLAGS_JOBS" 

In other words, immediately after cmake finishes, it dumps the contents of the two cmake log files.

The resulting build log ("new_build.log") is uploaded to this ticket.

Actions #4

Updated by Nathan Cutler over 4 years ago

  • Status changed from New to Fix Under Review
  • Assignee set to Nathan Cutler
  • Pull request ID set to 32800

Many thanks to Ulrich Weigand for finding the root cause of this bug!

Actions #5

Updated by Nathan Cutler over 4 years ago

  • Subject changed from master FTBFS on s390x possibly due to use of boost::lockfree to master FTBFS on s390x in openSUSE Build Service due to hard -O2 setting in RPM_OPT_FLAGS
Actions #6

Updated by Nathan Cutler over 4 years ago

  • Subject changed from master FTBFS on s390x in openSUSE Build Service due to hard -O2 setting in RPM_OPT_FLAGS to master FTBFS on s390x in openSUSE Build Service due to presence of -O2 in RPM_OPT_FLAGS
Actions #7

Updated by Nathan Cutler over 4 years ago

  • Assignee deleted (Nathan Cutler)
  • Pull request ID changed from 32800 to 32802
Actions #8

Updated by Nathan Cutler over 4 years ago

  • Status changed from Fix Under Review to Resolved
Actions #9

Updated by Kefu Chai about 4 years ago

  • Status changed from Resolved to Pending Backport
  • Backport set to nautilus
Actions #10

Updated by Kefu Chai about 4 years ago

  • Copied to Backport #44413: nautilus: FTBFS on s390x in openSUSE Build Service due to presence of -O2 in RPM_OPT_FLAGS added
Actions #11

Updated by Nathan Cutler about 4 years ago

  • Status changed from Pending Backport to Resolved

While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".

Actions

Also available in: Atom PDF