[lldb] Duplicate VDSO entry when loading core file on linux
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
There are two vdso modules when loading a core file even though the same UUID `638344DA-159C-23A4-7801-E93338592110-E027065B`
From https://github.com/llvm/llvm-project/pull/217403
```sh
$> lldb -c core.2358109
(lldb) target create --core "core.2358109"
Core file '/tmp/test_corefile/core.2358109' (x86_64) was loaded.
Core was generated by '/tmp/test_corefile/main'.
(lldb) bt
thread backtrace
* thread #1, name = 'main', stop reason = SIGTRAP
* frame #0: 0x0000555555555149 main`main at main.cpp:7:10
frame #1: 0x00007ffff782a601 libc.so.6`__libc_start_call_main(main=(main`main at main.cpp:3), argc=1, argv=0x00007fffffffdd18) at libc_start_call_main.h:59:16
frame #2: 0x00007ffff782a718 libc.so.6`__libc_start_main_impl(main=(main`main at main.cpp:3), argc=1, argv=0x00007fffffffdd18, init=, fini=, rtld_fini=, stack_end=0x00007fffffffdd08) at libc-start.c:360:3
frame #3: 0x0000555555555065 main`_start + 37
(lldb) image list
[ 0] E60719B7-E823-92E0-945B-6F9F9B104833-9CE50390 0x0000555555554000 /tmp/test_corefile/main
[ 1] 638344DA-159C-23A4-7801-E93338592110-E027065B 0x00007ffff7fbe000 [vdso] (0x7ffff7fbe000)
[ 2] 3A7A8C6B-D922-E631-4EDB-7A710FDC0293-265C2C42 0x00007ffff7c00000 /usr/lib/x86_64-linux-gnu/libstdc++.so.6
[ 3] 638344DA-159C-23A4-7801-E93338592110-E027065B 0x00007ffff7fbe000 linux-vdso.so.1 (0x7ffff7fbe000)
[ 4] 897987C3-1789-F8A0-BE80-4DE7531E4BDB-523EDC21 0x00007ffff7ada000 /usr/lib/x86_64-linux-gnu/libm.so.6
/usr/lib/debug/.build-id/89/7987c31789f8a0be804de7531e4bdb523edc21.debug
[ 5] 5CE300F9-A055-85D5-7CB8-CC061081F58A-80DAA431 0x00007ffff7f6f000 /usr/lib/x86_64-linux-gnu/libgcc_s.so.1
[ 6] D4BFD49C-ED9D-6E19-BB77-F23BF6872B8D-270A9712 0x00007ffff7fc0000 /lib64/ld-linux-x86-64.so.2
/usr/lib/debug/.build-id/d4/bfd49ced9d6e19bb77f23bf6872b8d270a9712.debug
[ 7] 240C8909-736B-31F9-6334-6ACA80667FD0-0C551E32 0x00007ffff7800000 /usr/lib/x86_64-linux-gnu/libc.so.6
/usr/lib/debug/.build-id/24/0c8909736b31f963346aca80667fd00c551e32.debug
(lldb)
```
Contributor guide
Research direction
Start by reproducing the issue with lldb -c core.2358109 and inspect the target's image list after loading the core file. Trace the Linux core-file module loading path to determine why the VDSO is registered twice; done means image list reports a single VDSO entry for the shared UUID and existing LLDB tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux
- Domain
- devtools, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100