[Python-bugs-list] [Bug #110667] select module: Bug in select.select() (PR#365)

noreply@sourceforge.net noreply@sourceforge.net
Wed, 23 Aug 2000 07:24:57 -0700


Bug #110667, was updated on 2000-Jul-31 21:12
Here is a current snapshot of the bug.

Project: Python
Category: None
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: select module: Bug in select.select() (PR#365)

Details: Jitterbug-Id: 365
Submitted-By: r32813@email.sps.mot.com
Date: Wed, 21 Jun 2000 12:00:54 -0400 (EDT)
Version: 1.5.2
OS: AIX 4.3.1


 The python 1.5.2 built on AIX 4.3.1.0 platform created a coredump when 
 this command was run:-
 
       select.select(waitList, [], [], timeWait)
 
 This command worked fine in Python 1.5.1 build and also fine on Python
 1.5.2 built on HP 10.2. It just didn't work in AIX 4.3.1.0 build on
 2 AIX machines that we have. 

 






====================================================================
Audit trail:
Tue Jul 11 08:24:19 2000	guido	moved from incoming to open

Follow-Ups:

Date: 2000-Aug-01 21:01
By: none

Comment:
From: Guido van Rossum <guido@python.org>
Subject: Re: [Python-bugs-list] select module: Bug in select.select() (PR#365)
Date: Wed, 21 Jun 2000 17:08:33 -0500

>  The python 1.5.2 built on AIX 4.3.1.0 platform created a coredump when 
>  this command was run:-
>  
>        select.select(waitList, [], [], timeWait)
>  
>  This command worked fine in Python 1.5.1 build and also fine on Python
>  1.5.2 built on HP 10.2. It just didn't work in AIX 4.3.1.0 build on
>  2 AIX machines that we have. 

Could you give us some more information?  You're indicating that it's
platform specific; we don't have an AIX box.  I'm guessing it's not
obvious that our code is wrong, but it may violate some guidelines
given by AIX manuals.  If we ever want to fix this, we'll need to
interact with you.  the first thing we need is a decent stack trace;
we'll take it from there.

If you could investigate this on your own and come up with a fix, that
would probably the best solution...

--Guido van Rossum (home page: http://www.python.org/~guido/)


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

Date: 2000-Aug-01 21:01
By: none

Comment:
From: "Wahmeng Wong" <r32813@email.sps.mot.com>
Subject: Re: [Python-bugs-list] select module: Bug in select.select() (PR#365)
Date: Thu, 22 Jun 2000 19:02:11 -0700

This is a multi-part message in MIME format.
--------------F9E74BCE6963FE221E423528
Content-Type: multipart/alternative;
 boundary="------------FF8E270086909CA1DBDDA697"


--------------FF8E270086909CA1DBDDA697
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi Guido,

Below is the dbx information from the coredump. This only occurs when the
select.select() function is used within a thread. This same error occurs on
both Python 1.5.1 and Python 1.5.2 when AIX 4.3.1. This problem does not
occur on AIX 4.1.4.

$ dbx -I ./Modules ./python core
Type 'help' for help.
reading symbolic information ...
[using memory image in core]

Segmentation fault in initselect at line 235 in file "Modules/selectmodule.c"
($t2)
  235           PyObject *tout = Py_None;

We have been able to reproduce the coredump by modifying the test_select.py
to perform the test within a thread. Attached is the modified file called
test_thread_select.py. Just place this file in the Lib/test directory to see
this problem.

Thanks for all your help.

Regards,
Wah Meng

Guido van Rossum wrote:

> >  The python 1.5.2 built on AIX 4.3.1.0 platform created a coredump when
> >  this command was run:-
> >
> >        select.select(waitList, [], [], timeWait)
> >
> >  This command worked fine in Python 1.5.1 build and also fine on Python
> >  1.5.2 built on HP 10.2. It just didn't work in AIX 4.3.1.0 build on
> >  2 AIX machines that we have.
>
> Could you give us some more information?  You're indicating that it's
> platform specific; we don't have an AIX box.  I'm guessing it's not
> obvious that our code is wrong, but it may violate some guidelines
> given by AIX manuals.  If we ever want to fix this, we'll need to
> interact with you.  the first thing we need is a decent stack trace;
> we'll take it from there.
>
> If you could investigate this on your own and come up with a fix, that
> would probably the best solution...
>
> --Guido van Rossum (home page: http://www.python.org/~guido/)

--------------FF8E270086909CA1DBDDA697
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hi Guido,
<p>Below is the dbx information from the coredump. This only occurs when
the select.select() function is used within a thread. This same error occurs
on both Python 1.5.1 and Python 1.5.2 when AIX 4.3.1. This problem does
not occur on AIX 4.1.4.
<p><tt>$ dbx -I ./Modules ./python core</tt>
<br><tt>Type 'help' for help.</tt>
<br><tt>reading symbolic information ...</tt>
<br><tt>[using memory image in core]</tt><tt></tt>
<p><tt>Segmentation fault in initselect at line 235 in file "Modules/selectmodule.c"
($t2)</tt>
<br><tt>&nbsp; 235&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
PyObject *tout = Py_None;</tt>
<p>We have been able to reproduce the coredump by modifying the test_select.py
to perform the test within a thread. Attached is the modified file called
test_thread_select.py. Just place this file in the Lib/test directory to
see this problem.
<p>Thanks for all your help.
<p>Regards,
<br>Wah Meng
<p>Guido van Rossum wrote:
<blockquote TYPE=CITE>>&nbsp; The python 1.5.2 built on AIX 4.3.1.0 platform
created a coredump when
<br>>&nbsp; this command was run:-
<br>>
<br>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; select.select(waitList,
[], [], timeWait)
<br>>
<br>>&nbsp; This command worked fine in Python 1.5.1 build and also fine
on Python
<br>>&nbsp; 1.5.2 built on HP 10.2. It just didn't work in AIX 4.3.1.0
build on
<br>>&nbsp; 2 AIX machines that we have.
<p>Could you give us some more information?&nbsp; You're indicating that
it's
<br>platform specific; we don't have an AIX box.&nbsp; I'm guessing it's
not
<br>obvious that our code is wrong, but it may violate some guidelines
<br>given by AIX manuals.&nbsp; If we ever want to fix this, we'll need
to
<br>interact with you.&nbsp; the first thing we need is a decent stack
trace;
<br>we'll take it from there.
<p>If you could investigate this on your own and come up with a fix, that
<br>would probably the best solution...
<p>--Guido van Rossum (home page: <a href="http://www.python.org/~guido/">http://www.python.org/~guido/</a>)</blockquote>
</html>

--------------FF8E270086909CA1DBDDA697--

--------------F9E74BCE6963FE221E423528
Content-Type: application/x-unknown-content-type-Python.File;
 name="test_thread_select.py"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="test_thread_select.py"

IyBUZXN0aW5nIHNlbGVjdCBtb2R1bGUNCmZyb20gdGVzdF9zdXBwb3J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seSBvbiIsIHN5cy5wbGF0
Zm9ybQ0KICAgICAgICAgICAgICAgIHJldHVybg0KICAgICAgICBjbWQgPSAnZm9yIGkgaW4g
MCAxIDIgMyA0IDUgNiA3IDggOTsgZG8gZWNobyB0ZXN0aW5nLi4uOyBzbGVlcCAxOyBkb25l
Jw0KICAgICAgICBwID0gb3MucG9wZW4oY21kLCAncicpDQogICAgICAgIGZvciB0b3V0IGlu
ICgwLCAxLCAyLCA0LCA4LCAxNikgKyAoTm9uZSwpKjEwOg0KICAgICAgICAgICAgICAgIGlm
IHZlcmJvc2U6DQogICAgICAgICAgICAgICAgICAgICAgICBwcmludCAndGltZW91dCA9Jywg
dG91dA0KICAgICAgICAgICAgICAgIHJmZCwgd2ZkLCB4ZmQgPSBzZWxlY3Quc2VsZWN0KFtw
XSwgW10sIFtdLCB0b3V0KQ0KIyMgICAgICAgICAgICAgIHByaW50IHJmZCwgd2ZkLCB4ZmQN
CiAgICAgICAgICAgICAgICBpZiAocmZkLCB3ZmQsIHhmZCkgPT0gKFtdLCBbXSwgW10pOg0K
ICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWUNCiAgICAgICAgICAgICAgICBpZiAo
cmZkLCB3ZmQsIHhmZCkgPT0gKFtwXSwgW10sIFtdKToNCiAgICAgICAgICAgICAgICAgICAg
ICAgIGxpbmUgPSBwLnJlYWRsaW5lKCkNCiAgICAgICAgICAgICAgICAgICAgICAgIGlmIHZl
cmJvc2U6DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByaW50IGBsaW5lYA0K
ICAgICAgICAgICAgICAgICAgICAgICAgaWYgbm90IGxpbmU6DQogICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgIGlmIHZlcmJvc2U6DQogICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgcHJpbnQgJ0VPRicNCiAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgYnJlYWsNCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlDQogICAgICAg
ICAgICAgICAgcHJpbnQgJ0hlaD8nDQogICAgICAgIHAuY2xvc2UoKQ0KICAgICAgICBxLnB1
dCgxKQ0KDQoNCnEgPSBRdWV1ZS5RdWV1ZSgxKQ0KdGhyZWFkLnN0YXJ0X25ld190aHJlYWQo
dGVzdCwocSwpKQ0KI3dhaXQgZm9yIHRocmVhZCB0byBjb21wbGV0ZSB0ZXN0IGZ1bmN0aW9u
DQpkb25lID0gcS5nZXQoKQ0KcHJpbnQgJ3RocmVhZCBjb21wbGV0ZWQgdGVzdCwgZXhpdGlu
ZycNCg0K
--------------F9E74BCE6963FE221E423528--



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

Date: 2000-Aug-01 21:01
By: none

Comment:
From: Guido van Rossum <guido@python.org>
Subject: Re: [Python-bugs-list] select module: Bug in select.select() (PR#365)
Date: Fri, 23 Jun 2000 11:01:40 -0500

> Below is the dbx information from the coredump. This only occurs when the
> select.select() function is used within a thread. This same error occurs on
> both Python 1.5.1 and Python 1.5.2 when AIX 4.3.1. This problem does not
> occur on AIX 4.1.4.
> 
> $ dbx -I ./Modules ./python core
> Type 'help' for help.
> reading symbolic information ...
> [using memory image in core]
> 
> Segmentation fault in initselect at line 235 in file "Modules/selectmodule.c"
> ($t2)
>   235           PyObject *tout = Py_None;

Thanks.  Could you do this again and also type the "bt" (backtrace)
command?  That would perhaps be more helpful.  We can't reproduce this
here since we don't have access to AIX!  (Even if we ha,d it would be
low priority :-( ).

--Guido van Rossum (home page: http://www.python.org/~guido/)


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

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110667&group_id=5470