Process finished with exit code 138[139] (interrupted by signal 10: SIGBUS[SIGSEGV])

Hi,

I get these one of these errors

  • Process finished with exit code 138 (interrupted by signal 10: SIGBUS)
  • Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

When I run my Python code.

I noticed that:

  • it occurs randomly, sometimes yes, others not.
  • it occurs in both Run and Debug
  • It occurs, not always, when I do an operation on pandas, always on the same data:
  • no Exception is raised

df = df.groupby(columns).count().reset_index()[filter_columns]

Is this a know issue? How can I solve it?

1
11 comments

I'm having a similar problem when running a django application. However, for me, it never happens when running normally, and always happens when trying to run debug mode. I get the same error:

Process finished with exit code 138 (interrupted by signal 10: SIGBUS)

Any help with this would be appreciated.

0

Hello, 

Please  add the following environment variables in your run/debug configuration, and check if it makes any difference:

PYDEVD_USE_CYTHON=NO
PYDEVD_USE_FRAME_EVAL=NO

Let me know the results. 

1

Hi, I'd been having the same problems / errors when debugging my python unit tests within pycharm intermittently. Setting the environment variables as Antonina describes above works for me. Many thanks. 

0
Avatar
Permanently deleted user

Hi, I have encountered the same problem when running pytest from Pycharm.

When I debug the failures, they are plainly incomprehensible, but with the following traits:

  1. failure only happens when multiple tests are run together: it could be a single parametrized test, or multiple tests in the same module;
  2. the exact point of failure is always inside an __init__ function. 
  3. the failure is always due to mysterious missing instance attributes even they have been just assigned; like
    self.a = something; print(self.__dict__);  self.b = another_thing; print(self.__dict__); 
    and in the first print there is "a" inside, but it is gone in the second print. But if I try to put a breakpoint before the second assignment and wait for a while, the test would always pass.

Setting the environment variable doesn't help in my case. The error happens both in normal run and debug.

Running pytest directly from the command line has no problem.

I am running PyCharm 202.6397.98  in python 3.78 by the way.

 

 

0
Avatar
Permanently deleted user

Following up what I have posted yesterday, the problem disappeared if I set 

PYTHONMALLOC=debug

as mentioned in https://bugs.python.org/issue34087 when running the test.

It doesn't look like the same issue, however, but I guess it would be hard to figure out why without providing a reproducible build.

1

Hey, @Antonina Belianskaya I have been on this for about 2 weeks now. I have done what you said. However, I still get the same message. 

0

me too! same error!

0

Please file a ticket to our issue tracker https://youtrack.jetbrains.com/issues/PY and provide code and steps for reproducing the problem.

0

Hi,

I have the same issue, only happens when running, shift+F10

When debugging, everything is fine, when running from console also no problem.

It only happens if I run the code with pycharm.

PYTHONUNBUFFERED=1

Any solution?

0

I had a similar issue (139 SIGSEGV) and it went away by setting the environment variable PYDEV_USE_CYTHON to NO. I did this by selecting "Edit Configurations" and adding to the "Environment variables" field to make it contain:

PYTHONUNBUFFERED=1;PYDEVD_USE_CYTHON=NO
2

Setting up the env variables worked for me. Thank you guys!

0

Please sign in to leave a comment.