Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7407555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:44:34+00:00 2026-05-29T05:44:34+00:00

I am trying to debug a device driver which apparently causes other task to

  • 0

I am trying to debug a device driver which apparently causes other
task to hang. It is deterministic that which task or at what time it
will hang.

Basically I got some error message from kernel saying that “task has
been blocked for more than 120 seconds”, along with some stack trace.
The hung task vary from sendmail to mkfs to pdflush(a kernel thread”.
And the topmost function in the stack trace vary from “getnstimeofday”
to “bio_submit” to “mark_locks_held”.

I am having a hard time debugging this as it’s very hard to locate the
problem. The stack trace provided by the kernel is not very helpful
neither. According to those stack traces, some of those hung process
are not even trying to grab a lock (like in the getnstimeofday
function), and I have no idea why they hang.

So I am wondering if anyone have some idea on how to debug such a
problem. Would kgdb be useful here, maybe by giving me exactly at what
point the process hangs, and what kind of lock it is waiting for?

Any suggestions are appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T05:44:35+00:00Added an answer on May 29, 2026 at 5:44 am

    When you don’t have frame pointers enabled in the kernel, stack traces won’t be reliable, and it’s confusing you. The kernel resorts to scanning the entire stack for values that might be pointers into kernel code (i.e. potential return addresses). This means that past function calls that have already returned might still be printed.

    If you had code that looked like this:

    void A(void) {
        printk("foo\n");
    }
    
    void B(void) {
        int x;
        A();
    }
    
    void crash(void) {
        char buf[32];
        *(int*)0 = 0;
    }
    
    void trouble(void) {
        int x;
        B();
        crash();
    }
    

    Your stack dump might appear something like:

    printk
    A
    crash
    foo
    trouble
    ...
    

    As for how to debug your problem, I have two suggestions:

    1. Knowing that some of the debug output is bad, use your own knowledge of the code to figure out the real call stack. It might help to look for the common functions across multiple stack dumps.

    2. Recompile the kernel to use frame pointers.

    The kernel will still print every value that looks like a return address, but it will flag the unreliable addresses with a “?”. So your stack dump might look like this instead:

    ? printk
    ? A
    crash
    ? foo
    trouble
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to automate a device driver's debug session in Windows XP with
I am trying to debug an Android app that talks to a usb device.
I am trying to debug a strange issue with users that have LogMeIn installed.
I'm trying to debug an MSBuild task, and I know there is some way
I am trying to debug an ActiveResource call that is not working. What's the
I'm trying to debug my app on the device. Enabled USB debugging On Computer
I'm trying to debug and test my application with a Dell Windows Mobile device
I'm trying to debug and step through an Android application that segfaults. I've tried
I am trying to debug an iPhone app that uses bluetooth for communication. I
I am trying to debug why a mobile device trying to connect to my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.