Git Product home page Git Product logo

Comments (13)

RalfJung avatar RalfJung commented on July 22, 2024 1

No. At the time I was busy getting a PR done and now I don't have a reproducing example any more.

from rust.

bjorn3 avatar bjorn3 commented on July 22, 2024 1

#111769 only checks for ctrl-c during const eval, so if no const eval runs for an extended period of time, the ctrl-c will be silently ignored. This is not the only problem with that PR. It also caused #124265, and shows the "compilation was interrupted" error after the prompt is already drawn by bash.

from rust.

fmease avatar fmease commented on July 22, 2024 1

Yeah, just take any I-hang Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc. issue (none are A-const-eval Area: constant evaluation (mir interpretation) anyway).
I can reproduce this issue with #122443 for example:

  • nightly-2024-03-26 (before #111769): Exits after a single ^C
  • nightly-2024-03-27 (after #111769): Requires ^C^C to exit

bjorn3's analysis checks out.

from rust.

saethlin avatar saethlin commented on July 22, 2024

Do you have a reproducer? I have not run into this myself.

The implementation should also ensure that the compiler exits promptly if you hit ctrl+c again. Does it?

from rust.

matthiaskrgr avatar matthiaskrgr commented on July 22, 2024

if stuff keeps going on ctrl+c, sometimes suspending the process (ctrl+z) and then killing the terminal does the trick somehow 😅

from rust.

RalfJung avatar RalfJung commented on July 22, 2024

Do you have a reproducer? I have not run into this myself.

Unfortunately no, I encountered this during some rustc hacking where I ended up getting well over 1k error messages in the standard library build and that turned out to be hard to cancel.

The implementation should also ensure that the compiler exits promptly if you hit ctrl+c again. Does it?

I thought I had tried that, but I am not entirely sure.

from rust.

ChrisDenton avatar ChrisDenton commented on July 22, 2024

Is it possible the shell is part of the problem? If, by the time you hit ctrl-c, it's working through a large amount of output it still has buffered then it might be awhile before you see a response.

from rust.

RalfJung avatar RalfJung commented on July 22, 2024

It's possible, sure -- but usually it reacts to Ctrl-C immediately even when there's tons of output.

from rust.

fmease avatar fmease commented on July 22, 2024

Have you tried reverting #111769 to check if that fixes it?

from rust.

workingjubilee avatar workingjubilee commented on July 22, 2024

is there a good way to make rustc loop endlessly without ever touching const eval? maybe via the trait solver? 🤔

it would help for debugging this.

from rust.

workingjubilee avatar workingjubilee commented on July 22, 2024

cool! I wasn't sure how much of the compiler's code flowed through const-eval, is why I asked.

from rust.

bjorn3 avatar bjorn3 commented on July 22, 2024

Another case where this is observed: #125428

IMO we should revert #111769 or at least make the signal handler run exit after a short timeout.

from rust.

saethlin avatar saethlin commented on July 22, 2024

I'll post a PR that adds a timeout later today, but by all means if you feel strongly just put up a PR. The initial handler here was just added through the normal PR process, there's no reason to be more cautious on reverting or modifying it.

from rust.

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.