Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #29030 > unrolled thread

Re: Python2.4 on Win32 suddenly started crashing last night

Started byTim Chase <python.list@tim.thechases.com>
First post2012-09-13 08:08 -0500
Last post2012-09-13 08:08 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Python2.4 on Win32 suddenly started crashing last night Tim Chase <python.list@tim.thechases.com> - 2012-09-13 08:08 -0500

#29030 — Re: Python2.4 on Win32 suddenly started crashing last night

FromTim Chase <python.list@tim.thechases.com>
Date2012-09-13 08:08 -0500
SubjectRe: Python2.4 on Win32 suddenly started crashing last night
Message-ID<mailman.602.1347541620.27098.python-list@python.org>
On 09/13/12 07:42, Tim Chase wrote:
> It was working as of last night, and to the best of my knowledge,
> nothing was changed on the system.  It took a while to track it
> down, but it came from importing smtplib which in turn imports socket.
> 
> I've tried "import socket" and it crashes, but then tried importing
> each of the modules that are imported in socket.py and nothing dies:
> 
> C:\Program Files\Python24\Lib>python
> Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit
> (Intel)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import _socket
>>>> from _socket import *
>>>> import _ssl
>>>> from _ssl import *
>>>> import os, sys
>>>> from errno import EBADF
>>>> sys.platform
> 'win32'
>>>> import socket
> [win32 crash happens here]

Further diagnostics (copying socket.py to suckit.py and adding a
sys.exit(1) at various points and then importing sucket) seem to
point to this line in socket.py:

__all__.extend(os._get_exports_list(_socket))

So I can reduce the case to

  >>> import _socket
  >>> import os
  >>> os._get_exports_list(_socket)

and it goes kablooie.  If I do the same with _ssl:

  >>> import _ssl
  >>> import os
  >>> os._get_exports_list(_ssl)

and it works fine.

-tkc

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web