From owner-freebsd-current@FreeBSD.ORG Thu Mar 31 12:02:27 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A2C41065715 for ; Thu, 31 Mar 2011 12:02:27 +0000 (UTC) (envelope-from onwahe@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 03C188FC1B for ; Thu, 31 Mar 2011 12:02:26 +0000 (UTC) Received: by pwj8 with SMTP id 8so482658pwj.13 for ; Thu, 31 Mar 2011 05:02:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=m66qaJFtpaBH9X9XoSvMCn+iVaidJDQaXDvTSDzFlxE=; b=oAUWzs0p6r9biUDKatWM3J/FoNrqQ5xiGZ7F0Fit9mx3Wpr3q/FX7lApxn4GLqBxmk DqRviqEYHlusB6BZWF1Xj8u77THkx9jLlUdcXTcHZab0dFNaO7PHpFXq9wRW8yUQiMDb 2aH3fYWHXXcuBzaG0A5iz2b8V3HQ/of6qVW9s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=SfhM21FEPiDmYt4YmZb4KW0Qt8qwDVavoCimBso7aacn3IcKTHD03k98Tj0XEzJJuh O6RFckgsobnKjJYBKa3QZXQwy/VttyYpqcruz1YFhDNc1fc77Iy5dOeKrBmOgwSVtdxH PTYVH/hCW71DppB1wwATbKxd/t/jc7hdHnBpU= MIME-Version: 1.0 Received: by 10.142.191.6 with SMTP id o6mr1943269wff.312.1301571146082; Thu, 31 Mar 2011 04:32:26 -0700 (PDT) Received: by 10.142.153.15 with HTTP; Thu, 31 Mar 2011 04:32:26 -0700 (PDT) Date: Thu, 31 Mar 2011 13:32:26 +0200 Message-ID: From: Svatopluk Kraus To: freebsd-current@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: schedcpu() in /sys/kern/sched_4bsd.c calls thread_lock() on thread with un-initialized td_lock X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2011 12:02:27 -0000 Hi, I've got a page fault (because of NULL td_lock) in thread_lock_flags() called from schedcpu() in /sys/kern/sched_4bsd.c file. During process fork, new thread is linked to new process which is linked to allproc list and both allproc_lock and new process lock are unlocked before sched_fork() is called, where new thread td_lock is initialized. Only PRS_NEW process status is on sentry but not checked in schedcpu(). Svata