Skip to content
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

Freeze under Linux #2016

Open
bflorat opened this issue Mar 15, 2018 · 2 comments
Open

Freeze under Linux #2016

bflorat opened this issue Mar 15, 2018 · 2 comments

Comments

@bflorat
Copy link
Contributor

bflorat commented Mar 15, 2018

For some reasons, any jvm (1.7, 1.8,1.9) freezes under Linux on the KDE check (doing a ps ) :

In UtilSystem :

 if (isUnderLinux()) {
      BufferedReader stdInput = null;
      try {
        ProcessBuilder pb = new ProcessBuilder("ps", "-eaf");
        Process proc = pb.start();
        stdInput = new BufferedReader(new InputStreamReader(proc.getInputStream()));
        proc.waitFor();
        String s;
        while ((s = stdInput.readLine()) != null) {
          if (s.matches(".*ksmserver.*")) {
            underKDE = true;
            break;
          }
        }

disabling selinux doesn't seem to change anything.

@centic9
Copy link
Contributor

centic9 commented Oct 31, 2020

Commit 1b0af0e introduced a timeout of 5 seconds to not hang on this, but just delay a bit until startup continues.

centic9 added a commit that referenced this issue Nov 29, 2020
We now first read the output of the process and then wait for it to stop.
Otherwise waitFor() will time out whenever there is more output from the
started process.

Fixes #2016
@centic9
Copy link
Contributor

centic9 commented Nov 29, 2020

Fixed via 74b45c5, the code should first read the output and then wait for the process to finish!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants