This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Fatal Python error: PyEval_RestoreThread: NULL tstate
Type: Stage:
Components: Versions: Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: DaVinci, pitrou, r.david.murray, terry.reedy
Priority: normal Keywords:

Created on 2012-12-22 02:04 by DaVinci, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
Python Error.JPG DaVinci, 2012-12-22 02:04
Messages (12)
msg177917 - (view) Author: Leonardo DaVinci (DaVinci) Date: 2012-12-22 02:04
I'm running the Solidoodle 2 printer with Python 2.7.3 (as recommended by
Solidoodle). I keep getting the "Fatal Python Error" message. I've tried
several Python versions, many installs without success.

I'm running Windows 7 x64 Ultimate sp1 on a MacBook pro with an i7, 8gigs
of Ram. I've installed all the softwares in x86 (32 bit) mode.

I'd like to know where the problem originates from.

Regards
Ciro
msg177918 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2012-12-22 02:09
Given the error message, my guess would be that there is a bug in the Solidoodle Python extension module.  That is, it is unlikely to be a bug in Python.
msg177919 - (view) Author: Leonardo DaVinci (DaVinci) Date: 2012-12-22 02:17
Ok thanks for the quick reply. I'll check with them.

Regards
Ciro

On Fri, Dec 21, 2012 at 9:09 PM, R. David Murray <report@bugs.python.org>wrote:

>
> R. David Murray added the comment:
>
> Given the error message, my guess would be that there is a bug in the
> Solidoodle Python extension module.  That is, it is unlikely to be a bug in
> Python.
>
> ----------
> nosy: +r.david.murray
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue16749>
> _______________________________________
>
msg177921 - (view) Author: Leonardo DaVinci (DaVinci) Date: 2012-12-22 02:58
Hi David,

I keep trying to unsuccessfully. Here's the problem details

  Problem signature:
  Problem Event Name: APPCRASH
  Application Name: python.exe
  Application Version: 0.0.0.0
  Application Timestamp: 4f84a6c8
  Fault Module Name: python27.dll
  Fault Module Version: 2.7.3150.1013
  Fault Module Timestamp: 4f84a6c7
  Exception Code: 40000015
  Exception Offset: 0006016a
  OS Version: 6.1.7601.2.1.0.256.1
  Locale ID: 3084
  Additional Information 1: 8c07
  Additional Information 2: 8c07c320598b1e31bf5de83aa7155e8f
  Additional Information 3: 8e83
  Additional Information 4: 8e835205385ec5be9858c1342251f482

Hope this helps

Regards
Ciro

On Fri, Dec 21, 2012 at 9:09 PM, R. David Murray <report@bugs.python.org>wrote:

>
> R. David Murray added the comment:
>
> Given the error message, my guess would be that there is a bug in the
> Solidoodle Python extension module.  That is, it is unlikely to be a bug in
> Python.
>
> ----------
> nosy: +r.david.murray
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue16749>
> _______________________________________
>
msg177943 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2012-12-22 14:46
Not really, I'm afraid.  You'd have to look at the crash dump in a debugger to get more useful information.  Perhaps one of the windows devs will have more concrete advice, I don't use Windows myself.
msg177945 - (view) Author: Leonardo DaVinci (DaVinci) Date: 2012-12-22 17:32
Ok I'll try booting and installing in Mac to see if the issue reappears.

Thanks for your time.

Happy holidays.

Ciro

On Sat, Dec 22, 2012 at 9:46 AM, R. David Murray <report@bugs.python.org>wrote:

>
> R. David Murray added the comment:
>
> Not really, I'm afraid.  You'd have to look at the crash dump in a
> debugger to get more useful information.  Perhaps one of the windows devs
> will have more concrete advice, I don't use Windows myself.
>
> ----------
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue16749>
> _______________________________________
>
msg178439 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2012-12-28 22:07
Antoine: do you know anything about this message?
Fatal Python error: PyEval_RestoreThread: NULL tstate
Is there a serious possibility that it could indicate a CPython error, as opposed to an extension author error? Could running Windows on Mac hardware make a difference?

Leonardo: You should have quoted the full error message instead of making each person search the image.

Also, Please don't quote entire messages in your replies (which means deleting them if replying with a mail program). They are already visible above your reply and constitute noise that makes scrolling in the web interface more tedious.

We will likely close this, at least for now, because there is currently no basis for action on our part.

1. From years of experience with such reports, we can be fairly certain that the problem is with the third party extension code. It is known that such code can crash CPython if it misuses the C API. We cannot prevent that without adding unacceptible overhead.

2. If there is a bug in CPython, then to do anything, we would need either Python code or proper C code that causes the crash. The latter would likely require cooperation of the Solidoodle extension authors.
 
For us to do anything, we need evidence in the form of (minimal) code we can run that there is a CPython bug.

Retrying under OS X is a good idea.

You could try testing the windows python installation with the test suite (python -m test.regrtest in a command window) but there are two problems when doing this with a user installation, as opposed to the test buildbots: there will be (expected) error boxes that you have to dismiss by hitting <enter>; and there will be a few reported errors that are not really errors in python itself.
msg178440 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-12-28 22:16
Well, the error message comes from a misuse of the PyEval_RestoreThread() (by passing it a NULL argument), either directly or by using another API such as Py_END_ALLOW_THREADS which calls that function. The problem is likely to be in the Solidoodle extension. Whatever the source of the problem, though, only a low-level C traceback would allow to tell.

I agree with closing, stock Python is very unlikely to produce such tracebacks.
msg178446 - (view) Author: Leonardo DaVinci (DaVinci) Date: 2012-12-29 00:13
Terry,

I've tried installing on Mac at least 6 times and I still get error
messages. I'm dealing with Solidoodle with no success.

I have an appointment with a 3d Print Lab on Jan 3rd (50 miles away) to
help me resolve my issues.

Regards
Ciro

On Fri, Dec 28, 2012 at 5:07 PM, Terry J. Reedy <report@bugs.python.org>wrote:

>
> Terry J. Reedy added the comment:
>
> Antoine: do you know anything about this message?
> Fatal Python error: PyEval_RestoreThread: NULL tstate
> Is there a serious possibility that it could indicate a CPython error, as
> opposed to an extension author error? Could running Windows on Mac hardware
> make a difference?
>
> Leonardo: You should have quoted the full error message instead of making
> each person search the image.
>
> Also, Please don't quote entire messages in your replies (which means
> deleting them if replying with a mail program). They are already visible
> above your reply and constitute noise that makes scrolling in the web
> interface more tedious.
>
> We will likely close this, at least for now, because there is currently no
> basis for action on our part.
>
> 1. From years of experience with such reports, we can be fairly certain
> that the problem is with the third party extension code. It is known that
> such code can crash CPython if it misuses the C API. We cannot prevent that
> without adding unacceptible overhead.
>
> 2. If there is a bug in CPython, then to do anything, we would need either
> Python code or proper C code that causes the crash. The latter would likely
> require cooperation of the Solidoodle extension authors.
>
> For us to do anything, we need evidence in the form of (minimal) code we
> can run that there is a CPython bug.
>
> Retrying under OS X is a good idea.
>
> You could try testing the windows python installation with the test suite
> (python -m test.regrtest in a command window) but there are two problems
> when doing this with a user installation, as opposed to the test buildbots:
> there will be (expected) error boxes that you have to dismiss by hitting
> <enter>; and there will be a few reported errors that are not really errors
> in python itself.
>
> ----------
> nosy: +pitrou, terry.reedy
> title: Fatal Python Error -> Fatal Python error: PyEval_RestoreThread:
> NULL tstate
> versions: +Python 2.7
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue16749>
> _______________________________________
>
msg178447 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-12-29 00:15
> I've tried installing on Mac at least 6 times and I still get error
> messages. I'm dealing with Solidoodle with no success.
> 
> I have an appointment with a 3d Print Lab on Jan 3rd (50 miles away) to
> help me resolve my issues.

Ciro, it seems you should wait a bit for Solidoodle's answer if you
asked them a question. I don't know about them, but if they're a
volunteer-run project you can't expect them to answer all requests very
quickly.
msg178463 - (view) Author: Leonardo DaVinci (DaVinci) Date: 2012-12-29 01:59
Actually Antoine,

Solidoodle has sent 2 email replies, 1 was a video link to some British guy
opening his box which wasn't packed like mine and had missing parts. and
the second email was just as useless stating that maybe I'm running both
platforms at the same time which I ain't...

In any case I went ahead and booked my appointment, I just want it to work.

Thanks for your time. Happy Holidays!

Best Regards
Ciro

On Fri, Dec 28, 2012 at 7:15 PM, Antoine Pitrou <report@bugs.python.org>wrote:

>
> Antoine Pitrou added the comment:
>
> > I've tried installing on Mac at least 6 times and I still get error
> > messages. I'm dealing with Solidoodle with no success.
> >
> > I have an appointment with a 3d Print Lab on Jan 3rd (50 miles away) to
> > help me resolve my issues.
>
> Ciro, it seems you should wait a bit for Solidoodle's answer if you
> asked them a question. I don't know about them, but if they're a
> volunteer-run project you can't expect them to answer all requests very
> quickly.
>
> ----------
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue16749>
> _______________________________________
>
msg178464 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2012-12-29 02:24
OK, given Antoine's reply, I am going to close this until there is actionable information.
History
Date User Action Args
2022-04-11 14:57:39adminsetgithub: 60953
2012-12-29 02:24:07terry.reedysetstatus: open -> closed
resolution: not a bug
messages: + msg178464
2012-12-29 01:59:25DaVincisetmessages: + msg178463
2012-12-29 00:15:39pitrousetmessages: + msg178447
2012-12-29 00:13:42DaVincisetstatus: pending -> open

messages: + msg178446
2012-12-28 22:16:16pitrousetstatus: open -> pending

messages: + msg178440
2012-12-28 22:07:58terry.reedysetnosy: + terry.reedy, pitrou
title: Fatal Python Error -> Fatal Python error: PyEval_RestoreThread: NULL tstate
messages: + msg178439

versions: + Python 2.7
2012-12-22 17:32:37DaVincisetmessages: + msg177945
2012-12-22 14:46:58r.david.murraysetmessages: + msg177943
2012-12-22 02:58:39DaVincisetmessages: + msg177921
2012-12-22 02:17:35DaVincisetmessages: + msg177919
2012-12-22 02:09:52r.david.murraysetnosy: + r.david.murray
messages: + msg177918
2012-12-22 02:04:16DaVincicreate