Bug 592910 - 'guestfish --remote run' hangs in a shell command substitution context
'guestfish --remote run' hangs in a shell command substitution context
Product: Virtualization Tools
Classification: Community
Component: libguestfs (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Richard W.M. Jones
Depends On: 730248
  Show dependency treegraph
Reported: 2010-05-17 06:45 EDT by Jinxin Zheng
Modified: 2012-05-02 09:08 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 730248 (view as bug list)
Last Closed: 2012-05-02 09:08:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
strace (37.18 KB, text/plain)
2010-05-17 07:01 EDT, Richard W.M. Jones
no flags Details

  None (edit)
Description Jinxin Zheng 2010-05-17 06:45:08 EDT
Description of problem:
running 'guestfish --remote run' in a shell command substitution, i.e., `` or $()
would cause the command to hang.

Version-Release number of selected component (if applicable):
guestfish 1.3.13

How reproducible:

Steps to Reproduce:
1. $ eval `guestfish -a test.img --listen`
2. a=`guestfish --remote run`
Actual results:
we get hang with step 2

Expected results:
the command should return on completion.

Additional info:
Comment 1 Richard W.M. Jones 2010-05-17 06:59:01 EDT
Easy to reproduce.

Something about guestfs_launch interferes with
stdout in a way which is incompatible with the remote

Note this *doesn't* happen with any other command.  For example:

$ a=`guestfish --remote list-devices`
$ echo $a
$ a=`guestfish --remote ping-daemon`
$ echo $a
Comment 2 Richard W.M. Jones 2010-05-17 07:01:11 EDT
Created attachment 414520 [details]

Output from:

strace -o strace.log -f -s 1024 sh -c 'a=`guestfish --remote run`'
Comment 3 Jinxin Zheng 2011-08-12 05:41:59 EDT
Can this one get at least a documentation fix?
Comment 4 Richard W.M. Jones 2011-08-12 05:56:19 EDT
Sure.  The bug wasn't cloned for 6.2, which is why it
had disappeared off the RHEL radar.

Cloned as bug 730248.
Comment 5 Richard W.M. Jones 2012-05-02 09:08:32 EDT
Documented upstream in commit 6cabc1cd02e181063596b48df55c3f6db51a6bb9.
We're not going to fix the bug itself.

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