On Wed, 2006-03-08 at 17:23 -0800, Paul Menage wrote:
> With patches 0-4 of f0.4 patched into a 2.6.11 kernel, I'm seeing a
> ref-counting Oops when I run the following two commands in parallel:
> 
> A: while true; do mkdir /config/ckrm/foo; rmdir /config/ckrm/foo; done
> B: while true; do echo $$ > /config/ckrm/foo/members; done
> 
> (This is basically the same test case that was a problem for e18).

I do run the test on f-series and has not seen this problem. I 'll try
it again tomorrow with f0.4.

> 
> I get a warning trigged in kref_get(), followed by an Oops in
> ckrm_remove_child() - presumably the ckrm_add_member is adding a task
> to a class whose refcount has already reached 0 and is in the process
> of being destroyed - see the console dump below.

Sounds right.

> 
> A solution would probably involve making rcfs or configfs hold
> refcounts for every object that's accessible through the filesystem,
> and not drop them until the object is no longer accessible.

hmm.. My understanding was that configfs holds a reference to the item
for each invocation (under the item) and the release function of the
group (which leads to removal of class) is called only when the last
reference is dropped (not when a rmdir is invoked). Will look at it
closely.

> 
> Paul
> 
> Badness in kref_get at lib/kref.c:32
>  [<c01b1832>] kref_get+0x26/0x30
>  [<c01370fd>] ckrm_add_member+0x9d/0xc8
>  [<c01a7e9d>] rcfs_attr_store+0x109/0x148
>  [<c01a5975>] flush_write_buffer+0x2d/0x34
>  [<c01a59c7>] configfs_write_file+0x4b/0x70
>  [<c0153600>] vfs_write+0x94/0xf0
>  [<c0153708>] sys_write+0x40/0x6c
>  [<c0102d70>] syscall_call+0x7/0xb
> Unable to handle kernel paging request at virtual address 00100104
>  printing eip:
> c0135fea
> *pde = 00000000
> Oops: 0002 [#1]
> SMP
> Modules linked in: pcnet32 mii crc32 uhci_hcd rtc
> CPU:    0
> EIP:    0060:[<c0135fea>]    Not tainted VLI
> EFLAGS: 00010246   (2.6.11-smp-DEV)
> EIP is at ckrm_remove_child+0x16/0x34
> eax: 00100100   ebx: cf2b7880   ecx: cf2b78c4   edx: 00200200
> esi: cf2b7880   edi: c0392d40   ebp: cef3e540   esp: cfea9f10
> ds: 007b   es: 007b   ss: 0068
> Process events/0 (pid: 4, threadinfo=cfea8000 task=cfedaa60)
> Stack: c0392d68 c013627c cf2b7880 c013623c cf2b78b4 cef3ea50 cef3e540 c01b189d
>        cf2b78b4 c0392d40 cf2b7880 c0136989 cf2b78b4 c013623c c0392d74 c04ba6a0
>        c0392dc4 c12ad000 00000000 00000001 c0392d40 c0136a7a cef3e540 cf2b7880
> Call Trace:
>  [<c013627c>] ckrm_release_class+0x40/0xc0
>  [<c01b189d>] kref_put+0x61/0x67
>  [<c0136989>] ckrm_setclass_internal+0x109/0x1bc
>  [<c0136a7a>] ckrm_setclass_wq+0x3e/0xa0
>  [<c012ae83>] worker_thread+0x1b3/0x240
>  [<c012e4f9>] kthread+0x7d/0xac
>  [<c0101309>] kernel_thread_helper+0x5/0xc
> Code: 8b 53 4c 89 42 04 89 51 44 8d 53 4c 89 50 04 89 43 4c 5b c3 90
> 53 8b 5c 24 08 8d 43 4c 39 43 4c 75 23 8d 4b 44 8b 51 04 8b 43 44 <89>
> 50 04 89 02 c7 43 44 00 01 10 00 c7 41 04 00 02 20 00 b8 01
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live webcast
> and join the prime developer group breaking into this new coding territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
> _______________________________________________
> ckrm-tech mailing list
> https://lists.sourceforge.net/lists/listinfo/ckrm-tech



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
ckrm-tech mailing list
https://lists.sourceforge.net/lists/listinfo/ckrm-tech

Reply via email to