[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
oops in xlog_unpack_data()
Hi All,
We had a situation where XFS persistent logs were
damaged irreparably due to hot swapping of disks. The
damage to the logs are expected. However when trying
to recover from the process XFS oopsed. The ksymoops
is
attached at the end of the email.
After having examined the code we discovered that the
kernel is trying to access a NULL value in
xlog_rec_header_t rhead->h_cycle_data
in function xlog_unpack_data(). A simple fix as
if(!rhead->h_cycle_data){
log->l_flags |= ( XLOG_DISK_LOG_CORRUPTED |
XLOG_IO_ERROR);
return;
}
and checking for XLOG_DISK_LOG_CORRUPTED in
xlog_do_recovery_pass and returning EFSCORRUPTED
caused mount to exit complaining about the file system
corruption.
However the question is what caused
rhead->h_cycle_data to have a NULL value ?
In xlog_do_recovery_pass() we notice that
rhead->h_magicno is compared to XLOG_HEADER_MAGIC_NUM
in several places. However EFSCORRUPTED is returned
only for the case where (!(tail_blk <= head_blk)) and
in other cases is simply ASSERTED but ignored. For the
case where it oopsed there was a magic number
discrepancy.
Is this a possible oversight ?
I am an XFS newbie and am greatly impaired by not
being able to access the XFS design docs in oss.
Anybody know where I could get them ?
Thank you
Ravi
--------------- ksymoops -----------------------
Unable to handle kernel paging request at virtual
address d0000000
c01c7bee
*pde = 00000000
Oops: 0002
CPU: 0
EIP: 0010:[<c01c7bee>] Not tainted
Using defaults from ksymoops -t elf32-i386 -a i386
EFLAGS: 00010202
eax: 00280006 ebx: 00000000 ecx: 00000380 edx:
00000000
esi: 00000380 edi: cff3902c ebp: d0000000 esp:
cff6b778
ds: 0018 es: 0018 ss: 0018
Process mount (pid: 41, stackpage=cff6b000)
Stack: 00000000 00001090 00000000 00000000 00000380
cff3902c c01c7dcd cff38200
cff90000 ce5b12e0 00000000 ce5b12e0 0000108e
00000000 c028ff11 cff6b7c0
ce5b12e0 cff6b8e8 72617453 cff90000 cff62800
cff62800 7265766f 6e6f2079
Call Trace: [<c01c7dcd>] [<c01c8226>] [<c01c82ae>]
[<c01c8450>] [<c01c2192>]
[<c01c9ec7>] [<c01a63a0>] [<c0105c69>] [<c01c8b21>]
[<c01c8d06>] [<c01c8d51>]
[<c01e74f1>] [<c01d18ed>] [<c01d1a6e>] [<c01d1a9b>]
[<c01e76e9>] [<c01284cf>]
[<c011f529>] [<c0128330>] [<c011f5a0>] [<c011f655>]
[<c01325e6>] [<c01417e7>]
[<c01329ec>] [<c0142654>] [<c0142a0e>] [<c0142874>]
[<c0142aac>] [<c0106dfb>]
Code: 89 45 00 81 c5 00 02 00 00 83 c7 04 89 7c 24 14
ff 44 24 10
>>EIP; c01c7bee <xlog_unpack_data+32/84> <=====
Trace; c01c7dcd <xlog_do_recovery_pass+18d/5b0>
Trace; c01c8226 <xlog_do_log_recovery+36/9c>
Trace; c01c82ae <xlog_do_recover+22/120>
Trace; c01c8450 <xlog_recover+a4/d0>
Trace; c01c2192 <xfs_log_mount+76/a4>
Trace; c01c9ec7 <xfs_mountfs+d93/13c0>
Trace; c01a63a0 <xfs_dir2_mount+0/120>
Trace; c0105c69 <__down+a1/ac>
Trace; c01c8b21 <xfs_xlatesb+35/1e0>
Trace; c01c8d06 <xfs_readsb+3a/bc>
Trace; c01c8d51 <xfs_readsb+85/bc>
Trace; c01e74f1 <linvfs_bsize_buftarg+11/18>
Trace; c01d18ed <xfs_cmountfs+4e1/5a0>
Trace; c01d1a6e <xfs_mount+62/6c>
Trace; c01d1a9b <xfs_vfsmount+23/38>
Trace; c01e76e9 <linvfs_read_super+1bd/2c4>
Trace; c01284cf <__alloc_pages+3b/17c>
Trace; c011f529 <do_no_page+4d/11c>
Trace; c0128330 <_alloc_pages+18/1c>
Trace; c011f5a0 <do_no_page+c4/11c>
Trace; c011f655 <handle_mm_fault+5d/c4>
Trace; c01325e6 <get_sb_bdev+246/2b0>
Trace; c01417e7 <set_devname+27/54>
Trace; c01329ec <do_kern_mount+a8/134>
Trace; c0142654 <do_add_mount+20/1f0>
Trace; c0142a0e <do_mount+14a/164>
Trace; c0142874 <copy_mount_options+50/a0>
Trace; c0142aac <sys_mount+84/c8>
Trace; c0106dfb <system_call+33/38>
Code; c01c7bee <xlog_unpack_data+32/84>
00000000 <_EIP>:
Code; c01c7bee <xlog_unpack_data+32/84> <=====
0: 89 45 00 mov
%eax,0x0(%ebp) <=====
Code; c01c7bf1 <xlog_unpack_data+35/84>
3: 81 c5 00 02 00 00 add $0x200,%ebp
Code; c01c7bf7 <xlog_unpack_data+3b/84>
9: 83 c7 04 add $0x4,%edi
Code; c01c7bfa <xlog_unpack_data+3e/84>
c: 89 7c 24 14 mov
%edi,0x14(%esp,1)
Code; c01c7bfe <xlog_unpack_data+42/84>
10: ff 44 24 10 incl 0x10(%esp,1)
=====
------------------------------
Ravi Wijayaratne
__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com