From owner-freebsd-sysinstall@FreeBSD.ORG Tue Jul 13 14:40:06 2010 Return-Path: Delivered-To: freebsd-sysinstall@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E45D106566B for ; Tue, 13 Jul 2010 14:40:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 55FA88FC20 for ; Tue, 13 Jul 2010 14:40:06 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o6DEe653002398 for ; Tue, 13 Jul 2010 14:40:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o6DEe6X3002393; Tue, 13 Jul 2010 14:40:06 GMT (envelope-from gnats) Date: Tue, 13 Jul 2010 14:40:06 GMT Message-Id: <201007131440.o6DEe6X3002393@freefall.freebsd.org> To: freebsd-sysinstall@FreeBSD.org From: Garrett Cooper Cc: Subject: Re: bin/148201: sysinstall(8): core dump (Error 10) while trying to install packages via sysinstall X-BeenThere: freebsd-sysinstall@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Garrett Cooper List-Id: Sysinstall Work List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 14:40:06 -0000 The following reply was made to PR bin/148201; it has been noted by GNATS. From: Garrett Cooper To: bug-followup@FreeBSD.org, leon.gehling@googlemail.com Cc: Subject: Re: bin/148201: sysinstall(8): core dump (Error 10) while trying to install packages via sysinstall Date: Tue, 13 Jul 2010 07:35:34 -0700 Some other details, like install media settings and the package installed would be helpful. As far as the technical issues are concerned, it might be because fp isn't initialized to NULL in package_extract: int package_extract(Device *dev, char *name, Boolean depended) { char path[MAXPATHLEN]; const char *PkgExts[] = { "", ".tbz", ".tbz2", ".tgz" }; int last_msg, pathend, ret; size_t ext; FILE *fp; There's a codepath where if it fails to setup the `device' via DEVICE_GET, it'll be uninitialized with a bogus value: /* We have a path, call the device strategy routine to get the file */ for (ext = 0 ; ext < sizeof PkgExts / sizeof PkgExts[0]; ++ext) { strlcpy(path + pathend, PkgExts[ext], sizeof path - pathend); if ((fp = DEVICE_GET(dev, path, TRUE))) break; } if (fp) { There are some other QA issues in this function as well... - fork can fail: pid = fork(); - dup2 can fail: dup2(pfd[0], 0); close(pfd[0]); dup2(DebugFD, 1); dup2(1, 2); close(pfd[1]); - pipe can fail: pipe(pfd); - WEXITSTATUS is only valid if WIFEXITED is true: if (sigpipe_caught || i < 0 || WEXITSTATUS(tot)) { - signal can fail: signal(SIGPIPE, catch_pipe); - This can spin the CPU (doesn't matter so much on install media, but it does matter for multiuser): /* Now catch any stragglers */ while (wait3(&tot, WNOHANG, NULL) > 0); Thanks, -Garrett