-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
"bus error" when running via Rosetta on Apple silicon mac #14946
Comments
Hi @niyue ! Thanks for this report. We have previously evaluated the other allocators you mentioned there, but the performance was not as good for Vector's allocation patterns as jemalloc was. It's been a while though, so we could certainly see if that is still the case. If you open a PR swapping the allocator, there is a Github Actions workflow that runs our performance tests and will post the difference. I'm surprised there hasn't been much movement on jemalloc/jemalloc#2014. Alternatively, we also have an issue to publish native M1 builds. Would that be sufficient for you? Vector does build under M1, so you could build it locally, we just haven't set up the scaffolding to publish the builds yet. |
FWIW, also on M1 and using tagged versions for x86 I've not run into this error - it's possibly related to a specific configuration or change you've made locally? |
It is possible since I am not 100% sure how this happens. The binary got loaded and crashed immediately without enter any code path yet (static variable like the memory allocator got initialized I think), and I don't have too much information except the I found it may be caused by jemalloc because I bisect to find the git commit, and then discovered that jemallocator and jemalloc's issue tracker indeed has related issue.
Is there any place I can get more info about the result we evaluated last time, such as when/what version of allocator was evaluated?
Thanks for the pointer, I only did some minimal change locally to make it work, and I am not sure how it impacts perf yet, I will give it a try.
It helps a lot in most cases, but my scenario is like this: |
I've submitted a PR to replace jemalloc with mimalloc, and see what the performance impact will be. |
I'm leaning towards just using the system allocator on OSX to resolve this given we don't have any performance tests on OSX to motivate using a different allocator. |
Problem
When running a x86_64 version of vector via Rosetta on Apple silicon mac, I ran into "bus error" immediately when launching vector (actually my use case is more complex since I built it from source with some modification).
After some binary searching, I found this is caused by this commit 5fe1767. This commit introduced jemalloc for memory allocation, however, jemalloc has some issue when running via Rosetta on Apple silicon mac:
Since the jemalloc issue (jemalloc/jemalloc#2014) has been there for nearly 2 years, I don't think it will be fixed any time soon. I wonder if there is any possibility to:
There are some other memory allocator like tcmalloc and mimalloc, which may provide comparable performance.
I've tried switch to mimalloc locally and doesn't run into such issue any more:
I don't run any performance benchmark so I have no idea how this impact vector's performance currently.
If such an option is acceptable, I am glad to give it a try. Thanks.
Configuration
No response
Version
0.24
Debug Output
No response
Example Data
No response
Additional Context
No response
References
No response
The text was updated successfully, but these errors were encountered: