2006-01-01 23:44:47

by Reinhard Nissl

[permalink] [raw]
Subject: SysReq & serial console

Hi,

I'm facing a similar issue like the thread

system keeps freezing once every 24 hours / random apps crashing

reported, but I still have to try all those suggestions.

For now, I've configured a serial console and enabled SysReq. When the
freeze happens on my system, the system is still pingable and SysReq can
for example sync the disks. I also can see on serial console which
SysReq command I selected (registers, tasks, SAK, etc.), but I do not
get any output of these commands on serial console.

When issuing such a SysReq command before the system freezes I can see
the output of the command on a framebuffer console.

So, is it possible to redirect the output of a SysReq command to a
serial console?

Bye.
--
Dipl.-Inform. (FH) Reinhard Nissl
mailto:[email protected]


2006-01-02 00:37:58

by Russell King

[permalink] [raw]
Subject: Re: SysReq & serial console

On Mon, Jan 02, 2006 at 12:44:43AM +0100, Reinhard Nissl wrote:
> So, is it possible to redirect the output of a SysReq command to a
> serial console?

It is. A wild guess - it sounds like sysrq requests go via some
tasklet, and because the scheduler has packed up, they don't get
run.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core

2006-01-02 07:29:53

by Kalin KOZHUHAROV

[permalink] [raw]
Subject: Re: SysReq & serial console

Reinhard Nissl wrote:
> Hi,
>
> I'm facing a similar issue like the thread
>
> system keeps freezing once every 24 hours / random apps crashing
>
> reported, but I still have to try all those suggestions.
>
> For now, I've configured a serial console and enabled SysReq. When the
> freeze happens on my system, the system is still pingable and SysReq can
> for example sync the disks. I also can see on serial console which
> SysReq command I selected (registers, tasks, SAK, etc.), but I do not
> get any output of these commands on serial console.
>
> When issuing such a SysReq command before the system freezes I can see
> the output of the command on a framebuffer console.
>
> So, is it possible to redirect the output of a SysReq command to a
> serial console?
Another wild guess: the syslog is still running and writes the output to the log.
I had this "problem" with syslog-ng running on 2.6.14.4. The solution was to set syslog-ng to write
to tty1 as well (now moved to tty12 to not scramble other MSGs).
I was seeing just something like "SysRq: memory map" and now I can see the output below that MSG.

Not sure if that was inteded to do so, but I think the output of SysRq+<key> is better send to the
console directly...

Kalin.

--
|[ ~~~~~~~~~~~~~~~~~~~~~~ ]|
+-> http://ThinRope.net/ <-+
|[ ______________________ ]|

2006-01-02 09:18:16

by Russell King

[permalink] [raw]
Subject: Re: SysReq & serial console

On Mon, Jan 02, 2006 at 04:29:38PM +0900, Kalin KOZHUHAROV wrote:
> Another wild guess: the syslog is still running and writes the output to
> the log.

I don't think syslog can influence whether you see sysrq output via the
console. Nevertheless, try sysrq-8 before other sysrq functions.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core

2006-01-02 20:16:28

by Reinhard Nissl

[permalink] [raw]
Subject: Re: SysReq & serial console

Hi,

Russell King wrote:

>>Another wild guess: the syslog is still running and writes the output to
>>the log.
>
> I don't think syslog can influence whether you see sysrq output via the
> console. Nevertheless, try sysrq-8 before other sysrq functions.

On my SuSE 10 system, I find the following lines in /etc/syslog.conf:

# print most on tty10 and on the xconsole pipe
#
kern.warning;*.err;authpriv.none /dev/tty10
kern.warning;*.err;authpriv.none |/dev/xconsole

Changing tty10 to ttyS0 and restarting rcsyslog has no influence on the
output of SysReq commands, but obviously they now nolonger appear on
tty10. So what's the correct way to delegate the output to serial console?

PS: kernel command line: ... console=ttyS0,115200 console=tty0

BTW: a short update of my freeze issue:
- memtest86 revealed a bad memory location
- accidentially beeing at tty10 when the freeze happend and sysrq-p
showed that the atheros module got stuck
- exchanging RAM and disabling ath0 seems to cure the system for 39
minutes so far ;-)

Bye.
--
Dipl.-Inform. (FH) Reinhard Nissl
mailto:[email protected]

2006-01-11 05:51:35

by Kalin KOZHUHAROV

[permalink] [raw]
Subject: Re: SysReq & serial console

Russell King wrote:
> On Mon, Jan 02, 2006 at 04:29:38PM +0900, Kalin KOZHUHAROV wrote:
>
>>Another wild guess: the syslog is still running and writes the output to
>>the log.
>
>
> I don't think syslog can influence whether you see sysrq output via the
> console. Nevertheless, try sysrq-8 before other sysrq functions.
>
While playing with a borked 2.6.15 box and syslog-ng, I ran across this again.

The issue is that syslog-ng can use /proc/kmesg as a source for logging and
if this is the case, then (intentionally or not), it sucks all the MSGs and
if not setup correctly MSGs from kernel will go to nowhere. The relevant
syslog-ng setup is:

source foo { pipe("/proc/kmsg"); };

This might be a problem/feature/bug with syslog-ng, but I still find it more
natural to see the output of SysRq and oopses on the console as well.

Kalin.

--
|[ ~~~~~~~~~~~~~~~~~~~~~~ ]|
+-> http://ThinRope.net/ <-+
|[ ______________________ ]|