Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, I am running kmemleak on one of my modules to find leaks, below is the result after a while. From the result, what i understand is below address are ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2014
    Posts
    1

    Analyzing kmemleak result


    Hi,
    I am running kmemleak on one of my modules to find leaks, below is the result after a while. From the result, what i understand is below address are object/s address in the .ko or .o file.

    Code:
    unreferenced object 0xffff8803c9708f10 (size 32):
      comm "resiter_access_i_o", pid 2320, jiffies 4294798486
      hex dump (first 32 bytes):
        d8 8e 70 c9 03 88 ff ff a0 8e 70 c9 03 88 ff ff  ..p.......p.....
        68 8e 70 c9 03 88 ff ff 30 8e 70 c9 03 88 ff ff  h.p.....0.p.....
      backtrace:
        [<ffffffff81516e3e>] kmemleak_alloc+0x5e/0xd0
        [<ffffffff8117cf2a>] __kmalloc+0x1ea/0x330
        [<ffffffffa04cafbb>] 0xffffffffa04cafbb
        [<ffffffffa04ad3a0>] 0xffffffffa04ad3a0
        [<ffffffffa04ae8fb>] 0xffffffffa04ae8fb
        [<ffffffffa0422e3a>] 0xffffffffa0422e3a
        [<ffffffffa0423022>] 0xffffffffa0423022
        [<ffffffff81096e86>] kthread+0x96/0xa0
        [<ffffffff8100c20a>] child_rip+0xa/0x20
        [<ffffffffffffffff>] 0xffffffffffffffff
    Based on my understanding, i did the following using gdb to find the function corresponding but i get the following error

    Code:
    gdb resiter_access_i_o.ko
    GNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.el6_4.1)
    Copyright (C) 2010 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later 
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "x86_64-redhat-linux-gnu".
    For bug reporting instructions, please see:
    
    Reading symbols from resiter_access_i_o.ko ...done.
    (gdb) info symbol 0xffffffffa04ae8fb
    No symbol matches 0xffffffffa04ae8fb.
    (gdb) q
    Can some point me how to figure out the function corresponding to the above address? Thanks in advance...

  2. #2
    Just Joined!
    Join Date
    Jan 2014
    Posts
    8
    Quote Originally Posted by pkumarn View Post
    Hi,
    I am running kmemleak on one of my modules to find leaks, below is the result after a while. From the result, what i understand is below address are object/s address in the .ko or .o file.

    Code:
    unreferenced object 0xffff8803c9708f10 (size 32):
      comm "resiter_access_i_o", pid 2320, jiffies 4294798486
      hex dump (first 32 bytes):
        d8 8e 70 c9 03 88 ff ff a0 8e 70 c9 03 88 ff ff  ..p.......p.....
        68 8e 70 c9 03 88 ff ff 30 8e 70 c9 03 88 ff ff  h.p.....0.p.....
      backtrace:
        [<ffffffff81516e3e>] kmemleak_alloc+0x5e/0xd0
        [<ffffffff8117cf2a>] __kmalloc+0x1ea/0x330
        [<ffffffffa04cafbb>] 0xffffffffa04cafbb
        [<ffffffffa04ad3a0>] 0xffffffffa04ad3a0
        [<ffffffffa04ae8fb>] 0xffffffffa04ae8fb
        [<ffffffffa0422e3a>] 0xffffffffa0422e3a
        [<ffffffffa0423022>] 0xffffffffa0423022
        [<ffffffff81096e86>] kthread+0x96/0xa0
        [<ffffffff8100c20a>] child_rip+0xa/0x20
        [<ffffffffffffffff>] 0xffffffffffffffff
    Based on my understanding, i did the following using gdb to find the function corresponding but i get the following error

    Code:
    gdb resiter_access_i_o.ko
    GNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.el6_4.1)
    Copyright (C) 2010 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later 
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "x86_64-redhat-linux-gnu".
    For bug reporting instructions, please see:
    
    Reading symbols from resiter_access_i_o.ko ...done.
    (gdb) info symbol 0xffffffffa04ae8fb
    No symbol matches 0xffffffffa04ae8fb.
    (gdb) q
    Can some point me how to figure out the function corresponding to the above address? Thanks in advance...
    Try running objdump with as many flags as you can. Rebuilding your module with -g flag will also help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •