Bug 48830 - IIS shutdown blocked in endpoint service when server doesn't respond
Summary: IIS shutdown blocked in endpoint service when server doesn't respond
Status: NEW
Alias: None
Product: Tomcat Connectors
Classification: Unclassified
Component: isapi (show other bugs)
Version: 1.2.27
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-01 08:23 UTC by Tim Whittington
Modified: 2017-12-08 15:07 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Whittington 2010-03-01 08:23:31 UTC
When the ISAPI redirector is used to access a back-end server that doesn't respond to a request for a long time, IIS shutdown will be blocked.

The specific case I've observed this is an Eclipse RAP application, with UI callbacks activated, which triggers a polling HTTP request to be made to the server - this request only returns when there are UI updates to display

Debugging yields the stack trace below (note the line numbers will be a bit off from trunk at the moment):

     isapi_redirect.dll!jk_tcp_socket_recvfull(unsigned int sd=1188, unsigned char * b=0x0124e18c, int len=4, jk_logger * l=0x01205478)  Line 896 + 0x1a bytes    C
     isapi_redirect.dll!ajp_connection_tcp_get_message(ajp_endpoint * ae=0x012a41a8, jk_msg_buf_t * msg=0x012a41e0, jk_logger * l=0x01205478)  Line 1216 + 0x19 bytes    C
     isapi_redirect.dll!ajp_get_reply(jk_endpoint * e=0x012a61d8, jk_ws_service * s=0x0124f288, jk_logger * l=0x01205478, ajp_endpoint * p=0x012a41a8, ajp_operation * op=0x0124e21c)  Line 2053 + 0x14 bytes    C
>    isapi_redirect.dll!ajp_service(jk_endpoint * e=0x012a61d8, jk_ws_service * s=0x0124f288, jk_logger * l=0x01205478, int * is_error=0x0124e254)  Line 2449 + 0x19 bytes    C
     isapi_redirect.dll!HttpExtensionProc(_EXTENSION_CONTROL_BLOCK * lpEcb=0x00aced68)  Line 2184 + 0x27 bytes    C
(This is the call to e->service after obtaining a worker).

I've replicated this multiple times on shutdown with 1.2.30 and 1.2.27.

This is observed even after terminating the browser.
Comment 1 Mark Thomas 2017-12-08 15:07:35 UTC
I've just tested this with the ISAPI redirector 1.2.42 and Windows 2008 SP. The same behaviour is observed. The behaviour is related to the socket_timeout. By default this is infinite. Setting a lower timeout (e.g. 10s) enables IIS to shutdown cleanly.

Note: With an infinite timeput IIS will shutdown eventually, but not until the back-end writes a response.

Need to look to see if there is a way to interrupt / cancel the I/O on shut down.