Uploaded image for project: 'Social Justice Repair Kit'
  1. Social Justice Repair Kit
  2. SJRK-322

Mysterious Kettle crash when running tests

    XMLWordPrintable

    Details

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            antranig Antranig Basman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: