Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#271 closed defect (fixed)

`flappserver create` hangs forever

Reported by: Jean-Paul Calderone Owned by:
Priority: major Milestone: 0.12.5
Component: appserver Version: 0.12.4
Keywords: Cc:

Description

$ flappserver --version                                                           
Foolscap version: 0.12.4
Twisted version: 16.5.0
$ flappserver create --location localhost:3116 /tmp/hang-forever
Server Running
Foolscap Application Server created in /tmp/hang-forever
TubID 2xfl6tpzc4uozbyg7bl27tygg3zsgjpg, listening on port tcp:3116
Now launch the daemon with 'flappserver start /tmp/hang-forever'
<time passes>
^CUnhandled error in Deferred:

This seems to be because of the interaction between run_flappserver and the defer.succeed(0) returned by Create.run. The Deferred has already fired so the callbacks run immediately, including the reactor.stop(), then the reactor gets run afterwards - and nothing ever stops it.

Change History (2)

comment:1 Changed 5 years ago by Brian Warner

Component: unknownappserver
Milestone: undecided0.12.5
Resolution: fixed
Status: newclosed

Fixed by exarkun's PR in [58f549ff6]. The long-term fix is to move to task.react, of course, but this is absolutely the right starting point.

comment:2 Changed 4 years ago by Brian Warner

BTW, this was probably introduced in [ad5db04c], where flappserver creation became synchronous (that commit removed the d = fireEventually(), which was shielding us from the bug). So this was broken starting in foolscap-0.12.0 .

Note: See TracTickets for help on using tickets.