Giter Site home page Giter Site logo

Errno::ESRCH on 3rd Ctrl-C about jobrnr HOT 1 CLOSED

rfdonnelly avatar rfdonnelly commented on July 23, 2024
Errno::ESRCH on 3rd Ctrl-C

from jobrnr.

Comments (1)

rfdonnelly avatar rfdonnelly commented on July 23, 2024

On the first Ctrl-C, job submission was stopped and active jobs were allowed to finish. On the second Ctrl-C, a SIGINT was sent to active jobs. The jobs terminated but due to a bug, Jobrnr thought they were still active. On the third Ctrl-C, another SIGINT was sent to "active" jobs. However, the jobs were no longer active and thus the "no such process" exception.

This is due to a combination of two issues:

  1. Nil exitstatus for signaled process (root cause)

    When a process is terminated via a SIGINT, it doesn't have an exitstatus (the exitstatus is nil). So checking for pass/fail of a process terminated via a SIGINT by using exitstatus.zero? attempted to call the zero? method on a nil value and thus caused an exception.

  2. Exceptions in Futures are silent

    Futures are used to execute multiple jobs concurrently. Jobrnr polls for the completion of jobs by looking for Futures in the fulfilled state. When all futures are fulfilled and the job queue is empty, everything is complete and Jobrnr terminates. However, if an exception occurs in a Future, the exception is local to the Future thread (i.e. it is not raised in the parent thread) and Future goes to the 'rejected' state. These silent exceptions caused Jobrnr to hang.

The fix for this should address both the root cause and the hang due to silent exceptions.

from jobrnr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.