Deadlock: JFFS2 with uClinux kernel 2.6.6-uc0
Heinz Haeberle
H.Haeberle at pilz.de
Mon Jun 20 07:26:00 EDT 2005
I have found a deadlock situation with jffs2 on linux 2.6.6-uc0 (do not
know what
version jffs2 that is, there aren't any version infos in the jffs2 dir)
The situation happens while continuously creating, writing and deleting a
couple#
(= 20 in my case) files. It happens about once per day.
I have tracked down the problem to the following level:
The jffs2 garbage collectors stack trace shows the following calls:
========================================================
....(don't find anything usefull)
schedule
__wait_on_freeing_inode (aparently waits for the inode
gets unlocked)
find_inode_fast
iget_locked
jffs2_garbage_collect_live
jffs2_garbage_collect_pass (does a: down(&c->alloc-sem))
....
The application kernel stack trace (application is doing the unlink):
========================================================
....(don't find anything usefull)
__down
__down_failed (should not be a fail according to source comments)
jffs2_do_clear_inode (does a:
down(&c->alloc_sem))
jffs2_clear_inode
clear_inode
generic_delete_inode
generic_drop_inode
iput
sys_unlink (does a:
lock inode sema)
So the situation happens that the GC happens to what for the unlike to
unlock the inode sema
while the unlike is waiting for the alloc-sema to be availabe. Which never
happens since the
GC is still owning it.
I can solve the issue with by disabling the garbage collector. Is there any
other known solution
or is it fixed in newer versions anyhow?
Heinz
More information about the linux-mtd
mailing list