Bug 730248 - 'guestfish --remote run' hangs in a shell command substitution context
Summary: 'guestfish --remote run' hangs in a shell command substitution context
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libguestfs
Version: 6.1
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 592910
TreeView+ depends on / blocked
 
Reported: 2011-08-12 09:55 UTC by Richard W.M. Jones
Modified: 2011-12-06 10:32 UTC (History)
4 users (show)

Fixed In Version: libguestfs-1.7.17-26.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 592910
Environment:
Last Closed: 2011-12-06 10:32:04 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1512 normal SHIPPED_LIVE libguestfs bug fix update 2011-12-06 00:39:11 UTC

Description Richard W.M. Jones 2011-08-12 09:55:11 UTC
+++ This bug was initially created as a clone of Bug #592910 +++

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:

--- Additional comment from rjones@redhat.com on 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
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

--- Additional comment from rjones@redhat.com on 2010-05-17 07:01:11 EDT ---

Created attachment 414520 [details]
strace

Output from:

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

--- Additional comment from jzheng@redhat.com on 2011-08-12 05:41:59 EDT ---

Can this one get at least a documentation fix?

Comment 3 Jinxin Zheng 2011-08-23 09:14:29 UTC
Documented in man page for guestfish:

--
   REMOTE CONTROL RUN COMMAND HANGING
       Using the "run" (or "launch") command remotely in a command substitution context hangs, ie. don’t do (note the backquotes):

        a=`guestfish --remote run`

       Since the "run" command produces no output on stdout, this is not useful anyway.

Comment 4 errata-xmlrpc 2011-12-06 10:32:04 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/RHBA-2011-1512.html


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