kern/149323: [libc] Applications with large memory footprint
failing with mmap(2) - memory allocation errors
Vernon Schryver
vjs at calcite.rhyolite.com
Sat Aug 7 16:20:03 UTC 2010
The following reply was made to PR kern/149323; it has been noted by GNATS.
From: Vernon Schryver <vjs at calcite.rhyolite.com>
To: bug-followup at FreeBSD.org
Cc: rblayzor at inoc.net
Subject: Re: kern/149323: [libc] Applications with large memory footprint failing with mmap(2) - memory allocation errors
Date: Sat, 7 Aug 2010 16:17:14 GMT
The problem does not happen with clean install of i386 Freebsd 8.1
and DCC 2.3.131 on a 32-bit box with 4 GByte of RAM less about 500 MByte
of PCI window.
The problem does happen after creating /boot/loader.conf.local containing
kern.maxdsiz="2048M" and rebooting. It happens when the dccd process
reaches about 880 MBytes of mmap()'ed windows into /var/dcc/dcc_db and
/var/dcc/dcc_db.hash.
`sysctl kern.maxdsiz` on my test system says "kern.maxdsiz: 536870912"
without /boot/loader.conf.local but "kern.maxdsiz: 2147483648" with
the file.
The message
try #1 mmap(dcc_db 0xeee000,0x3,0x801,11,0x49b72000): Cannot allocate memory
means that mmap(0, 0xeee000,0x3,0x801,11,0x49b72000) returned ENOMEM
where FD 11 is the file .../dcc_db
The message "try #2 mmap(...) ok" means that mmap() worked after releasing
some mmap()'ed memory.
I don't remember whether setting kern.maxdsiz was once needed to run
a DCC server on FreeBSD. As far as I know it is not needed now.
Evidently something happened to the effects of kern.maxdsiz between
FreeBSD 7.3 and 8.1
Perhaps the bug can be fixed by merely documenting the new effects of
kern.maxdsiz
Vernon Schryver vjs at rhyolite.com
More information about the freebsd-bugs
mailing list