[Python-bugs-list] [Bug #110703] select with dec-threads core dumps (PR#35)

noreply@sourceforge.net noreply@sourceforge.net
Wed, 13 Sep 2000 03:45:16 -0700


Bug #110703, was updated on 2000-Jul-31 14:29
Here is a current snapshot of the bug.

Project: Python
Category: None
Status: Closed
Resolution: Wont Fix
Bug Group: Platform-specific
Priority: 5
Summary: select with dec-threads core dumps (PR#35)

Details: Jitterbug-Id: 35
Submitted-By: ddula@alfomc.net
Date: Thu, 22 Jul 1999 17:01:04 -0400 (EDT)
Version: 1.5.2
OS: Digital Unix (OSF/1) 4.0E with latest patches


Select cores while waiting on a socket

spoo.alfomc.net> dbx  /usr/local/ddula/tar/Python-1.5.2/python core

dbx version 3.11.10
Type 'help' for help.
Core file created by program "python"
thread 0xb signal Segmentation fault at >*[nxm_thread_kill, 0x3ff805ab3b8]
retr31, (r26), 1
(dbx) t
>  0 nxm_thread_kill(0x14003bb40, 0x3ff807e31c8, 0x3ffc0085c98, 0x3ff805ab0a8,
0x14003bb40) [0x3ff805ab3b8]
   1 pthread_kill(0x1, 0x0, 0x0, 0x1400df980, 0x3ff00000000) [0x3ff80598b94]
   2 (unknown)() [0x3ff8058cb38]
   3 (unknown)() [0x3ff807e35ec]
   4 exc_unwind(0x1400dde78, 0x1400dc5a0, 0xabadabad00beed00, 0x0,
0x3ff807e3964) [0x3ff807e36d4]
   5 exc_raise_signal_exception(0x86, 0x0, 0x1200735b8, 0x1, 0x2)
[0x3ff807e3960]
   6 (unknown)() [0x3ff8059a248]
   7 select_select(args = (nil)) ["./selectmodule.c":221, 0x1200735b4]
   8 eval_code2(co = [bad address (0x14010d838)], globals = 0xfc50, locals =
(nil), args = [bad address (0x14010d840)], kws = [bad address (0x14010d848)],
kwcount = [bad address (0x14010d9a8)], defs = [bad address (0x14010d9b0)],
defcount = [bad address (0x14010d9b8)]) ["ceval.c":1654, 0x12003e57c]

Appears eval_code2 is getting passed bad addresses?

My code snipped 

<--SNIP-->
class TelnetProxy(SocketServer.StreamRequestHandler,SocketServer.BaseRequestHand
ler):
        def handle(self):
                o = socket(AF_INET,SOCK_STREAM)
                o.connect(OHOST,OPORT)
                while 1:
                        print o.fileno()
                        print self.rfile.fileno()
                        r,w,e = select.select([o,self.rfile],[],[],1) <---CORE
HERE
                        if o in r:

<--SNIP-->

Same problem under 1.5.1 as well.

The 1.5.2 is the latest source I downloaded Jul 20

This same code works fine on NT and LINUX I believe.

Dave Dula
ddula@alfomc.net


====================================================================
Audit trail:
Sat Jul 24 16:52:19 1999	guido	changed notes
Sat Jul 24 16:52:19 1999	guido	moved from incoming to open
Sat Jul 24 17:05:25 1999	guido	moved from open to platformbug

Follow-Ups:

Date: 2000-Aug-01 14:03
By: none

Comment:
From: Guido van Rossum <guido@CNRI.Reston.VA.US>
Subject: Re: [Python-bugs-list] select with dec-threads core dumps (PR#35)
Date: Thu, 22 Jul 1999 17:46:26 -0400

I seriously suspect that this is a bug in your C library, not in
Python.  Select is rock-solid on other platforms.  Do you feel
confident enough to try debugging this some more?  Otherwise, you have
no choice but to post a question to the newsgrup, maybe someone has
seen this before or is willing to help debugging it.

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

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

Date: 2000-Aug-01 14:03
By: none

Comment:
From: David Dula <ddula@alfomc.net>
Subject: Re: [Python-bugs-list] select with dec-threads core dumps (PR#35)
Date: Thu, 22 Jul 1999 18:43:48 -0400

Guido van Rossum wrote:

> I seriously suspect that this is a bug in your C library, not in
> Python.  Select is rock-solid on other platforms.  Do you feel
> confident enough to try debugging this some more?  Otherwise, you have
> no choice but to post a question to the newsgrup, maybe someone has
> seen this before or is willing to help debugging it.
>
> --Guido van Rossum (home page: http://www.python.org/~guido/)

Well a little more debugging shows that this is certainly a threading
+ select problem
because a forking method works.  The forks will serve my purposes so I
have a work around.

Thanks
Dave Dula


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

Date: 2000-Aug-01 14:03
By: none

Comment:
Digital Unix problem when combining threads with select?
-------------------------------------------------------

Date: 2000-Sep-07 15:04
By: jhylton

Comment:
Please do triage on this bug.
-------------------------------------------------------

Date: 2000-Sep-13 03:45
By: gvanrossum

Comment:
It's unlikely that we'll ever fix this, because of the uncommon platform, and the suspicion that the bug is in the platform. If you have more information pointing to a bug in Python, and if this is still not broken in Python 2.0, please send mail and we'll reopen the bug.
-------------------------------------------------------

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