-
Notifications
You must be signed in to change notification settings - Fork 75
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
[BUG] pycall/pytypeobject_wrapper.rb:24: [BUG] Segmentation fault at 0x0000000000000010 #175
Comments
Reproduced a similar case on a platform with AMD processor. Intel is totally fine. If I run |
@fuck-lukashenko pycall doesn't support multithreading. Please call Python only from the main thread. |
@tevykak Could you please check whether Python was called from non-main threads when SEGV occurred? If so, please prevent calling Python from non-main threads because the current pycall can support only the main thread. |
@tevykak If this problem isn't related to multithreading, please reopen the issue. |
I was having the same issue, segfaults on almost every function call. Can confirm putting the code in the main thread fixed the problem. |
@tevykak could you give an example of the pandas code that caused your crash? I believe I have a similar example, but mine is using a more complicated library than pandas. It would help me produce a minimal repro if you could give a pandas snippet that crashes for you. |
I believe the issue is that Puma ALWAYS starts requests in a thread, even if you set threads=1, it will still do requests on a different thread than initialized the code, which is not safe for pycall. See: #185 |
See main tracking issue for thread safety: #96 |
I have a rails project using pycall and pandas.
I use these gems in a dedicated service. It works on production (heroku) and in a local rails console, I can run some data calculations.
But in a local rails server (I call the service from a controller), it doesn't work anymore: every time
pycall
is called, the server crashes.Apparently, the error comes from
pytypeobject_wrapper.rb
but I have absolutely no idea why and I don't know how to fix it.Please, help? 🥲
Backtrace:
App rails config:
I also try to run my server with virtualenv but it doesn't change anything, I have the same error.
The text was updated successfully, but these errors were encountered: