[llvm-bugs] [Bug 51467] New: LLDB "image list" accumulates duplicate loader+vdso images on restart

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Aug 12 17:32:08 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=51467

            Bug ID: 51467
           Summary: LLDB "image list" accumulates duplicate loader+vdso
                    images on restart
           Product: lldb
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: rprichard at google.com
                CC: jdevlieghere at apple.com, llvm-bugs at lists.llvm.org

I'm using lldb with a dynamically-linked glibc hello world program:

$ cat hello.c
#include <stdio.h>

int main() {
  printf("hi\n");
  return 0;
}
$ gcc hello.c -g

Each time I restart the program in lldb, "image list" accumulates another copy
of the [vdso] image and the loader image
(/usr/lib/x86_64-linux-gnu/ld-2.31.so):

$ /x/clang12/bin/lldb a.out
(lldb) target create "a.out"
Current executable set to '/x/mess/a.out' (x86_64).
(lldb) image list
[  0] A57BBE87-FECC-2529-B8F0-06376F8C9954-4C7B7916 0x0000000000000000
/x/mess/a.out 
(lldb) b main
Breakpoint 1: where = a.out`main + 4 at hello.c:4:3, address =
0x0000000000001139
(lldb) run
Process 639200 launched: '/x/mess/a.out' (x86_64)
Process 639200 stopped
* thread #1, name = 'a.out', stop reason = breakpoint 1.1
    frame #0: 0x0000555555555139 a.out`main at hello.c:4:3
   1    #include <stdio.h>
   2    
   3    int main() {
-> 4      printf("hi\n");
   5      return 0;
   6    }
(lldb) image list
[  0] A57BBE87-FECC-2529-B8F0-06376F8C9954-4C7B7916 0x0000555555554000
/x/mess/a.out 
[  1] 9F75E12B-5CDE-458E-4DDF-E16FC31565F2-C6E3306F 0x00007ffff7fd2000
/usr/lib/x86_64-linux-gnu/ld-2.31.so 
      /usr/lib/debug/.build-id/9f/75e12b5cde458e4ddfe16fc31565f2c6e3306f.debug
[  2] D3D446F7-5BA5-351B-D4C9-2782DF0761ED-0B51B041 0x00007ffff7fd0000 [vdso]
(0x00007ffff7fd0000)
[  3] FC3F27BB-2B0B-F376-A564-0FA0ECC65A1E-16634CFB 0x00007ffff7ddc000
/lib/x86_64-linux-gnu/libc.so.6 
      /usr/lib/debug/.build-id/fc/3f27bb2b0bf376a5640fa0ecc65a1e16634cfb.debug
(lldb) run
There is a running process, kill it and restart?: [Y/n] y
Process 639200 exited with status = 9 (0x00000009) 
Process 639398 launched: '/x/mess/a.out' (x86_64)
Process 639398 stopped
* thread #1, name = 'a.out', stop reason = breakpoint 1.1
    frame #0: 0x0000555555555139 a.out`main at hello.c:4:3
   1    #include <stdio.h>
   2    
   3    int main() {
-> 4      printf("hi\n");
   5      return 0;
   6    }
(lldb) image list
[  0] A57BBE87-FECC-2529-B8F0-06376F8C9954-4C7B7916 0x0000555555554000
/x/mess/a.out 
[  1] 9F75E12B-5CDE-458E-4DDF-E16FC31565F2-C6E3306F 0x00007ffff7fd2000
/usr/lib/x86_64-linux-gnu/ld-2.31.so 
      /usr/lib/debug/.build-id/9f/75e12b5cde458e4ddfe16fc31565f2c6e3306f.debug
[  2] D3D446F7-5BA5-351B-D4C9-2782DF0761ED-0B51B041 0x00007ffff7fd0000 [vdso]
(0x00007ffff7fd0000)
[  3] FC3F27BB-2B0B-F376-A564-0FA0ECC65A1E-16634CFB 0x00007ffff7ddc000
/lib/x86_64-linux-gnu/libc.so.6 
      /usr/lib/debug/.build-id/fc/3f27bb2b0bf376a5640fa0ecc65a1e16634cfb.debug
[  4] 9F75E12B-5CDE-458E-4DDF-E16FC31565F2-C6E3306F 0x00007ffff7fd2000
/usr/lib/x86_64-linux-gnu/ld-2.31.so 
      /usr/lib/debug/.build-id/9f/75e12b5cde458e4ddfe16fc31565f2c6e3306f.debug
[  5] D3D446F7-5BA5-351B-D4C9-2782DF0761ED-0B51B041 0x00007ffff7fd0000 [vdso]
(0x00007ffff7fd0000)
(lldb) run
There is a running process, kill it and restart?: [Y/n] y
Process 639398 exited with status = 9 (0x00000009) 
Process 639416 launched: '/x/mess/a.out' (x86_64)
Process 639416 stopped
* thread #1, name = 'a.out', stop reason = breakpoint 1.1
    frame #0: 0x0000555555555139 a.out`main at hello.c:4:3
   1    #include <stdio.h>
   2    
   3    int main() {
-> 4      printf("hi\n");
   5      return 0;
   6    }
(lldb) image list
[  0] A57BBE87-FECC-2529-B8F0-06376F8C9954-4C7B7916 0x0000555555554000
/x/mess/a.out 
[  1] 9F75E12B-5CDE-458E-4DDF-E16FC31565F2-C6E3306F 0x00007ffff7fd2000
/usr/lib/x86_64-linux-gnu/ld-2.31.so 
      /usr/lib/debug/.build-id/9f/75e12b5cde458e4ddfe16fc31565f2c6e3306f.debug
[  2] D3D446F7-5BA5-351B-D4C9-2782DF0761ED-0B51B041 0x00007ffff7fd0000 [vdso]
(0x00007ffff7fd0000)
[  3] FC3F27BB-2B0B-F376-A564-0FA0ECC65A1E-16634CFB 0x00007ffff7ddc000
/lib/x86_64-linux-gnu/libc.so.6 
      /usr/lib/debug/.build-id/fc/3f27bb2b0bf376a5640fa0ecc65a1e16634cfb.debug
[  4] 9F75E12B-5CDE-458E-4DDF-E16FC31565F2-C6E3306F 0x00007ffff7fd2000
/usr/lib/x86_64-linux-gnu/ld-2.31.so 
      /usr/lib/debug/.build-id/9f/75e12b5cde458e4ddfe16fc31565f2c6e3306f.debug
[  5] D3D446F7-5BA5-351B-D4C9-2782DF0761ED-0B51B041 [vdso][0x0000000000000000]
[vdso] (0x00007ffff7fd0000)
[  6] 9F75E12B-5CDE-458E-4DDF-E16FC31565F2-C6E3306F 0x00007ffff7fd2000
/usr/lib/x86_64-linux-gnu/ld-2.31.so 
      /usr/lib/debug/.build-id/9f/75e12b5cde458e4ddfe16fc31565f2c6e3306f.debug
[  7] D3D446F7-5BA5-351B-D4C9-2782DF0761ED-0B51B041 0x00007ffff7fd0000 [vdso]
(0x00007ffff7fd0000)

I'll also attached a file with dyld logging enabled.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210813/87c102f1/attachment.html>


More information about the llvm-bugs mailing list