interpreter crashes

Tim Peters tim.one at home.com
Sat Oct 27 21:58:21 EDT 2001


[Paul Rubin]
> A few times I've had Python 2.1.1 crash on me for no apparent reason.
> Cursory inspection of the core dump doesn't show much-- the
> interpreter seemed to be innocently evaluating something.  Chances are
> something (maybe a reference count) got corrupted sometime earlier and
> eventually set off the crash.  The one out-of-the-ordinary thing I may
> have been doing was repeatedly reloading modules as I debugged them.
> But I'm not even sure about that.

Are you running with any extension modules (incl. any sort of GUI pkg)?  Are
you running threads?  Refcount problems in extension modules (others' or
especially your own) are historically the #1 cause of crashes.  Thread races
seemingly unique to a specific platform are #2.  Cyclic gc caused a few
nasty cases when it was new, but we don't see reports of crashes due to that
anymore.

> Anyone got any suggestions?

Without a reproducible problem in hand, or even a characterization of one,
guess <wink>.

> Want to see the core dumps?

If you open a SoureForge bug report, someone may.

> How frequently does this type of thing happen?

Essentially never for most people; rarely to frequently for people tickling
some specific unpopular bug.  If you're seeing crashes frequently, you *are*
doing something most people aren't (else we'd be getting other reports, and
we aren't), or may even have a flaky memory chip (etc).

> If Python is in the habit of crashing randomly, that may make it
> inadvisable to write long-running servers that need to stay up.  Perhaps
> it's more appropriate to write servers Apache-style, forking new
> processes and reinitializing every so often.

If Python were in the habit of crashing randomly, I'd advise not using it at
all.





More information about the Python-list mailing list