Skip to content

Forced SIGINT interrupt often required rather than ctrl+C for codes taking a long time #48154

Open
@gaurav-arya

Description

@gaurav-arya

Update: After learning some more, it seems the issue is that for some codes, one is required to spam ctrl+C to force a SIGINT interrupt rather than simply press ctrl+C once in order to stop it (without killing the whole REPL). Below is one MWE, another MWE is at #48154 (comment) (although seemingly fixed on master).

I've often had particular trouble interrupting code in VSCode and Jupyter Notebook environments: my suspicion is that this is because the SIGINT interrupt way of doing things totally fails in certain cases, and then one has to kill the whole Julia process. Potentially this is an issue with these external tools, potentially it would be helpful to understand why forced SIGINT interrupts are so often needed rather than ctrl+C, potentially it should be easier to trigger forced SIGINT interrupts (including from e.g. VSCode or a Jupyter notebook) since they are so commonly needed,... I'm not sure.


I still seem to having this issue on 1.9.0-beta2:

MWE:

function f()
    while true
    end
end

f()

Spamming ctrl+C (edit: the reason this didn't work was because I was in VSCode), holding onto ctrl+C, etc. don't seem to terminate the function for me. Version info:

julia> versioninfo()
Julia Version 1.9.0-beta2
Commit 7daffeecb8c (2022-12-29 07:45 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 8 × 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, tigerlake)
  Threads: 1 on 8 virtual cores
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS = 

Here are a couple of related issues: #46635, #35524. It wasn't clear to me whether this a dup. The former issue is closed, but the fix #47901 should already exist on 1.9.0-beta2 if I am understanding things right?

Also note that in the above MWE, ctrl+C or ctrl+Z does not seem to work at all for me in a reasonable time frame, I need to terminate the REPL. In other cases, also on 1.9.0-beta2, I'm also still experiencing the behaviour where after holding onto ctrl+C / pressing it several times or using ctrl+Z eventually works, but takes some time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions