[Bug 233205] make(1) can stall, leak tons of memory, and trigger OOM during buildworld

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Nov 13 19:44:13 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233205

            Bug ID: 233205
           Summary: make(1) can stall, leak tons of memory, and trigger
                    OOM during buildworld
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: bugs at FreeBSD.org
          Reporter: kevans at freebsd.org

I'm certain there's other ways to reproduce, but the simplest version I have
is:

cd /usr/src
rm lib/Makefile.inc
make -j4 buildworld

buildworld will stall early on, probably in cleandir or obj walk. truss reveals
tons and tons of:

fstatat(AT_FDCWD,"/usr/src/lib/ncurses/ncurses/../../Makefile.inc",0x7fffffffca20,0x0)
ERR#2 'No such file or directory'
fstatat(AT_FDCWD,"/usr/src/lib/ncurses/ncurses/../../Makefile.inc",0x7fffffffca20,0x0)
ERR#2 'No such file or directory'
fstatat(AT_FDCWD,"../Makefile.inc",0x7fffffffc908,0x0) ERR#2 'No such file or
directory'
openat(AT_FDCWD,"/usr/src/lib/ncurses/ncurses/../Makefile.inc",O_RDONLY,00) = 3
(0x3)
fstat(3,{ mode=-rw-r--r-- ,inode=43789,size=94,blksize=4096 }) = 0 (0x0)
mmap(0x0,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE,3,0x0) = 35266478080
(0x8360bc000)
close(3)                                         = 0 (0x0)

It dies in different places, but always in a grandchild of lib/. The immediate
examples I have being:

make obj DIRPRFX=lib/csu/amd64/
make obj DIRPRFX=lib/geom/cache/
make obj DIRPRFX=lib/libalias/libalias/
make obj DIRPRFX=lib/csu/tests/
make cleandir DIRPRFX=lib/libbsnmp/libbsnmp/ [markj]

Eventually the system runs out of memory and make(1) is killed, killing the
buildworld. As indicated above, markj was also able to reproduce this.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list