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
play hangs on console interacton when using jblas library #12355
Comments
So this is most likely caused by
Which version of sbt are you using in your However, given that this is working on Linux and "only" broken on Windows and the fact that this very likely is a problem only in dev mode, but should work fine in prod mode, I will not spend time to fix this problem. Also probably sbt magic is involved here as well... If you want to fix this, I am happy to review a pull request. But I am not going to look further into this issue at this point. |
Yes, it works fine in prod mode, only dev mode is affected. The issue still occurs with sbt 1.7.2 (Play 2.8.12) and sbt 1.9.7 (Play 2.9). We can run Play using:
This passes the string "abc" (no new line, this is important) to Play input, But after this Java process causes high CPU usage permanently :( I can't fix it this myself, sbt and scala are black magic to me. |
For the sake of completeness, can you also try sbt 1.9.9? (I don't expect it to work actually, but they did upgrade Jline in the release, so who knows) |
The issue still occurs with sbt 1.9.9 (Play 2.9). I understand this is a low priority issue. |
Play Version
3.0.1 (but probably all versions since 2.8.12)
API
Java
Operating System
Windows Server 2016 Std, Windows 10
Linux version is not affected by this issue.
JDK
but tested with same results also on other distributions (oracle) and versions (11, 17).
Library Dependencies
Expected Behavior
create play-java-seed project.
include
"org.jblas" % "jblas" % "1.2.5"
in libraryDependencies in build.sbt
create simple controller like this:
This code should just execute without any problems and print STEP 1-4 to the standard output.
Actual Behavior
Play (or more precisely just current thread handling a request) hangs when
MatrixFunctions.expm is invoked therefore it only prints STEP 1, 2 and 3 on the stardard output.
Calling standard jblas functions as in STEP 1 and STEP 2 works fine,
but play hangs on STEP 3 which afaik uses JNI in jblas.
But if I enter two characters using keyboard on play console, the execution completes and STEP 4 is printed.
Reproducible Test Case
This can be tested even with such one line of code:
Other comments
I just upgraded my project from old 2.8.x play framework to the latest 3.0.1.
On the first 2.8.x releases this worked without any problems.
I have checked this code in many older versions.
This code works without any problems up to and including version 2.8.11.
As of version 2.8.12 (and probably all newer ones) it hangs as described above.
As I can see in the commit history there have been some changes in consolereader between those versions,
maybe it is related to this issue.
This code also works fine outside of play, I don't see any
interactions with standard input or console.
The text was updated successfully, but these errors were encountered: