Skip to content
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

ff-probe segfault on macOS #87

Open
GodTamIt opened this issue Jan 11, 2022 · 1 comment
Open

ff-probe segfault on macOS #87

GodTamIt opened this issue Jan 11, 2022 · 1 comment
Labels

Comments

@GodTamIt
Copy link

Here's the output from the program and backtrace from LLDB:

(lldb) run
Process 67173 launched: '/Users/godtamit/src/llfio/programs/build/bin/fs-probe' (x86_64)
Writing 17Gb of temporary test files, this will take a while ...
Attempting to flush all modified data in system and drop all filesystem caches ...
   WARNING: Failed due to Operation not supported
Waiting for hard drive to quieten after temp files written ...

direct=0 sync=0:
Running test system:os:name ...
   system:os:name = Darwin
Running test system:os:ver ...
   system:os:ver = 21.2.0
Running test system:cpu:name ...
   system:cpu:name = GenuineIntel Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
Running test system:cpu:architecture ...
   system:cpu:architecture = x86_64
Running test system:cpu:physical_cores ...
   system:cpu:physical_cores = 4
Running test system:mem:max_bandwidth ...
llfio: Large page allocation successful
Process 67173 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xffffffffffffffff)
    frame #0: 0x00007ff81e520669 libsystem_platform.dylib`_platform_bzero$VARIANT$Haswell + 41
libsystem_platform.dylib`_platform_bzero$VARIANT$Haswell:
->  0x7ff81e520669 <+41>: rep    stosb	%al, %es:(%rdi)
    0x7ff81e52066b <+43>: movq   %rdx, %rax
    0x7ff81e52066e <+46>: popq   %rbp
    0x7ff81e52066f <+47>: retq
Target 0: (fs-probe) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xffffffffffffffff)
  * frame #0: 0x00007ff81e520669 libsystem_platform.dylib`_platform_bzero$VARIANT$Haswell + 41
    frame #1: 0x000000010002dfe3 fs-probe`llfio_v2_713b9dc8::storage_profile::system::mem(sp=0x00000001001ac160, h=0x00007ff7bfeff248) at storage_profile.ipp:189:11
    frame #2: 0x0000000100060dd5 fs-probe`llfio_v2_713b9dc8::storage_profile::item<unsigned long long>::operator(this=0x00000001001ac3e8, sp=0x00000001001ac160, h=0x00007ff7bfeff248)(llfio_v2_713b9dc8::storage_profile::storage_profile&, llfio_v2_713b9dc8::file_handle&) const at storage_profile.hpp:129:14
    frame #3: 0x0000000100060c92 fs-probe`auto llfio_v2_713b9dc8::storage_profile::item_erased::operator(this=0x00007ff7bfefefc0, item=0x00000001001ac3e8)(llfio_v2_713b9dc8::storage_profile::storage_profile&, llfio_v2_713b9dc8::file_handle&) const::'lambda'(auto&)::operator()<llfio_v2_713b9dc8::storage_profile::item<unsigned long long> const>(auto&) const at storage_profile.hpp:168:52
    frame #4: 0x0000000100060b7d fs-probe`auto llfio_v2_713b9dc8::storage_profile::item_erased::invoke<llfio_v2_713b9dc8::storage_profile::item_erased::operator()(llfio_v2_713b9dc8::storage_profile::storage_profile&, llfio_v2_713b9dc8::file_handle&) const::'lambda'(auto&)>(this=0x00000001001ac3e8, f=0x00007ff7bfefefc0) const at storage_profile.hpp:151:16
    frame #5: 0x000000010000571f fs-probe`llfio_v2_713b9dc8::storage_profile::item_erased::operator(this=0x00000001001ac3e8, sp=0x00000001001ac160, h=0x00007ff7bfeff248)(llfio_v2_713b9dc8::storage_profile::storage_profile&, llfio_v2_713b9dc8::file_handle&) const at storage_profile.hpp:168:14
    frame #6: 0x0000000100003705 fs-probe`main(argc=1, argv=0x00007ff7bfeff7f0) at main.cpp:168:25
    frame #7: 0x00000001004594fe dyld`start + 462
@ned14
Copy link
Owner

ned14 commented Jan 12, 2022

I don't have access to a Mac, so the port to Mac is mainly me trial and erroring the Mac CI runner.

I wonder if it's the lack of PROT_READ in https://github.com/ned14/llfio/blob/develop/include/llfio/v2.0/detail/impl/posix/utils.ipp#L733?

@ned14 ned14 added the bug label Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants