Results 1 to 10 of 13
Hey, I wrote a module and ran it, however it made the machine hanging up. Then I have to restart the computer.
After restarting, I typed `dmesg' and found no ...
- 07-14-2005 #1Just Joined!
- Join Date
- Nov 2004
- Posts
- 43
Where to find the errors when machine hangs up?
Hey, I wrote a module and ran it, however it made the machine hanging up. Then I have to restart the computer.
After restarting, I typed `dmesg' and found no information. So my questions is : How to check the errors when your codes make computer
haning up? Where can I find the debugging information?
Any help is appreciated.
- 07-14-2005 #2Just Joined!
- Join Date
- Nov 2004
- Posts
- 43
More weridly, I ran the same codes, sometimes, it makes the box hanging up (crashed/dead), sometimes it works well.
- 07-14-2005 #3Just Joined!
- Join Date
- Jul 2005
- Posts
- 4
KGDB
Maybe u can use KGDB to debug your modules
- 07-14-2005 #4
type
dmesg
to see current error output, otherwise, check your logs (location varies by distrobution)
/var/log is a common one, but if things aren't booting its not very likely that logging is working either, now is it? but thats the fun of kernel programming..... i guess
- 07-14-2005 #5Just Joined!
- Join Date
- Nov 2004
- Posts
- 43
Thanks, I found the information in /var/log/debug. But how to read those information?
Originally Posted by qub333
They are so hard to understand...
- 07-14-2005 #6Just Joined!
- Join Date
- Nov 2004
- Posts
- 43
Hey, I found the error information, but very confused. How to read the following information?
Thanks a lot!!
Jul 14 10:49:57 kernel: CPU: Before vendor init, caps: 0387fbff 00000000 00000000, vendor = 0
Jul 14 10:49:57 kernel: CPU: After vendor init, caps: 0387fbff 00000000 00000000 00000000
Jul 14 10:49:57 kernel: CPU: After generic, caps: 0383fbff 00000000 00000000 00000000
Jul 14 10:49:57 kernel: CPU: Common caps: 0383fbff 00000000 00000000 00000000
Jul 14 10:49:57 kernel: CPU: Before vendor init, caps: 0383fbff 00000000 00000000, vendor = 0
Jul 14 10:49:57 kernel: CPU: After vendor init, caps: 0383fbff 00000000 00000000 00000000
Jul 14 10:49:57 kernel: CPU: After generic, caps: 0383fbff 00000000 00000000 00000000
Jul 14 10:49:57 kernel: CPU: Common caps: 0383fbff 00000000 00000000 00000000
Jul 14 10:49:57 kernel: init IO_APIC IRQs
Jul 14 10:49:57 kernel: IO-APIC (apicid-pin) 4-0, 4-5, 4-7, 4-9, 4-11, 5-0, 5-1, 5-2, 5-3, 5-7, 5-8, 5-9, 5-10, 5-12, 5-13, 5-15 not connected.
Jul 14 10:49:57 kernel: number of MP IRQ sources: 17.
Jul 14 10:49:57 kernel: number of IO-APIC #4 registers: 16.
Jul 14 10:49:57 kernel: number of IO-APIC #5 registers: 16.
Jul 14 10:49:57 kernel: IO APIC #4......
Jul 14 10:49:57 kernel: .... register #00: 04000000
Jul 14 10:49:57 kernel: ....... : physical APIC id: 04
Jul 14 10:49:57 kernel: .... register #01: 000F0011
Jul 14 10:49:57 kernel: ....... : max redirection entries: 000F
Jul 14 10:49:57 kernel: ....... : PRQ implemented: 0
Jul 14 10:49:57 kernel: ....... : IO APIC version: 0011
Jul 14 10:49:57 kernel: .... register #02: 00000000
Jul 14 10:49:57 kernel: ....... : arbitration: 00
Jul 14 10:49:57 kernel: .... IRQ redirection table:
Jul 14 10:49:57 kernel: NR Log Phy Mask Trig IRR Pol Stat Dest Deli Vect:
Jul 14 10:49:57 kernel: 00 001 01 0 0 0 0 0 1 1 31
Jul 14 10:49:57 kernel: 01 001 01 0 0 0 0 0 1 1 39
Jul 14 10:49:57 kernel: 02 000 00 1 0 0 0 0 0 0 00
Jul 14 10:49:57 kernel: 03 001 01 0 0 0 0 0 1 1 41
Jul 14 10:49:57 kernel: 04 001 01 0 0 0 0 0 1 1 49
Jul 14 10:49:57 kernel: 05 000 00 1 0 0 0 0 0 0 00
Jul 14 10:49:57 kernel: 07 000 00 1 0 0 0 0 0 0 00
Jul 14 10:49:57 kernel: 08 001 01 0 0 0 0 0 1 1 59
Jul 14 10:49:57 kernel: 09 000 00 1 0 0 0 0 0 0 00
Jul 14 10:49:57 kernel: 0a 001 01 1 1 0 1 0 1 1 61
Jul 14 10:49:57 kernel: 0b 000 00 1 0 0 0 0 0 0 00
Jul 14 10:49:57 kernel: 0c 001 01 0 0 0 0 0 1 1 69
Jul 14 10:49:57 kernel: 0d 001 01 0 0 0 0 0 1 1 71
Jul 14 10:49:57 kernel: 0e 001 01 0 0 0 0 0 1 1 79
Jul 14 10:49:57 kernel: 0f 001 01 0 0 0 0 0 1 1 81
Jul 14 10:49:57 kernel: IO APIC #5......
Jul 14 10:49:57 kernel: .... register #00: 05000000
Jul 14 10:49:57 kernel: ....... : physical APIC id: 05
Jul 14 10:49:57 kernel: .... register #01: 000F0011
Jul 14 10:49:57 kernel: ....... : max redirection entries: 000F
Jul 14 10:49:57 kernel: ....... : PRQ implemented: 0
Jul 14 10:49:57 kernel: ....... : IO APIC version: 0011
Jul 14 10:49:57 kernel: .... register #02: 01000000
Jul 14 10:49:57 kernel: ....... : arbitration: 01
Jul 14 10:49:57 kernel: .... IRQ redirection table:
Jul 14 10:49:57 kernel: NR Log Phy Mask Trig IRR Pol Stat Dest Deli Vect:
Jul 14 10:49:57 kernel: 00 000 00 1 0 0 0 0 0 0 00
Jul 14 10:49:57 kernel: 01 000 00 1 0 0 0 0 0 0 00
Jul 14 10:49:57 kernel: 02 000 00 1 0 0 0 0 0 0 00
Jul 14 10:49:57 kernel: 03 000 00 1 0 0 0 0 0 0 00
Jul 14 10:49:57 kernel: 04 001 01 1 1 0 1 0 1 1 89
Jul 14 10:49:57 kernel: 05 001 01 1 1 0 1 0 1 1 91
Jul 14 10:49:57 kernel: 06 001 01 1 1 0 1 0 1 1 99
Jul 14 10:49:57 kernel: 07 000 00 1 0 0 0 0 0 0 00
Jul 14 10:49:57 kernel: 08 000 00 1 0 0 0 0 0 0 00
Jul 14 10:49:57 kernel: 09 000 00 1 0 0 0 0 0 0 00
Jul 14 10:49:57 kernel: 0a 000 00 1 0 0 0 0 0 0 00
Jul 14 10:49:57 kernel: 0b 001 01 1 1 0 1 0 1 1 A1
Jul 14 10:49:57 kernel: 0c 000 00 1 0 0 0 0 0 0 00
Jul 14 10:49:57 kernel: 0d 000 00 1 0 0 0 0 0 0 00
Jul 14 10:49:57 kernel: 0e 001 01 1 1 0 1 0 1 1 A9
Jul 14 10:49:57 kernel: 0f 000 00 1 0 0 0 0 0 0 00
Jul 14 10:49:57 kernel: IRQ to pin mappings:
Jul 14 10:49:57 kernel: IRQ to pin mappings:
Jul 14 10:49:57 kernel: IRQ0 -> 0:2
Jul 14 10:49:57 kernel: IRQ1 -> 0:1
Jul 14 10:49:57 kernel: IRQ3 -> 0:3
Jul 14 10:49:57 kernel: IRQ4 -> 0:4
Jul 14 10:49:57 kernel: IRQ6 -> 0:6
Jul 14 10:49:57 kernel: IRQ8 -> 0:8
Jul 14 10:49:57 kernel: IRQ10 -> 0:10
Jul 14 10:49:57 kernel: IRQ12 -> 0:12
Jul 14 10:49:57 kernel: IRQ13 -> 0:13
Jul 14 10:49:57 kernel: IRQ14 -> 0:14
Jul 14 10:49:57 kernel: IRQ15 -> 0:15
Jul 14 10:49:57 kernel: IRQ20 -> 1:4
Jul 14 10:49:57 kernel: IRQ21 -> 1:5
Jul 14 10:49:57 kernel: IRQ22 -> 1:6
Jul 14 10:49:57 kernel: IRQ27 -> 1:11
Jul 14 10:49:57 kernel: IRQ30 -> 1:14
Jul 14 10:49:57 kernel: agpgart: no supported devices found.
Thanks again.
- 07-15-2005 #7Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
Those aren't errors, those are just normal operational messages of the kernel setting up APICs, routing IRQs and so forth.
The thing is, you cannot save a panic message to a file. Since the kernel panics, it doesn't run any processes, filesystem drivers or disk device drivers anymore. If it did, then the kernel corruption that caused the panic could potentially corrupt the filesystem as well.
The only generic way to save a panic message is to take a photograph of your monitor. There are patches to send them over a serial link or save to a floppy disk as well, if you can find them.
Of course, you'll have to run the system in text mode for the panic message to even get printed on the screen.
- 07-15-2005 #8Just Joined!
- Join Date
- Nov 2004
- Posts
- 43
Hi, thank you so much for your reply! However, I don't understand "take a photograph of your monitor". Could you please say more? I am running the module in the text mode. Sometimes my module works, sometimes it makes the computer crashed/Freezing/No reponse.
Originally Posted by Dolda2000
I can't see any information from Console or the log files after restarting.
I even modified the printk file and let all the information appear on the
console. However, I still didn't see them. The computer just hanged up
and freezed, no any response.....
- 07-15-2005 #9Just Joined!
- Join Date
- Nov 2004
- Posts
- 43
BTW: I found the following information in /var/log/syslog
/usr/sbin/exim -a -f /etc/exim/exim.conf ]; then /usr/sbin/exim -q ; fi)
Jul 14 17:23:01 /USR/SBIN/CRON[1074]: (mail) CMD ( if [ -x /usr/sbin/exim -a -f /etc/exim/exim.conf ]; then /usr/sbin/exim -q ; fi)
Jul 14 17:38:01 /USR/SBIN/CRON[1079]: (mail) CMD ( if [ -x /usr/sbin/exim -a -f /etc/exim/exim.conf ]; then /usr/sbin/exim -q ; fi)
------
What are they? Are they errors? Thanks again!
- 07-15-2005 #10Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
Those aren't errors -- they're just info messages from various system services, in this case cron running a couple of programs.
I find it strange indeed that you don't get a panic message on the text console. Maybe the machine hangs before the kernel even gets to detect that, although I haven't seen anything like that previously. What does your module do, really? If you printk() some messages immediately upon module initialization, would they appear on the text console?


Reply With Quote
