Re: POLLHUP on never connected socket

2011-09-02 Thread Andriy Gapon
on 02/09/2011 23:26 Bruce Evans said the following: > Yes, that's what I'm asking. It should be simpler to fix if it is just > a bug and doesn't involve reader/writer races. The code for setting > POLLHUP for sockets is simple: from uipc_socket.c: > > % if ((events & POLLINIGNEOF) == 0) { >

Re: POLLHUP on never connected socket

2011-09-02 Thread Bruce Evans
On Fri, 2 Sep 2011, Andriy Gapon wrote: on 02/09/2011 20:36 Bruce Evans said the following: It seems likely that there was a transient connection to cause this problem. Do we know for sure? Not sure if this what you are asking but when I reproduced the problem it was by connecting to a local

Re: POLLHUP on never connected socket

2011-09-02 Thread Bruce Evans
On Fri, 2 Sep 2011, Jilles Tjoelker wrote: On Fri, Sep 02, 2011 at 12:28:24PM +0300, Andriy Gapon wrote: I see a problem where FreeBSD kernel (recent head) returns POLLHUP _alone_ (0x10) for a socket that has never been connected - a client socket for which connect(2) failed. There is also a p

Re: kern/160391: [ieee80211] [patch] Panic in mesh mode

2011-09-02 Thread linimon
Old Synopsis: Panic in mesh mode New Synopsis: [ieee80211] [patch] Panic in mesh mode Responsible-Changed-From-To: freebsd-bugs->freebsd-net Responsible-Changed-By: linimon Responsible-Changed-When: Fri Sep 2 19:54:11 UTC 2011 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.or

Re: POLLHUP on never connected socket

2011-09-02 Thread Andriy Gapon
on 02/09/2011 20:36 Bruce Evans said the following: > It seems likely that there was a transient connection to cause this > problem. Do we know for sure? Not sure if this what you are asking but when I reproduced the problem it was by connecting to a local port where no one listened for sure. --

Re: POLLHUP on never connected socket

2011-09-02 Thread Andriy Gapon
on 02/09/2011 14:21 Andrey Chernov said the following: > On Fri, Sep 02, 2011 at 02:04:34PM +0300, Andriy Gapon wrote: >> on 02/09/2011 13:40 Jilles Tjoelker said the following: >>> Ports people have complained about poll() behaviour before, are there >>> configure scripts that attempt to check if

Re: POLLHUP on never connected socket

2011-09-02 Thread Andrey Chernov
On Fri, Sep 02, 2011 at 02:04:34PM +0300, Andriy Gapon wrote: > on 02/09/2011 13:40 Jilles Tjoelker said the following: > > Ports people have complained about poll() behaviour before, are there > > configure scripts that attempt to check if we ever return POLLHUP alone > > and only check for POLLIN

Re: POLLHUP on never connected socket

2011-09-02 Thread Andriy Gapon
on 02/09/2011 13:40 Jilles Tjoelker said the following: > Ports people have complained about poll() behaviour before, are there > configure scripts that attempt to check if we ever return POLLHUP alone > and only check for POLLIN if not? Not sure about that other software and how POLLIN is related

Re: POLLHUP on never connected socket

2011-09-02 Thread Jilles Tjoelker
On Fri, Sep 02, 2011 at 12:28:24PM +0300, Andriy Gapon wrote: > I see a problem where FreeBSD kernel (recent head) returns POLLHUP > _alone_ (0x10) for a socket that has never been connected - a client > socket for which connect(2) failed. There is also a piece of software > that doesn't expect th

POLLHUP on never connected socket

2011-09-02 Thread Andriy Gapon
I see a problem where FreeBSD kernel (recent head) returns POLLHUP _alone_ (0x10) for a socket that has never been connected - a client socket for which connect(2) failed. There is also a piece of software that doesn't expect that flag and exhibits illogical behavior because of it. This is how P