Bug#677704: unusable multiarch (triggers "Dynamic MMap ran out of room" error)
On Sat, Jun 16, 2012 at 12:53:43PM +0200, Robert Millan wrote:
> clone 677704 -1
> retitle -1 missing mremap() implementation
> severity -1 wishlist
> reassign -1 kfreebsd-9
> forwarded -1 http://www.freebsd.org/cgi/query-pr.cgi?pr=59912
> block 677704 by -1
> thanks
>
> 2012/6/16 Julian Andres Klode <jak@debian.org>:
> > On Sat, Jun 16, 2012 at 12:09:06PM +0200, Robert Millan wrote:
> >> Package: apt
> >> Version: 0.9.6
> >> Severity: important
> >> User: debian-bsd@lists.debian.org
> >> Usertags: kfreebsd
> >>
> >> Tried increasing this limit, with no improvement. Â I also wonder how is
> >> libpgocaml-ocaml-dev related to this ...
> >
> > Yes, we don't have mremap() on kFreeBSD, which we use for resizing. This
> > could be fixed by rewriting the mremap() part to use munmap() and mmap()
> > instead of mremap(). I can't tell you why the limit increasing does not
> > help, though, someone else might know more.
>
> Thanks. Unfortunately I don't currently have time to work on this,
> but I'm adding a bug for mremap request as well...
Setting APT::Cache-Start instead of APT::Cache-Limit works. The message
is bogus on FreeBSD as we do not support growing, so the limit is ignored
and we only try to create a cache of APT::Cache-Start bytes.
The best way to fix this in my opinion is to use munmap() and mmap()
instead of mremap() for file-based mappings on not-Linux, and use
malloc()/realloc() for anonymous memory. But the code is slightly
complicated currently, with all kinds of different cases.
--
Julian Andres Klode - Debian Developer, Ubuntu Member
See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.
Reply to: