Bug 612178

Summary: guestfish: using -m option in conjunction with --listen option causes appliance to die
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: jzheng, llim, mbooth, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 609990 Environment:
Last Closed: 2010-07-07 16:01:56 UTC Type: ---
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:    
Bug Blocks: 609990    

Description Richard W.M. Jones 2010-07-07 13:49:29 UTC
I checked and this bug also happens in upstream libguestfs.
Therefore cloning for upstream product:

+++ This bug was initially created as a clone of Bug #609990 +++

Created an attachment (id=428358)
guestfish verbose output

Description of problem:
When -m option and --listen option is used at the same time, the appliance dies.

Version-Release number of selected component (if applicable):
guestfish-1.2.7-1.el6.5.x86_64
libguestfs-1.2.7-1.el6.5.x86_64

How reproducible:
Alway

Steps to Reproduce:
1. prepare test.img that contains a file system in /dev/sda1

2. run the following command,

$ LIBGUESTFS_DEBUG=1 guestfish -a test.img -m /dev/sda1 --listen

when the command completes executing, the pid of the process is printed,
save it in $pid.

3. do the following,

$ guestfish --remote=$pid -- ping-daemon

then this is printed on the screen,

send_to_daemon: 0x15ff3e0 g->state = 3, n = 28
child_cleanup: 0x15ff3e0: child process died
closing guestfs handle 0x15ff3e0 (state 0)

Actual results:
appliance died.

Expected results:
don't die

--- Additional comment from pm-rhel on 2010-07-01 07:35:27 EDT ---

Since this issue was entered in bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

--- Additional comment from pm-rhel on 2010-07-01 07:43:07 EDT ---

This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 1 Richard W.M. Jones 2010-07-07 14:07:40 UTC
Patch posted upstream:
https://www.redhat.com/archives/libguestfs/2010-July/msg00029.html