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

ConcurrentModificationException when we traverse registeredTasks #664

Closed
oliverhu opened this issue Apr 27, 2022 · 1 comment
Closed

ConcurrentModificationException when we traverse registeredTasks #664

oliverhu opened this issue Apr 27, 2022 · 1 comment
Assignees

Comments

@oliverhu
Copy link
Member

We observed this failure when run 700+ workers

java.util.ConcurrentModificationException: null
	at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1558) ~[?:1.8.0_172]
	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580) ~[?:1.8.0_172]
	at com.linkedin.tony.ApplicationMaster.startupFailed(ApplicationMaster.java:1282) ~[tony-core-0.4.9.jar:?]
	at com.linkedin.tony.ApplicationMaster.monitor(ApplicationMaster.java:685) ~[tony-core-0.4.9.jar:?]
	at com.linkedin.tony.ApplicationMaster.run(ApplicationMaster.java:402) ~[tony-core-0.4.9.jar:?]
	at com.linkedin.tony.ApplicationMaster.main(ApplicationMaster.java:334) [tony-core-0.4.9.jar:?]

registeredTasks is updated in a separate thread and can be updated whie we traverse it. We need to make sure registeredTasks can be safely passed to .stream().forEach().

@oliverhu oliverhu self-assigned this Apr 27, 2022
zuston pushed a commit that referenced this issue Apr 28, 2022
…664 (#665)

* [bugfix] ConcurrentModificationException when we traverse registeredTasks #664

* remove unused import
@zuston
Copy link
Member

zuston commented Apr 28, 2022

#665 solved.

@zuston zuston closed this as completed Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants