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

[BUG] ConcurrentModificationException when using JS Writer #6123

Open
york-p01033 opened this issue Mar 7, 2024 · 1 comment
Open

[BUG] ConcurrentModificationException when using JS Writer #6123

york-p01033 opened this issue Mar 7, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@york-p01033
Copy link

Describe the bug
While using JS writer with 75 Threads getting the following error:

java.util.ConcurrentModificationException
at java.base/java.util.HashMap$HashIterator.nextNode(Unknown Source)
at java.base/java.util.HashMap$EntryIterator.next(Unknown Source)
at java.base/java.util.HashMap$EntryIterator.next(Unknown Source)
at java.base/java.util.HashMap.putMapEntries(Unknown Source)
at java.base/java.util.HashMap.putAll(Unknown Source)
at com.mirth.connect.donkey.model.message.Message.getMergedConnectorMessage(Message.java:156)
at com.mirth.connect.donkey.server.channel.Channel.finishMessage(Channel.java:1995)
at com.mirth.connect.donkey.server.channel.Channel.process(Channel.java:1871)
at com.mirth.connect.donkey.server.channel.Channel.processSourceQueue(Channel.java:1952)
at com.mirth.connect.donkey.server.channel.Channel.run(Channel.java:1938)
at java.base/java.lang.Thread.run(Unknown Source)

Steps to reproduce the behavior:
Error was constantly happening, but not on every message. This was done by processing a large amount of messages over a few days time.

Expected behavior
This has not hindered performance or messages in any way, but wanted to report the issue so it could be corrected. Only seeing the error in the server log while messages are processing.

Environment (please complete the following information):

  • OS: Linux
  • Java Distribution/Version: OpenJDK 17
  • Connect Version: 4.4.1

Workaround(s)
N/A

Additional context
Seems to be happening in donkey/src/main/java/com/mirth/connect/donkey/model/message/Message.java getMergedConnectorMessage()

Similar Issue to:
#243

@york-p01033 york-p01033 added the bug Something isn't working label Mar 7, 2024
@jonbartels
Copy link
Contributor

jonbartels commented Mar 7, 2024

What is the code that your JS Writer is executing in the filters, transformer, response and the JS Writer itself?

What logs do you get from mirth.log from the server?

Show your queue and threading settings please.

#243 is similar in that it is a concurrent modification exception but that goes back to 2006 and is DB related. Mirth today is radically different than it was in '06.

I suggest moving this to a Discussion to determine the problem, then recreate an issue if the root cause is a Mirth bug and not a channel code issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants