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

segmentation fault - Python 3.10 on Mac M3 #2706

Closed
slanton-a opened this issue Jul 25, 2024 · 11 comments
Closed

segmentation fault - Python 3.10 on Mac M3 #2706

slanton-a opened this issue Jul 25, 2024 · 11 comments
Labels
bug Something isn't working

Comments

@slanton-a
Copy link

Environment

Python: 3.10.14
Mac OS: 14.4

Delta-rs version:
0.15.0
Binding:

Environment:

  • Cloud provider:
  • OS: Mac OS 14.4
  • Other:

Bug

Importing deltalake results in segmentation fault error
What happened:

  1. Start a new env
  2. install packages with pip install pyarrow==8.0.0 deltalake==0.15.0 numpy==1.26.4
  3. Start a Python shell and type:
from deltalake import DeltaTable, write_deltalake
exit()
  1. Once the shell exit you will see the segmentation fault error
    What you expected to happen:
    No error on exit
    How to reproduce it:
    see above
    More details:
Python 3.10.14 (main, Jul 25 2024, 15:47:37) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from deltalake import DeltaTable, write_deltalake
>>> exit()
[1]    17729 segmentation fault  python
@slanton-a slanton-a added the bug Something isn't working label Jul 25, 2024
@ion-elgreco
Copy link
Collaborator

@slanton-a please use the latest version and report back :)

@slanton-a
Copy link
Author

@ion-elgreco Same result with 0.18.2

@ion-elgreco
Copy link
Collaborator

@slanton-a can you compile from main and then import?

@slanton-a
Copy link
Author

@ion-elgreco Not sure I follow, give a step by step and I will try to reproduce

@sherlockbeard
Copy link
Contributor

@slanton-a
short stuff
use pyarrow>=9.0.0 if you want to exit without error (maybe time we bump up pyarrow)

long answer
trigged lldb python with your example
output

* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x10)
    frame #0: 0x000000010825ca30 libarrow.800.dylib`Aws::Http::CurlHandleContainer::~CurlHandleContainer() + 52
libarrow.800.dylib`Aws::Http::CurlHandleContainer::~CurlHandleContainer:
->  0x10825ca30 <+52>: ldr    x8, [x8, #0x10]
    0x10825ca34 <+56>: blr    x8
    0x10825ca38 <+60>: cmp    w0, #0x4
    0x10825ca3c <+64>: b.lt   0x10825cb30               ; <+308>

libarrow -> pyarrow
which i believe is from aws/aws-sdk-cpp#1833

@ion-elgreco
Copy link
Collaborator

@sherlockbeard thanks for checking!

We can keep the pyarrow at min 8.0.0 though, since most platforms that works fine

I'll close this issue then

@slanton-a
Copy link
Author

What is the upper limit for pyarrow? @ion-elgreco

@ion-elgreco
Copy link
Collaborator

@slanton-a there is no upper limit

@slanton-a
Copy link
Author

@ion-elgreco sorry I meant to ask about a lower limit. Since 8.0.0 is the current one but it's not working. In my large project that has hundreds package, it took me several day to figure out the issue is with deltalake and pyarrow

@ion-elgreco
Copy link
Collaborator

@ion-elgreco sorry I meant to ask about a lower limit. Since 8.0.0 is the current one but it's not working. In my large project that has hundreds package, it took me several day to figure out the issue is with deltalake and pyarrow

Lower limit is 8.0.0. But this is simply the requirement for pyarrow code to be compatible with our codebase.

In this case your platform of choice is not working with pyarrow I guess, but that's not something we could resolve

@slanton-a
Copy link
Author

Got it, the error indeed seems to come from the line import pyarrow.fs as pa_fs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants