Bug 152052

Summary: growisofs sets a too small RLIMIT_MEMLOCK - breaks DVD burning
Product: [openSUSE] SUSE Linux 10.1 Reporter: Andreas Kleen <ak>
Component: BasesystemAssignee: Adrian Schröter <adrian.schroeter>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None    
Version: Beta 3   
Target Milestone: ---   
Hardware: x86-64   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Andreas Kleen 2006-02-18 19:54:53 UTC
I tried to burn a 2.8GB DVD on a beta3 system. Result was:

# growisofs -dvd-compat -Z /dev/sr0=image.iso
:-( unable to anonymously mmap 33554432: Resource temporarily unavailable

The culprit is it first does 

getrlimit(RLIMIT_MEMLOCK, {rlim_cur=32*1024, rlim_max=32*1024}) = 0
setrlimit(RLIMIT_MEMLOCK, {rlim_cur=36864*1024, rlim_max=36864*1024}) = 0
mlockall(MCL_CURRENT|MCL_FUTURE)        = 0
... and then later ...
mmap(NULL, 33554432, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 EAGAIN (Resource temporarily unavailable)

The rlimit set is only ~36MB and the allocation is 33.5MB and with some
other allocations it's too much and the mmap fails.

Either the RLIMIT_MEMLOCK should be dropped or it needs to be increased
to the maximum amount of memory that can be allocated.
Comment 1 Andreas Kleen 2006-02-18 20:16:20 UTC
Ok fixed it myself now and submitted fixed package to STABLE