Bug 11887

Summary: kernel oops при попытке ресайза JFS на LVM2.
Product: Sisyphus Reporter: Konstantin Pavlov <thresh>
Component: kernel-image-ovz-smpAssignee: Nobody's working on this, feel free to take it <nobody>
Status: CLOSED WONTFIX QA Contact: qa-sisyphus
Severity: major    
Priority: P2 CC: aspsk, boris, boyarsh, glebfm, ldv, mike, mithraen, rider, sbolshakov, shrek, sin, vitty, vsu, vvk, zerg
Version: unstable   
Hardware: all   
OS: Linux   

Description Konstantin Pavlov 2007-05-24 22:20:56 MSD
# lvresize -L +10G stuff/ftp
...
# df -hT | grep ftp
/dev/mapper/stuff-ftp jfs     47G   40G  7.8G  84% /var/ftp
# mount -o remount,resize /var/ftp

результат: kernel oops.

BUG: unable to handle kernel NULL pointer dereference at virtual address 00000004
 printing eip:
c01b33c1
*pde = 1d3db067
*pte = 00000000
Oops: 0000 [#1]
SMP
Modules linked in: ppp_deflate zlib_deflate zlib_inflate sha1 arc4 ppp_mppe
ppp_async crc_ccitt ppp_generic slhc simfs vzethdev vznetdev vzrst vzcpt
vzdquota vzmon vzdev af_packet ipt_ttl ipt_TCPMSS ipt_tos ipt_REJECT nfsd
exportfs lockd nfs_acl tun thermal sunrpc xt_tcpudp xt_multiport iptable_nat
iptable_mangle xt_state iptable_filter ip_tables x_tables quota_v2 xfs ext2 jfs
nls_base dm_mod parport_pc parport evdev psmouse i2c_i801 intel_agp rtc
serio_raw i2c_core agpgart pcspkr uhci_hcd ehci_hcd usbcore ip_nat_ftp ip_nat
ip_conntrack_irc ip_conntrack_ftp ip_conntrack nfnetlink e100 mii processor
button ac battery ext3 jbd mbcache raid1 ide_generic ide_disk piix generic ide_core
CPU:    0, VCPU: 0.0
EIP:    0060:[<c01b33c1>]    Not tainted VLI
EFLAGS: 00010202   (2.6.18-ovz-smp-alt11 #1)
EIP is at generic_make_request+0x16/0x299
eax: 00000000   ebx: c5ccf900   ecx: 00000010   edx: c1485660
esi: 00000008   edi: 00000000   ebp: c5ccf900   esp: d3749bfc
ds: 007b   es: 007b   ss: 0068
Process mount (pid: 22605, veid: 0, ti=d3748000 task=dfd046d0 task.ti=d3748000)
Stack: de2a1c2c 00000000 00000000 e0a0a2b3 ffffffff 00000001 00000000 00000000
       dae1db40 d953c000 00000e18 d6e9c000 00000080 00000001 00000008 e0a9c410
       0005918b c03c1e80 c02e5980 7e701966 c011921a e0a68cd8 00000000 00000000
 Call Trace:
 [<c01b5422>] submit_bio+0xdb/0xe3
 [<e0a0b8f5>] lbmRead+0xa1/0x109 [jfs]
 [<e0a0bc05>] lmLogShutdown+0x9c/0xe3 [jfs]
 [<e0a0fb5e>] jfs_extendfs+0x30e/0x8cc [jfs]
 [<e09f3af9>] jfs_remount+0x8a/0x13f [jfs]
 [<c016f812>] do_remount_sb+0xe9/0x121
 [<c01839f8>] do_mount+0x19f/0x69b
 [<c0183f6b>] sys_mount+0x77/0xae
 [<c0102d47>] syscall_call+0x7/0xb
DWARF2 unwinder stuck at syscall_call+0x7/0xb
Leftover inexact backtrace:
Code: 2b c0 e8 0e 9b f6 ff 90 0f ba 6f 10 02 83 c4 4c 5b 5e 5f 5d c3 55 89 c5 57
56 53 83 ec 7c 8b 40 20 c1 e8 09 89 44 24 38 8b 45 0c <8b> 40 04 8b 50 40 8b 40
3c 0f ac d0 09 c1 fa 09 89 d1 09 c1 74
EIP: [<c01b33c1>] generic_make_request+0x16/0x299 SS:ESP 0068:d3749bfc
BUG: warning at kernel/exit.c:985/do_exit()
 [<c01045b6>] show_trace_log_lvl+0x5b/0x18e
 [<c0104c81>] show_trace+0xf/0x11
 [<c0104d80>] dump_stack+0x17/0x2f
 [<c011f141>] do_exit+0x51/0xbb8
 [<c0104c3f>] die+0x26a/0x272
 [<c0297494>] do_page_fault+0x477/0x525
 [<c0103f39>] error_code+0x39/0x40
DWARF2 unwinder stuck at error_code+0x39/0x40
Leftover inexact backtrace:
 [<c01b33c1>] generic_make_request+0x16/0x299
 [<e0a0a2b3>] metapage_writepage+0x0/0x1f2 [jfs]
 [<c011921a>] fairsched_schedule+0x34a/0x62b
 [<c01b5422>] submit_bio+0xdb/0xe3
 [<c01509e4>] mempool_alloc+0x24/0xc5
 [<c016e9f8>] bio_alloc_bioset+0x9b/0xf3
 [<e0a0b8f5>] lbmRead+0xa1/0x109 [jfs]
 [<c016ea5b>] bio_alloc+0xb/0x17
 [<e0a0bc05>] lmLogShutdown+0x9c/0xe3 [jfs]
 [<e0a0f52c>] txQuiesce+0xe0/0xe6 [jfs]
 [<e0a0fb5e>] jfs_extendfs+0x30e/0x8cc [jfs]
 [<c014df46>] find_get_pages_tag+0x38/0x77
 [<e09f357d>] parse_options+0x26f/0x2c1 [jfs]
 [<e09f3af9>] jfs_remount+0x8a/0x13f [jfs]
 [<c016f812>] do_remount_sb+0xe9/0x121
 [<c01839f8>] do_mount+0x19f/0x69b
 [<c0183066>] mntput_no_expire+0x11/0x5f
 [<c0178159>] link_path_walk+0xf7/0x101
 [<c0159a45>] __handle_mm_fault+0x52e/0x9d1
 [<c01527d5>] __alloc_pages+0x33f/0x364
 [<c01829f1>] copy_mount_options+0x26/0x109
 [<c0183f6b>] sys_mount+0x77/0xae
 [<c0102d47>] syscall_call+0x7/0xb

ловится как на -alt11, так и на последнем -alt14.
Comment 1 Maxim Tyurin 2007-05-26 01:21:07 MSD
Так как обещал проверить сообщаю: в Debian Etch работает.

Сначала про систему:

home:~# uname -a
Linux home 2.6.18-4-686 #1 SMP Wed Apr 18 09:55:10 UTC 2007 i686 GNU/Linux

home:~# dpkg -l 'jfs*' | grep ii
ii  jfsutils       1.1.11-1       utilities for managing the JFS filesystem

home:~# dpkg -l 'lvm*' | grep ii
ii  lvm-common     1.5.20         The Logical Volume Manager for Linux (common
ii  lvm2           2.02.06-4      The Linux Logical Volume Manager

Теперь проверю:

home:~# lvcreate -A y -C y -L 40G -n test -v -Z y LVM
    Finding volume group "LVM"
    Archiving volume group "LVM" metadata (seqno 12).
    Creating logical volume test
    Creating volume group backup "/etc/lvm/backup/LVM" (seqno 13).
    Found volume group "LVM"
    Creating LVM-test
    Loading LVM-test table
    Resuming LVM-test (254:6)
    Clearing start of logical volume "test"
    Creating volume group backup "/etc/lvm/backup/LVM" (seqno 13).
  Logical volume "test" created

home:~# mkfs.jfs -L test /dev/mapper/LVM-test 
mkfs.jfs version 1.1.11, 05-Jun-2006
Warning!  All data on device /dev/mapper/LVM-test will be lost!

Continue? (Y/N) y
   \

Format completed successfully.

41943040 kilobytes total disk space.

home:~#  jfs_debugfs /dev/mapper/LVM-test 
jfs_debugfs version 1.1.11, 05-Jun-2006
G
Aggregate Block Size: 4096

> q

home:~# mount -t jfs -o iocharset=utf8 /dev/mapper/LVM-test /mnt/disk/

home:~# df | grep test
/dev/mapper/LVM-test  41908788      5252  41903536   1% /mnt/disk

home:~# lvextend -L +10G /dev/LVM/test 
  Extending logical volume test to 50,00 GB
  Logical volume test successfully resized

home:~# mount -o remount,resize /mnt/disk/

home:~# df | grep test
/dev/mapper/LVM-test  52394228      6532  52387696   1% /mnt/disk


Я говорил что не работало без указания параметра у resize. Проверю позже т.к. то
было на amd64 и ядро там xen-vserver. Кроме того ядро уже обновлялось в
дистрибутиве. 

Проверю и там только попозже.

P.S. В ядре точно есть патчи для JFS.

P.P.S. Если надо что-то посмотреть/протестировать - говорите куда копать.
Comment 2 Maxim Tyurin 2007-08-07 20:01:30 MSD
Небольшая заметка.  Если раздел забит на 97% то kernel oops ловится стабильно на любой системе.
Comment 3 Dmitry V. Levin 2008-03-15 23:49:50 MSK
reassign
Comment 4 Michael Shigorin 2010-12-27 16:01:47 MSK
Хорошо бы:
- проверить на 2.6.32;
- если да, то в апстрим.
Comment 5 Michael Shigorin 2013-03-06 15:00:50 MSK
ovz-smp в сизифе опять нет.