RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1564983 - The mount-vfs failed to mount the logical volume
Summary: The mount-vfs failed to mount the logical volume
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.6
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1551055
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-09 06:09 UTC by YongkuiGuo
Modified: 2019-01-16 07:17 UTC (History)
1 user (show)

Fixed In Version: libguestfs-1.38.1-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 07:45:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:3021 0 None None None 2018-10-30 07:46:21 UTC

Description YongkuiGuo 2018-04-09 06:09:18 UTC
Description of problem:

The mount-vfs command failed to mount the logical volume to '/'. However, the mount command is OK.


Version-Release number of selected component (if applicable):
libguestfs-1.38.0-1.el7.x86_64
qemu-kvm-1.5.3-156.el7.x86_64
kernel-3.10.0-862.el7.x86_64
libvirt-3.9.0-14.el7.x86_64

How reproducible:
100%


Steps:

1. On rhel7.5 host
#qemu-img create -f raw fs_mount.ext2.raw 10G

2.#guestfish -a fs_mount.ext2.raw -v -x
><fs> run
><fs> pvcreate /dev/sda
><fs> vgcreate vol_test /dev/sda
><fs> lvcreate vol_file vol_test 10000
><fs> mkfs ext2 /dev/vol_test/vol_file
><fs> list-filesystems
/dev/vol_test/vol_file: ext2
><fs> mount-vfs "" ext2 /dev/vol_test/vol_file /
-------------------------------------------------
libguestfs: trace: mount_vfs "" "ext2" "/dev/vol_test/vol_file" "/"
libguestfs: trace: vfs_type "/dev/vol_test/vol_file"

guestfsd: <= vfs_type (0xc6) request length 68 bytes
commandrvf: stdout=n stderr=y flags=0x0
commandrvf: udevadm --debug settle -E /dev/vol_test/vol_file
calling: settle
command: blkid '-c' '/dev/null' '-o' 'value' '-s' 'TYPE' '/dev/vol_test/vol_file'
command: blkid returned 0
command: blkid: stdout:
ext2
guestfsd: => vfs_type (0xc6) took 0.00 secs
libguestfs: trace: vfs_type = "ext2"
guestfsd: <= mount_vfs (0x4b) request length 88 bytes
commandrvf: stdout=n stderr=y flags=0x0
commandrvf: udevadm --debug settle -E /dev/vol_test/vol_file
calling: settle
[   11.893586] traps: guestfsd[190] general protection ip:5583dc66da83 sp:7ffcc869b910 error:0 in guestfsd[5583dc585000+1c2000]
/init: line 244:   190 Segmentation fault      $cmd
+ sync
+ test '' = 1
+ reboot -f
Rebooting.
[   11.900859] Unregister pv shared memory for cpu 0
[   11.901502] sd 2:0:1:0: [sdb] Synchronizing SCSI cache
[   11.902234] sd 2:0:0:0: [sda] Synchronizing SCSI cache
[   11.903551] Restarting system.
[   11.903960] reboot: machine restart
libguestfs: error: appliance closed the connection unexpectedly, see earlier error messages
libguestfs: child_cleanup: 0x5632104f6cd0: child process died
libguestfs: calling virDomainDestroy flags=0
libguestfs: trace: mount_vfs = -1 (error)
-------------------------------------------------



Actual results:
The mount-vfs command failed with segmentation fault.


Expected results:
The mount-vfs command can mount the logical volume successfully.


Additional info:
The same error occurs on other filesystems(ext3,ext4,xfs).

Comment 2 Richard W.M. Jones 2018-04-09 07:38:25 UTC
> [   11.893586] traps: guestfsd[190] general protection ip:5583dc66da83 sp:7ffcc869b910 error:0 in guestfsd[5583dc585000+1c2000]
/init: line 244:   190 Segmentation fault      $cmd

Ouch.

A one line reproducer (which works upstream too) is:

$ guestfish -v -x -N lvfs mount-vfs "" ext2 /dev/VG/LV /

Comment 3 Richard W.M. Jones 2018-04-09 07:55:33 UTC
Patch posted:
https://www.redhat.com/archives/libguestfs/2018-April/msg00059.html

Comment 5 Pino Toscano 2018-05-02 11:23:02 UTC
Fix backported in 1.38.1.

Comment 7 YongkuiGuo 2018-05-04 03:48:53 UTC
Verified with packages:
libguestfs-1.38.1-1.el7.x86_64


Steps:

1. On rhel7.5 host
#guestfish -v -x -N lvfs mount-vfs "" ext2 /dev/VG/LV /
---------------------------------------------------------
...
command: mount '-t' 'ext2' '/dev/VG/LV' '/sysroot//'
[    2.570310] EXT4-fs (dm-0): mounting ext2 file system using the ext4 subsystem
[    2.573742] EXT4-fs (dm-0): mounted filesystem without journal. Opts: (null)
guestfsd: => mount_vfs (0x4b) took 0.01 secs
libguestfs: trace: mount_vfs = 0
...
---------------------------------------------------------
No error pops up. So verified this bug.

Comment 11 errata-xmlrpc 2018-10-30 07:45:35 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.

https://access.redhat.com/errata/RHEA-2018:3021


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