Opened 6 years ago

Closed 3 years ago

#3398 defect closed fixed (fixed)

process cleanup for ReactorBuilder-based tests loops indefinitely if processes do not exit

Reported by: zooko Owned by: itamar
Priority: normal Milestone:
Component: core Keywords:
Cc: exarkun Branch: branches/process-cleanup-loop-3398-2
(diff, github, buildbot, log)
Author: itamarst, exarkun Launchpad Bug:

Description

http://buildbot.twistedmatrix.com/builders/cygwin-py2.5-select/builds/1

Produces many hundreds or thousands of this line in the test.log:

2008-08-26 15:29:02-0700 [-] ReactorBuilder.tearDown reaping some processes {2540: <PTYProcess pid=2540 status=-1>}

Followed by many of this:

2008-08-26 15:29:10-0700 [-] ReactorBuilder.tearDown reaping some processes {2524: <PTYProcess pid=2524 status=-1>}

and eventually I stopped it.

Change History (12)

comment:1 Changed 6 years ago by exarkun

  • Cc exarkun added

It seems the process started by twisted.internet.test.test_process.ProcessTestsBuilder_PollReactor.test_childConnectionLost never exits. It is supposed to exit when it receives a blank line on stdin, which the test sends it after sending two other lines.

It seems like the test method actually ran to completion and all the events it expected did happen because the infinite log message happens in tearDown which should only run after the test method has returned.

So the question here may be about why the child process isn't exiting when it is expected to.

comment:2 Changed 6 years ago by zooko

Maybe it is waiting for a DOS-style blank line: '\r\n' ?

comment:3 Changed 6 years ago by exarkun

Maybe. I don't have cygwin installed anywhere, so I can't test this.

comment:4 Changed 6 years ago by zooko

  • Resolution set to duplicate
  • Status changed from new to closed

duplicate of #3529

comment:5 Changed 6 years ago by exarkun

  • Resolution duplicate deleted
  • Status changed from closed to reopened

Even if cygwin is broken, the tests shouldn't get stuck in a loop. #3529 can be for fixing cygwin support somehow. I'm using this ticket to fix the getting stuck behavior.

comment:6 Changed 6 years ago by exarkun

  • Owner changed from glyph to exarkun
  • Status changed from reopened to new

comment:7 Changed 6 years ago by exarkun

  • Author set to exarkun
  • Branch set to branches/process-cleanup-loop-3398

(In [25347]) Branching to 'process-cleanup-loop-3398'

comment:8 Changed 6 years ago by exarkun

  • Owner changed from exarkun to zooko
  • Summary changed from cygwin unit tests stuck in loop to process cleanup for ReactorBuilder-based tests loops indefinitely if processes do not exit

Can you try the branch on cygwin?

I expect the tests will fail, but the suite should run to completion at least.

comment:9 Changed 3 years ago by itamar

  • Owner changed from zooko to itamar

comment:10 Changed 3 years ago by itamar

  • Keywords cygwin removed

comment:11 Changed 3 years ago by itamarst

  • Author changed from exarkun to itamarst, exarkun
  • Branch changed from branches/process-cleanup-loop-3398 to branches/process-cleanup-loop-3398-2

(In [34151]) Branching to 'process-cleanup-loop-3398-2'

comment:12 Changed 3 years ago by itamarst

  • Resolution set to fixed
  • Status changed from new to closed

(In [34153]) Merge process-cleanup-loop-3398-2: Cleanup after zombie test processes.

Author: exarkun
Review: itamar
Fixes: #3398

Hopefully this will make the Fedora buildbot stop getting into infinite loops.

Note: See TracTickets for help on using tickets.