You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Stephen Tyree <ty...@gmail.com> on 2011/08/22 16:44:12 UTC

Using MSG_NOSIGNAL on socket sends in libzookeeper_mt

Right now when send is called after the cluster has closed the connection
(say on session expiration) SIGPIPE is fired for the entire application.
This seems like something we shouldn't be leaking out of the API, so a
simple fix (at least for Linux) would be to add the MSG_NOSIGNAL option to
any socket sends we do. This isn't portable to other platforms, but on other
platforms there are similar solutions to the problem. What does everyone
think?

Re: Using MSG_NOSIGNAL on socket sends in libzookeeper_mt

Posted by Stephen Tyree <ty...@gmail.com>.
Well, I made that JIRA a few months ago to track the issue but then no one
ever commented on it so I assumed there wasn't interest for fixing it. If
there is interest in fixing it wouldn't take me much time to add it in.

On Mon, Aug 22, 2011 at 12:32 PM, Mahadev Konar <ma...@hortonworks.com>wrote:

> Looks like we had similar issues in our tests and we ignored them in
> the test cases:
>
> https://issues.apache.org/jira/browse/ZOOKEEPER-482
>
> Is this the tracking jira for SIGPIPE issue?
>
> https://issues.apache.org/jira/browse/ZOOKEEPER-1051
>
> thanks
> mahadev
>
> On Mon, Aug 22, 2011 at 7:44 AM, Stephen Tyree <ty...@gmail.com> wrote:
> > Right now when send is called after the cluster has closed the connection
> > (say on session expiration) SIGPIPE is fired for the entire application.
> > This seems like something we shouldn't be leaking out of the API, so a
> > simple fix (at least for Linux) would be to add the MSG_NOSIGNAL option
> to
> > any socket sends we do. This isn't portable to other platforms, but on
> other
> > platforms there are similar solutions to the problem. What does everyone
> > think?
> >
>

Re: Using MSG_NOSIGNAL on socket sends in libzookeeper_mt

Posted by Mahadev Konar <ma...@hortonworks.com>.
Looks like we had similar issues in our tests and we ignored them in
the test cases:

https://issues.apache.org/jira/browse/ZOOKEEPER-482

Is this the tracking jira for SIGPIPE issue?

https://issues.apache.org/jira/browse/ZOOKEEPER-1051

thanks
mahadev

On Mon, Aug 22, 2011 at 7:44 AM, Stephen Tyree <ty...@gmail.com> wrote:
> Right now when send is called after the cluster has closed the connection
> (say on session expiration) SIGPIPE is fired for the entire application.
> This seems like something we shouldn't be leaking out of the API, so a
> simple fix (at least for Linux) would be to add the MSG_NOSIGNAL option to
> any socket sends we do. This isn't portable to other platforms, but on other
> platforms there are similar solutions to the problem. What does everyone
> think?
>