[ 
https://issues.apache.org/jira/browse/HADOOP-11802?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Colin Patrick McCabe updated HADOOP-11802:
------------------------------------------
    Attachment: HADOOP-11802.001.patch

version 1 of the patch:
* {{DataXceiver.java}}: do not close the DomainSocket on an error.  This is bad 
because the socket might already be getting poll()ed by the thread.  Instead, 
call {{shutdown(RDWR)}} on the socket.
* Log all {{Throwables}} that terminate the {{DomainSocketWatcher}} thread.  If 
there is a follow-on error, we don't want it to obscure the true cause of the 
problem.
* {{DomainSocketWatcher.c}}: look for both {{POLLIN}} and {{POLLHUP}} events 
when calling {{poll()}}.  Some UNIX variants (although not Linux) return 
POLLHUP instead of POLLIN when shutdown is called on the socket.
* {{BlockReaderFactory.java}}: add a {{injectRequestShortCircuitShmFailure}} 
method to the {{BlockReaderFactory#FailureInjector}} class.
* {{TestShortCircuitCache}}: add unit test

> DomainSocketWatcher thread terminates sometimes after there is an I/O error 
> during requestShortCircuitShm
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-11802
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11802
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.7.0
>            Reporter: Eric Payne
>            Assignee: Colin Patrick McCabe
>         Attachments: HADOOP-11802.001.patch
>
>
> In {{DataXceiver#requestShortCircuitShm}}, we attempt to recover from some 
> errors by closing the {{DomainSocket}}.  However, this violates the invariant 
> that the domain socket should never be closed when it is being managed by the 
> {{DomainSocketWatcher}}.  Instead, we should call {{shutdown}} on the 
> {{DomainSocket}}.  When this bug hits, it terminates the 
> {{DomainSocketWatcher}} thread.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to