Appdynamics / Appdynamics/qos-ch-logback
Class RollingFileAppender may have exceptions under thread concurrency?
- Dominant language
- Java
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
hey,
We have an exception. Here is the exception stack information
```
java.util.ConcurrentModificationException: null
at java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1493)
at java.base/java.util.HashMap$EntryIterator.next(HashMap.java:1526)
at java.base/java.util.HashMap$EntryIterator.next(HashMap.java:1524)
at ch.qos.logback.core.rolling.RollingFileAppender.innerCheckForFileNamePatternCollisionInPreviousRFA(RollingFileAppender.java:135)
at ch.qos.logback.core.rolling.RollingFileAppender.checkForCollisionsInPreviousRollingFileAppenders(RollingFileAppender.java:121)
at ch.qos.logback.core.rolling.RollingFileAppender.start(RollingFileAppender.java:62)
```
ch.qos.logback.core.rolling.RollingFileAppender#innerCheckForFileNamePatternCollisionInPreviousRFA

For the two pieces of code in the red box in the screenshot,
`Thread1` traversal `map`, and `thread2 `modifies `map `at the same time,whether an exception will be thrown `java.util.ConcurrentModificationException: null`,Is this a bug?
Contributor guide
Research direction
Start at ch.qos.logback.core.rolling.RollingFileAppender#innerCheckForFileNamePatternCollisionInPreviousRFA and trace the map used by the collision checks in the stack trace. Reproduce concurrent appender startup if possible and determine whether iteration can overlap modification; done means confirming the bug with a focused regression test or recording why the reported exception cannot occur.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- observability-sre
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100