-
Notifications
You must be signed in to change notification settings - Fork 176
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
HWLOC_DEBUG=1 breaks hwloc on MacOS. #564
Comments
I can reproduce with your test case on a M1, now I need to learn how to debug with lldb instead of gdb :) |
Found the bug, it's indeed limited to recent Mac where hybrid processors are described in sysctl "perflevels". I forgot to honor the API filtering for caches found in these perflevels, they are always added even when explicitly filtered out. It's easy to fix, I'll fix master and stable branches tomorrow. The assert is only enabled in debug mode, but you'll get those unwanted caches in non-debug too. If this is annoying for you, I'll release a 2.9.1 earlier than planned (that's pretty much the only bug found in 2.9 so far). |
@FunMiles Can you try the tarball at https://ci.inria.fr/hwloc/view/all/job/bgoglin/500/ with autotools or just apply commit bgoglin@aa0ef16 on top of your cmake build ? |
It works. Thanks. I'll move that under my commits for CMakeLists PR that @JackBoosY requested in #565 (comment) |
The fix is included in hwloc 2.9.1rc1 released yesterday. Final 2.9.1 is expected early next week. |
I discovered this issue after creating a MacOS CMakeLists.txt based on the Windows one. The Windows CMakeLists.txt turns on HWLOC_DEBUG if the code is compiled under debugging. It seems to not be an issue coming from CMake compilation but also exists for autotools.
Notes:
What version of hwloc are you using?
3.0.0a1-git
commit 7987eb4
Which operating system and hardware are you running on?
Darwin Michels-MacBook-Pro.local 22.3.0 Darwin Kernel Version 22.3.0: Thu Jan 5 20:53:49 PST 2023; root:xnu-8792.81.2~2/RELEASE_X86_64 x86_64
Details of the problem
Steps to reproduce:
CC="gcc -DHWLOC_DEBUG" <path to hwloc>/configure --prefix=
pwd/dbg
make -j 16 && make install
clang++ -std=c++20 test.cpp -Ldbg/lib -lhwloc -Idbg/include -framework CoreFoundation -framework IOKit
./a.out
and it crashesAdditional information
sysctl hw
sysct machdep
The text was updated successfully, but these errors were encountered: