From owner-freebsd-questions@FreeBSD.ORG Wed Apr 17 19:18:36 2013 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 572B13B2 for ; Wed, 17 Apr 2013 19:18:36 +0000 (UTC) (envelope-from brett@lariat.net) Received: from lariat.net (lariat.net [66.62.230.51]) by mx1.freebsd.org (Postfix) with ESMTP id 0DE4399 for ; Wed, 17 Apr 2013 19:18:35 +0000 (UTC) Received: from Toshi.lariat.net (IDENT:ppp1000.lariat.net@lariat.net [66.119.58.2] (may be forged)) by lariat.net (8.9.3/8.9.3) with ESMTP id NAA01649 for ; Wed, 17 Apr 2013 13:18:27 -0600 (MDT) Message-Id: <201304171918.NAA01649@lariat.net> X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9 Date: Wed, 17 Apr 2013 13:18:14 -0600 To: questions@freebsd.org From: Brett Glass Subject: Bad kernel with make -j? Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2013 19:18:36 -0000 Everyone: I've just had to resurrect a machine which apparently failed because the kernel was built with the make -j option. As reported in the make(1) man page, the purpose of the -j option is to let the make program build multiple portions of a program concurrently on a machine with multiple CPUs. The idea is to make use of SMP to speed up the build process. Unfortunately, after updating a FreeBSD 9.0 system with freebsd-update (and seeing some changes that would affect the custom kernel the machine was running), I rebuilt the kernel using the -j5 option. (The machine has 2 cores and 4 threads, but threads block due to I/O as well as memory access. So, when it works properly, -j5 is the fastest option.) The result was a kernel in which some compiled-in modules -- in particular, netgraph nodes -- weren't accessible. mpd5 began spewing odd messages, and VPN connections would not come up. I'd built the kernel with the NO_MODULES option, so the modules that were missing couldn't be loaded dynamically. Rebuilding the kernel using a single-threaded "make" solved the problem. Have others seen the same symptoms? I'd like to be able to do fast, multithreaded kernel builds, but will obviously have to avoid it if the resulting kernels are corrupted. --Brett Glass