Closed ziggystar closed 6 years ago
Could you a) try to reproduce? b) provide us the abstract?
Here, I can edit the abstract without issues.
Am 26.01.2017 12:31 schrieb "ziggystar" notifications@github.com:
Versions
- JabRef version 3.8.1
- on Ubuntu 16.04
- java version "1.8.0_121" (oracle)
Issue
The program hangs with no CPU utilization after editing an abstract (removing a HTML code and replacing it with the word 'and'). I don't know whether this is reproducible, but I have a thread dump attached. I think it's some kind of deadlock, and I hope you can diagnose it from the stack-traces. jabref-thread-dump.zip https://github.com/JabRef/jabref/files/732157/jabref-thread-dump.zip
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/JabRef/jabref/issues/2489, or mute the thread https://github.com/notifications/unsubscribe-auth/ABTafpvSg7R-QNPnTYOe9kwANXmfrHVRks5rWIQmgaJpZM4Luiqe .
I tried for a bit and I can't reproduce it. I don't know exactly what I clicked after editing the abstract.
I looked a bit into the sources and couldn't find an obvious issue with the locking.
writeLock().lock()
(by find usages on writeLock()
) is called and they all have an unlock()
within a finally
, except one which could be an issue if unchecked exceptions are thrown/caught within the JabRef source code:
sortedEntries.getReadWriteLock().writeLock().lock();
comparatorChooser.appendComparator(PAD, 0, false);
sortedEntries.getReadWriteLock().writeLock().unlock();
Here is the relevant part of the stack; apparently I hit a key that triggered the save database action. That's quite possible.
"AWT-EventQueue-0" #14 prio=6 os_prio=0 tid=0x00007f365c782000 nid=0x4919 waiting on condition [0x00007f36121c0000]
<snip>
at ca.odell.glazedlists.impl.java15.LockAdapter.lock(J2SE50LockFactory.java:85)
at net.sf.jabref.gui.maintable.MainTableDataModel$StartStopListFilterAction.update(MainTableDataModel.java:237)
at net.sf.jabref.gui.maintable.MainTableDataModel$StartStopListFilterAction.start(MainTableDataModel.java:229)
at net.sf.jabref.gui.maintable.MainTableDataModel.updateSearchState(MainTableDataModel.java:95)
at net.sf.jabref.gui.search.SearchWorker.updateUIWithSearchResult(SearchWorker.java:88)
at net.sf.jabref.gui.search.SearchWorker.done(SearchWorker.java:57)
<maybe the fact it's a timer is interesting>
at javax.swing.Timer.fireActionPerformed(Timer.java:313)
<snip>
at net.sf.jabref.gui.BasePanel.runCommand(BasePanel.java:1002)
at net.sf.jabref.gui.entryeditor.EntryEditor$SaveDatabaseAction.actionPerformed(EntryEditor.java:1379)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1663)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2882)
<snip>
Just been debugging #2482 and found similar deadlock. Screenshots attached for AWT-EventQueue-0 and JabRef CachedThreadPool
This appears to be caused by updates to the UI on multiple threads. @ziggystar if you can look at what the other threads are doing that may be able to track it down. See my screenshots above to identify the deadlock (waiting for / waited by), then work down the list until you get to a call that is the JabRef code, i.e. on with a line number.
There's a good chance that this is solved on 4.0, because the entry editor has been largely re-written.
@ziggystar @paulsputer Can you please try out the most recent version and see if the issue persists?
@lenhard I've already stated that I cannot reproduce this bug, and the stack dump is all I can provide. Apparently it's some kind of race condition.
Then I'll close it for now. Feel free to reopen if the problem occurs again.
Quite funny. I downloaded 4.0 and used it for some minutes, then I got another deadlock. I have a thread dump attached. It occurred after I clicked "accept changes" (or similar) of the dialog you get when fetching and updating entry items using a DOI.
Thanks, @ziggystar!
Here's another way for jabref to hang with same symptoms..
jabref installation details:
JabRef 4.2-dev Linux 4.14.6-1-arch amd64 Java 1.8.0_144
Steps to reproduce the error:
BTW, this problem was already present in version 4.1.
@ramiromagno Thanks for the precise workflow. I just tried to reproduce the bug with your exact steps and JabRef did not freeze. Instead the pdf download window appeared and I could link a pdf to the entry. Maybe the freeze came from your network connection or a firewall blocking the download?
@lenhard I can't reproduce this error anymore... Sorry! I am not sure what I've done in jabref since last time that might have made the error disappear.
C'mon. You cannot close this issue because someone can't reproduce a race condition. He is not the only one experiencing this. This is a serious bug that makes the application crash.
This means tickets for existing bugs must get closed, because no one is working on them? And if someone comes along in the future, maybe someone experiencing this same bug, someone willing to work on it, he shall not find this thread with lots of valuable information?