Opened 5 years ago

Closed 5 years ago

#7525 defect closed duplicate (duplicate)

spawnProcess hangs when run a lot

Reported by: Glyph Owned by:
Priority: normal Milestone:
Component: core Keywords:
Cc: Branch:


This script eventually hangs hard (C-c is blocked) if I run it for a while on my mac. It looks like some low-level bug in Python signal handling. While the eventual hang is reliable, it takes between 100 and 1000 seconds to get stuck.

from __future__ import print_function

from itertools import count
import sys
import twisted

from twisted.internet.utils import getProcessValue as do
from twisted.internet.task import LoopingCall, react

counter = count()

def batch():
    print("Tick:", next(counter))
    for _ in range(80):

def start(reactor):
    print("running twisted", twisted.version,
          "on python", sys.version)
    c = LoopingCall(batch)
    return c.start(1.0)

react(start, [])

(I could swear this bug is a duplicate but I can't find it anywhere. I know that I got the basic skeleton of this script from a user though, possibly on the mailing list.)

Attachments (1)

blocked.txt (20.7 KB) - added by Glyph 5 years ago.
output of "sample"

Download all attachments as: .zip

Change History (2)

Changed 5 years ago by Glyph

Attachment: blocked.txt added

output of "sample"

comment:1 Changed 5 years ago by Glyph

Resolution: duplicate
Status: newclosed

Okay, it was a duplicate, of #6972.

Note: See TracTickets for help on using tickets.