Skip to content

[amdgpu-arch] Replace use of HSA with reading sysfs directly #116651

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 19, 2024

Conversation

jhuber6
Copy link
Contributor

@jhuber6 jhuber6 commented Nov 18, 2024

Summary:
For Linux systems, we currently use the HSA library to determine the
installed GPUs. However, this isn't really necessary and adds a
dependency on the HSA runtime as well as a lot of overhead. Instead,
this patch uses the sysfs interface exposed by amdkfd to do this
directly.

Summary:
For Linux systems, we currently use the HSA library to determine the
installed GPUs. However, this isn't really necessary and adds a
dependency on the HSA runtime as well as a lot of overhead. Instead,
this patch uses the `sysfs` interface exposed by `amdkfd` to do this
directly.
@llvmbot llvmbot added clang Clang issues not falling into any other category backend:AMDGPU labels Nov 18, 2024
@llvmbot
Copy link
Member

llvmbot commented Nov 18, 2024

@llvm/pr-subscribers-backend-amdgpu

@llvm/pr-subscribers-clang

Author: Joseph Huber (jhuber6)

Changes

Summary:
For Linux systems, we currently use the HSA library to determine the
installed GPUs. However, this isn't really necessary and adds a
dependency on the HSA runtime as well as a lot of overhead. Instead,
this patch uses the sysfs interface exposed by amdkfd to do this
directly.


Full diff: https://github.com/llvm/llvm-project/pull/116651.diff

4 Files Affected:

  • (modified) clang/tools/amdgpu-arch/AMDGPUArch.cpp (+2-2)
  • (removed) clang/tools/amdgpu-arch/AMDGPUArchByHSA.cpp (-122)
  • (added) clang/tools/amdgpu-arch/AMDGPUArchByKFD.cpp (+74)
  • (modified) clang/tools/amdgpu-arch/CMakeLists.txt (+1-1)
diff --git a/clang/tools/amdgpu-arch/AMDGPUArch.cpp b/clang/tools/amdgpu-arch/AMDGPUArch.cpp
index 7ae57b7877e1fe..6c10cbc5c46a83 100644
--- a/clang/tools/amdgpu-arch/AMDGPUArch.cpp
+++ b/clang/tools/amdgpu-arch/AMDGPUArch.cpp
@@ -25,7 +25,7 @@ static void PrintVersion(raw_ostream &OS) {
   OS << clang::getClangToolFullVersion("amdgpu-arch") << '\n';
 }
 
-int printGPUsByHSA();
+int printGPUsByKFD();
 int printGPUsByHIP();
 
 int main(int argc, char *argv[]) {
@@ -45,7 +45,7 @@ int main(int argc, char *argv[]) {
   }
 
 #ifndef _WIN32
-  if (!printGPUsByHSA())
+  if (!printGPUsByKFD())
     return 0;
 #endif
 
diff --git a/clang/tools/amdgpu-arch/AMDGPUArchByHSA.cpp b/clang/tools/amdgpu-arch/AMDGPUArchByHSA.cpp
deleted file mode 100644
index 432f2c414ed244..00000000000000
--- a/clang/tools/amdgpu-arch/AMDGPUArchByHSA.cpp
+++ /dev/null
@@ -1,122 +0,0 @@
-//===- AMDGPUArchByHSA.cpp - list AMDGPU installed ------*- C++ -*---------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This file implements a tool for detecting name of AMDGPU installed in system
-// using HSA on Linux. This tool is used by AMDGPU OpenMP and HIP driver.
-//
-//===----------------------------------------------------------------------===//
-
-#include "clang/Basic/Version.h"
-#include "llvm/Support/CommandLine.h"
-#include "llvm/Support/DynamicLibrary.h"
-#include "llvm/Support/Error.h"
-#include "llvm/Support/raw_ostream.h"
-#include <memory>
-#include <string>
-#include <vector>
-
-using namespace llvm;
-
-typedef enum {
-  HSA_STATUS_SUCCESS = 0x0,
-} hsa_status_t;
-
-typedef enum {
-  HSA_DEVICE_TYPE_CPU = 0,
-  HSA_DEVICE_TYPE_GPU = 1,
-} hsa_device_type_t;
-
-typedef enum {
-  HSA_AGENT_INFO_NAME = 0,
-  HSA_AGENT_INFO_DEVICE = 17,
-} hsa_agent_info_t;
-
-typedef struct hsa_agent_s {
-  uint64_t handle;
-} hsa_agent_t;
-
-hsa_status_t (*hsa_init)();
-hsa_status_t (*hsa_shut_down)();
-hsa_status_t (*hsa_agent_get_info)(hsa_agent_t, hsa_agent_info_t, void *);
-hsa_status_t (*hsa_iterate_agents)(hsa_status_t (*)(hsa_agent_t, void *),
-                                   void *);
-
-constexpr const char *DynamicHSAPath = "libhsa-runtime64.so";
-
-llvm::Error loadHSA() {
-  std::string ErrMsg;
-  auto DynlibHandle = std::make_unique<llvm::sys::DynamicLibrary>(
-      llvm::sys::DynamicLibrary::getPermanentLibrary(DynamicHSAPath, &ErrMsg));
-  if (!DynlibHandle->isValid()) {
-    return llvm::createStringError(llvm::inconvertibleErrorCode(),
-                                   "Failed to 'dlopen' %s", DynamicHSAPath);
-  }
-#define DYNAMIC_INIT(SYMBOL)                                                   \
-  {                                                                            \
-    void *SymbolPtr = DynlibHandle->getAddressOfSymbol(#SYMBOL);               \
-    if (!SymbolPtr)                                                            \
-      return llvm::createStringError(llvm::inconvertibleErrorCode(),           \
-                                     "Failed to 'dlsym' " #SYMBOL);            \
-    SYMBOL = reinterpret_cast<decltype(SYMBOL)>(SymbolPtr);                    \
-  }
-  DYNAMIC_INIT(hsa_init);
-  DYNAMIC_INIT(hsa_shut_down);
-  DYNAMIC_INIT(hsa_agent_get_info);
-  DYNAMIC_INIT(hsa_iterate_agents);
-#undef DYNAMIC_INIT
-  return llvm::Error::success();
-}
-
-static hsa_status_t iterateAgentsCallback(hsa_agent_t Agent, void *Data) {
-  hsa_device_type_t DeviceType;
-  hsa_status_t Status =
-      hsa_agent_get_info(Agent, HSA_AGENT_INFO_DEVICE, &DeviceType);
-
-  // continue only if device type if GPU
-  if (Status != HSA_STATUS_SUCCESS || DeviceType != HSA_DEVICE_TYPE_GPU) {
-    return Status;
-  }
-
-  std::vector<std::string> *GPUs =
-      static_cast<std::vector<std::string> *>(Data);
-  char GPUName[64];
-  Status = hsa_agent_get_info(Agent, HSA_AGENT_INFO_NAME, GPUName);
-  if (Status != HSA_STATUS_SUCCESS) {
-    return Status;
-  }
-  GPUs->push_back(GPUName);
-  return HSA_STATUS_SUCCESS;
-}
-
-int printGPUsByHSA() {
-  // Attempt to load the HSA runtime.
-  if (llvm::Error Err = loadHSA()) {
-    logAllUnhandledErrors(std::move(Err), llvm::errs());
-    return 1;
-  }
-
-  hsa_status_t Status = hsa_init();
-  if (Status != HSA_STATUS_SUCCESS) {
-    return 1;
-  }
-
-  std::vector<std::string> GPUs;
-  Status = hsa_iterate_agents(iterateAgentsCallback, &GPUs);
-  if (Status != HSA_STATUS_SUCCESS) {
-    return 1;
-  }
-
-  for (const auto &GPU : GPUs)
-    llvm::outs() << GPU << '\n';
-
-  if (GPUs.size() < 1)
-    return 1;
-
-  hsa_shut_down();
-  return 0;
-}
diff --git a/clang/tools/amdgpu-arch/AMDGPUArchByKFD.cpp b/clang/tools/amdgpu-arch/AMDGPUArchByKFD.cpp
new file mode 100644
index 00000000000000..c7590572de63d4
--- /dev/null
+++ b/clang/tools/amdgpu-arch/AMDGPUArchByKFD.cpp
@@ -0,0 +1,74 @@
+//===- AMDGPUArchByKFD.cpp - list AMDGPU installed ------*- C++ -*---------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file implements a tool for detecting name of AMD GPUs installed in
+// system using the Linux sysfs interface for the AMD KFD driver.
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/Support/FileSystem.h"
+#include "llvm/Support/LineIterator.h"
+#include "llvm/Support/MemoryBuffer.h"
+#include "llvm/Support/Path.h"
+#include <memory>
+#include <string>
+
+using namespace llvm;
+
+constexpr const char *KFD_SYSFS_NODE_PATH =
+    "/sys/devices/virtual/kfd/kfd/topology/nodes";
+
+constexpr static long getMajor(long Ver) { return (Ver / 10000) % 100; }
+constexpr static long getMinor(long Ver) { return (Ver / 100) % 100; }
+constexpr static long getStep(long Ver) { return Ver % 100; }
+
+int printGPUsByKFD() {
+  SmallVector<std::pair<long, long>> Devices;
+  std::error_code EC;
+  for (sys::fs::directory_iterator Begin(KFD_SYSFS_NODE_PATH, EC), End;
+       Begin != End; Begin.increment(EC)) {
+    if (EC)
+      return 1;
+
+    long Node = 0;
+    if (sys::path::stem(Begin->path()).consumeInteger(10, Node))
+      return 1;
+
+    SmallVector<char> Path(Begin->path().begin(), Begin->path().end());
+    sys::path::append(Path, "properties");
+
+    ErrorOr<std::unique_ptr<MemoryBuffer>> BufferOrErr =
+        MemoryBuffer::getFileOrSTDIN(Path);
+    if (std::error_code EC = BufferOrErr.getError())
+      return 1;
+
+    long GFXVersion = 0;
+    for (line_iterator Lines(**BufferOrErr, false); !Lines.is_at_end();
+         ++Lines) {
+      if (Lines->starts_with("gfx_target_version")) {
+        if (Lines->drop_front(sizeof("gfx_target_version"))
+                .consumeInteger(10, GFXVersion))
+          return 1;
+        break;
+      }
+    }
+
+    // If this is zero the node is a CPU.
+    if (GFXVersion == 0)
+      continue;
+    Devices.emplace_back(Node, GFXVersion);
+  }
+
+  // Sort the devices by their node to make sure it prints in order.
+  llvm::sort(Devices, [](auto &L, auto &R) { return L.first < R.first; });
+  for (const auto &[Node, GFXVersion] : Devices)
+    std::fprintf(stdout, "gfx%ld%ld%lx\n", getMajor(GFXVersion),
+                 getMinor(GFXVersion), getStep(GFXVersion));
+
+  return 0;
+}
diff --git a/clang/tools/amdgpu-arch/CMakeLists.txt b/clang/tools/amdgpu-arch/CMakeLists.txt
index 1657c701251308..c4c8de614565a7 100644
--- a/clang/tools/amdgpu-arch/CMakeLists.txt
+++ b/clang/tools/amdgpu-arch/CMakeLists.txt
@@ -8,6 +8,6 @@
 
 set(LLVM_LINK_COMPONENTS Support)
 
-add_clang_tool(amdgpu-arch AMDGPUArch.cpp AMDGPUArchByHSA.cpp AMDGPUArchByHIP.cpp)
+add_clang_tool(amdgpu-arch AMDGPUArch.cpp AMDGPUArchByKFD.cpp AMDGPUArchByHIP.cpp)
 
 target_link_libraries(amdgpu-arch PRIVATE clangBasic)

@arsenm arsenm changed the title [amdgpu-arch] Replcae use of HSA with reading sysfs directly [amdgpu-arch] Replace use of HSA with reading sysfs directly Nov 18, 2024
for (sys::fs::directory_iterator Begin(KFD_SYSFS_NODE_PATH, EC), End;
Begin != End; Begin.increment(EC)) {
if (EC)
return 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should print some errors when this fails

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was unsure if I should, since we can still fall back to HIP in the current implementation.

@b-sumner
Copy link

@jhuber6 can you comment on "lot of overhead" and if that matters? Also, not sure why the HSA library dependence is a problem. This seems to be exposing amdgpu-arch to more maintenance overhead.

@jhuber6
Copy link
Contributor Author

jhuber6 commented Nov 18, 2024

@jhuber6 can you comment on "lot of overhead" and if that matters? Also, not sure why the HSA library dependence is a problem. This seems to be exposing amdgpu-arch to more maintenance overhead.

Sometimes the driver will hang and since this is used inside of clang to support --offload-arch=native I've had cases where the compiler hangs forever, so I added a timeout to keep it from doing that in the past. This removes that possibility entirely. I have also had reports from cluster users that it becomes very slow when others are stressing the GPU. It's faster and since this will be installed on every single LLVM build, not everyone has ROCm so it would be nice for this to work. I think ti's fair to do this as the fast-path on Linux systems and then fall-back to HIP if something goes terribly wrong.

@b-sumner
Copy link

@jhuber6 can you comment on "lot of overhead" and if that matters? Also, not sure why the HSA library dependence is a problem. This seems to be exposing amdgpu-arch to more maintenance overhead.

Sometimes the driver will hang and since this is used inside of clang to support --offload-arch=native I've had cases where the compiler hangs forever, so I added a timeout to keep it from doing that in the past. This removes that possibility entirely. I have also had reports from cluster users that it becomes very slow when others are stressing the GPU. It's faster and since this will be installed on every single LLVM build, not everyone has ROCm so it would be nice for this to work. I think ti's fair to do this as the fast-path on Linux systems and then fall-back to HIP if something goes terribly wrong.

I don't really understand why cluster users are compiling on a system where the GPUs are being stressed, and I still don't see why it's a good idea to break layering for this case. Also, I wasn't aware that the "native" offload arch is supported by ROCm.

@jhuber6
Copy link
Contributor Author

jhuber6 commented Nov 18, 2024

I don't really understand why cluster users are compiling on a system where the GPUs are being stressed, and I still don't see why it's a good idea to break layering for this case.

I'd like to eliminate a class of failures I've seen with --offload-arch=native either causing the compilation job to fail, hang forever, or take a really long time. I suppose I cannot attest to whether or not the Driver team will modify this interface, but since it's hard-coded in ROCT I would doubt it. This is also sufficiently tested by libc which uses -mcpu=native and has its own bot, along with some downstream OpenMP tests using --offload-arch=native so I don't think this would silently fail and make it into a release.

Also, I wasn't aware that the "native" offload arch is supported by ROCm.

HIP does at least upstream, don't know if that was modified in ROCm. OpenMP supports it in the fork.

@arsenm
Copy link
Contributor

arsenm commented Nov 18, 2024

I suppose I cannot attest to whether or not the Driver team will modify this interface,

They must never ever do this. It is their fault and problem if this breaks

@yxsamliu
Copy link
Collaborator

@jhuber6 can you comment on "lot of overhead" and if that matters? Also, not sure why the HSA library dependence is a problem. This seems to be exposing amdgpu-arch to more maintenance overhead.

Sometimes the driver will hang and since this is used inside of clang to support --offload-arch=native I've had cases where the compiler hangs forever, so I added a timeout to keep it from doing that in the past. This removes that possibility entirely. I have also had reports from cluster users that it becomes very slow when others are stressing the GPU. It's faster and since this will be installed on every single LLVM build, not everyone has ROCm so it would be nice for this to work. I think ti's fair to do this as the fast-path on Linux systems and then fall-back to HIP if something goes terribly wrong.

I don't really understand why cluster users are compiling on a system where the GPUs are being stressed, and I still don't see why it's a good idea to break layering for this case. Also, I wasn't aware that the "native" offload arch is supported by ROCm.

The issue also happens to machines with one GPU if amdgpu-arch is executed multiple times in a short time due to some limitation of the driver. --offload-arch=native calls amdpu-arch to get the actual GPU archs.

@yxsamliu
Copy link
Collaborator

I think we could use this approach for Linux. amdgpu-arch can still use HIP runtime to detect GPU for both Linux and Windows, so we still have a fallback even if we remove the HSA approach.

@b-sumner
Copy link

I feel like this is a workaround. Can we not fix the "limitation of the driver" and if there is an issue with HSA overhead, shouldn't we file a ticket?

@jhuber6
Copy link
Contributor Author

jhuber6 commented Nov 18, 2024

I feel like this is a workaround. Can we not fix the "limitation of the driver" and if there is an issue with HSA overhead, shouldn't we file a ticket?

I don't know for sure, but I'd guess that the limitations seen may be related to the limit of 128 or so doorbells I think we have somewhere. I don't see this as a workaround, it deliberately gets the same information without requiring /dev/kfd to be opened. That's unlikely something we'd want to push into HSA.

@arsenm
Copy link
Contributor

arsenm commented Nov 18, 2024

We shouldn't need to load a driver to query the devices on the system. This exists for this purpose, if there isn't going to be some ioctl to read it for you

@jhuber6
Copy link
Contributor Author

jhuber6 commented Nov 18, 2024

Here's a question, should it respect ROCR_VISIBLE_DEVICES?

@shiltian
Copy link
Contributor

Here's a question, should it respect ROCR_VISIBLE_DEVICES?

I think it depends on whether you consider this as a ROCm toolchain. If not, I'd prefer not to be bound to any ROCm related stuff.

@jhuber6
Copy link
Contributor Author

jhuber6 commented Nov 18, 2024

Here's a question, should it respect ROCR_VISIBLE_DEVICES?

I think it depends on whether you consider this as a ROCm toolchain. If not, I'd prefer not to be bound to any ROCm related stuff.

Agreed, maybe in the fork but makes sense to leave community LLVM alone.

@shiltian
Copy link
Contributor

Maybe add this information into the beginning of the file.

@arsenm
Copy link
Contributor

arsenm commented Nov 18, 2024

Here's a question, should it respect ROCR_VISIBLE_DEVICES?

No. That is a transient runtime debug flag. This is not executing code on the device

@b-sumner
Copy link

We shouldn't need to load a driver to query the devices on the system. This exists for this purpose, if there isn't going to be some ioctl to read it for you

It depends on the device and the system. In this case, since linux provides an alternative I agree it makes sense to use it, and now see why this is not a workaround. Thanks.

@yxsamliu
Copy link
Collaborator

I feel like this is a workaround. Can we not fix the "limitation of the driver" and if there is an issue with HSA overhead, shouldn't we file a ticket?

I think there was already a ticket but it cannot be fixed easily.

Copy link
Collaborator

@JonChesterfield JonChesterfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely yes, awesome. I had a todo to have the kernel export this under sysfs literally years ago and didn't get around to working out their commit structure, delighted to see it is exposed. The unreliable hsa calls has been a consistent nuisance for ages, great to see we don't need that hack any more.

Possible after-commit fix is to replace all the return 1 with different numbers (maybe an enum?) so that we have exit 0 on success and an exit code which indicates what went wrong on failure.

@JonChesterfield
Copy link
Collaborator

Oh. I now see there was a bunch of discussion about this, will add some context.

The driver has a hard limit on how many processes can open it at a time. clang calls this utility to ask what gpu to compile for by default. If you put those together, a parallel build on a vaguely modern desktop immediately blows through that process limit and proceeds to fail, so the user has to deliberately build code slowly or specify the gpu by hand, to work around our tooling falling over.

The limit on number of processes is generally reasonable - launching hundreds of processes that all open the GPU and allocate queues and launch kernels is generally a disaster and having the kernel return an equivalent to "too many open" is great. However in the specific case where we are only asking for trivial information, which doesn't need to allocate a queue or do anything whatsoever with the GPU, this is a spurious and annoying limitation.

I suppose it could be "fixed" in the driver - some sort of reference count which is incremented when you do something non-trivial instead of on open - but I'd expect the kernel people to tell us to stop opening hundreds of processes when none of them do any work.

One clumsy outstanding thing is that this should now be some code in a header that clang includes so that instead of the subprocess shell to handle arch=native clang just looks up the information directly.

@b-sumner does the additional context make the design choice clear?

@jhuber6
Copy link
Contributor Author

jhuber6 commented Nov 18, 2024

One clumsy outstanding thing is that this should now be some code in a header that clang includes so that instead of the subprocess shell to handle arch=native clang just looks up the information directly.

Would only work for Linux unfortunately, unless some Windows driver developer out there knows if there's some similar win32 magic.

@JonChesterfield
Copy link
Collaborator

Would only work for Linux unfortunately, unless some Windows driver developer out there knows if there's some similar win32 magic.

Windows getting subprocess calls until their driver catches up (or someone points out how to do this) seems fine to me. Linux people get a slightly faster clang, and maybe even one that prints useful error messages while it dies derived from the return code.

@jhuber6 jhuber6 merged commit 129a1a2 into llvm:main Nov 19, 2024
8 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 19, 2024

LLVM Buildbot has detected a new failure on builder ppc64le-lld-multistage-test running on ppc64le-lld-multistage-test while building clang at step 12 "build-stage2-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/168/builds/5681

Here is the relevant piece of the build log for the reference
Step 12 (build-stage2-unified-tree) failure: build (failure)
...
364.467 [1053/1154/4136] Building CXX object tools/clang/lib/AST/CMakeFiles/obj.clangAST.dir/ScanfFormatString.cpp.o
364.509 [1052/1154/4137] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/FixedAddressChecker.cpp.o
364.537 [1051/1154/4138] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/UndefCapturedBlockVarChecker.cpp.o
364.567 [1050/1154/4139] Building CXX object lib/Target/Mips/CMakeFiles/LLVMMipsCodeGen.dir/MipsSubtarget.cpp.o
364.597 [1049/1154/4140] Building CXX object lib/Target/Sparc/CMakeFiles/LLVMSparcCodeGen.dir/SparcTargetMachine.cpp.o
364.627 [1048/1154/4141] Building CXX object lib/Target/VE/MCTargetDesc/CMakeFiles/LLVMVEDesc.dir/VEMCCodeEmitter.cpp.o
364.667 [1047/1154/4142] Building CXX object tools/clang/lib/AST/CMakeFiles/obj.clangAST.dir/StmtCXX.cpp.o
364.707 [1046/1154/4143] Building CXX object lib/Target/X86/MCTargetDesc/CMakeFiles/LLVMX86Desc.dir/X86ATTInstPrinter.cpp.o
364.737 [1045/1154/4144] Building CXX object lib/Target/X86/MCTargetDesc/CMakeFiles/LLVMX86Desc.dir/X86InstComments.cpp.o
364.767 [1044/1154/4145] Building CXX object tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o
FAILED: tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o 
ccache /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/install/stage1/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage2/tools/clang/tools/amdgpu-arch -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/clang/tools/amdgpu-arch -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/clang/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage2/tools/clang/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage2/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o -MF tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o.d -o tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/clang/tools/amdgpu-arch/AMDGPUArchByKFD.cpp
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/clang/tools/amdgpu-arch/AMDGPUArchByKFD.cpp:58:9: error: ignoring return value of function declared with 'nodiscard' attribute [-Werror,-Wunused-result]
   58 |         Line.drop_while([](char C) { return std::isspace(C); });
      |         ^~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
364.767 [1044/1153/4146] Linking CXX executable tools/clang/unittests/DirectoryWatcher/DirectoryWatcherTests
364.767 [1044/1152/4147] Linking CXX static library lib/libLLVMWebAssemblyAsmParser.a
364.771 [1044/1151/4148] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/HTMLDiagnostics.cpp.o
364.772 [1044/1150/4149] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/TrustReturnsNonnullChecker.cpp.o
364.774 [1044/1149/4150] Building CXX object tools/clang/lib/Interpreter/CMakeFiles/obj.clangInterpreter.dir/DeviceOffload.cpp.o
364.775 [1044/1148/4151] Building CXX object tools/clang/lib/AST/CMakeFiles/obj.clangAST.dir/Comment.cpp.o
364.777 [1044/1147/4152] Building CXX object tools/clang/lib/AST/CMakeFiles/obj.clangAST.dir/CommentParser.cpp.o
364.778 [1044/1146/4153] Building CXX object lib/Target/AArch64/MCTargetDesc/CMakeFiles/LLVMAArch64Desc.dir/AArch64WinCOFFObjectWriter.cpp.o
364.778 [1044/1145/4154] Linking CXX executable bin/llvm-cxxfilt
364.799 [1044/1144/4155] Building CXX object lib/Target/ARM/CMakeFiles/LLVMARMCodeGen.dir/ARMRegisterBankInfo.cpp.o
364.801 [1044/1143/4156] Linking CXX static library lib/libLLVMVEDesc.a
364.871 [1044/1142/4157] Building CXX object tools/clang/tools/nvptx-arch/CMakeFiles/nvptx-arch.dir/NVPTXArch.cpp.o
364.875 [1044/1141/4158] Building CXX object tools/clang/lib/Parse/CMakeFiles/obj.clangParse.dir/ParseAST.cpp.o
364.899 [1044/1140/4159] Building CXX object lib/Target/SystemZ/CMakeFiles/LLVMSystemZCodeGen.dir/SystemZShortenInst.cpp.o
364.899 [1044/1139/4160] Linking CXX executable bin/llvm-cvtres
364.929 [1044/1138/4161] Building CXX object tools/clang/lib/AST/CMakeFiles/obj.clangAST.dir/DeclOpenMP.cpp.o
364.930 [1044/1137/4162] Building CXX object tools/clang/tools/diagtool/CMakeFiles/diagtool.dir/FindDiagnosticID.cpp.o
364.949 [1044/1136/4163] Building CXX object lib/Target/XCore/Disassembler/CMakeFiles/LLVMXCoreDisassembler.dir/XCoreDisassembler.cpp.o
364.968 [1044/1135/4164] Building CXX object tools/clang/lib/AST/CMakeFiles/obj.clangAST.dir/StmtObjC.cpp.o
364.972 [1044/1134/4165] Building CXX object lib/Target/PowerPC/CMakeFiles/LLVMPowerPCCodeGen.dir/PPCMacroFusion.cpp.o
365.029 [1044/1133/4166] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/SwiftCallingConv.cpp.o
365.031 [1044/1132/4167] Linking CXX executable bin/llvm-debuginfod-find
365.037 [1044/1131/4168] Building CXX object lib/Target/PowerPC/CMakeFiles/LLVMPowerPCCodeGen.dir/PPCCTRLoops.cpp.o
365.041 [1044/1130/4169] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/MmapWriteExecChecker.cpp.o
365.068 [1044/1129/4170] Building CXX object lib/Target/AArch64/Disassembler/CMakeFiles/LLVMAArch64Disassembler.dir/AArch64ExternalSymbolizer.cpp.o
365.087 [1044/1128/4171] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/ObjCUnusedIVarsChecker.cpp.o
365.092 [1044/1127/4172] Building CXX object lib/Target/NVPTX/CMakeFiles/LLVMNVPTXCodeGen.dir/NVPTXReplaceImageHandles.cpp.o
365.105 [1044/1126/4173] Building CXX object lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonRDFOpt.cpp.o
365.146 [1044/1125/4174] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/obj.clangStaticAnalyzerCore.dir/AnalysisManager.cpp.o
365.149 [1044/1124/4175] Building CXX object lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyExceptionInfo.cpp.o
365.156 [1044/1123/4176] Building CXX object lib/Target/ARM/CMakeFiles/LLVMARMCodeGen.dir/MVEVPTBlockPass.cpp.o
365.189 [1044/1122/4177] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/ArrayBoundChecker.cpp.o
365.201 [1044/1121/4178] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/CheckObjCInstMethSignature.cpp.o

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 19, 2024

LLVM Buildbot has detected a new failure on builder sanitizer-ppc64le-linux running on ppc64le-sanitizer while building clang at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/72/builds/5473

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
[3741/4107] Linking CXX executable bin/llvm-jitlink-executor
[3742/4107] Linking CXX static library lib/libLLVMPowerPCDisassembler.a
[3743/4107] Linking CXX static library lib/libLLVMPowerPCDesc.a
[3744/4107] Linking CXX static library lib/libLLVMIRReader.a
[3745/4107] Linking CXX executable bin/llvm-stress
[3746/4107] Linking CXX executable bin/llvm-bcanalyzer
[3747/4107] Linking CXX executable bin/llvm-dis
[3748/4107] Linking CXX executable bin/llvm-diff
[3749/4107] Building CXX object tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArch.cpp.o
[3750/4107] Building CXX object tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o
FAILED: tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm_build0/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/tools/clang/tools/amdgpu-arch -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/clang/tools/amdgpu-arch -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/clang/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/tools/clang/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o -MF tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o.d -o tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/clang/tools/amdgpu-arch/AMDGPUArchByKFD.cpp
/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/clang/tools/amdgpu-arch/AMDGPUArchByKFD.cpp:58:9: error: ignoring return value of function declared with 'nodiscard' attribute [-Werror,-Wunused-result]
   58 |         Line.drop_while([](char C) { return std::isspace(C); });
      |         ^~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
[3751/4107] Building CXX object lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/AsmParser.cpp.o
ninja: build stopped: subcommand failed.

How to reproduce locally: https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild

@@@STEP_FAILURE@@@
@@@BUILD_STEP test compiler-rt debug@@@
ninja: Entering directory `build_default'
[1/239] Linking CXX static library lib/libLLVMMCParser.a
[2/239] Linking CXX static library lib/libLLVMPowerPCAsmParser.a
[3/239] Linking CXX static library lib/libLLVMObject.a
[4/239] Linking CXX static library lib/libLLVMLibDriver.a
[5/239] Linking CXX static library lib/libLLVMDlltoolDriver.a
[6/239] Linking CXX static library lib/libLLVMObjCopy.a
[7/239] Linking CXX static library lib/libLLVMDebugInfoDWARF.a
[8/239] Linking CXX static library lib/libLLVMJITLink.a
[9/239] Linking CXX static library lib/libLLVMRuntimeDyld.a
[10/239] Linking CXX static library lib/libLLVMObjectYAML.a
[11/239] Linking CXX static library lib/libLLVMXRay.a
[12/239] Linking CXX static library lib/libLLVMDebugInfoPDB.a
[13/239] Linking CXX static library lib/libLLVMTextAPIBinaryReader.a
[14/239] Linking CXX static library lib/libLLVMSymbolize.a
[15/239] Linking CXX static library lib/libLLVMDebuginfod.a
[16/239] Linking CXX static library lib/libLLVMProfileData.a
[17/239] Linking CXX static library lib/libLLVMCoverage.a
[18/239] Linking CXX static library lib/libLLVMAnalysis.a
[19/239] Linking CXX executable bin/llvm-size
[20/239] Linking CXX static library lib/libLLVMFrontendDriver.a
[21/239] Linking CXX static library lib/libLLVMBitWriter.a
[22/239] Linking CXX static library lib/libLLVMIRPrinter.a
[23/239] Linking CXX static library lib/libLLVMTarget.a
[24/239] Linking CXX static library lib/libLLVMSandboxIR.a
[25/239] Linking CXX static library lib/libLLVMTransformUtils.a
Step 8 (build compiler-rt debug) failure: build compiler-rt debug (failure)
...
[3741/4107] Linking CXX executable bin/llvm-jitlink-executor
[3742/4107] Linking CXX static library lib/libLLVMPowerPCDisassembler.a
[3743/4107] Linking CXX static library lib/libLLVMPowerPCDesc.a
[3744/4107] Linking CXX static library lib/libLLVMIRReader.a
[3745/4107] Linking CXX executable bin/llvm-stress
[3746/4107] Linking CXX executable bin/llvm-bcanalyzer
[3747/4107] Linking CXX executable bin/llvm-dis
[3748/4107] Linking CXX executable bin/llvm-diff
[3749/4107] Building CXX object tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArch.cpp.o
[3750/4107] Building CXX object tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o
FAILED: tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm_build0/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/tools/clang/tools/amdgpu-arch -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/clang/tools/amdgpu-arch -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/clang/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/tools/clang/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o -MF tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o.d -o tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/clang/tools/amdgpu-arch/AMDGPUArchByKFD.cpp
/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/clang/tools/amdgpu-arch/AMDGPUArchByKFD.cpp:58:9: error: ignoring return value of function declared with 'nodiscard' attribute [-Werror,-Wunused-result]
   58 |         Line.drop_while([](char C) { return std::isspace(C); });
      |         ^~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
[3751/4107] Building CXX object lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/AsmParser.cpp.o
ninja: build stopped: subcommand failed.

How to reproduce locally: https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild
Step 10 (build compiler-rt tsan_debug) failure: build compiler-rt tsan_debug (failure)
...
[3721/4088] Building CXX object tools/clang/tools/clang-extdef-mapping/CMakeFiles/clang-extdef-mapping.dir/ClangExtDefMapGen.cpp.o
[3722/4088] Building CXX object tools/clang/tools/driver/CMakeFiles/clang.dir/driver.cpp.o
[3723/4088] Linking CXX executable bin/llvm-diff
[3724/4088] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CIndex.cpp.o
[3725/4088] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXExtractAPI.cpp.o
[3726/4088] Building CXX object tools/clang/tools/clang-repl/CMakeFiles/clang-repl.dir/ClangRepl.cpp.o
[3727/4088] Building CXX object tools/clang/tools/driver/CMakeFiles/clang.dir/cc1_main.cpp.o
[3728/4088] Building CXX object tools/clang/tools/clang-scan-deps/CMakeFiles/clang-scan-deps.dir/ClangScanDeps.cpp.o
[3729/4088] Building CXX object tools/clang/tools/clang-installapi/CMakeFiles/clang-installapi.dir/ClangInstallAPI.cpp.o
[3730/4088] Building CXX object tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o
FAILED: tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm_build0/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/tools/clang/tools/amdgpu-arch -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/clang/tools/amdgpu-arch -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/clang/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/tools/clang/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o -MF tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o.d -o tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/clang/tools/amdgpu-arch/AMDGPUArchByKFD.cpp
/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/clang/tools/amdgpu-arch/AMDGPUArchByKFD.cpp:58:9: error: ignoring return value of function declared with 'nodiscard' attribute [-Werror,-Wunused-result]
   58 |         Line.drop_while([](char C) { return std::isspace(C); });
      |         ^~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
[3731/4088] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/HIPUtility.cpp.o
[3732/4088] Building CXX object lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/AsmParser.cpp.o
ninja: build stopped: subcommand failed.

How to reproduce locally: https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild
Step 11 (build compiler-rt default) failure: build compiler-rt default (failure)
...
[3741/4107] Building CXX object tools/clang/tools/clang-check/CMakeFiles/clang-check.dir/ClangCheck.cpp.o
[3742/4107] Building CXX object tools/clang/tools/driver/CMakeFiles/clang.dir/driver.cpp.o
[3743/4107] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CIndex.cpp.o
[3744/4107] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CIndexCodeCompletion.cpp.o
[3745/4107] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXExtractAPI.cpp.o
[3746/4107] Building CXX object tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/core_main.cpp.o
[3747/4107] Building CXX object tools/clang/tools/clang-repl/CMakeFiles/clang-repl.dir/ClangRepl.cpp.o
[3748/4107] Building CXX object tools/clang/tools/driver/CMakeFiles/clang.dir/cc1_main.cpp.o
[3749/4107] Building CXX object tools/clang/tools/clang-installapi/CMakeFiles/clang-installapi.dir/ClangInstallAPI.cpp.o
[3750/4107] Building CXX object tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o
FAILED: tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm_build0/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/tools/clang/tools/amdgpu-arch -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/clang/tools/amdgpu-arch -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/clang/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/tools/clang/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o -MF tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o.d -o tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/clang/tools/amdgpu-arch/AMDGPUArchByKFD.cpp
/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/clang/tools/amdgpu-arch/AMDGPUArchByKFD.cpp:58:9: error: ignoring return value of function declared with 'nodiscard' attribute [-Werror,-Wunused-result]
   58 |         Line.drop_while([](char C) { return std::isspace(C); });
      |         ^~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
[3751/4107] Building CXX object lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/AsmParser.cpp.o
ninja: build stopped: subcommand failed.

How to reproduce locally: https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 19, 2024

LLVM Buildbot has detected a new failure on builder sanitizer-aarch64-linux running on sanitizer-buildbot8 while building clang at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/51/builds/6547

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
[4584/5342] Linking CXX executable bin/obj2yaml
[4585/5342] Generating ../../bin/llvm-addr2line
[4586/5342] Linking CXX executable bin/verify-uselistorder
[4587/5342] Linking CXX executable bin/sanstats
[4588/5342] Linking CXX executable bin/llvm-readobj
[4589/5342] Generating ../../bin/llvm-readelf
[4590/5342] Building CXX object tools/clang/tools/clang-installapi/CMakeFiles/clang-installapi.dir/ClangInstallAPI.cpp.o
[4591/5342] Building X86GenDAGISel.inc...
[4592/5342] Building CXX object tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArch.cpp.o
[4593/5342] Building CXX object tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o
FAILED: tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /home/b/sanitizer-aarch64-linux/build/llvm_build0/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/b/sanitizer-aarch64-linux/build/build_default/tools/clang/tools/amdgpu-arch -I/home/b/sanitizer-aarch64-linux/build/llvm-project/clang/tools/amdgpu-arch -I/home/b/sanitizer-aarch64-linux/build/llvm-project/clang/include -I/home/b/sanitizer-aarch64-linux/build/build_default/tools/clang/include -I/home/b/sanitizer-aarch64-linux/build/build_default/include -I/home/b/sanitizer-aarch64-linux/build/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o -MF tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o.d -o tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o -c /home/b/sanitizer-aarch64-linux/build/llvm-project/clang/tools/amdgpu-arch/AMDGPUArchByKFD.cpp
/home/b/sanitizer-aarch64-linux/build/llvm-project/clang/tools/amdgpu-arch/AMDGPUArchByKFD.cpp:58:9: error: ignoring return value of function declared with 'nodiscard' attribute [-Werror,-Wunused-result]
   58 |         Line.drop_while([](char C) { return std::isspace(C); });
      |         ^~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
[4594/5342] Building X86GenSubtargetInfo.inc...
[4595/5342] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/HIPUtility.cpp.o
[4596/5342] Building RISCVGenInstrInfo.inc...
[4597/5342] Building RISCVGenGlobalISel.inc...
[4598/5342] Building X86GenInstrInfo.inc...
[4599/5342] Building AMDGPUGenGlobalISel.inc...
[4600/5342] Building AMDGPUGenAsmMatcher.inc...
[4601/5342] Building AMDGPUGenInstrInfo.inc...
[4602/5342] Building RISCVGenDAGISel.inc...
[4603/5342] Building AMDGPUGenAsmWriter.inc...
[4604/5342] Building AMDGPUGenDAGISel.inc...
[4605/5342] Building AMDGPUGenRegisterBank.inc...
[4606/5342] Building AMDGPUGenRegisterInfo.inc...
[4607/5342] Building RISCVGenSubtargetInfo.inc...
ninja: build stopped: subcommand failed.

How to reproduce locally: https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild

@@@STEP_FAILURE@@@
@@@BUILD_STEP test compiler-rt symbolizer@@@
ninja: Entering directory `build_default'
[1/490] Building CXX object lib/Target/RISCV/CMakeFiles/LLVMRISCVCodeGen.dir/RISCVAsmPrinter.cpp.o
[2/490] Building CXX object lib/Target/RISCV/CMakeFiles/LLVMRISCVCodeGen.dir/RISCVCallingConv.cpp.o
[3/490] Building CXX object lib/Target/RISCV/CMakeFiles/LLVMRISCVCodeGen.dir/RISCVCodeGenPrepare.cpp.o
[4/490] Building CXX object lib/Target/RISCV/CMakeFiles/LLVMRISCVCodeGen.dir/RISCVConstantPoolValue.cpp.o
[5/490] Building CXX object lib/Target/RISCV/CMakeFiles/LLVMRISCVCodeGen.dir/RISCVDeadRegisterDefinitions.cpp.o
[6/490] Building CXX object lib/Target/RISCV/CMakeFiles/LLVMRISCVCodeGen.dir/RISCVMakeCompressible.cpp.o
[7/490] Building CXX object lib/Target/RISCV/CMakeFiles/LLVMRISCVCodeGen.dir/RISCVExpandAtomicPseudoInsts.cpp.o
[8/490] Building CXX object lib/Target/RISCV/CMakeFiles/LLVMRISCVCodeGen.dir/RISCVFrameLowering.cpp.o
[9/490] Building CXX object lib/Target/RISCV/CMakeFiles/LLVMRISCVCodeGen.dir/RISCVInsertReadWriteCSR.cpp.o
[10/490] Building CXX object lib/Target/RISCV/CMakeFiles/LLVMRISCVCodeGen.dir/RISCVInsertWriteVXRM.cpp.o
[11/490] Building CXX object lib/Target/RISCV/CMakeFiles/LLVMRISCVCodeGen.dir/RISCVInstrInfo.cpp.o
[12/490] Building CXX object lib/Target/RISCV/CMakeFiles/LLVMRISCVCodeGen.dir/RISCVLandingPadSetup.cpp.o
Step 8 (build compiler-rt symbolizer) failure: build compiler-rt symbolizer (failure)
...
[4584/5342] Linking CXX executable bin/obj2yaml
[4585/5342] Generating ../../bin/llvm-addr2line
[4586/5342] Linking CXX executable bin/verify-uselistorder
[4587/5342] Linking CXX executable bin/sanstats
[4588/5342] Linking CXX executable bin/llvm-readobj
[4589/5342] Generating ../../bin/llvm-readelf
[4590/5342] Building CXX object tools/clang/tools/clang-installapi/CMakeFiles/clang-installapi.dir/ClangInstallAPI.cpp.o
[4591/5342] Building X86GenDAGISel.inc...
[4592/5342] Building CXX object tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArch.cpp.o
[4593/5342] Building CXX object tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o
FAILED: tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /home/b/sanitizer-aarch64-linux/build/llvm_build0/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/b/sanitizer-aarch64-linux/build/build_default/tools/clang/tools/amdgpu-arch -I/home/b/sanitizer-aarch64-linux/build/llvm-project/clang/tools/amdgpu-arch -I/home/b/sanitizer-aarch64-linux/build/llvm-project/clang/include -I/home/b/sanitizer-aarch64-linux/build/build_default/tools/clang/include -I/home/b/sanitizer-aarch64-linux/build/build_default/include -I/home/b/sanitizer-aarch64-linux/build/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o -MF tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o.d -o tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o -c /home/b/sanitizer-aarch64-linux/build/llvm-project/clang/tools/amdgpu-arch/AMDGPUArchByKFD.cpp
/home/b/sanitizer-aarch64-linux/build/llvm-project/clang/tools/amdgpu-arch/AMDGPUArchByKFD.cpp:58:9: error: ignoring return value of function declared with 'nodiscard' attribute [-Werror,-Wunused-result]
   58 |         Line.drop_while([](char C) { return std::isspace(C); });
      |         ^~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
[4594/5342] Building X86GenSubtargetInfo.inc...
[4595/5342] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/HIPUtility.cpp.o
[4596/5342] Building RISCVGenInstrInfo.inc...
[4597/5342] Building RISCVGenGlobalISel.inc...
[4598/5342] Building X86GenInstrInfo.inc...
[4599/5342] Building AMDGPUGenGlobalISel.inc...
[4600/5342] Building AMDGPUGenAsmMatcher.inc...
[4601/5342] Building AMDGPUGenInstrInfo.inc...
[4602/5342] Building RISCVGenDAGISel.inc...
[4603/5342] Building AMDGPUGenAsmWriter.inc...
[4604/5342] Building AMDGPUGenDAGISel.inc...
[4605/5342] Building AMDGPUGenRegisterBank.inc...
[4606/5342] Building AMDGPUGenRegisterInfo.inc...
[4607/5342] Building RISCVGenSubtargetInfo.inc...
ninja: build stopped: subcommand failed.

How to reproduce locally: https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild
Step 10 (build compiler-rt debug) failure: build compiler-rt debug (failure)
...
[4586/5342] Linking CXX executable bin/llvm-xray
[4587/5342] Linking CXX executable bin/sanstats
[4588/5342] Linking CXX executable bin/obj2yaml
[4589/5342] Linking CXX executable bin/llvm-extract
[4590/5342] Linking CXX executable bin/verify-uselistorder
[4591/5342] Building CXX object tools/clang/tools/clang-installapi/CMakeFiles/clang-installapi.dir/ClangInstallAPI.cpp.o
[4592/5342] Linking CXX executable bin/lli
[4593/5342] Building X86GenSubtargetInfo.inc...
[4594/5342] Building RISCVGenInstrInfo.inc...
[4595/5342] Building CXX object tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o
FAILED: tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /home/b/sanitizer-aarch64-linux/build/llvm_build0/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/b/sanitizer-aarch64-linux/build/build_default/tools/clang/tools/amdgpu-arch -I/home/b/sanitizer-aarch64-linux/build/llvm-project/clang/tools/amdgpu-arch -I/home/b/sanitizer-aarch64-linux/build/llvm-project/clang/include -I/home/b/sanitizer-aarch64-linux/build/build_default/tools/clang/include -I/home/b/sanitizer-aarch64-linux/build/build_default/include -I/home/b/sanitizer-aarch64-linux/build/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o -MF tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o.d -o tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o -c /home/b/sanitizer-aarch64-linux/build/llvm-project/clang/tools/amdgpu-arch/AMDGPUArchByKFD.cpp
/home/b/sanitizer-aarch64-linux/build/llvm-project/clang/tools/amdgpu-arch/AMDGPUArchByKFD.cpp:58:9: error: ignoring return value of function declared with 'nodiscard' attribute [-Werror,-Wunused-result]
   58 |         Line.drop_while([](char C) { return std::isspace(C); });
      |         ^~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
[4596/5342] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/HIPUtility.cpp.o
[4597/5342] Building RISCVGenGlobalISel.inc...
[4598/5342] Building X86GenInstrInfo.inc...
[4599/5342] Building RISCVGenDAGISel.inc...
[4600/5342] Building AMDGPUGenAsmWriter.inc...
[4601/5342] Building AMDGPUGenGlobalISel.inc...
[4602/5342] Building AMDGPUGenDAGISel.inc...
[4603/5342] Building AMDGPUGenAsmMatcher.inc...
[4604/5342] Building AMDGPUGenInstrInfo.inc...
[4605/5342] Building AMDGPUGenRegisterBank.inc...
[4606/5342] Building RISCVGenSubtargetInfo.inc...
[4607/5342] Building AMDGPUGenRegisterInfo.inc...
ninja: build stopped: subcommand failed.

How to reproduce locally: https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild
Step 12 (build compiler-rt tsan_debug) failure: build compiler-rt tsan_debug (failure)
...
[4565/5323] Generating ../../bin/llvm-readelf
[4566/5323] Linking CXX executable bin/llvm-symbolizer
[4567/5323] Linking CXX executable bin/yaml2obj
[4568/5323] Building CXX object tools/clang/lib/Interpreter/CMakeFiles/obj.clangInterpreter.dir/Interpreter.cpp.o
[4569/5323] Generating ../../bin/llvm-addr2line
[4570/5323] Linking CXX executable bin/llvm-xray
[4571/5323] Linking CXX executable bin/obj2yaml
[4572/5323] Linking CXX executable bin/sanstats
[4573/5323] Linking CXX executable bin/verify-uselistorder
[4574/5323] Building CXX object tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o
FAILED: tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /home/b/sanitizer-aarch64-linux/build/llvm_build0/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/b/sanitizer-aarch64-linux/build/build_default/tools/clang/tools/amdgpu-arch -I/home/b/sanitizer-aarch64-linux/build/llvm-project/clang/tools/amdgpu-arch -I/home/b/sanitizer-aarch64-linux/build/llvm-project/clang/include -I/home/b/sanitizer-aarch64-linux/build/build_default/tools/clang/include -I/home/b/sanitizer-aarch64-linux/build/build_default/include -I/home/b/sanitizer-aarch64-linux/build/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o -MF tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o.d -o tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o -c /home/b/sanitizer-aarch64-linux/build/llvm-project/clang/tools/amdgpu-arch/AMDGPUArchByKFD.cpp
/home/b/sanitizer-aarch64-linux/build/llvm-project/clang/tools/amdgpu-arch/AMDGPUArchByKFD.cpp:58:9: error: ignoring return value of function declared with 'nodiscard' attribute [-Werror,-Wunused-result]
   58 |         Line.drop_while([](char C) { return std::isspace(C); });
      |         ^~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
[4575/5323] Building X86GenSubtargetInfo.inc...
[4576/5323] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/HIPUtility.cpp.o
[4577/5323] Building RISCVGenInstrInfo.inc...
[4578/5323] Building RISCVGenGlobalISel.inc...
[4579/5323] Building X86GenInstrInfo.inc...
[4580/5323] Building AMDGPUGenAsmWriter.inc...
[4581/5323] Building AMDGPUGenDAGISel.inc...
[4582/5323] Building RISCVGenDAGISel.inc...
[4583/5323] Building AMDGPUGenAsmMatcher.inc...
[4584/5323] Building AMDGPUGenRegisterBank.inc...
[4585/5323] Building AMDGPUGenInstrInfo.inc...
[4586/5323] Building AMDGPUGenGlobalISel.inc...
[4587/5323] Building AMDGPUGenRegisterInfo.inc...
[4588/5323] Building RISCVGenSubtargetInfo.inc...
ninja: build stopped: subcommand failed.

How to reproduce locally: https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild
Step 13 (build compiler-rt default) failure: build compiler-rt default (failure)
...
[4586/5342] Generating ../../bin/llvm-readelf
[4587/5342] Generating ../../bin/llvm-addr2line
[4588/5342] Linking CXX executable bin/verify-uselistorder
[4589/5342] Linking CXX executable bin/sanstats
[4590/5342] Linking CXX executable bin/obj2yaml
[4591/5342] Building X86GenSubtargetInfo.inc...
[4592/5342] Linking CXX executable bin/lli
[4593/5342] Building CXX object tools/clang/tools/clang-installapi/CMakeFiles/clang-installapi.dir/ClangInstallAPI.cpp.o
[4594/5342] Building RISCVGenInstrInfo.inc...
[4595/5342] Building CXX object tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o
FAILED: tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /home/b/sanitizer-aarch64-linux/build/llvm_build0/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/b/sanitizer-aarch64-linux/build/build_default/tools/clang/tools/amdgpu-arch -I/home/b/sanitizer-aarch64-linux/build/llvm-project/clang/tools/amdgpu-arch -I/home/b/sanitizer-aarch64-linux/build/llvm-project/clang/include -I/home/b/sanitizer-aarch64-linux/build/build_default/tools/clang/include -I/home/b/sanitizer-aarch64-linux/build/build_default/include -I/home/b/sanitizer-aarch64-linux/build/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o -MF tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o.d -o tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o -c /home/b/sanitizer-aarch64-linux/build/llvm-project/clang/tools/amdgpu-arch/AMDGPUArchByKFD.cpp
/home/b/sanitizer-aarch64-linux/build/llvm-project/clang/tools/amdgpu-arch/AMDGPUArchByKFD.cpp:58:9: error: ignoring return value of function declared with 'nodiscard' attribute [-Werror,-Wunused-result]
   58 |         Line.drop_while([](char C) { return std::isspace(C); });
      |         ^~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
[4596/5342] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/HIPUtility.cpp.o
[4597/5342] Building X86GenInstrInfo.inc...
[4598/5342] Building RISCVGenGlobalISel.inc...
[4599/5342] Building RISCVGenDAGISel.inc...
[4600/5342] Building AMDGPUGenAsmWriter.inc...
[4601/5342] Building AMDGPUGenAsmMatcher.inc...
[4602/5342] Building AMDGPUGenGlobalISel.inc...
[4603/5342] Building AMDGPUGenDAGISel.inc...
[4604/5342] Building AMDGPUGenInstrInfo.inc...
[4605/5342] Building AMDGPUGenRegisterBank.inc...
[4606/5342] Building RISCVGenSubtargetInfo.inc...
[4607/5342] Building AMDGPUGenRegisterInfo.inc...
ninja: build stopped: subcommand failed.

How to reproduce locally: https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 19, 2024

LLVM Buildbot has detected a new failure on builder clang-ppc64le-rhel running on ppc64le-clang-rhel-test while building clang at step 5 "build-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/145/builds/3271

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
50.887 [1254/34/5032] Building CXX object tools/clang/tools/extra/clangd/refactor/tweaks/CMakeFiles/obj.clangDaemonTweaks.dir/RawStringLiteral.cpp.o
50.889 [1254/33/5033] Building CXX object tools/clang/tools/extra/pp-trace/CMakeFiles/pp-trace.dir/PPTrace.cpp.o
50.941 [1254/32/5034] Building CXX object tools/clang/tools/extra/clangd/refactor/tweaks/CMakeFiles/obj.clangDaemonTweaks.dir/ObjCLocalizeStringLiteral.cpp.o
50.944 [1254/31/5035] Building CXX object tools/clang/tools/extra/clangd/refactor/tweaks/CMakeFiles/obj.clangDaemonTweaks.dir/SwapBinaryOperands.cpp.o
50.961 [1254/30/5036] Building CXX object tools/clang/tools/extra/clangd/refactor/tweaks/CMakeFiles/obj.clangDaemonTweaks.dir/ObjCMemberwiseInitializer.cpp.o
50.970 [1254/29/5037] Building CXX object tools/clang/tools/extra/clangd/refactor/tweaks/CMakeFiles/obj.clangDaemonTweaks.dir/SpecialMembers.cpp.o
50.991 [1254/28/5038] Building CXX object tools/clang/tools/extra/clang-doc/CMakeFiles/obj.clangDoc.dir/Mapper.cpp.o
51.062 [1254/27/5039] Building CXX object tools/clang/tools/extra/clangd/tool/CMakeFiles/obj.clangdMain.dir/Check.cpp.o
51.172 [1254/26/5040] Building CXX object tools/clang/tools/extra/clangd/refactor/tweaks/CMakeFiles/obj.clangDaemonTweaks.dir/RemoveUsingNamespace.cpp.o
51.388 [1254/25/5041] Building CXX object tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o
FAILED: tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o 
ccache /home/docker/llvm-external-buildbots/clang.17.0.6/bin/clang++ --gcc-toolchain=/gcc-toolchain/usr -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/tools/clang/tools/amdgpu-arch -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/clang/tools/amdgpu-arch -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/clang/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/tools/clang/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o -MF tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o.d -o tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/clang/tools/amdgpu-arch/AMDGPUArchByKFD.cpp
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/clang/tools/amdgpu-arch/AMDGPUArchByKFD.cpp:58:9: error: ignoring return value of function declared with 'nodiscard' attribute [-Werror,-Wunused-result]
   58 |         Line.drop_while([](char C) { return std::isspace(C); });
      |         ^~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
51.592 [1254/24/5042] Building CXX object tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArch.cpp.o
52.882 [1254/23/5043] Building CXX object lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/AsmParser.cpp.o
53.622 [1254/22/5044] Building RISCVGenDAGISel.inc...
56.562 [1254/21/5045] Building AArch64GenInstrInfo.inc...
57.025 [1254/20/5046] Building AArch64GenSubtargetInfo.inc...
59.984 [1254/19/5047] Building CXX object lib/CodeGen/AsmPrinter/CMakeFiles/LLVMAsmPrinter.dir/AsmPrinter.cpp.o
63.048 [1254/18/5048] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTO.cpp.o
72.711 [1254/17/5049] Building AMDGPUGenMCCodeEmitter.inc...
74.371 [1254/16/5050] Building AMDGPUGenRegBankGICombiner.inc...
76.581 [1254/15/5051] Building AMDGPUGenPreLegalizeGICombiner.inc...
76.990 [1254/14/5052] Building AMDGPUGenMCPseudoLowering.inc...
77.264 [1254/13/5053] Building AMDGPUGenCallingConv.inc...
77.313 [1254/12/5054] Building AMDGPUGenSearchableTables.inc...
77.560 [1254/11/5055] Building AMDGPUGenDisassemblerTables.inc...
79.313 [1254/10/5056] Building AMDGPUGenPostLegalizeGICombiner.inc...
80.461 [1254/9/5057] Building AMDGPUGenSubtargetInfo.inc...
85.388 [1254/8/5058] Building RISCVGenSubtargetInfo.inc...
87.809 [1254/7/5059] Building AMDGPUGenAsmWriter.inc...
93.218 [1254/6/5060] Building AMDGPUGenAsmMatcher.inc...
94.931 [1254/5/5061] Building AMDGPUGenGlobalISel.inc...
97.021 [1254/4/5062] Building AMDGPUGenDAGISel.inc...
97.644 [1254/3/5063] Building AMDGPUGenInstrInfo.inc...
99.254 [1254/2/5064] Building AMDGPUGenRegisterBank.inc...
101.339 [1254/1/5065] Building AMDGPUGenRegisterInfo.inc...
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 19, 2024

LLVM Buildbot has detected a new failure on builder sanitizer-x86_64-linux-android running on sanitizer-buildbot-android while building clang at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/186/builds/4148

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
[4826/5317] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXComment.cpp.o
[4827/5317] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CIndexInclusionStack.cpp.o
[4828/5317] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/FatalErrorHandler.cpp.o
[4829/5317] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CIndexHigh.cpp.o
[4830/5317] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CIndexCodeCompletion.cpp.o
[4831/5317] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXLoadedDiagnostic.cpp.o
[4832/5317] Linking CXX executable bin/clang-repl
[4833/5317] Building CXX object tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArch.cpp.o
[4834/5317] Building CXX object tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByHIP.cpp.o
[4835/5317] Building CXX object tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o
FAILED: tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build0/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build64/tools/clang/tools/amdgpu-arch -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/tools/amdgpu-arch -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/include -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build64/tools/clang/include -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build64/include -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o -MF tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o.d -o tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o -c /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/tools/amdgpu-arch/AMDGPUArchByKFD.cpp
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/tools/amdgpu-arch/AMDGPUArchByKFD.cpp:58:9: error: ignoring return value of function declared with 'nodiscard' attribute [-Werror,-Wunused-result]
   58 |         Line.drop_while([](char C) { return std::isspace(C); });
      |         ^~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
[4836/5317] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXCursor.cpp.o
[4837/5317] Building CXX object tools/clang/tools/nvptx-arch/CMakeFiles/nvptx-arch.dir/NVPTXArch.cpp.o
[4838/5317] Linking CXX executable bin/dsymutil
[4839/5317] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXSourceLocation.cpp.o
[4840/5317] Linking CXX executable bin/bugpoint
[4841/5317] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXStoredDiagnostic.cpp.o
[4842/5317] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CIndex.cpp.o
[4843/5317] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXIndexDataConsumer.cpp.o
[4844/5317] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXString.cpp.o
[4845/5317] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/Rewrite.cpp.o
[4846/5317] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXType.cpp.o
[4847/5317] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/Indexing.cpp.o
[4848/5317] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXExtractAPI.cpp.o
ninja: build stopped: subcommand failed.

How to reproduce locally: https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild

@@@STEP_FAILURE@@@
Step 9 (bootstrap clang) failure: bootstrap clang (failure)
...
[4826/5317] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXComment.cpp.o
[4827/5317] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CIndexInclusionStack.cpp.o
[4828/5317] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/FatalErrorHandler.cpp.o
[4829/5317] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CIndexHigh.cpp.o
[4830/5317] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CIndexCodeCompletion.cpp.o
[4831/5317] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXLoadedDiagnostic.cpp.o
[4832/5317] Linking CXX executable bin/clang-repl
[4833/5317] Building CXX object tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArch.cpp.o
[4834/5317] Building CXX object tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByHIP.cpp.o
[4835/5317] Building CXX object tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o
FAILED: tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build0/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build64/tools/clang/tools/amdgpu-arch -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/tools/amdgpu-arch -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/include -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build64/tools/clang/include -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm_build64/include -I/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o -MF tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o.d -o tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o -c /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/tools/amdgpu-arch/AMDGPUArchByKFD.cpp
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/clang/tools/amdgpu-arch/AMDGPUArchByKFD.cpp:58:9: error: ignoring return value of function declared with 'nodiscard' attribute [-Werror,-Wunused-result]
   58 |         Line.drop_while([](char C) { return std::isspace(C); });
      |         ^~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
[4836/5317] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXCursor.cpp.o
[4837/5317] Building CXX object tools/clang/tools/nvptx-arch/CMakeFiles/nvptx-arch.dir/NVPTXArch.cpp.o
[4838/5317] Linking CXX executable bin/dsymutil
[4839/5317] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXSourceLocation.cpp.o
[4840/5317] Linking CXX executable bin/bugpoint
[4841/5317] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXStoredDiagnostic.cpp.o
[4842/5317] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CIndex.cpp.o
[4843/5317] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXIndexDataConsumer.cpp.o
[4844/5317] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXString.cpp.o
[4845/5317] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/Rewrite.cpp.o
[4846/5317] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXType.cpp.o
[4847/5317] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/Indexing.cpp.o
[4848/5317] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXExtractAPI.cpp.o
ninja: build stopped: subcommand failed.

How to reproduce locally: https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild
program finished with exit code 2
elapsedTime=5318.190216

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 20, 2024

LLVM Buildbot has detected a new failure on builder clang-ppc64-aix running on aix-ppc64 while building clang at step 3 "clean-build-dir".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/64/builds/1492

Here is the relevant piece of the build log for the reference
Step 3 (clean-build-dir) failure: Delete failed. (failure) (timed out)
Step 5 (build-unified-tree) failure: build (failure)
...
6066.097 [533/10/4667] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CIndexInclusionStack.cpp.o
6067.313 [532/10/4668] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXCursor.cpp.o
6071.142 [531/10/4669] Linking CXX executable bin/clang-offload-packager
6071.391 [530/10/4670] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CIndex.cpp.o
6071.498 [529/10/4671] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXIndexDataConsumer.cpp.o
6071.666 [528/10/4672] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/FatalErrorHandler.cpp.o
6072.379 [527/10/4673] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXLoadedDiagnostic.cpp.o
6073.149 [526/10/4674] Linking CXX executable bin/clang-offload-bundler
6074.816 [525/10/4675] Building CXX object tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArch.cpp.o
6075.576 [524/10/4676] Building CXX object tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o
FAILED: tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o 
/usr/local/clang-17.0.2/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_LARGE_FILE_API -D_XOPEN_SOURCE=700 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/tools/clang/tools/amdgpu-arch -I/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/clang/tools/amdgpu-arch -I/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/clang/include -I/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/tools/clang/include -I/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/include -I/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/include -mcmodel=large -fPIC -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o -MF tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o.d -o tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByKFD.cpp.o -c /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/clang/tools/amdgpu-arch/AMDGPUArchByKFD.cpp
/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/clang/tools/amdgpu-arch/AMDGPUArchByKFD.cpp:58:9: error: ignoring return value of function declared with 'nodiscard' attribute [-Werror,-Wunused-result]
   58 |         Line.drop_while([](char C) { return std::isspace(C); });
      |         ^~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
6077.385 [524/9/4677] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXStoredDiagnostic.cpp.o
6077.696 [524/8/4678] Building CXX object tools/clang/tools/amdgpu-arch/CMakeFiles/amdgpu-arch.dir/AMDGPUArchByHIP.cpp.o
6077.714 [524/7/4679] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXString.cpp.o
6079.528 [524/6/4680] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXSourceLocation.cpp.o
6081.109 [524/5/4681] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXType.cpp.o
6095.893 [524/4/4682] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/Rewrite.cpp.o
6096.515 [524/3/4683] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/Indexing.cpp.o
6096.830 [524/2/4684] Linking CXX executable bin/clang-scan-deps
6102.648 [524/1/4685] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXExtractAPI.cpp.o
ninja: build stopped: subcommand failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:AMDGPU clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants