You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2014/06/19 06:47:19 UTC

[Bug 56642] New: Socket timeout callback is always fired even after the socket have woke.

https://issues.apache.org/bugzilla/show_bug.cgi?id=56642

            Bug ID: 56642
           Summary: Socket timeout callback is always fired even after the
                    socket have woke.
           Product: Apache httpd-2
           Version: 2.5-HEAD
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: critical
          Priority: P2
         Component: mpm_event
          Assignee: bugs@httpd.apache.org
          Reporter: takashi.asfbugzilla@tks.st

ap_mpm_register_socket_callback_timeout takes two callback funtions.

 * @param cbfn The callback function
 * @param tofn The callback function if the timeout expires

Current event MPM calls tofn in the timeout even if cbfn have been called.
Using mod_proxy_wstunnel Async mode and timeout is set, this can cause SEGV
because proxy_wstunnel_finish is called more than once for the same backend
connetion.

mod_proxy_wstunnel call ap_mpm_register_socket_callback_timeout with
proxy_wstunnel_finish as tofn when ProxyWebsocketAsync is On and
ProxyWebsocketIdleTimeout is set some number > 0.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 56642] Socket timeout callback is always fired even after the socket have woke.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56642

--- Comment #1 from Takashi Sato <ta...@tks.st> ---
Created attachment 31729
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31729&action=edit
error log

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 56642] Socket timeout callback is always fired even after the socket have woke.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56642

--- Comment #5 from Takashi Sato <ta...@tks.st> ---
Fixed as r1604347

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 56642] Socket timeout callback is always fired even after the socket woke.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56642

--- Comment #6 from Yann Ylavic <yl...@gmail.com> ---
Follow up in r1604451 to avoid a timer event leak.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 56642] Socket timeout callback is always fired even after the socket woke.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56642

Takashi Sato <ta...@tks.st> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
            Summary|Socket timeout callback is  |Socket timeout callback is
                   |always fired even after the |always fired even after the
                   |socket have woke.           |socket woke.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 56642] Socket timeout callback is always fired even after the socket have woke.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56642

--- Comment #2 from Takashi Sato <ta...@tks.st> ---
The attached error log says proxy_wstunnel_cancel_callback is called three
times though only one connetion is established to my websocket backend.

[Thu Jun 19 03:19:41.483461 2014] [proxy_wstunnel:trace1] [pid 16551:tid
3045055344] mod_proxy_wstunnel.c(157): [remote 172.104.38.219:58759]
proxy_wstunnel_cancel_callback, IO timed out
[Thu Jun 19 03:19:41.483537 2014] [proxy_wstunnel:trace1] [pid 16551:tid
3034565488] mod_proxy_wstunnel.c(157): [remote 172.104.38.219:58759]
proxy_wstunnel_cancel_callback, IO timed out
[cut]
[Thu Jun 19 03:19:41.483737 2014] [proxy_wstunnel:trace1] [pid 16551:tid
3055545200] mod_proxy_wstunnel.c(157): [remote 172.104.38.219:58759]
proxy_wstunnel_cancel_callback, IO timed out

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 56642] Socket timeout callback is always fired even after the socket have woke.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56642

--- Comment #4 from Eric Covener <co...@gmail.com> ---
(In reply to Takashi Sato from comment #3)
> Created attachment 31732 [details]
> patch to fix
> 
> I think this patch fixes this issue.
> If the timeout callback is cancelled, the listener thread shouldn't push it
> to worker.

looks good here

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 56642] Socket timeout callback is always fired even after the socket have woke.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56642

--- Comment #3 from Takashi Sato <ta...@tks.st> ---
Created attachment 31732
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31732&action=edit
patch to fix

I think this patch fixes this issue.
If the timeout callback is cancelled, the listener thread shouldn't push it to
worker.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org