https://bugs.dragonflybsd.org/https://bugs.dragonflybsd.org/favicon.ico?16293952082017-09-16T18:06:54ZDragonFlyBSD bugtrackerDragonFlyBSD - Bug #3056: HAMMER2 corruption - nonexistent fileshttps://bugs.dragonflybsd.org/issues/3056?journal_id=132032017-09-16T18:06:54Zdillon
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>In Progress</i></li><li><strong>Assignee</strong> set to <i>dillon</i></li></ul><p>I believe I fixed that one in the latest master with the sideq commit 7220df841c67. It won't fix the existing disconnect between inode nlinks and directory entries but it should prevent new occurrences. We have not yet confirmed that the fix actually prevents such things from happening, yet (testing now).</p>
<p>I will come up with a way to scrap the dead directory entries in an upcoming commit. It might be possible to just unlink("path") already, but 'rm' won't do it because 'rm' calls access() and lstat() first (which need the inode to exist).</p>
<p>-Matt</p> DragonFlyBSD - Bug #3056: HAMMER2 corruption - nonexistent fileshttps://bugs.dragonflybsd.org/issues/3056?journal_id=132042017-09-17T05:15:17Zdillon
<ul></ul><p>I have added a new directive to the hammer2 utility which can remove the dead directory entries. 'hammer2 destroy <path>'. Use very carefully. Manual page has been updated. Needs a new kernel (w/updated hammer2 VFS), and a new hammer2 utility to use. Still considered alpha.</p>
<p>-Matt</p> DragonFlyBSD - Bug #3056: HAMMER2 corruption - nonexistent fileshttps://bugs.dragonflybsd.org/issues/3056?journal_id=132052017-09-17T22:13:45Zarcade@b1t.namearcade@b1t.name
<ul></ul><p>Sorry, can't find the file:</p>
<p>===> sbin/hammer2<br />make<sup><a href="#fn4">4</a></sup>: make<sup><a href="#fn4">4</a></sup>: don't know how to make cmd_destroy.c. Stop</p>
make<sup><a href="#fn4">4</a></sup>: stopped in /usr/src/sbin/hammer2
<ul>
<li>[_SUBDIR_depend_hammer2] Error code 2</li>
</ul> DragonFlyBSD - Bug #3056: HAMMER2 corruption - nonexistent fileshttps://bugs.dragonflybsd.org/issues/3056?journal_id=132112017-09-19T14:42:02Zarcade@b1t.namearcade@b1t.name
<ul><li><strong>File</strong> <a href="/attachments/1422">core.txt.31</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/1422/core.txt.31">core.txt.31</a> added</li><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Resolved</i></li></ul><p>Today I tested hammer2 destroy and it worked fine, yet 5 minutes later host crashed with (attached coredump). Host was actually crashing again with attempts to write that crash to /var/crash (with the same traceback). Probably unrelated.</p> DragonFlyBSD - Bug #3056: HAMMER2 corruption - nonexistent fileshttps://bugs.dragonflybsd.org/issues/3056?journal_id=132122017-09-19T16:30:59Zarcade@b1t.namearcade@b1t.name
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Feedback</i></li></ul><p>Oops, it's not over yet.</p>
<p>I hadn't paid attention to other fs parts and some wrong files were still present. I cleaned up whole disk from incorrect files (god bless backups) and found some more weird things:</p>
<p><del>rw-r--r-</del> 1 root wheel 4 19-Sep-2017 19:23 slim.pid<br /><del>rw-r--r-</del> 1 root wheel 4 19-Sep-2017 19:23 slim.pid<br /><del>rw-r--r-</del> 1 root wheel 4 19-Sep-2017 19:23 slim.pid<br /><del>rw-r--r-</del> 1 root wheel 4 19-Sep-2017 19:23 slim.pid<br /><del>rw------</del> 1 root wheel 4 19-Sep-2017 19:23 smartd.pid<br /><del>rw------</del> 1 root wheel 4 19-Sep-2017 19:23 smartd.pid<br /><del>rw------</del> 1 root wheel 4 19-Sep-2017 19:23 smartd.pid<br /><del>rw------</del> 1 root wheel 4 19-Sep-2017 19:23 smartd.pid<br /><del>rw------</del> 1 root wheel 3 19-Sep-2017 19:22 syslog.pid<br /><del>rw------</del> 1 root wheel 3 19-Sep-2017 19:22 syslog.pid<br /><del>rw------</del> 1 root wheel 3 19-Sep-2017 19:22 syslog.pid<br /><del>rw------</del> 1 root wheel 3 19-Sep-2017 19:22 syslog.pid</p>
<p>If I do `hammer2 destroy filename` one of them is destroyed.</p>
<p>I also noticed that after the crash simple empty files may appear in the place of newly created files.</p>
<p>Will clean up the drive and check how it would work.</p> DragonFlyBSD - Bug #3056: HAMMER2 corruption - nonexistent fileshttps://bugs.dragonflybsd.org/issues/3056?journal_id=132182017-09-20T04:58:21Zdillon
<ul></ul><p>I hit the cluster_write() crash too, and it should now be fixed in master. It turned out to be a bug in devfs that only hammer2 tickles due to the way hammer2 uses cluster_write().</p>
<p>Also fixed a number of other issues this morning (see the git logs), including a corruption bug that can triggered by a crash or panic.</p>
<p>-Matt</p> DragonFlyBSD - Bug #3056: HAMMER2 corruption - nonexistent fileshttps://bugs.dragonflybsd.org/issues/3056?journal_id=132222017-09-20T10:43:10Zarcade@b1t.namearcade@b1t.name
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Resolved</i></li></ul><p>Yeah, that's much better. Now I can compile new kernel without hitting a crash and host is stable again for a couple of hours.</p>