Duplicate
Details
Assignee
UnassignedUnassignedReporter
Antranig BasmanAntranig BasmanComponents
Priority
Major
Details
Details
Assignee
Unassigned
UnassignedReporter
Antranig Basman
Antranig BasmanComponents
Priority
Created January 28, 2020 at 3:55 PM
Updated January 28, 2020 at 7:32 PM
Resolved January 28, 2020 at 7:32 PM
When running the SJRK client tests, once I received a mysterious Kettle crash whilst running the base-page-storyEdit-Tests.html from the full test rollup. Unfortunately I didn't preserve the stack trace at the time and running the tests a further 10 times have failed to reproduce it.
The failure was within kettle.markActiveRequest as executed from the static middleware handler, complaining that the request to be marked had already been destroyed. This failure should have been benign, since the built-in Kettle failure handler simply aborts any current request and logs the failure - however, the server exitted, for a reason which isn't clear. One possibility might have been that the test version of the handler in kettle.test.handleUncaughtException was included, which invokes process.exit(1) to fiercely highlight problems in test cases - however, it was not included in any site from the code I could see. I also verified that the process shouldn't ordinarily exit by manually triggering a failure in the debugger in kettle.markActiveRequest and checking that the correct failure handlers were called.
It's going to be hard to trace this issue down without some more reliable ways of triggering it. My best guess is that some rare race condition is responsible not only for triggering the initial failure but also for triggering some further failure during the processing of an uncaught exception resulting from it which causes node to exit.