quarkus-http icon indicating copy to clipboard operation
quarkus-http copied to clipboard

UNDERTOW-1701: Fix race condition in GracefulShutdownHandler

Open carterkozak opened this issue 4 years ago • 2 comments

From https://github.com/undertow-io/undertow/pull/875

  1. Thread T1 calls decrementRequests. Shutdown is false, so this thread will follow the 'else' path in preparation for decrementAndGet
  2. Thread T2 calls shutdown. Increments from 1 to 2, sets shutdown=true, and calls decrementRequests where decrementAndGet results in 1
  3. Thread T1 completes the decrementRequests invocation reducing the active request count to zero in the else path without calling shutdownComplete.

carterkozak avatar Apr 27 '21 19:04 carterkozak


:waning_crescent_moon: This workflow status is outdated as a new workflow run has been triggered.


Status for workflow Build

This is the status report for running Build on commit be54ee8d0726968fb37ffccbb084dfde6da3c835.

Failing Jobs

Status Name Step Failures Logs Raw logs
:heavy_check_mark: Build - JDK 11 Logs Raw logs
Build - JDK 17 Build with Maven Failures Logs Raw logs

Full information is available in the Build summary check run.

Failures

:gear: Build - JDK 17 #

- Failing: servlet 
! Skipped: websocket websocket/core websocket/servlet and 1 more

:package: servlet

io.undertow.servlet.test.dispatcher.DispatcherForwardTestCase.testPathBasedInclude line 137 - More details - Source on GitHub

org.junit.ComparisonFailure: expected:<...etContext/dispatch /[dispatch]> but was:<...etContext/dispatch /[forward]>
	at org.junit.Assert.assertEquals(Assert.java:117)
	at org.junit.Assert.assertEquals(Assert.java:146)
	at io.undertow.servlet.test.dispatcher.DispatcherForwardTestCase.testPathBasedInclude(DispatcherForwardTestCase.java:137)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)

quarkus-bot[bot] avatar Apr 18 '24 06:04 quarkus-bot[bot]

Status for workflow Build

This is the status report for running Build on commit 0b82018fa0981ab451937cd831643d484c051bfd.

Failing Jobs

Status Name Step Failures Logs Raw logs
:heavy_check_mark: Build - JDK 11 Logs Raw logs
Build - JDK 17 Build with Maven Failures Logs Raw logs

Full information is available in the Build summary check run.

Failures

:gear: Build - JDK 17 #

- Failing: servlet 
! Skipped: websocket websocket/core websocket/servlet and 1 more

:package: servlet

io.undertow.servlet.test.dispatcher.DispatcherForwardTestCase.testPathBasedInclude line 137 - More details - Source on GitHub

org.junit.ComparisonFailure: expected:<...etContext/dispatch /[dispatch]> but was:<...etContext/dispatch /[forward]>
	at org.junit.Assert.assertEquals(Assert.java:117)
	at org.junit.Assert.assertEquals(Assert.java:146)
	at io.undertow.servlet.test.dispatcher.DispatcherForwardTestCase.testPathBasedInclude(DispatcherForwardTestCase.java:137)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)

quarkus-bot[bot] avatar Apr 19 '24 05:04 quarkus-bot[bot]