libxfs_initbuf can't memalign 4096 bytes: Cannot allocate memory
Package: xfsprogs
Version: 2.8.11-1
Followup-For: Bug #382935
Hello,
Using xfs_repair on a 2TB partition I get:
Phase 1 - find and verify superblock...
Phase 2 - using internal log
- zero log...
- scan filesystem freespace and inode maps...
- found root inode chunk
Phase 3 - for each AG...
- scan and clear agi unlinked lists...
- process known inodes and perform inode discovery...
- agno = 0
- agno = 1
- agno = 2
- agno = 3
- agno = 4
- agno = 5
- agno = 6
- agno = 7
- agno = 8
- agno = 9
- agno = 10
xfs_repair: libxfs_initbuf can't memalign 4096 bytes: Cannot allocate memory
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (499, 'experimental')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17-6-debian-styx
Locale: LANG=en_CA, LC_CTYPE=fr_FR@euro (charmap=ISO-8859-15)
Versions of packages xfsprogs depends on:
ii libc6 2.3.6.ds1-4 GNU C Library: Shared libraries ii libreadline5 5.1-7 GNU readline and history libraries ii libuuid1 1.39-1 universally unique id library
xfsprogs recommends no packages.
-- no debconf information
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
On Sun, 27 Aug 2006 09:28:10 +0200, Louis-David Mitterrand <[email protected]> said:
[ ... ]
Quoted 1 line
xfs_repair:libxfs_initbufcan't memalign 4096 bytes: Cannot allocate memory
Most probably this is not a bug. The system probably does not have enough memory. "Cannot allocate memory" is probably what is happening. This has been discussed many times previously...
http://OSS.SGI.com/archives/linux-xfs/2005-08/msg00045.html
[ ... ]
Quoted 1 line · Louis-David Mitterrand
xfs_repair:libxfs_initbufcan't memalign 4096 bytes: Cannot allocate memory
Not enough memory, try adding swap space if that's possible? (BTW, how much memory do you have in this case?)
Quoted 6 lines · Chris Wedgwood
Quoted 1 line · Louis-David Mitterrand
xfs_repair:libxfs_initbufcan't memalign 4096 bytes: Cannot allocate memoryNot enough memory, try adding swap space if that's possible? (BTW, how much memory do you have in this case?)
I had 2GB RAM and a 300GB swap partition and was monitoring memory consumption with "top": it never went over 3BG before failing.
With the 2.7.x version of xfs_repair found on a live CD distro, memory consumption never exceeds 1GB on the same filesystem. Why has the 2.8.11 version become so greedy?
Quoted 7 lines · Louis-David Mitterrand
Package: xfsprogs
Version: 2.8.11-1
Followup-For: Bug #382935Hello,
Using
xfs_repairon a 2TB partition I get:
.....
Quoted 9 lines
xfs_repair:libxfs_initbufcan't memalign 4096 bytes: Cannot allocate memory-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (499, 'experimental')
Architecture: i386 (i686)
ia32, multi-terabyte filesystem, so as Peter pointed out:
Quoted 5 lines · Peter Grandi
Most probably this is not a bug. The system probably does not have enough memory. "Cannot allocate memory" is probably what is happening. This has been discussed many times previously...
http://OSS.SGI.com/archives/linux-xfs/2005-08/msg00045.html
This will be the problem.
Quoted 10 lines · Louis-David Mitterrand
Quoted 6 lines · Chris Wedgwood
Quoted 1 line · Louis-David Mitterrand
xfs_repair:libxfs_initbufcan't memalign 4096 bytes: Cannot allocate memoryNot enough memory, try adding swap space if that's possible? (BTW, how much memory do you have in this case?)
I had 2GB RAM and a 300GB swap partition and was monitoring memory consumption with "top": it never went over 3BG before failing.
It' won't matter how much swap you add - ia32 has a per-process memory limit of 1-4GB RAM depending on kernel build options.
Quoted 3 lines
With the 2.7.x version of
xfs_repairfound on a live CD distro, memory consumption never exceeds 1GB on the same filesystem. Why has the 2.8.11 version become so greedy?
xfs_repair is undergoing a lot of change at the moment and so memory usage may have blown out under some circumstances. Do you have figures on how much more memory xfs_repair is using?
Cheers,
Dave.
Signature · 3 lines
Dave Chinner Principal Engineer SGI Australian Software Group
Quoted 9 lines
Quoted 5 lines
Quoted 2 lines
On Sun, 27 Aug 2006 22:51:19 +0200, Louis-David Mitterrand <[email protected]> said:
[ ... ]
xfs_repair:libxfs_initbufcan't memalign 4096 bytes:
Cannot allocate memory [ ... ]I had 2GB RAM and a 300GB swap partition and was monitoring memory consumption with "top": it never went over 3BG before failing.
The default 3GiB address space limit per process on a 32 bit system is rather well documented, for a summary:
http://WWW.sabi.co.UK/Notes/#060821c
Let's mention this classic entry again:
http://OSS.SGI.com/archives/linux-xfs/2005-08/msg00045.html
«> > Your filesystem (8TiB) may simply bee too large for your
Quoted 2 lines
Quoted 2 lines
system to be able to repair. Try mounting it on a 64bit system with more RAM in it and repairing it from there.
Now that linux supports larger than 2TiB filesystems on 32 bit systems, this is true for Linux as well.»
A previous entry in the same thread might help too:
http://OSS.SGI.com/archives/linux-xfs/2005-08/msg00037.html
«> I try xfs_check and xfs_ncheck (and more progs) with
Quoted 2 lines
+200GB swap, but no different! less than 1 second and get out of memory.
Swap won't help if you're running an ia32 (32bit) kernel - you have a per-process memory limit of 1-4GiB (depending on kernel and config). The amount of physical memory and swap does not change this limitation.»
Trying hard to avoid looking at what «has been discussed many times previously» is a great time saving strategy! :-)