Hi!

I am in the situation of having to make aufs work on CentOS 6 / RHEL
6. This is unfortunate because I'm not a fan of backporting stuff. My
first approach was to take the kernel and aufs package from here:
http://software.internet2.edu/web100_kernel/rpms/el6/SRPMS/. This
works, but processes start getting stuck arbitrarily after some time.

I am now trying the approach of taking the CentOS 6 kernel source from
here: 
http://vault.centos.org/6.7/updates/Source/SPackages/kernel-2.6.32-573.7.1.el6.src.rpm,
as well as the 2.6.32 aufs branch from the aufs2 git tree.

On this, I apply two changes. One is along the lines of
https://github.com/aia/kernel-patches/blob/master/2.6.32/aufs-vfs-compatibility.patch
to fix the vfs_statfs() calls. The other is to replace calls to
__getname_gfp(GFP_NOFS) with calls to (void
*)__get_free_page(GFP_NOFS);

This makes the kernel compile and boot. However, as soon as the switch
to the root file system (mounted over aufs, of course) takes place, I
start seeing errors like this:

[   20.369245] kernel BUG at mm/slab.c:535!
[   20.430552] invalid opcode: 0000 [#1] PREEMPT SMP
[   20.500053] last sysfs file: /sys/devices/system/cpu/online
[   20.591978] Modules linked in:
[   20.630437]
[   20.651490] Pid: 254, comm: fstab-decode Not tainted 2.6.32-thinux
#6 innotek GmbH VirtualBox/VirtualBox
[   20.802118] EIP: 0060:[<c1113b98>] EFLAGS: 00010046 CPU: 0
[   20.870217] EIP is at free_block+0x138/0x150
[   20.926880] EAX: c2022260 EBX: f7003f40 ECX: f6613000 EDX: 40000000
[   21.025139] ESI: 00000000 EDI: f70059d4 EBP: 0000000c ESP: f667df18
[   21.126056]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
[   21.204660] Process fstab-decode (pid: 254, ti=f667c000
task=f64a45b0 task.ti=f667c000)
[   21.322687] Stack:
[   21.352329]  f6640000 c1034525 00000068 f697ecd8 0000000c f70059d4
00000014 f7018400
[   21.468509] <0> f70059c0 f70059d4 0000000c c1113802 00000000
f7003f40 f700fce4 f663b000
[   21.596129] <0> f70059c0 00000292 f6e3bbe8 c11139a2 00000003
00000020 f663b000 c111fd4a
[   21.734843] Call Trace:
[   21.761828]  [<c1034525>] ? __do_page_fault+0x1a5/0x3f0
[   21.839954]  [<c1113802>] ? cache_flusharray+0x52/0xc0
[   21.921753]  [<c11139a2>] ? kmem_cache_free+0x52/0xa0
[   21.992557]  [<c111fd4a>] ? do_sys_open+0xfa/0x130
[   22.059130]  [<c111fdfc>] ? sys_open+0x2c/0x40
[   22.101444]  [<c152e064>] ? syscall_call+0x7/0xb
[   22.112180] Code: 5e 5f 5d c3 8d b4 26 00 00 00 00 2b 4b 28 89 d8
89 4f 18 8b 54 24 04 e8 67 fe ff ff e9 1d ff ff ff 8b 40 0c 8b 10 e9
44 ff ff ff <0f> 0b 8d b6 00 00 00 00 eb f8 8d b4 26 00 00 00 00 8d bc
27 00
[   22.314026] EIP: [<c1113b98>] free_block+0x138/0x150 SS:ESP 0068:f667df18
[   22.388893] ---[ end trace 78330615fed1ddd8 ]---
[   22.452313] Kernel panic - not syncing: Fatal exception
[   22.521558] Pid: 254, comm: fstab-decode Tainted: G      D    --
------------    2.6.32-thinux #6
[   22.640560] Call Trace:
[   22.675844]  [<c152a4ff>] ? panic+0x69/0x111
[   22.727078]  [<c1008142>] ? oops_end+0x82/0x90
[   22.800414]  [<c100426f>] ? do_invalid_op+0x7f/0x90
[   22.878122]  [<c1113b98>] ? free_block+0x138/0x150
[   22.946516]  [<c1120047>] ? __dentry_open+0x207/0x340
[   23.003970]  [<c1120271>] ? nameidata_to_filp+0x51/0x70
[   23.090971]  [<c122e220>] ? aufs_open_nondir+0x0/0x70
[   23.177566]  [<c11324f5>] ? do_filp_open+0x5f5/0xb80
[   23.267048]  [<c152e963>] ? error_code+0x73/0x78
[   23.345305]  [<c10f007b>] ? shmem_add_to_page_cache+0x10b/0x120
[   23.426627]  [<c1113b98>] ? free_block+0x138/0x150
[   23.490033]  [<c1034525>] ? __do_page_fault+0x1a5/0x3f0
[   23.565939]  [<c1113802>] ? cache_flusharray+0x52/0xc0
[   23.648602]  [<c11139a2>] ? kmem_cache_free+0x52/0xa0
[   23.708546]  [<c111fd4a>] ? do_sys_open+0xfa/0x130
[   23.769158]  [<c111fdfc>] ? sys_open+0x2c/0x40
[   23.816681]  [<c152e064>] ? syscall_call+0x7/0xb

I suspect that playing around with the vfs and free calls is causing
this, but I'm finding this hard to debug. Attempts to switch from SLAB
to SLUB have failed (the CentOS kernel source tree has cyclic header
dependencies that I'm unable to unravel).

Any help or pointers on how to proceed would be highly appreciated.

Regards
Saurabh

------------------------------------------------------------------------------

Reply via email to