Hide Forgot
Description of problem: qmfv2 does not provide a way to determine via a pollable file descriptor if a new event is available. Version-Release number of selected component (if applicable): rhel 6.1 How reproducible: 100% Steps to Reproduce: 1. no api present 2. 3. Actual results: must simulate a pollable file descriptor by creating a timer to poll on a time interval to check for new events. Expected results: An api to get a pollable file descriptor should be made available. When this pollable fd has a POLLIN event, a following event retrieval should result in an event without any delay related to timers for good high performance operation. Additional info: Workaround involves starting a timer to "poll" the event list via qmfv2. Need a file descriptor to let the kernel do the polling so our apps don't chew cpu in cloud environments.
Since RHEL 6.1 External Beta has begun, and this bug remains unresolved, it has been rejected as it is not proposed as exception or blocker. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux.
*** Bug 699501 has been marked as a duplicate of this bug. ***
Fixed upstream in revision 1170314.
An example program is provided to illustrate the use of the new, optional, feature. Here is the Readers Digest version: #include <qmf/posix/EventNotifier.h> void MyAgent::mainloop() { qmf::posix::EventNotifier notifier(agentSession); int qmf_fd(notifier.getHandle()); // qmf_fd is a file descriptor that shall be readable if and only if // there is at least one qmf event to be processed. The application should // neither read nor write data to or from this file descriptor. It should // simply use it in select/poll to test its readability. // // If qmf_fd is readable, the application should call agentSession.nextEvent // with a timeout of qpid::messaging::Duration::IMMEDIATE to assure that the // call will never block. while (running) { ... retval = select(nfds, &rfds, NULL, NULL, &timeval); if (retval > 0 && FD_ISSET(qmf_fd, &rfds)) { AgentEvent event; while (agentSession.nextEvent(event, Duration::IMMEDIATE)) { // Process Event } } ... } } Note that the above is also usable for Console sessions.
The issue has been fixed Verified on RHEL6.2-20111019.2, architectures: i386, x86_64 packages installed: python-qpid-0.12-1.el6.noarch python-qpid-qmf-0.12-6.el6.x86_64 qpid-cpp-client-0.12-6.el6.x86_64 qpid-cpp-client-devel-0.12-6.el6.x86_64 qpid-cpp-client-rdma-0.12-6.el6.x86_64 qpid-cpp-client-ssl-0.12-6.el6.x86_64 qpid-cpp-debuginfo-0.12-6.el6.x86_64 qpid-cpp-server-0.12-6.el6.x86_64 qpid-cpp-server-cluster-0.12-6.el6.x86_64 qpid-cpp-server-devel-0.12-6.el6.x86_64 qpid-cpp-server-rdma-0.12-6.el6.x86_64 qpid-cpp-server-ssl-0.12-6.el6.x86_64 qpid-cpp-server-store-0.12-6.el6.x86_64 qpid-cpp-server-xml-0.12-6.el6.x86_64 qpid-java-client-0.10-11.el6.noarch qpid-java-common-0.10-11.el6.noarch qpid-java-example-0.10-11.el6.noarch qpid-java-jca-0.10-11.el6.noarch qpid-java-jca-zip-0.10-11.el6.noarch qpid-qmf-0.12-6.el6.x86_64 qpid-qmf-debuginfo-0.12-6.el6.x86_64 qpid-qmf-devel-0.12-6.el6.x86_64 qpid-tests-0.12-1.el6.noarch qpid-tools-0.12-2.el6.noarch rh-qpid-cpp-tests-0.12-6.el6.x86_64 ruby-qpid-0.7.946106-2.el6.x86_64 ruby-qpid-qmf-0.12-6.el6.x86_64 -> VERIFIED
*** Bug 751865 has been marked as a duplicate of this bug. ***
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2011-1671.html