From owner-freebsd-stable@FreeBSD.ORG Mon Jun 15 11:29:25 2009 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E34010656A7 for ; Mon, 15 Jun 2009 11:29:25 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-bw0-f228.google.com (mail-bw0-f228.google.com [209.85.218.228]) by mx1.freebsd.org (Postfix) with ESMTP id DDB098FC16 for ; Mon, 15 Jun 2009 11:29:24 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: by bwz28 with SMTP id 28so524486bwz.43 for ; Mon, 15 Jun 2009 04:29:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=oSFGlYcRMyY8JPvhF4OQB/IxnpWZvNnzzp7eq1+vdLI=; b=vh3jW4rv7PwoVanpANgG3XmlMXs75Pq3lxXEHGxihB3VJPLPkyrrSDKNGLwzfS0Xzz FPwtiU2+oN74qZkF3URzEDDM34pLvm0k/ii59oK2m655kl3zUgCfO8w0zJIrLatjpzEO vU1um2O1AplO3+PdPF5K0FUrjhygmVT02EoDg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=TfbhITf8sq0LNQWBfbV0M1w7/ak059f4a53LRr7a76thVE8EY8ncEvJyMo0RzI9S2q nrDe969Jpf/wgC0ZBsjY001vvEYr3awTTUdAbel2mXpzmZYyQ9exk2iC4majh0KxGvce j8W7bolTi6IUsG3qUEbbCdEnAeQx3VjU7tjts= MIME-Version: 1.0 Received: by 10.103.214.13 with SMTP id r13mr3589893muq.37.1245065363837; Mon, 15 Jun 2009 04:29:23 -0700 (PDT) Date: Mon, 15 Jun 2009 15:29:23 +0400 Message-ID: From: pluknet To: freebsd-stable Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: coretemp(4) lockups on 6-stable X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2009 11:29:26 -0000 This is 6.4-stable from April. System locks up while in `sysctl dev.cpu` (with coretemp kldloaded). So as far as I understand sched_bind() binds an executing thread to nonexistent CPU 255. Same behavior on coretemp built on 6.2. db> ps pid ppid pgrp uid state wmesg wchan cmd 34381 34380 34381 0 R+ CPU 255 sysctl [...] db> bt 34381 Tracing pid 34381 tid 100166 td 0xc8634680 sched_switch(c8634680,0,1) at sched_switch+0x143 mi_switch(1,0,c86347e0,4,c0a4e510,...) at mi_switch+0x1ba sched_bind(c8634680,4,c856f3b0,0,c0836b3b,...) at sched_bind+0x52 coretemp_get_temp_sysctl(c8ef56c0,c908c200,0,eebebc04,c8ef56c0,...) at coretemp_get_temp_sysctl+0x47 sysctl_root(0,eebebc74,4,eebebc04) at sysctl_root+0x107 userland_sysctl(c8634680,eebebc74,4,0,bfbfda8c,0,0,0,eebebc70,0) at userland_sysctl+0x112 __sysctl(c8634680,eebebd04) at __sysctl+0x93 syscall(3b,3b,3b,4,bfbfda8c,...) at syscall+0x2bf Xint0x80_syscall() at Xint0x80_syscall+0x1f --- syscall (202, FreeBSD ELF32, __sysctl), eip = 0x2812407b, esp = 0xbfbfd9fc, ebp = 0xbfbfda38 --- static int coretemp_get_temp(device_t dev) { uint64_t msr; int temp; int cpu = device_get_unit(dev); struct coretemp_softc *sc = device_get_softc(dev); char stemp[16]; mtx_lock_spin(&sched_lock); sched_bind(curthread, cpu); ^^^ mtx_unlock_spin(&sched_lock); -- wbr, pluknet