ASF Bugzilla – Attachment 27193 Details for
Bug 51417
Apache mod_jk worker gets stuck in OK/BUSY.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
busy.patch created by Mladen Turk and verified independently to fix this issue
busy.patch (text/plain), 2.15 KB, created by
Samuel Mendenhall
on 2011-06-22 15:10:41 UTC
(
hide
)
Description:
busy.patch created by Mladen Turk and verified independently to fix this issue
Filename:
MIME Type:
Creator:
Samuel Mendenhall
Created:
2011-06-22 15:10:41 UTC
Size:
2.15 KB
patch
obsolete
>--- native/common/jk_ajp_common.c >+++ native/common/jk_ajp_common.c >@@ -3345,3 +3345,39 @@ > JK_TRACE_EXIT(l); > return JK_FALSE; > } >+ >+int ajp_has_endpoint(jk_worker_t *pThis, >+ jk_logger_t *l) >+{ >+ JK_TRACE_ENTER(l); >+ >+ if (pThis && pThis->worker_private) { >+ ajp_worker_t *aw = pThis->worker_private; >+ int rc; >+ >+ JK_ENTER_CS(&aw->cs, rc); >+ if (rc) { >+ unsigned int slot; >+ /* Try to find connected socket cache entry */ >+ for (slot = 0; slot < aw->ep_cache_sz; slot++) { >+ if (aw->ep_cache[slot]) { >+ JK_LEAVE_CS(&aw->cs, rc); >+ return JK_TRUE; >+ } >+ } >+ JK_LEAVE_CS(&aw->cs, rc); >+ } >+ else { >+ jk_log(l, JK_LOG_ERROR, >+ "locking thread (errno=%d)", errno); >+ JK_TRACE_EXIT(l); >+ return JK_FALSE; >+ } >+ } >+ else { >+ JK_LOG_NULL_PARAMS(l); >+ } >+ >+ JK_TRACE_EXIT(l); >+ return JK_FALSE; >+} >--- native/common/jk_ajp_common.h >+++ native/common/jk_ajp_common.h >@@ -458,6 +458,8 @@ > > int jk_ajp_get_cping_mode(const char *m, int def); > >+int ajp_has_endpoint(jk_worker_t *pThis, jk_logger_t *l); >+ > #ifdef __cplusplus > } > #endif /* __cplusplus */ >--- native/common/jk_lb_worker.c >+++ native/common/jk_lb_worker.c >@@ -1085,8 +1085,18 @@ > if (p->worker->sequence != p->worker->s->h.sequence) > jk_lb_pull(p->worker, JK_FALSE, l); > for (i = 0; i < num_of_workers; i++) { >+ lb_sub_worker_t *rec = &(p->worker->lb_workers[i]); >+ if (rec->s->state == JK_LB_STATE_BUSY) { >+ if (ajp_has_endpoint(rec->worker, l)) { >+ if (JK_IS_DEBUG_LEVEL(l)) >+ jk_log(l, JK_LOG_DEBUG, >+ "worker %s busy count fixed", >+ rec->name); >+ rec->s->state = JK_LB_STATE_OK; >+ } >+ } > /* Copy the shared state info */ >- p->states[i] = p->worker->lb_workers[i].s->state; >+ p->states[i] = rec->s->state; > } > > /* set the recovery post, for LB mode */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 51417
: 27193