Go compiler crash with "signal: trace/BPT trap" when running testing concurrently(and lead to heavy load). Core-dump and kernel debug log telling that it is trigger by i386_set_ldt/i386_ldt_grow run out of LDT. Fix by change kmem_malloc flags from "M_WAITOK" to "M_WAITOK | M_ZERO" in user_ldt_alloc (https://github.com/freebsd/freebsd/blob/master/sys/i386/i386/sys_machdep.c#L441) More detail: https://github.com/golang/go/issues/16950
A commit references this bug: Author: tijl Date: Sun Sep 25 18:29:03 UTC 2016 New revision: 306318 URL: https://svnweb.freebsd.org/changeset/base/306318 Log: MFamd64: r266901 Allocate a zeroed LDT. Failing to do this might result in the LDT appearing to run out of free descriptors because of random junk in the descriptor's 'sd_type' field. http://lists.freebsd.org/pipermail/freebsd-amd64/2014-May/016088.html PR: 212639 Submitted by: wheelcomplex@gmail.com MFC after: 2 weeks Changes: head/sys/i386/i386/sys_machdep.c
A commit references this bug: Author: tijl Date: Mon Oct 10 11:51:47 UTC 2016 New revision: 306960 URL: https://svnweb.freebsd.org/changeset/base/306960 Log: MFC: r306318 Allocate a zeroed LDT. Failing to do this might result in the LDT appearing to run out of free descriptors because of random junk in the descriptor's 'sd_type' field. http://lists.freebsd.org/pipermail/freebsd-amd64/2014-May/016088.html PR: 212639 Submitted by: wheelcomplex@gmail.com Changes: _U stable/11/ stable/11/sys/i386/i386/sys_machdep.c
A commit references this bug: Author: tijl Date: Mon Oct 10 11:53:54 UTC 2016 New revision: 306961 URL: https://svnweb.freebsd.org/changeset/base/306961 Log: MFC: r306318 Allocate a zeroed LDT. Failing to do this might result in the LDT appearing to run out of free descriptors because of random junk in the descriptor's 'sd_type' field. http://lists.freebsd.org/pipermail/freebsd-amd64/2014-May/016088.html PR: 212639 Submitted by: wheelcomplex@gmail.com Changes: _U stable/10/ stable/10/sys/i386/i386/sys_machdep.c