org.eclipse.rap icon indicating copy to clipboard operation
org.eclipse.rap copied to clipboard

ConcurrentModificationException in LifeCycleServiceHandler

Open gcolburn opened this issue 2 years ago • 3 comments

After previously upgrading to RAP 3.20, we occasionally see this exception in production. Unfortunately we haven't found a way to deterministically reproduce it.

Any Suggestions? Thanks!

2022-11-21T22:28:10.383146347Z java.util.ConcurrentModificationException
2022-11-21T22:28:10.383157823Z  at java.base/java.util.ArrayList$Itr.checkForComodification(Unknown Source)
2022-11-21T22:28:10.383167628Z  at java.base/java.util.ArrayList$Itr.next(Unknown Source)
2022-11-21T22:28:10.383175730Z  at org.eclipse.rap.json.JsonArray$1.next(JsonArray.java:420)
2022-11-21T22:28:10.383184205Z  at org.eclipse.rap.json.JsonArray$1.next(JsonArray.java:1)
2022-11-21T22:28:10.383192454Z  at org.eclipse.rap.json.JsonWriter.writeArray(JsonWriter.java:120)
2022-11-21T22:28:10.383200133Z  at org.eclipse.rap.json.JsonArray.write(JsonArray.java:431)
2022-11-21T22:28:10.383207462Z  at org.eclipse.rap.json.JsonWriter.writeObject(JsonWriter.java:95)
2022-11-21T22:28:10.383214666Z  at org.eclipse.rap.json.JsonObject.write(JsonObject.java:593)
2022-11-21T22:28:10.383222008Z  at org.eclipse.rap.json.JsonWriter.writeArray(JsonWriter.java:124)
2022-11-21T22:28:10.383229769Z  at org.eclipse.rap.json.JsonArray.write(JsonArray.java:431)
2022-11-21T22:28:10.383238040Z  at org.eclipse.rap.json.JsonWriter.writeArray(JsonWriter.java:124)
2022-11-21T22:28:10.383246024Z  at org.eclipse.rap.json.JsonArray.write(JsonArray.java:431)
2022-11-21T22:28:10.383253769Z  at org.eclipse.rap.json.JsonWriter.writeObject(JsonWriter.java:95)
2022-11-21T22:28:10.383261714Z  at org.eclipse.rap.json.JsonObject.write(JsonObject.java:593)
2022-11-21T22:28:10.383269856Z  at org.eclipse.rap.json.JsonValue.writeTo(JsonValue.java:396)
2022-11-21T22:28:10.383277419Z  at org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.writeResponseMessage(LifeCycleServiceHandler.java:189)
2022-11-21T22:28:10.383284946Z  at org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.processUIRequest(LifeCycleServiceHandler.java:101)
2022-11-21T22:28:10.383305960Z  at org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.synchronizedService(LifeCycleServiceHandler.java:75)
2022-11-21T22:28:10.383316337Z  at org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.service(LifeCycleServiceHandler.java:66)
2022-11-21T22:28:10.383324481Z  at org.eclipse.rap.rwt.engine.RWTServlet.handleValidRequest(RWTServlet.java:135)
2022-11-21T22:28:10.383332839Z  at org.eclipse.rap.rwt.engine.RWTServlet.handleRequest(RWTServlet.java:117)
2022-11-21T22:28:10.383340918Z  at org.eclipse.rap.rwt.engine.RWTServlet.doPost(RWTServlet.java:107)
2022-11-21T22:28:10.383348862Z  at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
2022-11-21T22:28:10.383360164Z  at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
2022-11-21T22:28:10.383367739Z  at org.eclipse.rap.rwt.osgi.internal.CutOffContextPathWrapper.service(CutOffContextPathWrapper.java:106)
2022-11-21T22:28:10.383376943Z  at org.eclipse.equinox.http.servlet.internal.HttpServiceRuntimeImpl$LegacyServlet.service(HttpServiceRuntimeImpl.java:1457)
2022-11-21T22:28:10.383385782Z  at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:159)
2022-11-21T22:28:10.383394146Z  at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:67)
2022-11-21T22:28:10.383402374Z  at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:118)
2022-11-21T22:28:10.383410801Z  at org.eclipse.equinox.http.servlet.internal.servlet.ProxyServlet.dispatch(ProxyServlet.java:147)
2022-11-21T22:28:10.383419049Z  at org.eclipse.equinox.http.servlet.internal.servlet.ProxyServlet.preprocess(ProxyServlet.java:115)
2022-11-21T22:28:10.383426890Z  at org.eclipse.equinox.http.servlet.internal.servlet.ProxyServlet.service(ProxyServlet.java:104)
2022-11-21T22:28:10.383434324Z  at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)

gcolburn avatar Nov 21 '22 22:11 gcolburn

Without a way to reproduce and investigate the issue I can't say much. Do you have any custom widget or client service that renders some properties to the client? What Java version are you using?

ifurnadjiev avatar Nov 22 '22 08:11 ifurnadjiev

The only comment here is that this code must be executed from a single thread - the UI thread. Probably you are doing something (render property on custom widget?!) outside the UI thread.

ifurnadjiev avatar Nov 22 '22 10:11 ifurnadjiev

@gcolburn Do you have any additional information here? Some hints how to reproduce it?

ifurnadjiev avatar Feb 08 '23 09:02 ifurnadjiev