Skip to content

Avoid ConcurrentModificationException at shutdown #3113

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

Conversation

adamretter
Copy link
Contributor

@adamretter adamretter commented Nov 15, 2019

We were missing some synchronisation. This was shown by the test suite https://github.com/eXist-db/exist-xqts-runner

@adamretter adamretter added the bug issue confirmed as bug label Nov 15, 2019
@adamretter adamretter added this to the eXist-5.0.1 milestone Nov 15, 2019
@adamretter adamretter requested review from joewiz and a team November 15, 2019 15:58
Copy link
Contributor

@duncdrum duncdrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

finally rimshot

Copy link
Member

@joewiz joewiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before this PR, the exist-xqts-runner would die after 1,638 tests, with the following error:

08 Nov 2019 10:02:19,058 [XQTSRunnerSystem-akka.actor.default-dispatcher-22] INFO  (slf4j.scala [info]:159) - Serialized results for TestSet: fn-distinct-values OK. 
Exception in thread "global.BrokerPools.ShutdownHook" java.util.ConcurrentModificationException
	at java.util.HashMap$HashIterator.nextNode(HashMap.java:1445)
	at java.util.HashMap$KeyIterator.next(HashMap.java:1469)
	at org.exist.storage.ProcessMonitor.killAll(ProcessMonitor.java:305)
	at org.exist.storage.BrokerPool.shutdown(BrokerPool.java:1610)
	at org.exist.storage.BrokerPools.stopAll(BrokerPools.java:281)
	at org.exist.storage.BrokerPools.lambda$0(BrokerPools.java:69)
	at java.lang.Thread.run(Thread.java:748)

After rebuilding with this PR, exist-xqts-runner completed 8,306 tests, so evidently this PR has helped!

@duncdrum duncdrum merged commit e4c8aa2 into eXist-db:develop Nov 16, 2019
@adamretter adamretter deleted the hotfix/ProcessMonitor-ConcurrentModificationException branch November 16, 2019 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issue confirmed as bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants