Project

General

Profile

Bug #1897

server loops on closed ajp13 connection (freezes)

Added by Alf over 10 years ago. Updated over 10 years ago.

Status:
Fixed
Priority:
Immediate
Assignee:
-
Category:
mod_proxy_backend_ajp13
Target version:
Start date:
2009-02-11
Due date:
% Done:

100%

Estimated time:
Missing in 1.5.x:

Description

In a faulty setup (lighttpd & ajp13 proxy configured, tomcat partly configured only), restarting tomcat while sending requests intended for the servlet causes lighttpd to freeze.
When it happens, the server is trapped in a loop which prevents it from being nicely stopped. Only a "kill -9" helps.

I narrowed it down to mod_proxy_backend_ajp13.c:709 and changed :

        } while (in->first && res == HANDLER_GO_ON);

to
        } while (in->first && !in->is_closed && res == HANDLER_GO_ON);

I do not know the server's code structure at all, so it might be a wrong place for patching this and might be handled much better elsewhere.
But this actually does the trick.

Don't hesitate asking for more info and/or a precise test case.

Cheers,

Frédéric.

Associated revisions

Revision 2441 (diff)
Added by stbuehler over 10 years ago

Fix endless loop in ajp (fixes #1897)

History

#1

Updated by Alf over 10 years ago

Argl. The site editor did something on my report.

Please, read :

Before : while (in->first && res == HANDLER_GO_ON)
After : while (in->first && !in->is_closed && res == HANDLER_GO_ON)
#2

Updated by stbuehler over 10 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset r2441.

Also available in: Atom