0

I'm getting an intermittant segfault in python, which really shouldn't happen. It's a heisenbug, so I haven't figured out exactly what's causing it.

I've done the search and found that there was a known problem with an older version of python, but I'm using 2.7.10 (in a virtualenv, in case that matters)

I'm using pandas (0.18.0) , scipy(0.17.0) and numpy (1.11.0), in case the problem might be in there...

Brian Postow
  • 11,709
  • 17
  • 81
  • 125
  • 1
    Speaking for myself, a segfault in python is always in a bit of dodgy C code that I have written, probably on a Friday night. Have you added any of your own C modules? Or maybe used `ctypes`? – cdarke Jun 08 '16 at 15:48
  • Nope... we have no home-grown C... or ctypes. Friday night code, I make no claims of. B-) – Brian Postow Jun 08 '16 at 18:10
  • If you are on a UNIX-like system then you should get a `core` dump - you might have to do `ulimit -c unlimited` to get the file. Using a debugger you might be able to find which executable (.so) file it came from. You won't get much more without debug versions of python and your modules though. – cdarke Jun 08 '16 at 19:32
  • It's a mac, so technically, yes. It was already unlimited, and no core. – Brian Postow Jun 09 '16 at 13:57
  • 1
    A core dump should have been produced. To check that it was unlimited, did you do `ulimit -c`? (If you just do `ulimit` then the default is `-f`, which is the maximum file size, not the core dump option). – cdarke Jun 09 '16 at 14:17
  • I don't seem to be able to change ulimit. ulimit -c gives 0. ulimit -c unlimited gives "operation not permitted" When I try with sudo, it doesn't error, but doesn't do anything either. – Brian Postow Jun 15 '16 at 16:53
  • Try `ulimit -c hard`. – cdarke Jun 15 '16 at 18:06
  • That doesn't seem to do anything. IT looks like crashes are handled elswehre on a mac... – Brian Postow Jun 15 '16 at 21:18

1 Answers1

0

It looks like: How to generate core dumps in Mac OS X?

might be the best way to get stack trace...it appears in ~/Library/Logs/DiagnosticReports I'm not sure if it's USEFUL, and it's not a core per se, to be put into a debugger, but it's something...

Community
  • 1
  • 1
Brian Postow
  • 11,709
  • 17
  • 81
  • 125