E_FAIL Error in 7zip

250

Solution 1

I was copying a 3.5 GB ISO file to a 8 GB USB flash drive.

Diagnose

In my case I seconded @kwubbufetowicz and looked at the system calls and signals with strace, see man strace:

strace 7z x [source] -o[target] 2>&1 | tee 7z-strace.log

Within the last 40 lines or so there is this sequence:

open("[path to offending file]", O_WRONLY|O_CREAT, 0664) = 4
[...]
write(4, "[...])..."[...], 131072)          = 131071
munmap(0x7f1c9e0b3000, 135168)          = 0
write(4, "\354", 1)                     = -1 EFBIG (File too large)
close(3)                                = 0
close(4)                                = 0
brk(0x22be000)                          = 0x22be000
munmap(0x7f1c9c864000, 3837216)         = 0
rt_sigaction(SIGINT, {SIG_DFL, [INT], [...]
rt_sigaction(SIGTERM, {SIG_DFL, [TERM], [...]
write(1, "xtracting  [some file]/"..., 1108xtracting  [some file] 
[...]
ERROR: E_FAIL                

) = 1108
exit_group(2)                           = ?
+++ exited with 2 +++

So there is a pass write on file 4, a fail write on the same file with message EFBIG (File too large), then some file closed, a few interruption and termination signals. Eventually, the error message saw before: ERROR: E_FAIL. The offending file is 4.3 GB.

Also, final message sent to the terminal should always reflect the inner message, if you ask me. In the OP's pastebin, you see

 write(1, "Error: E_FAIL                \n", 30Error: E_FAIL  ) = 30

which is a consistent message. In my case 'ERROR: E_FAIL', with uppercase error, on the terminal hides a 'EFBIG (File too large)' in the call-and-signal trace.

Basically, don't take the stdout at face value and look up in the trace for more, maybe. Also mind the letter case and whether you get Error: E_FAIL or ERROR: E_FAIL**.

Actions

I found this other blog post of 2014 in which the author suggests three avenues:

  1. You are looking at a compressed archive that is read-only, like a CD-ROM and you've asked -7zip to write to that. It can't do this so fails as if there is no disk space.
  2. You are trying to uncompress to a drive with insufficient disk space.
  3. You are trying to uncompress a large file to a file system that cannot support a file that large so it fails as if there is no disk space.

My problem was the brand new Flash drive was formatted to exFAT or FAT32 as it appeared to my linux box. Thus the big file (>25GB) couldn't be written above 4GB, which is the limit for FAT32.

Basically, it is not a matter of space left on disk. Check whether the file system can support the file size you want to write.

Results

This solution worked for me. I reformatted the USB drive from FAT32 to NFTS and could finish the extraction. After extraction the total used space is 5.3 GB.

Everything is Ok

Folders: 85
Files: 942
Size:       5437451876
Compressed: 5443010560
) = 3646
exit_group(0)                           = ?
+++ exited with 0 +++

Solution 2

I just had similar error. The problem was that "file.7z.002" was missing. I only copied "file.7z.001" to new folder by mistake.

Share:
250

Related videos on Youtube

malcoauri
Author by

malcoauri

Updated on September 18, 2022

Comments

  • malcoauri
    malcoauri almost 2 years

    I'm a newby in AngularJS, and I have one question: because Angular is client-side framework, it must work without any web-server, but this code doesn't work:

    <!doctype html>
    <html ng-app="learningApp">
      <body>
        I can add: {{ 1+2 }}.
        <script src="angular.min.js"></script>
      </body>
    </html>
    

    I see just "I can add: {{ 1+2 }}." in the browser window. What's the trouble? Thanks.

    • MAQ
      MAQ over 8 years
      show us strace 7z e Backup.7z.001 results. Which of the presented filesystems are you using ?
    • Ckubrak
      Ckubrak over 8 years
      @KWubbufetowicz the result of strace 7z e Backup.7z.001 is too long to paste here so here's the result: pastebin.com/kLpesXEa I'm pretty sure I'm using the 450G's one, or at least I think so
    • thrig
      thrig over 8 years
      The strace mentions /srv/samba which appears to be missing from your list of filesystems?
    • MAQ
      MAQ over 8 years
      @thrig indeed ... pls show us df /srv/samba, it seems this is the filesystem you use to extract the files. You should also be able to find out which fs you are using by issuing df . before you execute 7z
    • Ckubrak
      Ckubrak over 8 years
      @thrig it gives back Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda2 470977904 76170496 370860044 18% / and when I run it "-h" it echoes Filesystem Size Used Avail Use% Mounted on /dev/sda2 450G 73G 354G 18% /
    • Kusalananda
      Kusalananda over 6 years
      Do you have all archive volumes available in the current directory (not just the first 001 part)?
  • malcoauri
    malcoauri over 9 years
    Great answer! Thanks!
  • Michael Mrozek
    Michael Mrozek almost 7 years
    This looks like a fine answer to me. It's not clear if this is the asker's problem too since the error is kind of generic, but it could be