-
Notifications
You must be signed in to change notification settings - Fork 10
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
regopy does not work on ARM #92
Comments
Thanks for the report! Looks like cross-compile isn't working properly. I'll dig into it. |
It would be hugely helpful if you would try building the python module locally on the hardware. You can do this in the following way:
If that works and the resulting python module is able to be used, then that would definitely nail it down as a cross-compile problem. No worries if you can't, but it would help provide some information while I try to get my hands on some ARM hardware to build and test on. |
I've upgraded our CI to use the new Github M1 runners to build arm64 wheels. If you were able to try one of those and see if it resolves your issue, that would be greatly appreciated. |
@matajoh Thanks for digging into this. I tested the latest state on my M1 machine, and everything works fine. |
And no: I see this in the console after I copy/pasted the example:
|
Fun! Looks like there is some Arm64 Python specific issue causing a double free in the Python runtime. Unfortunately as I do not have local access to an Apple Silicon machine it is going to make debugging this quite difficult. Out of curiosity, would you please paste the entire output of the console when running the test script with the "-v" option? It may help me nail down exactly what problem Python is having in this circumstance while I try to track down a machine I can actually debug this on. |
I happen to run into the It can be reproduced by doing a ~/r/r/build (main) [106]> dist/bin/rego
rego 0.3.11 (main:6d84fc7, Fri, 19 Jan 2024 17:29:17 +0000)[AppleClang 15.0.0.15000100] on macos
--query is required
Run with --help or --help-all for more information.
~/r/r/build (main) [106]> strip dist/bin/rego
~/r/r/build (main)> dist/bin/rego
rego 0.3.11 (main:6d84fc7, Fri, 19 Jan 2024 17:29:17 +0000)[AppleClang 15.0.0.15000100] on macos
--query is required
Run with --help or --help-all for more information.
rego(5263,0x1dbe59000) malloc: *** error for object 0x106329980: pointer being freed was not allocated
rego(5263,0x1dbe59000) malloc: *** set a breakpoint in malloc_error_break to debug
fish: Job 1, 'dist/bin/rego' terminated by signal SIGABRT (Abort)
I couldn't debug it much since there aren't any debug symbols, but I was to bisect the code and figure out that the issue happens once line 43 has executed: Line 43 in 60058a7
Using dsymutil allowed retaining symbols yet reproduce the issue. Hope this helps. |
I've added the Apple Silicon build machines to our CI in an attempt to repro this error but it doesn't seem to arise on that hardware for any of those tests, which include building and running the Python wrapper and testing it (in addition to all the C, C++, and Rust tests). I'll see if I can get access to an arm Mac so I can try to repro what you have here @anakrish. |
Installing regopy on ARM architecture works, but using it throws an error.
The text was updated successfully, but these errors were encountered: