#1558: make the testsuite work with THREADS=2
------------------------+---------------------------------------------------
 Reporter:  simonmar    |          Owner:             
     Type:  bug         |         Status:  new        
 Priority:  normal      |      Milestone:  6.10 branch
Component:  Test Suite  |        Version:  6.6.1      
 Severity:  normal      |     Resolution:             
 Keywords:              |     Difficulty:  Easy (1 hr)
 Testcase:              |   Architecture:  Unknown    
       Os:  Unknown     |  
------------------------+---------------------------------------------------
Comment (by igloo):

 Having had a quick look at the above bug report and the code, I think that
 this has been fixed. In my python 2.4.4 I have
 {{{
 def _cleanup():
     for inst in _active[:]:
         inst.poll()
 }}}
 (`poll` calls `_active.remove(self)`)
 while in my 2.5.2 I have
 {{{
 def _cleanup():
     for inst in _active[:]:
         if inst.poll(_deadstate=sys.maxint) >= 0:
             try:
                 _active.remove(inst)
             except ValueError:
                 # This can happen if two threads create a new Popen
 instance.
                 # It's harmless that it was already removed, so ignore.
                 pass
 }}}
 and I think that caught exception is the one that we are seeing.

 Even if it is not fixed, I think that we could work around it by wrapping
 the Popen class in our own class, and taking a lock before calling the
 Popen constructor.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1558#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to