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

jabref does not shut down (on Linux); process keeps running #6559

Closed
1 task done
ilippert opened this issue May 30, 2020 · 43 comments · Fixed by #6835
Closed
1 task done

jabref does not shut down (on Linux); process keeps running #6559

ilippert opened this issue May 30, 2020 · 43 comments · Fixed by #6835
Labels
bug Confirmed bugs or reports that are very likely to be bugs preferences

Comments

@ilippert
Copy link
Contributor

JabRef 5.1--2020-05-29--ed275b6
Linux 5.6.14-300.fc32.x86_64 amd64
Java 14.0.1

Not on every run, but often, shutting down jabref does not cleanly proceed. A process continues to run for many minutes. Maybe related to #5071 ?

If you give me pointers for how to investigate this further, I am happy to do.

@ilippert
Copy link
Contributor Author

ilippert commented Jun 5, 2020

This continues to be a problem with the recent builds.

CPU use is 50-60%. Far too high, slows down the system.

Processes continue to run even for hours

@ilippert
Copy link
Contributor Author

JabRef 5.1--2020-06-08--b810356
Linux 5.6.16-300.fc32.x86_64 amd64
Java 14.0.1

Issue is still present - Jabref hangs my system... no error messages.

@ilippert ilippert changed the title jabref does not cleanly shut down jabref does not shut down Jun 20, 2020
@ilippert
Copy link
Contributor Author

Sorry, it is really quite terrible - jabref simply does not shut down - a process continues to run and slow down my computer. no error messages.

@Siedlerchr
Copy link
Member

Seems to be some linux issue, I cannot reproduce it on Windows. Maybe some file watching is still in the background active?

@ilippert
Copy link
Contributor Author

thanks for reacting. It is running for hours, literally... it must have been introduced, I assume, at some point before 2020-05-29--ed275b6. I am not aware of a change of my file system.

now
JabRef 5.1--2020-06-17--ef0a6bb
Linux 5.6.18-300.fc32.x86_64 amd64
Java 14.0.1

ok, I am testing systematically for some minutes:

  • 3 minutes running with 1 file. no problem to shut down, CPU at around 2-10%
  • 10 minutes running with 2 files. no problem to shut down, CPU at around 2-10%
  • 3 minutes running with 3 files. problem to shut down, CPU at 50%. files in different folders
  • 3 minutes running with 3 files. no problem to shut down, CPU at around 2-10% files in different folders
  • 3 minutes running with 3 files. problem to shut down, CPU at 95%. I had to kill it. files in different folders
  • 3 minutes running with 3 files. problem to shut down, CPU at 34%. I had to kill it. files in different folders
  • 10 minutes running with 2 files. no problem to shut down, CPU at around 2-10%
  • 5 minutes running with 3 files. no problem to shut down, CPU at around 2-10%. files in same folder.
  • 30 minutes running with 2 files. no problem to shut down, CPU between 2-60% files in different folders

Hmm, I do not see any pattern.

@sanjayankur31
Copy link

I also see this on Fedora 32:

jabref-5.0.50001-1.x86_64

Often when I've closed Jabref, processes are still running:

3969481 /opt/jabref/bin/JabRef

jabref-processes

I haven't tried the dev builds yet. I can collect more info if someone can tell me what info is needed.

@Siedlerchr
Copy link
Member

Try a kill -QUIT <pid> to get thread dump from the jvm

Alternatively
You could try to use jconsole: https://docs.oracle.com/en/java/javase/14/management/using-jconsole.html#GUID-EFDD2B40-6E4B-45E9-84B2-5E6D609065AE
Or you could try jstack to get a thread dump.
https://programmer.ink/think/jdk14-performance-management-tool-introduction-to-jstack.html

@ilippert
Copy link
Contributor Author

kill -QUIT <pid> does not generate any visible result; process is not killed.

Just to check: for jstack and jconsole - do I need to download jdk14 from oracle?

@Siedlerchr
Copy link
Member

You need jdk 14, you can use the openjdk variant.
https://bell-sw.com/pages/downloads/

@ilippert
Copy link
Contributor Author

Hi, please find the jstack -l -e output in the txt file

jstack-jabref.txt

@Siedlerchr
Copy link
Member

Siedlerchr commented Jun 22, 2020

Thanks, that looks indeed helpful. It is somehow related to the search and to the recent implementation of the authors parser #6552
`

@Siedlerchr Siedlerchr added the bug Confirmed bugs or reports that are very likely to be bugs label Jun 22, 2020
@ilippert ilippert changed the title jabref does not shut down jabref does not shut down (on Linux); process keeps running Jun 22, 2020
@ilippert
Copy link
Contributor Author

ilippert commented Jul 1, 2020

happily I can report that jabref

JabRef 5.1--2020-06-30--5f2b994
Linux 5.6.19-300.fc32.x86_64 amd64
Java 14.0.1

has now been running for 3h without problems - let's see for how long it runs ;)

@ilippert
Copy link
Contributor Author

ilippert commented Jul 1, 2020

ending my observation for the day. jabref successfully ran for 16h, well interrupted by computer sleeping. but still. and CPU use was very low. great, too.

@ilippert
Copy link
Contributor Author

ilippert commented Jul 2, 2020

I am afraid I must report that the same jabref version has the old behaviour today again ;( too optimistic, I was. So, no visible change.

@ilippert
Copy link
Contributor Author

JabRef 5.1-PullRequest6528.793--2020-07-11--93eaf4f
Linux 5.7.7-200.fc32.x86_64 amd64
Java 14.0.1

a correlation: when jabref CPU use goes up, I cannot save the library anymore.

@ilippert
Copy link
Contributor Author

ilippert commented Aug 3, 2020

JabRef 5.1--2020-08-03--586044a
Linux 5.7.11-200.fc32.x86_64 amd64
Java 14.0.2

a correlation: when jabref CPU use goes up, I cannot save the library anymore.

still not functional on
JabRef 5.1--2020-08-03--586044a
Linux 5.7.11-200.fc32.x86_64 amd64
Java 14.0.2

I am very happy to conduct more tests/provide more logs if that might help.

@vsht
Copy link

vsht commented Aug 30, 2020

It seems that installing bellsoft-java14 according to https://bell-sw.com/pages/repositories/#yum fixes the issue for me
on Fedora 32 (using the latest dev build of JabRef).

Without Liberica JDK installed (i.e. just having the standard OpenJDK from Fedora repos)
JabRef generates 100% CPU load on all cores roughly 1 min after being launched.

@ilippert
Copy link
Contributor Author

ilippert commented Sep 1, 2020

JabRef 5.2--2020-09-01--35f5078
Linux 5.8.4-200.fc32.x86_64 amd64
Java 14.0.2

as recommended by @vsht, I now use bellsoft-java14. My immediate observation is this: CPU load is ok. However, I still cannot close jabref. Process continues to run.

@Siedlerchr
Copy link
Member

I think we finally found the issue for the problem with the shutdown. The fix just got merged, so it would be nice if you could test the new version in a few hours.

@vsht
Copy link

vsht commented Sep 2, 2020

In my case

JabRef 5.1--2020-08-28--5540b93
Linux 5.8.4-200.fc32.x86_64 amd64
Java 14.0.2

JabRef already shut downs properly. My only issue was the CPU load and that one got fixed by installing
that other JVM.

@ilippert
Copy link
Contributor Author

ilippert commented Sep 3, 2020

JabRef 5.2--2020-09-03--1283f9f
Linux 5.7.15-200.fc32.x86_64 amd64
Java 14.0.2

thanks all for the effort. You cannot believe how pleasant it is to see a well running and stopping jabref version again! it works. Yeah!

@ilippert
Copy link
Contributor Author

ilippert commented Sep 9, 2020

Hi

JabRef 5.2--2020-09-03--1283f9f
Linux 5.8.6-201.fc32.x86_64 amd64
Java 14.0.2

hmm, sorry, I am afraid whilst it does work to close jabref now without error messages, it also happened at least one time that the process was not actually ended.

@ilippert
Copy link
Contributor Author

Just crashed still with 80% CPU load

JabRef 5.2--2020-09-09--46e9fe2
Linux 5.8.7-200.fc32.x86_64 amd64
Java 14.0.2

@ilippert
Copy link
Contributor Author

JabRef 5.2--2020-09-09--46e9fe2
Linux 5.8.7-200.fc32.x86_64 amd64
Java 14.0.2

does not reliably shut down. Sometimes the process keeps running after the window closes.

@Siedlerchr - sorry to report this. Should I open a new issue or would you reopen this?

@Siedlerchr Siedlerchr reopened this Sep 12, 2020
@Siedlerchr
Copy link
Member

Thanks for the report. I am working on a solution. Think have found the underlying issue.

@ilippert
Copy link
Contributor Author

ilippert commented Dec 13, 2020

JabRef 5.2--2020-12-12--86e2c82
Linux 5.9.12-200.fc33.x86_64 amd64
Java 15.0.1

gets me again 90%ish CPU load with openjdk version "14.0.2" 2020-07-14.

#6559 (comment) points me to bellsoft-java. I use bellsoft-java15 now. That works fine.

shuts down ok.

@ilippert
Copy link
Contributor Author

ilippert commented Feb 4, 2021

JabRef 5.3--2021-02-03--242a494
Linux 5.10.11-200.fc33.x86_64 amd64
Java 15.0.2
JavaFX 15.0.1+1

Well, it happens again, JabRef does not shut down reliably, a process continues to run, using between 30 to 90% CPU. I let it run for +5 minutes, no change

A new dimension of this issue (or should this be a new issue?): when I shut down, and try to start JabRef anew a few seconds later, often the Linux system freezes.

@Siedlerchr
Copy link
Member

Do you have a shared sql database opened?
I noticed that it takes some time after exiting for JabRef to stop the process

@ilippert
Copy link
Contributor Author

ilippert commented Feb 4, 2021

Do you have a shared sql database opened?

No, I am not using sql databases.

@ilippert
Copy link
Contributor Author

Problem continues.

@vsht
Copy link

vsht commented Mar 24, 2021

True. Especially using the search bar (e.g. to search for author names) and leaving the filtered view
for longer time (i.e. by not clearing the search bar) seems to trigger it.

@ilippert
Copy link
Contributor Author

ilippert commented May 3, 2021

JabRef 5.3--2021-04-29--cfb14b2
Linux 5.11.16-200.fc33.x86_64 amd64
Java 15.0.2
JavaFX 16+8

problem continues

@ilippert
Copy link
Contributor Author

True. Especially using the search bar (e.g. to search for author names) and leaving the filtered view
for longer time (i.e. by not clearing the search bar) seems to trigger it.

JabRef 5.3--2021-05-15--0a26d31
Linux 5.11.19-200.fc33.x86_64 amd64
Java 16.0.1
JavaFX 16+8

I also suspect that the comment on the search bar detects something important! It seems to be a good predictor of how to get CPU use at 100%.

@Siedlerchr
Copy link
Member

Do you have autocomplete enabled?

@ilippert
Copy link
Contributor Author

autocomplete is enabled for the entry editor.

@ilippert
Copy link
Contributor Author

JabRef 5.3--2021-06-17--38d7a30
Linux 5.12.11-300.fc34.x86_64 amd64
Java 16.0.1
JavaFX 16+8

meanwhile slightly updated system - no significant change.

I often seem to observe, that jabref hangs when I search for something and then go for entry editor tab that includes a local file field.

@ilippert
Copy link
Contributor Author

JabRef 5.3--2021-07-16--c99d61c
Linux 5.13.4-200.fc34.x86_64 amd64
Java 16.0.1
JavaFX 16+8

no change ;)

@ilippert
Copy link
Contributor Author

ilippert commented Aug 8, 2021

JabRef 5.3--2021-07-16--c99d61c
Linux 5.13.7-200.fc34.x86_64 amd64
Java 16.0.1
JavaFX 16+8

I have now disabled autocomplete.

But I have changed one aspect today - with seeming success: the jabref preference window told me to not include specific signs twice today: once in the entry editor dialogue and once in the custom editor tabs dialogue. I checked and found I was using a "prohibited" sign in there. I am not sure how many months or years ago I had created these field names. But I have now removed the prohibited signs and seemingly JabRef runs and closes stable now. I will observe this for a bit longer and report back.

@ilippert
Copy link
Contributor Author

ilippert commented Aug 8, 2021

But I have changed one aspect today - with seeming success: the jabref preference window told me to not include specific signs twice today: once in the entry editor dialogue and once in the custom editor tabs dialogue. I checked and found I was using a "prohibited" sign in there. I am not sure how many months or years ago I had created these field names. But I have now removed the prohibited signs and seemingly JabRef runs and closes stable now. I will observe this for a bit longer and report back.

I have now run JabRef for many hours today without the problems I had for a year or so. So, maybe that was the issue.

Suggestion: could JabRef notify the user in a more accessible way that their preferences are set with a problem - such as saying, Dear user, you have an illegal field name OLD1, OLD2 in the Preferences section "entry editor" and the "custom editor tabs". This risks unstable behaviour. Suggested field names are NEW (removed prohibited characters). Shall all the field names "OLD" be updated to NEW in the library?

@Siedlerchr
Copy link
Member

Thanks for the analysis! I'm sure we can add a preferences migration. Can you please specify which "illegal character" you entered/had there?
And we can also add a check when saving the changes

@ilippert
Copy link
Contributor Author

ilippert commented Aug 8, 2021

Ok, further testing:

in the preferences/entry editor, when I add the "illegal character" -, I do not get a warning. And I am able to add the "illegal character".

When I add - at custom editor tabs, I get the warning
Screenshot from 2021-08-08 20-10-23

and the save button lets me save/proceed, but the "illegal character" is actually not saved.

I believe I had entered the - years ago. So a migration check might be helpful, but also I would recommend a once a month consistency check run.

The window
Screenshot from 2021-08-08 20-10-23

only is partially helpful: it might be better to highlight which specific character I am not supposed to be using - and the complete list of illegal characters is still helpful, but of secondary importance.

This morning, when I changed the field names, I also got the window
Screenshot from 2021-08-08 20-10-23

at the entry editor section.

@ilippert
Copy link
Contributor Author

Just as an update in between. I have used jabref quite much over the last days - and encountered this problem not again as regularly occurring. so, I guess, the problem might have really been the incorrectly formulated preferences file.

@ilippert
Copy link
Contributor Author

ilippert commented Jan 7, 2022

Given that I am now on
JabRef 5.5--2022-01-02--55ceed9
Linux 5.15.12-200.fc35.x86_64 amd64
Java 16.0.2
JavaFX 17.0.1+1
and have not encountered the issue for a while anymore, I am closing this issue - but of course other are welcome to comment to ask for this to be reopened/or to reopen yourself...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs preferences
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants