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

SIGNAL, Code 10 Bus error: 10 Will running on apple m1 through rosetta 2. #17

Open
billettc opened this issue Oct 19, 2021 · 2 comments

Comments

@billettc
Copy link

I'm getting "Bus error: 10" when trying to run a Solana Validator compile on my Mac M1 using the "arch -x86_64 cargo build" inside a Rosetta 2 terminal.

Here the detail of the crash:

`-------------------------------------
Translated Report (Full Report Below)

Process: solana-validator [57812]
Path: /Users/USER/*/solana-validator
Identifier: solana-validator
Version: ???
Code Type: X86-64 (Translated)
Parent Process: zsh [64578]
Responsible: iTerm2 [6549]
User ID: 501

Date/Time: 2021-10-19 07:48:27.3311 -0400
OS Version: macOS 12.0 (21A5552a)
Report Version: 12
Anonymous UUID: 8513CD6B-D2F8-376B-11F1-92B20BE15753

Time Awake Since Boot: 78000 seconds

System Integrity Protection: enabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00000001050b7128
Exception Codes: 0x0000000000000002, 0x00000001050b7128
Exception Note: EXC_CORPSE_NOTIFY

Termination Reason: Namespace SIGNAL, Code 10 Bus error: 10
Terminating Process: exc handler [57812]

VM Region Info: 0x1050b7128 is in 0x1047c6000-0x10bec0000; bytes after start: 9376040 bytes before end: 115379927
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
VM_ALLOCATE 1047b2000-1047c6000 [ 80K] rw-/rw- SM=PRV
---> __LINKEDIT 1047c6000-10bec0000 [119.0M] r--/r-- SM=COW ...ana-validator
__LINKEDIT 10bec0000-10bec2000 [ 8K] r--/r-- SM=NUL ...ana-validator

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 solana-validator 0x100c70312 rtree_leaf_elm_write + 258
1 solana-validator 0x100c700b4 extent_rtree_write_acquired + 84
2 solana-validator 0x100c75124 extent_register_impl + 340
3 solana-validator 0x100c681e2 extent_register + 34
4 solana-validator 0x100c68174 extent_alloc_wrapper_hard + 628
5 solana-validator 0x100c67d03 _rjem_je_extent_alloc_wrapper + 435
6 solana-validator 0x100c33728 _rjem_je_arena_extent_alloc_large + 648
7 solana-validator 0x100c78203 _rjem_je_large_palloc + 2195
8 solana-validator 0x100c7795f _rjem_je_large_malloc + 63
9 solana-validator 0x100c36de0 _rjem_je_arena_palloc + 3232
10 solana-validator 0x100c941c8 _rjem_je_tsd_tcache_data_init + 2040
11 solana-validator 0x100c939bc _rjem_je_tsd_tcache_enabled_data_init + 108
12 solana-validator 0x100ca23b7 tsd_data_init + 87
13 solana-validator 0x100ca1e54 _rjem_je_tsd_fetch_slow + 692
14 solana-validator 0x100ca2b7f _rjem_je_malloc_tsd_boot0 + 831
15 solana-validator 0x100c2f88e malloc_init_hard + 158
16 solana-validator 0x100c2a521 jemalloc_constructor + 33
17 dyld 0x20bf16b49 invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 182
18 dyld 0x20bf3d0ff invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 129
19 dyld 0x20bf34893 invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 566
20 dyld 0x20bf03d91 dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const + 129
21 dyld 0x20bf3461b dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 179
22 dyld 0x20bf3cb30 dyld3::MachOAnalyzer::forEachInitializerPointerSection(Diagnostics&, void (unsigned int, unsigned int, unsigned char const*, bool&) block_pointer) const + 118
23 dyld 0x20bf3cda2 dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 386
24 dyld 0x20bf16a7c dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 144
25 dyld 0x20bf16c08 dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const + 178
26 dyld 0x20bf16cac dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const + 108
27 dyld 0x20bf2a32e dyld4::APIs::runAllInitializersForMain() + 222
28 dyld 0x20bf08358 dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 3438
29 dyld 0x20bf074b4 start + 388
30 ??? 0x3 ???

Thread 1:: com.apple.rosetta.exceptionserver
0 runtime 0x7ff7ffe058e4 0x7ff7ffe01000 + 18660
1 runtime 0x7ff7ffe12928 0x7ff7ffe01000 + 71976
2 runtime 0x7ff7ffe140a4 0x7ff7ffe01000 + 77988

{threadState|"No thread state (register information) available"}

Binary Images:
0x100b82000 - 0x104659fff solana-validator () /Users/USER//solana-validator
0x20bf02000 - 0x20bf6dfff dyld () <48e0922a-562a-33e9-bfb6-a94ca1480d94> /usr/lib/dyld
0x0 - 0xffffffffffffffff ??? (
) <00000000-0000-0000-0000-000000000000> ???
0x7ff7ffe01000 - 0x7ff7ffe30fff runtime (*) /usr/libexec/rosetta/runtime

External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 0
thread_create: 0
thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=1.0G resident=0K(0%) swapped_out_or_unallocated=1.0G(100%)
Writable regions: Total=815.4M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=815.4M(100%)

                            VIRTUAL   REGION 

REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Activity Tracing 256K 1
Kernel Alloc Once 8K 1
MALLOC 154.1M 14
MALLOC guard page 96K 4
MALLOC_MEDIUM (reserved) 120.0M 1 reserved VM address space (unallocated)
MALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)
Rosetta Arena 4096K 2
Rosetta Generic 676K 166
Rosetta IndirectBranch 32K 1
Rosetta JIT 128.0M 1
Rosetta Return Stack 20K 2
Rosetta Thread Context 20K 2
Stack 8176K 1
Stack Guard 56.0M 1
VM_ALLOCATE 12.8M 7
VM_ALLOCATE (reserved) 48K 2 reserved VM address space (unallocated)
__DATA 15.5M 242
__DATA_CONST 12.3M 144
__DATA_DIRTY 484K 84
__FONT_DATA 4K 1
__LINKEDIT 813.9M 14
__OBJC_RO 81.5M 1
__OBJC_RW 3120K 2
__TEXT 246.9M 253
__UNICODE 588K 1
dyld private memory 1056K 3
mapped file 5.1G 298
shared memory 80K 5
unshared pmap 2416K 2
=========== ======= =======
TOTAL 7.1G 1257
TOTAL, minus reserved VM space 6.6G 1257
`

@Techcable
Copy link

Techcable commented Aug 14, 2022

This could be because M1 Macs use 16K pages at a hardware level, while jemalloc defaults to 8K pages.....

EDIT: I think BusyJay is correct here

@BusyJay
Copy link
Member

BusyJay commented Aug 15, 2022

Issue in jemalloc: jemalloc/jemalloc#2014

niyue added a commit to yanhuangdata/vector that referenced this issue Oct 23, 2022
niyue added a commit to yanhuangdata/vector that referenced this issue Oct 25, 2022
niyue added a commit to yanhuangdata/vector that referenced this issue Oct 25, 2022
niyue added a commit to yanhuangdata/vector that referenced this issue Oct 26, 2022
ProBrian pushed a commit to yanhuangdata/vector that referenced this issue Oct 28, 2022
ProBrian pushed a commit to yanhuangdata/vector that referenced this issue Nov 2, 2022
ProBrian pushed a commit to yanhuangdata/vector that referenced this issue Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants