From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 7 16:35:07 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1BDBB16A4CE for ; Thu, 7 Oct 2004 16:35:07 +0000 (GMT) Received: from hanoi.cronyx.ru (hanoi.cronyx.ru [144.206.181.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4DC0743D4C for ; Thu, 7 Oct 2004 16:35:06 +0000 (GMT) (envelope-from rik@cronyx.ru) Received: (from root@localhost) by hanoi.cronyx.ru id i97GW7W3088996 for hackers@FreeBSD.org.checked; (8.12.8/vak/2.1) Thu, 7 Oct 2004 20:32:07 +0400 (MSD) (envelope-from rik@cronyx.ru) Received: from cronyx.ru (hi.cronyx.ru [144.206.181.94]) by hanoi.cronyx.ru with ESMTP id i97GQaKG088763; (8.12.8/vak/2.1) Thu, 7 Oct 2004 20:29:18 +0400 (MSD) (envelope-from rik@cronyx.ru) Message-ID: <41656EEB.5050602@cronyx.ru> Date: Thu, 07 Oct 2004 20:29:31 +0400 From: Roman Kurakin User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031208 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Greg 'groggy' Lehey" References: <41645625.3020209@cronyx.ru> <20041006230954.GO1350@wantadilla.lemis.com> In-Reply-To: <20041006230954.GO1350@wantadilla.lemis.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: hackers@FreeBSD.org Subject: Re: Printing from kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Oct 2004 16:35:07 -0000 Greg 'groggy' Lehey wrote: >On Thursday, 7 October 2004 at 0:31:33 +0400, Roman Kurakin wrote: > > >>Hi, >> >> I have some problems with printing from kernel. >>At first I think that my problems was cause I use printf, >>but changed all of them to log cause it safe to use from >>interrupt handlers. The situation become better but I still >>observe system lockup in case I output some debug information >>from my driver. >> >> >About the only thing I can think is that you're doing this in some >area where it's unsafe to print, probably holding a lock that's needed >in the print routines. > > I have the same idea but I cant't get which one. >> Also I have some problems with system console via com >>port. Instead of messages from kernel I see the first letter >>of the month name. >> >> Could anybody comment my observation? >> >> >Without more detail, it's impossible to help. > > >>Does anybody saw anything like this? >> >> > >No. printf() is widely used in the kernel. > > I know. But it seems that log is more safer ... >> Oh, I forget to say I observe that with both Current >>and Releng5, SMP. Also I can't trigger NMI so I can't see the >>point of lockup. >> >> > >Take a look at your code and check what locks you're holding. Also, >if this is only for debugging, you should be using the kernel >debugger. > > It is used not only for debugging by myself, part of this output is my eye on users side. But for now, most of output is locking debugging. rik >Greg >-- >See complete headers for address and phone numbers. > >