Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 870058

Summary: qpidd --config <directory> hangs during startup
Product: Red Hat Enterprise MRG Reporter: Peter Belanyi <pbelanyi>
Component: qpid-cppAssignee: Ernie <eallen>
Status: CLOSED ERRATA QA Contact: Valiantsina Hubeika <vhubeika>
Severity: high Docs Contact:
Priority: medium    
Version: DevelopmentCC: athomas, crolke, esammons, freznice, iboverma, jross, mcressma, vhubeika
Target Milestone: 2.3   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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 18:52:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 740505    
Bug Blocks:    
Attachments:
Description Flags
Detect if command line contained a directory instead of a file crolke: review+

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