Closed Ohadbasan closed 10 years ago
Hm, that is an odd one that I haven't seen before. It looks like it is squarely in the realm of libguestfs. Unfortunately I have no idea. I'll try to contact the maintainer of libguestfs and get him to comment here.
When libguestfs sends files over the link between the appliance and the library (such as when running the guestfs_tar_out call), it sends 8 KByte chunks of data. If the library cannot read a chunk, it will print this error. The normal case would be that system call (eg read(2)) would fail. This is likely to be a "should never happen" issue, and this code is well tested.
Oz calls guestfs_tar_out with the /dev/fd/NN parameter (there's nothing wrong with that). This explains why /dev/fd/NN is shown in the error message.
The bug suggests that strace shows a problem with a file descriptor being closed, but without the complete strace output, plus the precise version of libguestfs, this is not useful.
I can't really debug this further without knowing the precise version of libguestfs, the full strace output, and ideally having a reproducible bug report.
Hello Thanks for the answer libguestfs is libguestfs-1.22.7-1.fc19.x86_64 I uploaded the strace output to my google drive https://docs.google.com/file/d/0B3eNkDsPQKn5ZDdlNlI3Y0NUOEU/edit
thanks,
Ohad
I can't see the full error message because strace truncates strings, but the appliance kernel prints several worrying errors towards the end:
$ fgrep 'read(12,' strace.out
read(12, "[ 174.783567] attempt to access"..., 8192) = 105
read(12, "835\r\ntar: ./repodata/495d3964f86"..., 8192) = 147
read(12, ": Input/output error\r\n", 8192) = 22
read(12, "[ 174.823543] attempt to access"..., 8192) = 110
read(12, "[ 174.830558] attempt to access"..., 8192) = 195
read(12, "lists.sqlite.bz2: Read error at "..., 8192) = 86
read(12, "[ 174.916106] attempt to access"..., 8192) = 132
read(12, " to access beyond end of device\r"..., 8192) = 88
read(12, "tar: ./repodata/5af8199bd0ffb441"..., 8192) = 156
read(12, "error\r\n", 8192) = 7
read(12, "[ 174.974255] attempt to access"..., 8192) = 165
read(12, "[ 174.976748] sda: rw=0, want=8"..., 8192) = 222
read(12, "[ 175.060976] attempt to access"..., 8192) = 94
read(12, " limit=5720835\r\n", 8192) = 16
read(12, "[ 175.063317] attempt to access"..., 8192) = 105
read(12, "835\r\ntar: ./repodata/b4e0b9342ef"..., 8192) = 153
read(12, ": Input/output error\r\n", 8192) = 22
read(12, "[ 175.087326] attempt to access"..., 8192) = 107
read(12, "5\r\n[ 175.088603] attempt to acc"..., 8192) = 100
read(12, "mit=5720835\r\ntar: ./repodata/ca5"..., 8192) = 158
read(12, "bytes: Input/output error\r\n[ 17"..., 8192) = 64
read(12, "nd end of device\r\n[ 175.097439]"..., 8192) = 99
read(12, "access beyond end of device\r\n[ "..., 8192) = 105
read(12, "2ef36b0cde54ee0521fae90b98911db0"..., 8192) = 146
read(12, "[ 175.144098] attempt to access"..., 8192) = 85
read(12, "=8230664, limit=5720835\r\n[ 175."..., 8192) = 102
read(12, "=0, want=8230664, limit=5720835\r"..., 8192) = 127
read(12, "\r\n[ 175.148084] attempt to acce"..., 8192) = 103
read(12, "5720835\r\n", 8192) = 9
read(12, "[ 175.149393] attempt to access"..., 8192) = 105
read(12, "835\r\ntar: ./repodata/TRANS.TBL: "..., 8192) = 100
read(12, "tar: Exiting with failure status"..., 8192) = 73
I'd say your ISO file is corrupted or truncated.
you were right. I redownloaded the iso and now a dsk image is being created successfully. I have to ask, is there any mailing list or irc channel for oz? I have some question about using the tool thanks!
There isn't really a mailing list or IRC channel; I just don't have time to hang out on IRC, and there hasn't been enough volume to warrant a mailing list. If you have usage questions, feel free to either email me directly (my email address is clalancette@gmail.com), or open issues on this forum with user questions. I'll answer them as best I can.
For this particular issue, I'm going to close it out. Thanks everyone!
Hi
trying to use oz-install throws the following exception: Traceback (most recent call last): File "/bin/oz-install", line 159, in
customize or generate_icicle)
File "/usr/lib/python2.7/site-packages/oz/RedHat.py", line 706, in generate_install_media
customize_or_icicle)
File "/usr/lib/python2.7/site-packages/oz/Guest.py", line 1803, in _iso_generate_install_media
self._copy_iso()
File "/usr/lib/python2.7/site-packages/oz/Guest.py", line 1483, in _copy_iso
gfs.tar_out("/", "/dev/fd/%d" % wr)
File "/usr/lib/python2.7/site-packages/guestfs.py", line 3708, in tar_out
r = libguestfsmod.tar_out (self._o, directory, tarfile, compress, numericowner, excludes)
RuntimeError: /dev/fd/13: error in chunked encoding
strace shows the last file opened with fd=13 was: open("/var/lib/rpm/Basenames", O_RDONLY) = 13 , but it was closed close(13) I don't know why it tries to open fd13 later... I think that this is what fails it open("/dev/fd/13", O_WRONLY|O_CREAT|O_NOCTTY|O_TRUNC|O_CLOEXEC, 0666) = 16
the oz version that I am using is oz-0.11.0-2.fc19.noarch
cmd is oz-install -d3 -c oz.cfg appliance.tdl template is
conf [paths] output_dir = /var/lib/libvirt/images data_dir = /var/lib/oz screenshot_dir = .
[libvirt] uri = qemu:///system type = kvm bridge_name = virbr0 cpus = 2 memory = 4048 image_type = raw
[cache] original_media = yes modified_media = no jeos = no
[icicle] safe_generation = no
thank you!