Bug 1099172 - supermin: exception: Out of memory
Summary: supermin: exception: Out of memory
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: supermin
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1113065
TreeView+ depends on / blocked
 
Reported: 2014-05-19 16:34 UTC by Richard W.M. Jones
Modified: 2017-08-24 12:12 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1113065 (view as bug list)
Environment:
Last Closed: 2017-08-24 12:12:48 UTC
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2014-05-19 16:34:48 UTC
Description of problem:

(Reported by Stef Walter)

mkdir -p ~/.guestfs-1000
/usr/bin/supermin --build --verbose --if-newer --lock ~/.guestfs-1000/lock --copy-kernel -f ext2 --host-cpu x86_64 /usr/lib64/guestfs/supermin.d -o ~/.guestfs-1000/appliance.d

fails with the error:

supermin: exception: Out of memory

I asked Stef to use -v -v -v, and the end of the output is:

  - /var/lib/systemd/coredump
  - /var/lib/systemd/random-seed
  - /var/lib/tpm
  - /var/local
  - /var/lock
  - /var/log
  - /var/log/README
  - /var/log/journal
  - /var/log/lastlog
  - /var/log/tallylog
  - /var/spool
  - /var/spool/mail
  - /var/mail
  - /var/nis
  - /var/opt
  - /var/preserve
  - /var/run
  - /var/run/console
  - /var/run/dbus
  - /var/run/faillock
  - /var/run/mdadm
  - /var/run/sepermit
  - /var/run/setrans
  - /var/spool
  - /var/spool/lpd
  - /var/spool/mail
  - /var/tmp
  - /var/yp
supermin: kernel: picked kernel vmlinuz-3.14.4-200.fc20.x86_64
supermin: kernel: picked modules path /lib/modules/3.14.4-200.fc20.x86_64
supermin: kernel: kernel_version 3.14.4-200.fc20.x86_64
supermin: kernel: modules /lib/modules/3.14.4-200.fc20.x86_64
supermin: ext2: creating empty ext2 filesystem '/data/.guestfs-1000/appliance.d.ci1uy50n/root'
mke2fs 1.42.8 (20-Jun-2013)
Discarding device blocks: done                            
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
262144 inodes, 1048576 blocks
52428 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1073741824
32 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736

Allocating group tables: done                            
Writing inode tables: done                            
Writing superblocks and filesystem accounting information: done 

supermin: ext2: populating from base image
supermin: ext2: copying files from host filesystem
supermin: exception: Out of memory

It turns out the exception is raised from C code:

/* Read in the whole file into memory.  Check the size is still 'size'. */
static char *
read_whole_file (const char *filename, size_t size)
{
  char *buf = malloc (size);
  if (buf == NULL)
    caml_raise_out_of_memory ();

/var/log/lastlog (in this case) was a huge file which caused
the out of memory error.

Version-Release number of selected component (if applicable):

supermin 5.1.7

Comment 2 Fedora End Of Life 2015-05-29 11:53:50 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 3 Richard W.M. Jones 2015-05-29 12:08:09 UTC
It's worked around, but not properly fixed upstream, so moving
to 'Rawhide'.

Comment 4 Jan Kurik 2015-07-15 14:40:25 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23

Comment 5 Pino Toscano 2017-08-24 12:12:48 UTC
This was fixed with commit
https://github.com/libguestfs/supermin/commit/f5a3deef588759c49dc862427a265aced612002d
which is in supermin >= 5.1.17.


Note You need to log in before you can comment on or make changes to this bug.