Bug 1798768 - Python bindings: Input/output error when testing whether an inode is a directory
Summary: Python bindings: Input/output error when testing whether an inode is a directory
Keywords:
Status: NEW
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: x86_64
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-05 23:13 UTC by mathieu.tarral
Modified: 2025-10-17 12:52 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-10-17 00:11:01 UTC
Embargoed:


Attachments (Terms of Use)
input/output error on is_dir call (70.71 KB, image/png)
2020-02-05 23:13 UTC, mathieu.tarral
no flags Details
libguestfs output with debugging information (77.31 KB, text/plain)
2020-02-06 11:56 UTC, mathieu.tarral
no flags Details

Description mathieu.tarral 2020-02-05 23:13:19 UTC
Created attachment 1658045 [details]
input/output error on is_dir call

Description of problem:
When testing if the path "/Windows/SoftwareDistribution" is a directory on Windows 10 Build 1703,
the libguestfs Python Bindings fails and raises a RuntimeError.


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

How reproducible:
always


Steps to Reproduce:
1. Install Windows 10 build 1703 in QEMU/KVM
2. launch libguestfs instance with Python bindings
3. g.is_dir('/Windows/SoftwareDistribution')

Actual results:
A RuntimeError is raised: "is_dir: lstat: /Windows/SoftwareDistribution: Input/output error"

Expected results:
No exceptions should have been raised


Additional info:
I can provide the qcow, but it is heavy (10GB), so you need to give me a server where I can upload it.

Thanks !

Comment 1 Richard W.M. Jones 2020-02-06 10:57:34 UTC
You'll need to enable debugging and post the results, as outlined here:

http://libguestfs.org/guestfs-faq.1.html#debugging-libguestfs

Comment 2 mathieu.tarral 2020-02-06 11:56:18 UTC
Created attachment 1658170 [details]
libguestfs output with debugging information

Hi Richard,

thanks for the feedback.
Please see the io_error_is_dir.txt log file attached, with the requested debugging information.

Comment 3 Richard W.M. Jones 2020-02-06 12:00:00 UTC
OK it's literally seeing an EIO error when opening that file, indicating
either that the disk really is corrupt or ntfs-3g cannot open the file
for some other reason.

I would suggest using virt-rescue so you can see what's really going on:

virt-rescue --ro -a /home/wenzel/kvm/win10-1703.qcow2 -i
><rescue> ls -l /Windows
><rescue> ls -l /Windows/SoftwareDistribution

and also use ‘dmesg’ in the rescue shell to see if there's any additional
clue about what is failing with that file.

Comment 4 Richard W.M. Jones 2020-02-06 12:00:46 UTC
I mean:

><rescue> ls -l /sysroot/Windows
><rescue> ls -l /sysroot/Windows/SoftwareDistribution

Comment 5 Red Hat Bugzilla 2025-10-17 00:11:01 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.

Comment 6 Alasdair Kergon 2025-10-17 12:52:13 UTC
Reopening because Virtualization Tools has not been discontinued.


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