On Mon, Dec 7, 2015 at 4:00 PM, Logan Gunthorpe <logang@xxxxxxxxxxxx> wrote: > Hi Dan, > > I've done a bit of digging and here's some more information: > > * The crash occurs in ext4_end_io_unwritten when it tries to dereference > bh->b_assoc_map which is not necessarily NULL. > > * That function is called by __dax_pmd_fault, as the argument > complete_unwritten. > > * Looking in __dax_pmd_fault, the bug occurs if we hit either of the first > two 'goto fallback' lines. (In my case, it's hitting the first one.) > > * After the fallback code, it goes back to 'out', then checks '&bh' > for the unwritten flag. But bh hasn't been initialized yet and, on my setup, > the unwritten flag happens to be set. So, it then calls complete_unwritten > with a garbage bh and crashes. > > If I move the memset(&bh) up in the code, before the goto fallbacks can > occur, I can fix the crash. I don't know if this is really the best way to > fix the problem though. I believe you are hitting the same issue that Matthew hit here: https://patchwork.kernel.org/patch/7763851/ I have it fixed up in the latest that I pushed out last night to libnvdimm-pending. Note the libnvdimm-pending branch is now based on linux-next as I needed to resolve collisions with transparent huge page work pending in the -mm tree. > However, unfortunately, fixing the above just uncovered another issue. Now > the MR de-registration seems to have completed but the task hangs when it's > trying to munmap the memory. (Stack trace at the end of this email.) > > It looks like the i_mmap_lock_write is hanging in unlink_file_vma. I'm not > really sure how to go about debugging this lock issue. If you have any steps > I can try to get you more information let me know. I'm also happy to re-test > if you have any other changes you'd like me to try. I worked through a crop of hangs and crashes triggered by Toshi's mmap test. Give the latest a try if you get a chance and I'll fix it up if it still occurs. I'll be pushing an updated branch again tonight with fixes for issues uncovered while running the nvml test suite. Thanks Logan! -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>