Bug 870058 - qpidd --config <directory> hangs during startup
Summary: qpidd --config <directory> hangs during startup
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: Development
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: 2.3
: ---
Assignee: Ernie
QA Contact: Valiantsina Hubeika
URL:
Whiteboard:
Depends On: 740505
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-25 13:42 UTC by Peter Belanyi
Modified: 2015-01-04 22:55 UTC (History)
8 users (show)

Fixed In Version: qpid-cpp-0.18-4
Doc Type: Bug Fix
Doc Text:
Cause: Run the qpidd --config command and pass an existing directory Consequence: The command hangs and does not return to the command line Fix: Detect when an existing directory is passed and, if so, return an error message Result: Running qpidd --config and passing an existing directory will return an error message
Clone Of:
Environment:
Last Closed: 2013-03-06 18:52:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Detect if command line contained a directory instead of a file (798 bytes, patch)
2012-10-29 18:56 UTC, Ernie
crolke: review+
Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0561 0 normal SHIPPED_LIVE Moderate: Red Hat Enterprise MRG Messaging 2.3 security update 2013-03-06 23:48:13 UTC

Description Peter Belanyi 2012-10-25 13:42:35 UTC
Description of problem:
qpidd --config <directory> hangs during startup

strace qpidd --config /tmp/dir
...
mprotect(0x872000, 4096, PROT_READ)     = 0
munmap(0xb7faf000, 32929)               = 0
set_tid_address(0xb7fa9768)             = 11774
set_robust_list(0xb7fa9770, 0xc)        = 0
futex(0xbfdf7294, FUTEX_WAKE_PRIVATE, 1) = 0
rt_sigaction(SIGRTMIN, {0x9df400, [], SA_SIGINFO}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x9df300, [], SA_RESTART|SA_SIGINFO}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=10240*1024, rlim_max=RLIM_INFINITY}) = 0
uname({sys="Linux", node="localhost.localdomain", ...}) = 0
futex(0xbccadc, FUTEX_WAKE_PRIVATE, 2147483647) = 0
brk(0)                                  = 0x97ec000
brk(0x980d000)                          = 0x980d000
futex(0x7e1b0c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
pipe([3, 4])                            = 0
write(4, "\3\0", 2)                     = 2
rt_sigaction(SIGPIPE, {0x1, [PIPE], SA_RESTART}, {SIG_DFL, [], 0}, 8) = 0
open("/tmp/dir", O_RDONLY|O_LARGEFILE)  = 5
read(5, 0x97f8950, 8191)                = -1 EISDIR (Is a directory)
futex(0xaafb48, FUTEX_WAKE_PRIVATE, 2147483647) = 0

The issue was seen on 0.14 as well as 0.18, qpidd reliably hangs for ever.

The issue is related to bug 740505.


Version-Release number of selected component (if applicable):
qpid-cpp-server-0.18-2.el5
qpid-cpp-server-0.14-22.el6_3


How reproducible:
100%


Steps to Reproduce:
1. mkdir /tmp/dir
2. qpidd --config /tmp/dir ('qpidd --help --config /tmp/dir' also fails)
3. # qpidd hung

  
Actual results:
qpidd hangs


Expected results:
qpidd should not hang

Additional info:

Comment 1 Peter Belanyi 2012-10-25 13:59:20 UTC
See bug 740505 for issue reproducer, function tc8.

Comment 3 Ernie 2012-10-29 18:56:53 UTC
Created attachment 635129 [details]
Detect if command line contained a directory instead of a file

Does this happen under windows? 
If yes, will the attached patch fix the problem there as well?

Comment 4 Ernie 2012-10-30 12:32:46 UTC
Does this happen under windows? 
If yes, will the attached patch fix the problem there as well?
If no, will the attached patch cause a problem in windows?

Comment 5 Chuck Rolke 2012-10-30 14:17:17 UTC
I approve this patch.

Without the patch it hangs (on Fedora) and with the patch it produces a good error message.

On Windows the problem does not exist. Without the patch it produces the good error message and with the patch it produces the same good error message.

Comment 6 Chuck Rolke 2012-10-30 17:43:02 UTC
Submitted patch upstream at r1403797

Comment 10 Valiantsina Hubeika 2012-11-13 12:00:47 UTC
Retested on rhel5.9/6.3 i/x on packages:

python-qpid-0.18-4.el5
python-qpid-qmf-0.18-6.el5
qpid-cpp-client-0.18-7.el5
qpid-cpp-client-devel-0.18-7.el5
qpid-cpp-client-devel-docs-0.18-7.el5
qpid-cpp-client-ssl-0.18-7.el5
qpid-cpp-server-0.18-7.el5
qpid-cpp-server-cluster-0.18-7.el5
qpid-cpp-server-devel-0.18-7.el5
qpid-cpp-server-ssl-0.18-7.el5
qpid-cpp-server-store-0.18-7.el5
qpid-cpp-server-xml-0.18-7.el5
qpid-java-client-0.18-5.el5
qpid-java-common-0.18-5.el5
qpid-java-example-0.18-5.el5
qpid-jca-0.18-5.el5
qpid-jca-xarecovery-0.18-5.el5
qpid-qmf-0.18-6.el5
qpid-qmf-devel-0.18-6.el5
qpid-tools-0.18-5.el5

qpid-cpp-client-0.18-7.el6.i686
qpid-cpp-client-devel-0.18-7.el6.i686
qpid-cpp-client-devel-docs-0.18-7.el6.noarch
qpid-cpp-server-0.18-7.el6.i686
qpid-cpp-server-devel-0.18-7.el6.i686
qpid-cpp-server-store-0.18-7.el6.i686
qpid-cpp-server-xml-0.18-7.el6.i686
qpid-java-client-0.18-5.el6.noarch
qpid-java-common-0.18-5.el6.noarch
qpid-java-example-0.18-5.el6.noarch
qpid-qmf-0.18-6.el6.i686


Qpidd does not hang any more.


-> VERIFIED

Comment 11 Chuck Rolke 2012-12-10 18:50:12 UTC
Comment on attachment 635129 [details]
Detect if command line contained a directory instead of a file

patch approved

Comment 13 errata-xmlrpc 2013-03-06 18:52:34 UTC
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/RHSA-2013-0561.html


Note You need to log in before you can comment on or make changes to this bug.