From owner-freebsd-current@FreeBSD.ORG Wed Jul 11 14:58:10 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7DD9B16A400 for ; Wed, 11 Jul 2007 14:58:10 +0000 (UTC) (envelope-from cristi@net.utcluj.ro) Received: from bavaria.utcluj.ro (bavaria.utcluj.ro [193.226.5.35]) by mx1.freebsd.org (Postfix) with ESMTP id 36BB913C457 for ; Wed, 11 Jul 2007 14:58:10 +0000 (UTC) (envelope-from cristi@net.utcluj.ro) Received: from localhost (localhost [127.0.0.1]) by bavaria.utcluj.ro (Postfix) with ESMTP id 2801450834 for ; Wed, 11 Jul 2007 17:58:09 +0300 (EEST) X-Virus-Scanned: by the daemon playing with your mail on bavaria.utcluj.ro Received: from bavaria.utcluj.ro ([127.0.0.1]) by localhost (bavaria.utcluj.ro [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CUxsdr+i4Gzm for ; Wed, 11 Jul 2007 17:58:02 +0300 (EEST) Received: from hades.local (hades.utcluj.ro [193.226.5.46]) by bavaria.utcluj.ro (Postfix) with ESMTP id 964B05082E for ; Wed, 11 Jul 2007 17:58:02 +0300 (EEST) Message-ID: <4694EFF9.2060505@net.utcluj.ro> Date: Wed, 11 Jul 2007 17:58:01 +0300 From: Cristian KLEIN User-Agent: Thunderbird 2.0.0.4 (X11/20070711) MIME-Version: 1.0 To: freebsd-current@freebsd.org References: <62195.193.226.6.226.1184091201.squirrel@intranet.utcluj.ro> In-Reply-To: <62195.193.226.6.226.1184091201.squirrel@intranet.utcluj.ro> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: acpi forced suspending panics 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: Wed, 11 Jul 2007 14:58:10 -0000 Cristian KLEIN wrote: > Hi everybody, > > I compiled FreeBSD-CURRENT a few days ago on an IBM Thinkpad R51. Whenever > I try to suspend the system using Fn+F4, the system will wait 10 seconds > then panic: > > acpi: suspend request timed out, forcing sleep now > panic: Trying sleep, but thread marked as sleeping prohibited > > I have a handwritten backtrace if anybody is interested. I don't know what > requires the forced suspend, but the panic is triggered by the following > events: > > * acpi_ReqSleepState() notifies the userspace that the system is going to > sleep and initializes a callout, using callout_reset(), which will call > acpi_sleep_force() (dev/acpica/acpi.c:2203) > * softclock() will mark the current thread as non-sleepable > (kern/kern_timeout.c:280) then call acpi_sleep_force(), through the > callout mechanism > * acpi_sleep_force() will go on, and suspend all devices > * some time later, the cardbus driver will call pause() on this very > non-sleepable thread (dev/pccbb/pccbb.c:1242), which, naturally, results > in a panic. > > I don't really know how to solve the problem. If I insert > THREAD_SLEEPING_OK() in acpi_sleep_force(), then the system will not panic > anymore, but it doesn't suspend either and it becomes unusable. > > Note that the kernel from 7.0-200706 did not have this issue (although it > had other). This problem was caused by world not being up-to-date, espacially acpiconf, devd and /etc/rc.suspend. Sorry for the noise. There are however other suspending issues which I will highlight in another thread.