BB tar aborts while GNU tar continues to unpack

Jody Bruchon jody at jodybruchon.com
Thu May 7 20:51:15 UTC 2015


Today I encountered an "invalid magic" error using BusyBox 1.23.1 tar on 
x86_64 while unpacking a 16 GB archive full of database files. It got 
about halfway through and gave up. GNU tar unpacked it without any 
issues. It is possible that my error is caused by an ancient tar 1.12 
without large file support being fed a file > 4 GB in size and giving up 
at that boundary (one of the files seemed to be truncated at 4 GB and 
the failure happened after attempting to unpack it.)

GNU tar emitted this and unpacked everything but the big file OK:

user at host:~ $ tar -tf backup1.tgz >/dev/null
tar: Skipping to next header
tar: A lone zero block at 34758420
tar: Exiting with failure status due to previous errors

BusyBox tar emitted this and aborted without further unpacking:

user at host:~ $ gzip -dc backup1.tgz | busybox tar -t >/dev/null
tar: invalid tar magic

-Jody


More information about the busybox mailing list