-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
race condition in logging code? #972
Comments
different but similar trace: Write of size 4 at 0x7f569e587ba0 by thread T19 (mutexes: write M666672754807107656, write M666954229783818720, write M667235704760529400, write M666672754851916272, write M666954229828627072, write M667235704805337704): Previous read of size 4 at 0x7f569e587ba0 by thread T76: |
@hanwen what version of jetty are you using, so we can match the line numbers? |
JETTY_VERS = '9.3.11.v20160721' maven_jar( maven_jar( maven_jar( maven_jar( maven_jar( maven_jar( maven_jar( maven_jar( maven_jar( |
This is no longer relevant in Jetty 9.4.x Closing. |
I'm debugging a deadlock in Gerrit, and got the following report for a data race. Since this has only Jetty in the stack-traces, I thought this might interest you.
There are several similar traces, due to debug logging of objects
WARNING: ThreadSanitizer: data race (pid=14201)
Write of size 4 at 0x7f569e58748c by thread T65:
#0 org.eclipse.jetty.io.SelectChannelEndPoint.onSelected()Ljava/lang/Runnable; (SelectChannelEndPoint.java:168)
#1 org.eclipse.jetty.io.ManagedSelector$SelectorProducer.processSelected()Ljava/lang/Runnable; (ManagedSelector.java:283)
#2 org.eclipse.jetty.io.ManagedSelector$SelectorProducer.produce()Ljava/lang/Runnable; (ManagedSelector.java:181)
#3 org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume()V (ExecuteProduceConsume.java:249)
#4 org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume()V (ExecuteProduceConsume.java:148)
#5 org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run()V (ExecuteProduceConsume.java:136)
#6 org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(Ljava/lang/Runnable;)V (QueuedThreadPool.java:671)
#7 org.eclipse.jetty.util.thread.QueuedThreadPool$2.run()V (QueuedThreadPool.java:589)
#8 java.lang.Thread.run()V (Thread.java:745)
#9 (Generated Stub)
Previous read of size 4 at 0x7f569e58748c by thread T19 (mutexes: write M666672754807107656, write M666954229783818720, write M667235704760529400):
#0 org.eclipse.jetty.io.SelectChannelEndPoint.toString()Ljava/lang/String; (SelectChannelEndPoint.java:308)
#1 java.util.Formatter$FormatSpecifier.printString(Ljava/lang/Object;Ljava/util/Locale;)V (Formatter.java:2886)
#2 java.util.Formatter$FormatSpecifier.print(Ljava/lang/Object;Ljava/util/Locale;)V (Formatter.java:2763)
#3 java.util.Formatter.format(Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/util/Formatter; (Formatter.java:2520)
#4 java.util.Formatter.format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/util/Formatter; (Formatter.java:2455)
#5 java.lang.String.format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; (String.java:2942)
#6 org.eclipse.jetty.io.AbstractConnection.toString()Ljava/lang/String; (AbstractConnection.java:262)
#7 org.eclipse.jetty.server.HttpConnection.toString()Ljava/lang/String; (HttpConnection.java:569)
#8 org.slf4j.helpers.MessageFormatter.safeObjectAppend(Ljava/lang/StringBuilder;Ljava/lang/Object;)V (MessageFormatter.java:305)
#9 org.slf4j.helpers.MessageFormatter.deeplyAppendParameter(Ljava/lang/StringBuilder;Ljava/lang/Object;Ljava/util/Map;)V (MessageFormatter.java:277)
#10 org.slf4j.helpers.MessageFormatter.arrayFormat(Ljava/lang/String;[Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple; (MessageFormatter.java:231)
#11 org.eclipse.jetty.util.log.JettyAwareLogger.log(Lorg/slf4j/Marker;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V (JettyAwareLogger.java:619)
#12 org.eclipse.jetty.util.log.JettyAwareLogger.debug(Ljava/lang/String;[Ljava/lang/Object;)V (JettyAwareLogger.java:206)
#13 org.eclipse.jetty.util.log.Slf4jLog.debug(Ljava/lang/String;[Ljava/lang/Object;)V (Slf4jLog.java:89)
#14 org.eclipse.jetty.server.HttpConnection.onFillable()V (HttpConnection.java:274)
#15 org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded()V (AbstractConnection.java:273)
#16 org.eclipse.jetty.io.FillInterest.fillable()V (FillInterest.java:95)
#17 org.eclipse.jetty.io.SelectChannelEndPoint$2.run()V (SelectChannelEndPoint.java:93)
#18 org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume()V (ExecuteProduceConsume.java:303)
#19 org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume()V (ExecuteProduceConsume.java:148)
#20 org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run()V (ExecuteProduceConsume.java:136)
#21 org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(Ljava/lang/Runnable;)V (QueuedThreadPool.java:671)
#22 org.eclipse.jetty.util.thread.QueuedThreadPool$2.run()V (QueuedThreadPool.java:589)
#23 java.lang.Thread.run()V (Thread.java:745)
#24 (Generated Stub)
The text was updated successfully, but these errors were encountered: