Bug 870058 - qpidd --config <directory> hangs during startup
qpidd --config <directory> hangs during startup
Status: CLOSED ERRATA
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp (Show other bugs)
Development
Unspecified Unspecified
medium Severity high
: 2.3
: ---
Assigned To: Ernie
checking permissions
:
Depends On: 740505
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-25 09:42 EDT by Peter Belanyi
Modified: 2015-01-04 17:55 EST (History)
8 users (show)

See Also:
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
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-03-06 13:52:34 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Peter Belanyi 2012-10-25 09:42:35 EDT
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 09:59:20 EDT
See bug 740505 for issue reproducer, function tc8.
Comment 3 Ernie 2012-10-29 14:56:53 EDT
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 08:32:46 EDT
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 10:17:17 EDT
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 13:43:02 EDT
Submitted patch upstream at r1403797
Comment 10 checking permissions 2012-11-13 07:00:47 EST
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 13:50:12 EST
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 13:52:34 EST
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.