Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #236963

Re: Memory allocation failed during fsck of large EXT4 filesystem

From "Thomas Schmitt" <scdbackup@gmx.net>
Newsgroups linux.debian.user
Subject Re: Memory allocation failed during fsck of large EXT4 filesystem
Date 2021-07-06 13:30 +0200
Message-ID <CxRr4-41w-3@gated-at.bofh.it> (permalink)
References <CxNx7-1KT-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi,

Reiner Buehl wrote.
> I would like to fix the filesystem
> so that I can then use more intelligent recovery methods that do not need to
> copy every file.

Maybe the old workaround proposed by Ted T'so in
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=614082
would be worth a try.

Bug reporter:

  "Error storing directory block information
   (inode=169246423, block=0, num=3966024): Memory allocation failed"

Ted T'so:

  "The way to work around this problem should it occur again is to note
   the inode number, and then zap it using debugfs:
     debugfs -w /dev/md1
     debugfs: clri <169246423>
     debugfs: quit
   Then e2fsck should be able to complete its work."

If possible i would make any experiments on a plain copy of the filesystem.
I.e. a copy of the bytes which can be read from the partition device.

-------------------------------------------------------------------------
Far fetched approach:

If this would not help and i would deem it worth the effort, then i'd get
the newest source of e2fsprogs and try to build it. Then i'd run the new
fsck.ext4 program on a copy of the filesystem. If it still fails with
"Memory allocation failed" then i'd try to let the program print a message
from any occasion of EXT2_ET_NO_MEMORY, describing which occasion was
triggered.

This point in the source and, if possible, a stack trace would be hands-on
information for the developers of e2fsprogs.

I'm not sure how good an idea it is to run fsck under gdb to get a stack
trace.
There are glib functions backtrace(3) and backtrace_symbols_fd(3).
  https://www.gnu.org/software/libc/manual/html_node/Backtraces.html
Their usage is shown in the handler function of
  https://stackoverflow.com/questions/77005/how-to-automatically-generate-a-stacktrace-when-my-program-crashes
In your case no signal would be received, of course. You'd call the trace
printer from the various EXT2_ET_NO_MEMORY occasions.

As said: far fetched and open ended ...


Have a nice day :)

Thomas

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Memory allocation failed during fsck of large EXT4 filesystem Reiner Buehl <reiner.buehl@gmail.com> - 2021-07-05 10:30 +0200
  Re: Memory allocation failed during fsck of large EXT4 filesystem IL Ka <kazakevichilya@gmail.com> - 2021-07-05 11:50 +0200
    Re: Memory allocation failed during fsck of large EXT4 filesystem Michael Stone <mstone@debian.org> - 2021-07-05 23:00 +0200
      Re: Memory allocation failed during fsck of large EXT4 filesystem "Thomas D. Dean" <tomdean@wavecable.com> - 2021-07-05 23:30 +0200
        Re: Memory allocation failed during fsck of large EXT4 filesystem Michael Stone <mstone@debian.org> - 2021-07-05 23:30 +0200
        Re: Memory allocation failed during fsck of large EXT4 filesystem Reiner Buehl <reiner.buehl@gmail.com> - 2021-07-06 09:20 +0200
          Re: Memory allocation failed during fsck of large EXT4 filesystem "Thomas Schmitt" <scdbackup@gmx.net> - 2021-07-06 13:30 +0200
  Re: Memory allocation failed during fsck of large EXT4 filesystem "Thomas Schmitt" <scdbackup@gmx.net> - 2021-07-05 12:00 +0200
    Re: Memory allocation failed during fsck of large EXT4 filesystem Reiner Buehl <reiner.buehl@gmail.com> - 2021-07-05 16:20 +0200
      Re: Memory allocation failed during fsck of large EXT4 filesystem IL Ka <kazakevichilya@gmail.com> - 2021-07-05 16:40 +0200
        Re: Memory allocation failed during fsck of large EXT4 filesystem IL Ka <kazakevichilya@gmail.com> - 2021-07-06 13:40 +0200
          Re: Memory allocation failed during fsck of large EXT4 filesystem Andy Smith <andy@strugglers.net> - 2021-07-06 15:20 +0200
  Re: Memory allocation failed during fsck of large EXT4 filesystem Stefan Monnier <monnier@iro.umontreal.ca> - 2021-07-05 17:20 +0200
  Re: Memory allocation failed during fsck of large EXT4 filesystem Marc Auslander <marcausl@gmail.com> - 2021-07-05 18:40 +0200

csiph-web