Bug 1040912 - [ARM] mount-local / FUSE support does not seem to work at all
Summary: [ARM] mount-local / FUSE support does not seem to work at all
Keywords:
Status: NEW
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On: 1040945
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-12 09:59 UTC by Richard W.M. Jones
Modified: 2021-04-19 10:35 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2013-12-12 09:59:17 UTC
Description of problem:

(Note this only happens on ARM, not on x86).

libguestfs enters guestfs_mount_local, but this call returns
early, apparently without any error.  This leaves the FUSE
mount in a strange state without a backing transport.

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

libguestfs 1.25.13

How reproducible:

100%

Steps to Reproduce:

Use a test script like this:

------------------------------------------------
#!/bin/bash -

fusermount -u /tmp/mnt
rm -rf /tmp/mnt
set -e
mkdir /tmp/mnt

export LIBGUESTFS_HV=/home/rjones/d/qemu/arm-softmmu/qemu-system-arm
export LIBGUESTFS_DEBUG=1
export LIBGUESTFS_TRACE=1

gdir=$HOME/d/libguestfs

$gdir/run \
$gdir/fish/guestfish -a $gdir/tests/guests/fedora.img -i <<EOF
  mount-local /tmp/mnt
EOF
------------------------------------------------

Actual results:

mount_local enters and leaves very quickly, with no error:

libguestfs: trace: mount_local "/tmp/mnt"
libguestfs: guestfs__mount_local: fuse_mount /tmp/mnt
libguestfs: guestfs__mount_local: fuse_new
libguestfs: guestfs__mount_local: leaving fuse_mount_local
libguestfs: trace: mount_local = 0

Expected results:

mount_local should wait around until someone unmounts the
mountpoint using fusermount -u.

Comment 1 Richard W.M. Jones 2013-12-12 10:06:51 UTC
Sorry, that description & test is bogus, since it doesn't call
mount-local-run.

Here is an updated test case:

------------------------------------------------
#!/bin/bash -

fusermount -u /tmp/mnt
rm -rf /tmp/mnt
set -e
mkdir /tmp/mnt

export LIBGUESTFS_HV=/home/rjones/d/qemu/arm-softmmu/qemu-system-arm
export LIBGUESTFS_DEBUG=1
export LIBGUESTFS_TRACE=1

gdir=$HOME/d/libguestfs

$gdir/run \
$gdir/fish/guestfish -a $gdir/tests/guests/fedora.img -i <<EOF
  mount-local /tmp/mnt
  mount-local-run
EOF
------------------------------------------------

What happens is /tmp/mnt is created and mounted, and libguestfs
sits in the FUSE loop processing requests.  However the mount
point has strange permissions and is completely inaccessible:

$ ls -al /tmp | grep mnt
ls: cannot access /tmp/mnt: Permission denied
d??????????  ? ?      ?             ?            ? mnt
$ ls /tmp/mnt
ls: cannot access /tmp/mnt: Permission denied

So this is probably a FUSE bug?


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