You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Rob Springer <rs...@etinternational.com> on 2012/07/25 15:39:43 UTC

Possible EPollPoller issue?

Hey all - there's an unchecked error condition in EpollPoller.cpp that we ran 
into, but I wanted to check in here before opening a bug, since as far as I 
can tell, it can only be triggered if another error is present elsewhere.

To keep a long story short, there was a bug in one of our programs wherein a 
thread could call close() on what was effectively a random socket. 
Occasionally, it would happen to call close() on the alwaysReadableFd 
registered in the PollerPrivate constructor, which would result in an epoll 
event for that FD to be returned in the call to epoll_wait() on line 568. It'd 
then try to dereference the event's "ptr" element (which was set to 0x1 on 
registration for that FD), which would lead to a segfault.

Since the root problem is absolutely in our software, and not in Qpid, I 
wasn't sure if you [the maintainers] wanted an issue opened to perhaps catch 
the error condition and log a message, rather than throwing a segfault. IMO, 
either answer makes sense.

Thanks!
-rob

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Possible EPollPoller issue?

Posted by Steve Huston <sh...@riverace.com>.
Good detective work, Rob! Could you please open a jira for this issue?
Then we can track it, and if the decision is made to leave it as-is, at
least that will be documented.

Thanks!
-Steve

On 7/25/12 9:39 AM, "Rob Springer" <rs...@etinternational.com> wrote:

>Hey all - there's an unchecked error condition in EpollPoller.cpp that we
>ran 
>into, but I wanted to check in here before opening a bug, since as far as
>I 
>can tell, it can only be triggered if another error is present elsewhere.
>
>To keep a long story short, there was a bug in one of our programs
>wherein a 
>thread could call close() on what was effectively a random socket.
>Occasionally, it would happen to call close() on the alwaysReadableFd
>registered in the PollerPrivate constructor, which would result in an
>epoll 
>event for that FD to be returned in the call to epoll_wait() on line 568.
>It'd 
>then try to dereference the event's "ptr" element (which was set to 0x1
>on 
>registration for that FD), which would lead to a segfault.
>
>Since the root problem is absolutely in our software, and not in Qpid, I
>wasn't sure if you [the maintainers] wanted an issue opened to perhaps
>catch 
>the error condition and log a message, rather than throwing a segfault.
>IMO, 
>either answer makes sense.
>
>Thanks!
>-rob
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
>For additional commands, e-mail: users-help@qpid.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org