-
Notifications
You must be signed in to change notification settings - Fork 928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SBT console disappears due to race condition #1706
Comments
Thanks for the repro project, Ben. It's using 0.13.6, but do you know roughly when this started to happen? Has this always been the case with sbt? |
Hey @eed3si9n. Thanks for taking a look at this. It hasn't always been a problem for us. I'd say it's been happening the past few months. I'm not exactly sure when it started happening, but one theory I just came up with is that it started when we added some new test options that @jroper recommended to change the test output.
That seems to fit the timeline and my project also seems to work when I remove that line |
I was able to repro on Ubuntu, Java 8. (Replacing annoying output with gist link.) https://gist.github.com/som-snytt/02c55f12202f63e80eb5 So when it breaks, it's just the prompt echo that goes away. Not to minimize how annoying that must be. |
What does |
I actually have the whole process freeze up pretty frequently now, but I haven't figured out how to reproduce that yet. I'll let @som-snytt or someone else take the jstack question because I don't think I know that tool or SBT well enough to be very helpful. |
You can run |
The problem seems to be that Stack trace of parallel tests, two of which are mutating
|
Thanks @retronym ! This is hugely helpful. Do you have any suggestions on how junit-interface should deal with this? Should this feature be implemented differently or should it be deprecated or removed as not making a lot of sense? It sounds like we should close this bug and file a bug at that project? |
At a minimum, it would be good to detect when it is being used in a parallel test run and try to fail fast. I suppose junit-interface could to install a custom Googling |
I'll leave this issue open in case @eed3si9n wants to take defensive measure in SBT. It could save and restore the System streams around each line of the shell. |
Partest has also contended in that arena. |
Thanks for all the help guys. I filed a bug at junit-interface. That project doesn't get enough love, so I tend to doubt it will be looked at unless someone here wants to take a stab. It's rather good to know what the issue is and that I should avoid using the -q option. Perhaps we can at least update the junit-interface docs to say that the option is broken and shouldn't be used. |
This is so old I think we could just close it. We could always reopen it if someone steps forward and says the problem remains reproducible. |
I could not reproduce. It requires jdk 8 for
and my sbt does not fetch 0.13, but 1.9.7 succeeds without tweaks, repeatedly
I'm not going to do it again because I'm reminded that if you paste to jline, you don't get any history, even if you append to the command line. No up-arrow! OK, I lied, as I retried with |
I've created a repository that reproduces this bug.
The console prompt should reappear when the tests have finished running:
However, due to this bug, often times you won't see the prompt appear after the tests have run:
This is super annoying because it happens to me nearly every time I run my tests making me constantly kill and restart the SBT console. It happens much less with the sample repository than my real project (I'm guessing because there are fewer tests so I hit whatever race condition less often).
The text was updated successfully, but these errors were encountered: