Received: from chrysocolla.lwithers.me.uk ([2001:41c8:1:5763::2]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WBYAa-0005s7-7y for linux-mtd@lists.infradead.org; Thu, 06 Feb 2014 23:15:45 +0000 Received: from rhodium.guralpsystems.co.uk ([2001:8b0:1a5:0:1e6f:65ff:fe94:20b4] helo=rhodium.platinum.guralp.com) by chrysocolla.lwithers.me.uk with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1WBY9x-0006CR-JR for linux-mtd@lists.infradead.org; Thu, 06 Feb 2014 23:15:08 +0000 Received: from lwithers by rhodium.platinum.guralp.com with local (Exim 4.80) (envelope-from ) id 1WBY9x-0007zA-2D for linux-mtd@lists.infradead.org; Thu, 06 Feb 2014 23:15:05 +0000 Date: Thu, 6 Feb 2014 23:15:04 +0000 From: Laurence Withers To: linux-mtd@lists.infradead.org Message-ID: <20140206231504.GA26821@guralp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Subject: UBIFS assert failed in ubifs_set_page_dirty List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi, >From time to time I'm seeing some assertion failures in UBIFS. The system is running a mainline 3.10 kernel (though I've previously seen this on 3.2) with only drivers/board support for my particular setup. There are no vendor patches, MM patches or FS patches. The system has been run extensively with the mtdtests kernel modules too. There is some evidence that this corresponds to memory pressure: it only seems to trigger when our userspace applications (which among other things are writing to memory-mapped ring buffers, all on UBIFS volumes) are writing at higher data rates. This only happens after several hours of normal operation. The first assertion failure, triggered by one of the processes writing to a memory-mapped ring buffer, is as follows: [19788.903790] UBIFS assert failed in ubifs_set_page_dirty at 1421 (pid 2121) [19788.910734] CPU: 0 PID: 2121 Comm: gdi2gcf Not tainted 3.10.0cmg-das+ #645 [19788.953116] [] (unwind_backtrace+0x0/0xec) from [] (show_stack+0x20/0x24) [19788.961762] [] (show_stack+0x20/0x24) from [] (dump_stack+0x20/0x28) [19788.992887] [] (dump_stack+0x20/0x28) from [] (ubifs_set_page_dirty+0x48/0x5c) [19789.001954] [] (ubifs_set_page_dirty+0x48/0x5c) from [] (set_page_dirty+0x5c/0x9c) [19789.019483] [] (set_page_dirty+0x5c/0x9c) from [] (__do_fault+0x3c4/0x470) [19789.029815] [] (__do_fault+0x3c4/0x470) from [] (handle_pte_fault+0x270/0xb84) [19789.040442] [] (handle_pte_fault+0x270/0xb84) from [] (handle_mm_fault+0xb0/0xd8) [19789.051283] [] (handle_mm_fault+0xb0/0xd8) from [] (do_page_fault+0x188/0x3bc) [19789.061927] [] (do_page_fault+0x188/0x3bc) from [] (do_DataAbort+0x44/0xa8) [19789.072234] [] (do_DataAbort+0x44/0xa8) from [] (__dabt_usr+0x44/0x60) [19789.082046] Exception stack(0xc2c7bfb0 to 0xc2c7bff8) [19789.088604] bfa0: b64d4000 01747ff0 00000360 4a0000c8 [19789.098324] bfc0: c4b6796e f01c1f45 fa24b500 d5ffffff 0d010100 000003e8 000166a8 017468b0 [19789.110848] bfe0: edf9f5fb be933ac4 0f0cfe13 b6c422e0 20000010 ffffffff shortly followed by: [19797.503315] UBIFS assert failed in ubifs_writepage at 1009 (pid 2121) [19797.509825] CPU: 0 PID: 2121 Comm: gdi2gcf Not tainted 3.10.0cmg-das+ #645 [19797.521942] [] (unwind_backtrace+0x0/0xec) from [] (show_stack+0x20/0x24) [19797.532198] [] (show_stack+0x20/0x24) from [] (dump_stack+0x20/0x28) [19797.541963] [] (dump_stack+0x20/0x28) from [] (ubifs_writepage+0x94/0x22c) [19797.552171] [] (ubifs_writepage+0x94/0x22c) from [] (__writepage+0x24/0x54) [19797.563086] [] (__writepage+0x24/0x54) from [] (write_cache_pages+0x28c/0x3c8) [19797.576415] [] (write_cache_pages+0x28c/0x3c8) from [] (generic_writepages+0x50/0x70) [19797.588095] [] (generic_writepages+0x50/0x70) from [] (do_writepages+0x3c/0x48) [19797.598831] [] (do_writepages+0x3c/0x48) from [] (__filemap_fdatawrite_range+0x70/0x7c) [19797.610182] [] (__filemap_fdatawrite_range+0x70/0x7c) from [] (filemap_write_and_wait_range+0x44/0x84) [19797.623006] [] (filemap_write_and_wait_range+0x44/0x84) from [] (ubifs_fsync+0x48/0xc0) [19797.634342] [] (ubifs_fsync+0x48/0xc0) from [] (vfs_fsync_range+0x44/0x54) [19797.644566] [] (vfs_fsync_range+0x44/0x54) from [] (vfs_fsync+0x34/0x3c) [19797.654626] [] (vfs_fsync+0x34/0x3c) from [] (do_fsync+0x38/0x60) [19797.664416] [] (do_fsync+0x38/0x60) from [] (SyS_fdatasync+0x1c/0x20) [19797.676560] [] (SyS_fdatasync+0x1c/0x20) from [] (ret_fast_syscall+0x0/0x44) [19797.688599] UBIFS assert failed in do_writepage at 936 (pid 2121) [19797.696302] CPU: 0 PID: 2121 Comm: gdi2gcf Not tainted 3.10.0cmg-das+ #645 [19797.704803] [] (unwind_backtrace+0x0/0xec) from [] (show_stack+0x20/0x24) [19797.714961] [] (show_stack+0x20/0x24) from [] (dump_stack+0x20/0x28) [19797.724770] [] (dump_stack+0x20/0x28) from [] (do_writepage+0x144/0x1e8) [19797.734776] [] (do_writepage+0x144/0x1e8) from [] (ubifs_writepage+0x1cc/0x22c) [19797.745400] [] (ubifs_writepage+0x1cc/0x22c) from [] (__writepage+0x24/0x54) [19797.755791] [] (__writepage+0x24/0x54) from [] (write_cache_pages+0x28c/0x3c8) [19797.768717] [] (write_cache_pages+0x28c/0x3c8) from [] (generic_writepages+0x50/0x70) [19797.780001] [] (generic_writepages+0x50/0x70) from [] (do_writepages+0x3c/0x48) [19797.802655] [] (do_writepages+0x3c/0x48) from [] (__filemap_fdatawrite_range+0x70/0x7c) [19797.839018] [] (__filemap_fdatawrite_range+0x70/0x7c) from [] (filemap_write_and_wait_range+0x44/0x84) [19797.851770] [] (filemap_write_and_wait_range+0x44/0x84) from [] (ubifs_fsync+0x48/0xc0) [19797.865732] [] (ubifs_fsync+0x48/0xc0) from [] (vfs_fsync_range+0x44/0x54) [19797.876072] [] (vfs_fsync_range+0x44/0x54) from [] (vfs_fsync+0x34/0x3c) [19797.886194] [] (vfs_fsync+0x34/0x3c) from [] (do_fsync+0x38/0x60) [19797.896192] [] (do_fsync+0x38/0x60) from [] (SyS_fdatasync+0x1c/0x20) [19797.906013] [] (SyS_fdatasync+0x1c/0x20) from [] (ret_fast_syscall+0x0/0x44) This then seems to send the system into a spiral of trouble involving the following two assertion failures: [20050.671332] UBIFS assert failed in ubifs_release_budget at 567 (pid 2196) [20051.141033] UBIFS assert failed in ubifs_budget_space at 464 (pid 2168) Does anybody know where to start looking to discover the root cause of this problem? >From a little digging it looks like some of the other FS do exactly the same as ubifs_set_page_dirty(), except that they simply pass back the return value from __set_page_dirty_nobuffers() without checking it. However, given that this first assert is always followed by more things going wrong, it does seem there is more going on here. Many thanks, and bye for now, -- Laurence Withers, http://www.guralp.com/