DragonFly bugs List (threaded) for 2009-02
DragonFly BSD
DragonFly bugs List (threaded) for 2009-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: [issue1286] msdosfs crashes (when using rsync?)

From: Nicolas Thery <nthery@xxxxxxxxx>
Date: Sat, 28 Feb 2009 13:40:05 +0100

2009/2/18 Simon 'corecode' Schubert (via DragonFly issue tracker)
> New submission from Simon 'corecode' Schubert <corecode@fs.ei.tum.de>:
> Just now, twice, also on a fsck'ed system:
> panic: msdosfs_reinsert: insertion failed 16
> happend when calling rsync -aPv /dir/on/hammer /dir/on/msdosfs
> crashdump available on request (mega huge one)

I think I root caused the bug and can reproduce it with the following steps:

mkdir d
cd d
touch f1
touch f2
from another term to keep a vnode on f2: vi f2
rm f2
mv f1 f3

f2 is the last entry in d.  When it is deleted, the entry is free'd
but the denode associated with f2 stays in the dehashtbl[].

When f1 is renamed, msdosfs_lookup() looks for a new dir entry to move
it too(*) and finds the one previously used by f2.

When msdosfs_rename() reinserts f1's denode in the hash table, the
assertion fires because f2's denode is still there.

So the assertion I added some months ago is incorrect (but ignoring
the error was incorrect too).

I'm trying to come up with a fix...

(*) Contrary to what is stated in comment before msdosfs_rename(),
when simply renaming a file (no move), the original dir entry is not
reused.  Instead a new one is allocated.

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]