Bugs item #1332869, was opened at 2005-10-19 22:22
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1332869&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Interpreter Core
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Andrew Mitchell (ajmitch)
>Assigned to: Tim Peters (tim_one)
Summary:  Fatal Python error: Interpreter not initialized 

Initial Comment:
When running 'bzr status' on Ubuntu 5.10 with python
2.4.2, I came across the error:
Fatal Python error: Interpreter not initialized
(version mismatch?)
Aborted

The bzr code in question has a __del__ method which
when invoked (eventually) imports socket (which imports
_socket), causing everything to fall over in a heap.

A backtrace is available at http://pastebin.com/399461


----------------------------------------------------------------------

>Comment By: Neal Norwitz (nnorwitz)
Date: 2005-10-20 22:55

Message:
Logged In: YES 
user_id=33168

Hey Tim, I'm hoping you can take some time to long at this
patch (you too Michael and anyone else listening).

Attached is a patch which seems to fix this problem.  At
least it fixes it from Tim's example in the mail from Nov (I
think).  It moves initialized down after the GC collect.

Is this patch a good or bad thing?

Andrew, it would be interesting if you could test this patch
(you will need to rebuild python) for bzr.  I couldn't
trigger the problem from my version.

----------------------------------------------------------------------

Comment By: Michael Hudson (mwh)
Date: 2005-10-20 03:09

Message:
Logged In: YES 
user_id=6656

Are you using daemon threads?

Why is a __del__ method importing things?

----------------------------------------------------------------------

Comment By: Andrew Mitchell (ajmitch)
Date: 2005-10-20 01:51

Message:
Logged In: YES 
user_id=19159

Also,  gdb did not report other modules loaded

----------------------------------------------------------------------

Comment By: Andrew Mitchell (ajmitch)
Date: 2005-10-20 01:04

Message:
Logged In: YES 
user_id=19159

Feedback in #bzr indicated that I was triggering this code:
http://pastebin.com/399491 and also something similar to
http://mail.python.org/pipermail/python-dev/2003-September/038151.html
Another example that triggers it is
http://mail.python.org/pipermail/python-dev/2003-November/040188.html
It's all a stock breezy system, no external modules, and bzr
is retrieved from running:
 rsync -av bazaar-ng.org::bazaar-ng/bzr/bzr.dev .
I was using the latest revision at the time this happened.

----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2005-10-19 22:39

Message:
Logged In: YES 
user_id=33168

Also, where is the bzr code and what version are you running?

----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2005-10-19 22:37

Message:
Logged In: YES 
user_id=33168

Are there any other extension modules in the system that are
not provided with python?  When you went into gdb did it
print a long list of dynamic modules loaded?  Can you
provide that info too?

I'm guessing this is a memory overwrite which can happen
with poorly behaved C extension modules.  You could try
running python under valgrind and see what it reports.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1332869&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to