From: l121282s@yahoo.com.cn (shuang liu) Date: Wed, 15 May 2013 18:19:40 +0800 (CST) Subject: how to debug thread stuck in filemap_fault In-Reply-To: References: Message-ID: <1368613180.91967.YahooMailNeo@web15107.mail.cnb.yahoo.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Hi, there,? some user space threads, say thread-X stuck in??sleep_on_page_killable?@ filemap_fault().? my question is :? in normal flow, how to wakeup thread-X from?wait_on_page_locked_killable() ? How can I go further to debug this issue?? I try to use ftrace function_graph to trace the flow, but it can only log EXPORT_SYMBOL_GPL() functions. I am struggling with huge memory and file system source code...? hope anyone can give me some practical tips.? Call Trace: ?[] schedule+0x35/0x50 ?[] io_schedule+0x78/0xb0 ?[] sleep_on_page_killable+0xd/0x40 ?[] __wait_on_bit+0x4f/0x70 ?[] wait_on_page_bit_killable+0x8e/0x90 ?[] __lock_page_or_retry+0x92/0xb0 ?[] filemap_fault+0x2e1/0x400 ?[] __do_fault+0x3e/0x390 ?[] handle_pte_fault+0x7c/0x930 ?[] handle_mm_fault+0x93/0xc0 ?[] do_page_fault+0x10e/0x4b0 ?[] error_code+0x5f/0x64 here is the kernel code in filemap.c? static inline int wait_on_page_locked_killable(struct page *page) { if (PageLocked(page)) return wait_on_page_bit_killable(page, PG_locked); return 0; } here is ftrace result:? ?3) ? ? ? ? ? ? ? | ? ?filemap_fault() { ?3) ? ? ? ? ? ? ? | ? ? ?find_get_page() { ?3) ? 0.259 us ? ?| ? ? ? ?__rcu_read_lock(); ?3) ? 0.217 us ? ?| ? ? ? ?__rcu_read_unlock(); ?3) ? 7.432 us ? ?| ? ? ?} ?3) ? 0.244 us ? ?| ? ? ?__might_sleep(); ?3) + 12.206 us ? | ? ?} -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130515/c8463ebf/attachment-0001.html