SChernykh / p2pool

Decentralized pool for Monero mining
GNU General Public License v3.0
1.07k stars 128 forks source link

segmentation fault when running on macos 13.0 on M2 macbook air #217

Closed MarcusNewman closed 1 year ago

MarcusNewman commented 1 year ago

Anyone else having this issue? I built from the 2.5 code following the instructions for macos after installing xcode and homebrew

SChernykh commented 1 year ago

Do you have this problem with v2.5 official MacOS binaries? Edit: nevermind, you have an ARMv8 CPU so you have to build it. You can try to build all dependencies yourself, like CI script does: https://github.com/SChernykh/p2pool/blob/master/.github/workflows/c-cpp.yml#L305

MarcusNewman commented 1 year ago

I will try that and let you know. Thanks!

MarcusNewman commented 1 year ago

I rebuilt the dependencies manually, and p2pool seemed to run a little longer, but after just a few minutes it errored again with a segmentation fault. Anything else I can do to help document this?

SChernykh commented 1 year ago

Can you run it under a debugger (lldb or gdb) to get the callstack when it crashes? https://lldb.llvm.org/use/tutorial.html

SChernykh commented 1 year ago

@MarcusNewman can you compile the latest master branch and try again? A possible fix for this issue is in the latest commit.

MarcusNewman commented 1 year ago

Still seeing the segmentation fault with 2.6. I'll try rebuilding all dependencies again, and running it through the debugger soon.

SChernykh commented 1 year ago

Rebuild the latest master branch with dependencies, 2.6 binary doesn't have this fix.

MarcusNewman commented 1 year ago

4267 Segmentation fault: 11

I'll try rebuilding all dependencies and using the debugger soon.

MarcusNewman commented 1 year ago

lldb is saying Process 25575 exited with status = -1 (0xffffffff) lost connection

MarcusNewman commented 1 year ago

I even tried building the dependencies with more debug information ( --enable-debug --disable-optimize --enable-curldebug --disable-symbol-hiding) and -DCMAKE_BUILD_TYPE=Debug, still no more detail from lldb

MarcusNewman commented 1 year ago

I'm also looking into this: "Alternatively, you may have a crash report from your process segfaulting in ~/Library/Logs/DiagnosticReports/. This will show you the backtrace at the point where your binary crashed. You may also want to open Console.app and see if any messages are being logged to console at the point where it crashes."

sern19 commented 1 year ago

Building with older MacOS SDK fixed the issue for me.

You can download the SDK here https://github.com/phracker/MacOSX-SDKs/releases/tag/11.3 and then just run cmake with -DCMAKE_OSX_SYSROOT=/path/to/your/MacOSX11.3.sdk