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?

5 comments
Comment actions Permalink

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
Comment actions Permalink

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. 

0
Comment actions Permalink

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
Comment actions Permalink

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
Comment actions Permalink

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.

0

Please sign in to leave a comment.