You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Alexander Klimetschek (JIRA)" <ji...@apache.org> on 2010/10/01 19:06:32 UTC

[jira] Created: (SLING-1815) Improve error handling of "broken pipe" socket exceptions

Improve error handling of "broken pipe" socket exceptions
---------------------------------------------------------

                 Key: SLING-1815
                 URL: https://issues.apache.org/jira/browse/SLING-1815
             Project: Sling
          Issue Type: Bug
            Reporter: Alexander Klimetschek


If the client (browser) kills the socket connection mid-request, one gets broken pipe exception stack traces, exactly three of them (see attachment). The problem is that the error handling doesn't work on them, as the response is already written, and you always get three stacktraces:

1) original exception log
Uncaught Throwable java.net.SocketException: Broken pipe

2) error handling fails due to response already transmitted
Calling the error handler resulted in an error java.lang.IllegalStateException: OutputStream already retrieved

3) error handling logs original exception again
Original error class java.net.SocketException java.net.SocketException: Broken pipe

A single warn "broken pipe" would probably be enough (it's not a server fault).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SLING-1815) Improve error handling of "broken pipe" socket exceptions

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-1815?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger resolved SLING-1815.
--------------------------------------

    Fix Version/s: Engine 2.1.2
       Resolution: Fixed

Fixed in Rev. 1003700 by rethrowing IOException in the processRequest method to have it handled in the caller.

> Improve error handling of "broken pipe" socket exceptions
> ---------------------------------------------------------
>
>                 Key: SLING-1815
>                 URL: https://issues.apache.org/jira/browse/SLING-1815
>             Project: Sling
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: Engine 2.0.2, Engine 2.0.4, Engine 2.0.6, Engine 2.1.0
>            Reporter: Alexander Klimetschek
>            Assignee: Felix Meschberger
>            Priority: Minor
>             Fix For: Engine 2.1.2
>
>         Attachments: broken-pipe-stacktraces.txt
>
>
> If the client (browser) kills the socket connection mid-request, one gets broken pipe exception stack traces, exactly three of them (see attachment). The problem is that the error handling doesn't work on them, as the response is already written, and you always get three stacktraces:
> 1) original exception log
> Uncaught Throwable java.net.SocketException: Broken pipe
> 2) error handling fails due to response already transmitted
> Calling the error handler resulted in an error java.lang.IllegalStateException: OutputStream already retrieved
> 3) error handling logs original exception again
> Original error class java.net.SocketException java.net.SocketException: Broken pipe
> A single warn "broken pipe" would probably be enough (it's not a server fault).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (SLING-1815) Improve error handling of "broken pipe" socket exceptions

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-1815?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger reassigned SLING-1815:
----------------------------------------

    Assignee: Felix Meschberger

> Improve error handling of "broken pipe" socket exceptions
> ---------------------------------------------------------
>
>                 Key: SLING-1815
>                 URL: https://issues.apache.org/jira/browse/SLING-1815
>             Project: Sling
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: Engine 2.0.2, Engine 2.0.4, Engine 2.0.6, Engine 2.1.0
>            Reporter: Alexander Klimetschek
>            Assignee: Felix Meschberger
>            Priority: Minor
>         Attachments: broken-pipe-stacktraces.txt
>
>
> If the client (browser) kills the socket connection mid-request, one gets broken pipe exception stack traces, exactly three of them (see attachment). The problem is that the error handling doesn't work on them, as the response is already written, and you always get three stacktraces:
> 1) original exception log
> Uncaught Throwable java.net.SocketException: Broken pipe
> 2) error handling fails due to response already transmitted
> Calling the error handler resulted in an error java.lang.IllegalStateException: OutputStream already retrieved
> 3) error handling logs original exception again
> Original error class java.net.SocketException java.net.SocketException: Broken pipe
> A single warn "broken pipe" would probably be enough (it's not a server fault).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SLING-1815) Improve error handling of "broken pipe" socket exceptions

Posted by "Alexander Klimetschek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-1815?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Klimetschek updated SLING-1815:
-----------------------------------------

    Attachment: broken-pipe-stacktraces.txt

> Improve error handling of "broken pipe" socket exceptions
> ---------------------------------------------------------
>
>                 Key: SLING-1815
>                 URL: https://issues.apache.org/jira/browse/SLING-1815
>             Project: Sling
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: Engine 2.0.2, Engine 2.0.4, Engine 2.0.6, Engine 2.1.0
>            Reporter: Alexander Klimetschek
>            Priority: Minor
>         Attachments: broken-pipe-stacktraces.txt
>
>
> If the client (browser) kills the socket connection mid-request, one gets broken pipe exception stack traces, exactly three of them (see attachment). The problem is that the error handling doesn't work on them, as the response is already written, and you always get three stacktraces:
> 1) original exception log
> Uncaught Throwable java.net.SocketException: Broken pipe
> 2) error handling fails due to response already transmitted
> Calling the error handler resulted in an error java.lang.IllegalStateException: OutputStream already retrieved
> 3) error handling logs original exception again
> Original error class java.net.SocketException java.net.SocketException: Broken pipe
> A single warn "broken pipe" would probably be enough (it's not a server fault).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-1815) Improve error handling of "broken pipe" socket exceptions

Posted by "Alexander Klimetschek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-1815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12916952#action_12916952 ] 

Alexander Klimetschek commented on SLING-1815:
----------------------------------------------

This happens when accessing media files on a sling server with an iPad or iPhone, because these seem to do "test" requests. See also SLING-1814

> Improve error handling of "broken pipe" socket exceptions
> ---------------------------------------------------------
>
>                 Key: SLING-1815
>                 URL: https://issues.apache.org/jira/browse/SLING-1815
>             Project: Sling
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: Engine 2.0.2, Engine 2.0.4, Engine 2.0.6, Engine 2.1.0
>            Reporter: Alexander Klimetschek
>            Priority: Minor
>
> If the client (browser) kills the socket connection mid-request, one gets broken pipe exception stack traces, exactly three of them (see attachment). The problem is that the error handling doesn't work on them, as the response is already written, and you always get three stacktraces:
> 1) original exception log
> Uncaught Throwable java.net.SocketException: Broken pipe
> 2) error handling fails due to response already transmitted
> Calling the error handler resulted in an error java.lang.IllegalStateException: OutputStream already retrieved
> 3) error handling logs original exception again
> Original error class java.net.SocketException java.net.SocketException: Broken pipe
> A single warn "broken pipe" would probably be enough (it's not a server fault).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SLING-1815) Improve error handling of "broken pipe" socket exceptions

Posted by "Alexander Klimetschek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-1815?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Klimetschek updated SLING-1815:
-----------------------------------------

    Affects Version/s: Engine 2.1.0
                       Engine 2.0.6
                       Engine 2.0.4
                       Engine 2.0.2
             Priority: Minor  (was: Major)
          Component/s: Engine

> Improve error handling of "broken pipe" socket exceptions
> ---------------------------------------------------------
>
>                 Key: SLING-1815
>                 URL: https://issues.apache.org/jira/browse/SLING-1815
>             Project: Sling
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: Engine 2.0.2, Engine 2.0.4, Engine 2.0.6, Engine 2.1.0
>            Reporter: Alexander Klimetschek
>            Priority: Minor
>
> If the client (browser) kills the socket connection mid-request, one gets broken pipe exception stack traces, exactly three of them (see attachment). The problem is that the error handling doesn't work on them, as the response is already written, and you always get three stacktraces:
> 1) original exception log
> Uncaught Throwable java.net.SocketException: Broken pipe
> 2) error handling fails due to response already transmitted
> Calling the error handler resulted in an error java.lang.IllegalStateException: OutputStream already retrieved
> 3) error handling logs original exception again
> Original error class java.net.SocketException java.net.SocketException: Broken pipe
> A single warn "broken pipe" would probably be enough (it's not a server fault).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-1815) Improve error handling of "broken pipe" socket exceptions

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-1815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12917052#action_12917052 ] 

Felix Meschberger commented on SLING-1815:
------------------------------------------

Can also be reproduced on Linux using Firefox or Chrome: Accessing a movie causes the browser to request the file and abort the request once it decides to have a plugin handle the request, which places a new request.

> Improve error handling of "broken pipe" socket exceptions
> ---------------------------------------------------------
>
>                 Key: SLING-1815
>                 URL: https://issues.apache.org/jira/browse/SLING-1815
>             Project: Sling
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: Engine 2.0.2, Engine 2.0.4, Engine 2.0.6, Engine 2.1.0
>            Reporter: Alexander Klimetschek
>            Assignee: Felix Meschberger
>            Priority: Minor
>         Attachments: broken-pipe-stacktraces.txt
>
>
> If the client (browser) kills the socket connection mid-request, one gets broken pipe exception stack traces, exactly three of them (see attachment). The problem is that the error handling doesn't work on them, as the response is already written, and you always get three stacktraces:
> 1) original exception log
> Uncaught Throwable java.net.SocketException: Broken pipe
> 2) error handling fails due to response already transmitted
> Calling the error handler resulted in an error java.lang.IllegalStateException: OutputStream already retrieved
> 3) error handling logs original exception again
> Original error class java.net.SocketException java.net.SocketException: Broken pipe
> A single warn "broken pipe" would probably be enough (it's not a server fault).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-1815) Improve error handling of "broken pipe" socket exceptions

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-1815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12917054#action_12917054 ] 

Felix Meschberger commented on SLING-1815:
------------------------------------------

There is an exception catch overkill in the SlingRequestProcessorImpl.processRequest method: The method declares to throw IOException and the SlingMainServlet.service method in fact catches IOException and properly handles any SocketException.

The problem is that the processRequestMethod catches any IOException thrown during request processing in a catch(Throwable) and logs this situation. Instead, the IOException should be caught and forward.

> Improve error handling of "broken pipe" socket exceptions
> ---------------------------------------------------------
>
>                 Key: SLING-1815
>                 URL: https://issues.apache.org/jira/browse/SLING-1815
>             Project: Sling
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: Engine 2.0.2, Engine 2.0.4, Engine 2.0.6, Engine 2.1.0
>            Reporter: Alexander Klimetschek
>            Assignee: Felix Meschberger
>            Priority: Minor
>         Attachments: broken-pipe-stacktraces.txt
>
>
> If the client (browser) kills the socket connection mid-request, one gets broken pipe exception stack traces, exactly three of them (see attachment). The problem is that the error handling doesn't work on them, as the response is already written, and you always get three stacktraces:
> 1) original exception log
> Uncaught Throwable java.net.SocketException: Broken pipe
> 2) error handling fails due to response already transmitted
> Calling the error handler resulted in an error java.lang.IllegalStateException: OutputStream already retrieved
> 3) error handling logs original exception again
> Original error class java.net.SocketException java.net.SocketException: Broken pipe
> A single warn "broken pipe" would probably be enough (it's not a server fault).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.