Re: Printing from kernel
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. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Printing from kernel
Don Lewis wrote: On 7 Oct, 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. 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. This is a bug in syslogd related to non-blocking I/O that bde and I discussed quite a while back, though we never figured out a proper fix. I recently made the interesting discovery that the same problem isn't present on sparc64. I think it'll start working again if you restart syslogd. From my observation I didn't came to conclusion that this could be due to syslog, but I'll check this. Could anybody comment my observation? Does anybody saw anything like this? 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. I generally use printf for this sort of thing, and I was going to suggest that you take a look at the KTR stuff, but that won't help if the machine totally locks up so that you can't get to the KTR buffer. I think you'll have trouble getting close to the bug if you use log because of the log latency from the generation of the message, passing it through syslogd, and back to the kernel to be printed. I'll try to think up how to see where I have my problems. If you plan to work on this problems we could join our efforts, rik ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Printing from kernel
Søren Schmidt wrote: 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. Yes its a known problem, if you output "enough" from the kernel the console will eventually lockup, its been so for ages, and I dont think anyone really have been looking into it. I didn't saw it before, only now after moving from Giant, but probably some system changes affect this. Hm. may be I need to try some old versions to check for this. I'll try to dig this. This was the only eye in kernel I use for ages. rik ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Printing from kernel
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. Yes its a known problem, if you output "enough" from the kernel the console will eventually lockup, its been so for ages, and I dont think anyone really have been looking into it. -- -Søren ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Printing from kernel
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. > 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. > 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. Greg -- See complete headers for address and phone numbers. pgpYJ4Myqltru.pgp Description: PGP signature
Re: Printing from kernel
On 7 Oct, 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. > > 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. This is a bug in syslogd related to non-blocking I/O that bde and I discussed quite a while back, though we never figured out a proper fix. I recently made the interesting discovery that the same problem isn't present on sparc64. I think it'll start working again if you restart syslogd. > Could anybody comment my observation? Does anybody > saw anything like this? > > 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. I generally use printf for this sort of thing, and I was going to suggest that you take a look at the KTR stuff, but that won't help if the machine totally locks up so that you can't get to the KTR buffer. I think you'll have trouble getting close to the bug if you use log because of the log latency from the generation of the message, passing it through syslogd, and back to the kernel to be printed. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Printing from kernel
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. 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? Does anybody saw anything like this? 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. rik ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"