#10977: kdl in pthread_cond_wait on netsurf buildslave -----------------------------+---------------------------- Reporter: pulkomandy | Owner: bonefish Type: bug | Status: new Priority: normal | Milestone: R1 Component: System/Kernel | Version: R1/Development Resolution: | Keywords: Blocked By: | Blocking: Has a Patch: 0 | Platform: All -----------------------------+---------------------------- Comment (by bonefish): The immediate cause of the panic is just a missing {{{ DEBUG_PAGE_ACCESS_END(context.page); }}} in `vm_soft_fault()` before [http://cgit.haiku- os.org/haiku/tree/src/system/kernel/vm/vm.cpp?id=f7566626e5b389dbc90bc246660aeea8bad4f861#n4684 unlocking everything] when having to wait for a to-be-unmapped page to become unwired. Unfortunately that will leave another issue to be resolved: The page we want to unmap isn't actually wired in this case. We have two threads that want to wire the same virtual page for writing. The way `wire_page()` works, they both first mark the respective address range wired before calling `vm_soft_fault()` to map a writable page (there's only a readable one from a lower cache). Either thread ignores its own pre-wired range, but not that of the other thread. Hence the read-only page looks wired and cannot be unmapped. Both threads would wait forever. Not sure how involved a solution would be. It might be possible to mark pre-wired ranges respectively and ignore them in `vm_soft_fault()`, but this needs to be thought through thoroughly (particularly when to unmark the ranges). -- Ticket URL: <https://dev.haiku-os.org/ticket/10977#comment:1> Haiku <https://dev.haiku-os.org> Haiku - the operating system.