DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 17th November 2011
pieterverberne pieterverberne is offline
Real Name: Pieter Verberne
Port Guard
 
Join Date: Oct 2008
Location: The Netherlands, Veldhoven
Posts: 11
Thanked 0 Times in 0 Posts
Default cat: [file]: Invalid argument

Hola,

$ cat winxp1.8.ova > /dev/null
cat: winxp1.8.ova: Invalid argument

What could cause this? This 3GB file is not entirely readable anymore. When I cat/copy/md5/rsync it I always get errors. It happens to more big files, and to big files only.

rsync says:
rsync: read errors mapping "[snip]/winxp1.8.ova": Invalid argument (22)
ERROR: [snip]/winxp1.8.ova failed verification -- update discarded.

Dmesg doesn't say a thing. This same file is on multiple volumes, and all volumes give this fault. I just upgraded to OpenBSD Current (OpenBSD lilium.garden 5.0 GENERIC#90 i386) This is the first time I see this error, and I backup almost daily with rsnapshot/rsync.

The filesystem is not corrupt. I don't think a file on itself can become corrupt so that cat(1) cannot read it anymore.

Ow, and the ova file is still usable by VirtualBox :-)

Could this be an OpenBSD bug?

Update: I transferred the ova file to another computer via NFS. There, the ova file is usable. So, the file is actually readable. Maybe NFS is not very picky about errors?

Last edited by pieterverberne; 18th November 2011 at 11:07 AM.
Reply With Quote
  #2   (View Single Post)  
Old 17th November 2011
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,658
Thanked 214 Times in 189 Posts
Default

Quote:
Could this be an OpenBSD bug?
Of course.

Since these files of yours are used by virtual machines, is it possible these are "sparse files" with unallocated sectors reserved? FFS filesystems support them, but cat(1) does not, it expects to access files sequentially, because it is used to concatenate files to standard output.

You might find cp(1) works where cat does not.

---

A dd(1) of the raw drive (or the raw partition) would indicate I/O errors isolated from any cat, rsync, or filesystem problem. Raw device nodes are significantly faster than cooked, and you can use high block sizes, though anything over 32KB isn't going to be any faster.

Use fsck_ffs(8) to determine if there is a filesystem structure problem.

If you dump(8) your .ova files, you may discover additional diagnostic messages if there are problems with the individual files.

Last edited by jggimi; 17th November 2011 at 09:12 PM. Reason: Edited to add dump, fsck, and dd suggestions
Reply With Quote
  #3   (View Single Post)  
Old 17th November 2011
pieterverberne pieterverberne is offline
Real Name: Pieter Verberne
Port Guard
 
Join Date: Oct 2008
Location: The Netherlands, Veldhoven
Posts: 11
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by jggimi View Post
Of course.

Since these files of yours are used by virtual machines, is it possible these are "sparse files" with unallocated sectors reserved? FFS filesystems support them, but cat(1) does not, it expects to access files sequentially, because it is used to concatenate files to standard output.

You might find cp(1) works where cat does not.
I read about that. However, some mpeg(video) and ISO (cd image) files have the same problem. cp doesn't work either on these files.

Maybe ova file was not a good example.

Another example as root:

# dd if=winxp1.8.ova of=/dev/null
dd: winxp1.8.ova: Invalid argument
4194303+0 records in
4194303+0 records out
2147483136 bytes transferred in 116.564 secs (18423057 bytes/sec)

Diagnostic tips (hints) are also welcome.

Update: Ok, bit dumb to use an ova-file example again. But other files had the same problem anyway.

Last edited by pieterverberne; 17th November 2011 at 09:29 PM.
Reply With Quote
  #4   (View Single Post)  
Old 18th November 2011
pieterverberne pieterverberne is offline
Real Name: Pieter Verberne
Port Guard
 
Join Date: Oct 2008
Location: The Netherlands, Veldhoven
Posts: 11
Thanked 0 Times in 0 Posts
Default

Looks like it is fixed by downgrading to OpenBSD 5.0 stable release.
Reply With Quote
  #5   (View Single Post)  
Old 18th November 2011
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,876
Thanked 190 Times in 160 Posts
Default

Quote:
Originally Posted by pieterverberne View Post
Looks like it is fixed by downgrading to OpenBSD 5.0 stable release.
You may want to pass this information on to the developers so this can be fixed. Information on how to submit a problem report can be found at the following:

http://www.openbsd.org/report.html

Taking the time to provide a thorough, detailed, & complete report will help the developers resolve the issue faster. Providing complete outputs of dmesg(8) for both configurations will certainly help.
Reply With Quote
  #6   (View Single Post)  
Old 19th November 2011
pieterverberne pieterverberne is offline
Real Name: Pieter Verberne
Port Guard
 
Join Date: Oct 2008
Location: The Netherlands, Veldhoven
Posts: 11
Thanked 0 Times in 0 Posts
Default

Sorry (to the OpenBSD developers), but I'm not really planning to upgrade, make a bug report and downgrade again. I did sent a mail to bugs@openbsd.org but never find a copy on http://marc.info/?l=openbsd-bugs&r=1&b=201111&w=2 . (I thought bugs@openbsd.org was a public list?)
Reply With Quote
  #7   (View Single Post)  
Old 19th November 2011
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,658
Thanked 214 Times in 189 Posts
Default

Your report was published to bugs@. Unfortunately, marc.info has had problems with regular updates since September, sometimes going many days, or even weeks, without recording incoming Email. Use Gmane.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
AWK passing the argument to system command Oko Programming 6 6th July 2011 08:03 PM
mount-msdosfs /dev/dao: : Invalid argument harold FreeBSD General 5 12th December 2010 06:59 AM
Pidgin MSN connection issues, invalid SSL Certificate chain TerryP Guides 5 8th December 2010 01:06 AM
Warning domain_not_set.invalid aleunix OpenBSD General 13 15th December 2009 11:19 AM
Mount DVD - invalid argument. maxrussell FreeBSD General 17 7th January 2009 08:46 AM


All times are GMT. The time now is 04:27 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick