Skip to contentSkip to conversation

garbled oopsen

DISCUSSION Randy.Dunlap 4 participants 5 messages May 8, 2003 – May 19, 2003

lore
Share & tools
lore
#0 lore raw

I have several oopses that are garbled. Part of the problem is that page fault code (x86: arch/i386/mm/fault.c) does not attempt to serialize the "Unable to handle kernel ... at virtual address ..." messages, since it's considered better to get _some_ messages out than no messages. (and serialize it with what?)

However, after untwisting these, I can tell you that unraveling them is not fun.

Can these be cleaned up in any reasonable way?
Any suggestions?

This is on 2.5.68 and 2.5.69.

(sample 1)
i
de-sUcnsaibl:e hdtod :h asuncd l1e 80ke22rn0e1l96 p3aging request at virtual address 6b6b6b8b

(sample 2)
i<de1->Usncsaibl:e h dtod: h saunc dl18e 0k2e20r1ne96l3 p

which decodes into:
i de - s cs i : h d d: s u c 18 0 2 20 1 96 3
< 1 >U n a bl e to h a n dl e k e r ne l p

(sample 3, much longer)
scsi_eh_<pr4>t_hfdadi: lA_TstAaPIts r: e2se:t0: 0co:m0 plcmetdse
failiedde:- sc0s,i :c anRecaeclh: ed1
idTeosctsali_ pofc_ 1in ctro mminantdersr oupnt 1 hdanedvliceres
rePaqcuikrete ceho mmwoanrdk
cosmcplsiet_ehe_d,2 : 0 abboyrttesin tgr canmdsf:e0rxrf7eddb
f1didc
e-scidsei-: shcsddi:: achbeorckt icognndoiretdi
on sfocsr i_1e41h_
2: iabdoe-rstcisngi : chmddd :f aqilueedue: 0xcmf7dd b= f1[d c3
0 0s cs0i _4e0 h_02 :]
Seinddie-ngs cBsiD:R Rsdeaevc:h ed0xf i7ddde5sccs0i0_
pci_dien-trs cisin:te rdrevuiptc e harensdelte ri
gnoidreed-s
csiid: eR-escaschi:ed h iddd:e scqsuei_ 1p4c1_i, nctmrd i=n te[r 0 ru0p 0t h0 a0nd 0le r]

/end/

#1 lore raw
Quoted 2 lines · Randy.Dunlap

I have several oopses that are garbled.

Use kgdb.

Quoted 1 line

Can these be cleaned up in any reasonable way?

It needs some additional spinlock in there. People have moaned for over a year, patches have been floating about but nobody has taken the time to finish one off and submit it.

It's never bothered me, because availability of a serial console equates to availability of kgdb.

Quoted 1 line

Any suggestions?

A Greek-to-English dictionary?

#2 lore raw
Quoted 5 lines
Quoted 1 line

Can these be cleaned up in any reasonable way?

It needs some additional spinlock in there. People have moaned for over a year, patches have been floating about but nobody has taken the time to finish one off and submit it.

I tried it a while back, the obvious lock approach didn't seem to work, but I can't seem to find the patch right now. IIRC, printk should be atomic, so converting it to printk into a line buffer, and then printk'ing the buffer (prefaced by cpu number) *should* work. Maybe. I think.

M.

#3 lore raw
In reply to Andrew Morton
Quoted 6 lines
Quoted 2 lines · Randy.Dunlap

I have several oopses that are garbled.

Use kgdb.

Quoted 8 lines
Quoted 1 line

Can these be cleaned up in any reasonable way?

It needs some additional spinlock in there. People have moaned for over a year, patches have been floating about but nobody has taken the time to finish one off and submit it.

It's never bothered me, because availability of a serial console equates to availability of kgdb.

I'm more interested in having it clean for people who use 2.6.x. Yes, I can get by without it or by using kgdb, but that's not the point IMO.

~Randy

#4 lore raw
In reply to Randy.Dunlap
Quoted 11 lines · Randy.Dunlap

I have several oopses that are garbled. Part of the problem is that page fault code (x86: arch/i386/mm/fault.c) does not attempt to serialize the "Unable to handle kernel ... at virtual address ..." messages, since it's considered better to get _some_ messages out than no messages. (and serialize it with what?)

However, after untwisting these, I can tell you that unraveling them is not fun.

Can these be cleaned up in any reasonable way?
Any suggestions?

kdb_printf() has this:

        /* Serialize kdb_printf if multiple cpus try to write at once.
         * But if any cpu goes recursive in kdb, just print the output,
         * even if it is interleaved with any other text.
         */
        if (!KDB_STATE(PRINTF_LOCK)) {
                KDB_STATE_SET(PRINTF_LOCK);
                spin_lock(&kdb_printf_lock);
        }
	....
        if (KDB_STATE(PRINTF_LOCK)) {
                spin_unlock(&kdb_printf_lock);
                KDB_STATE_CLEAR(PRINTF_LOCK);
        }

KDB_STATE() is a per-cpu set of flags, PRINTF_LOCK indicates if this cpu has got or is trying to get the kdb_printf_lock. I get no interleave problems, except when somebody prints a line in multiple calls to kdb_printf(), the fragments are printed as one chunk but the individual fragments can be interleaved.