Bug 592910 - 'guestfish --remote run' hangs in a shell command substitution context
Summary: 'guestfish --remote run' hangs in a shell command substitution context
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On: 730248
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-17 10:45 UTC by Jinxin Zheng
Modified: 2012-05-02 13:08 UTC (History)
2 users (show)

(edit)
Clone Of:
: 730248 (view as bug list)
(edit)
Last Closed: 2012-05-02 13:08:32 UTC


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

Description Jinxin Zheng 2010-05-17 10:45:08 UTC
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:
Always

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 10:59:01 UTC
Easy to reproduce.

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

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

$ a=`guestfish --remote list-devices`
$ echo $a
/dev/vda
$ a=`guestfish --remote ping-daemon`
$ echo $a

Comment 2 Richard W.M. Jones 2010-05-17 11:01:11 UTC
Created attachment 414520 [details]
strace

Output from:

strace -o strace.log -f -s 1024 sh -c 'a=`guestfish --remote run`'

Comment 3 Jinxin Zheng 2011-08-12 09:41:59 UTC
Can this one get at least a documentation fix?

Comment 4 Richard W.M. Jones 2011-08-12 09:56:19 UTC
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 13:08:32 UTC
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.