Hi Ying,

On Wed, Jul 10, 2024 at 4:33 AM Ying Huang <ying.hu...@oss.cipunited.com> wrote:
>
> Hi,
>
> I did test on mips64el and x86_64, the test results all were failed as 
> follows:
>
> 1. x86-64:
>
> $ uname -a
> Linux swecovm-s01 6.1.0-17-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.69-1 
> (2023-12-30) x86_64 GNU/Linux
>
> $ cat tests/run-sysroot.sh.log
> ++ mktemp -d
> + tmpdir=/tmp/tmp.8ZyeM4XiUP
> + trap 'rm -rf -- /tmp/tmp.8ZyeM4XiUP' EXIT
> + tar xjf /swecoproj/huangying/elfutils/tests/testfile-sysroot.tar.bz2 -C 
> /tmp/tmp.8ZyeM4XiUP
> + testrun /swecoproj/huangying/elfutils/src/stack --core 
> /tmp/tmp.8ZyeM4XiUP/core.bash --sysroot /tmp/tmp.8ZyeM4XiUP/sysroot
> + built_testrun /swecoproj/huangying/elfutils/src/stack --core 
> /tmp/tmp.8ZyeM4XiUP/core.bash --sysroot /tmp/tmp.8ZyeM4XiUP/sysroot
> + 
> LD_LIBRARY_PATH=/swecoproj/huangying/elfutils/libdw:/swecoproj/huangying/elfutils/backends:/swecoproj/huangying/elfutils/libelf:/swecoproj/huangying/elfutils/libasm:/swecoproj/huangying/elfutils/debuginfod:/swecoproj/huangying/elfutils/libdw:/swecoproj/huangying/elfutils/libelf:
> + /swecoproj/huangying/elfutils/src/stack --core 
> /tmp/tmp.8ZyeM4XiUP/core.bash --sysroot /tmp/tmp.8ZyeM4XiUP/sysroot
> + testrun diff /tmp/tmp.8ZyeM4XiUP/stack.out -
> + built_testrun diff /tmp/tmp.8ZyeM4XiUP/stack.out -
> + 
> LD_LIBRARY_PATH=/swecoproj/huangying/elfutils/libdw:/swecoproj/huangying/elfutils/backends:/swecoproj/huangying/elfutils/libelf:/swecoproj/huangying/elfutils/libasm:/swecoproj/huangying/elfutils/debuginfod:/swecoproj/huangying/elfutils/libdw:/swecoproj/huangying/elfutils/libelf:
> + diff /tmp/tmp.8ZyeM4XiUP/stack.out -
> 4,5c4,5
> < #1  0x0000aaaae5663f20
> < #2  0x0000aaaae5667a98
> ---
> > #1  0x0000aaaae5663f20 kill_shell
> > #2  0x0000aaaae5667a98 termsig_handler.part.0
> + rm -rf -- /tmp/tmp.8ZyeM4XiUP
> FAIL run-sysroot.sh (exit status: 1)
>
>
> 2.mips64el:
>
> $ uname -a
> Linux Sleepygon 6.1.0-18-loongson-3 #1 SMP PREEMPT Debian 6.1.76-1 
> (2024-02-01) mips64 GNU/Linux
>
> $ cat tests/run-sysroot.sh.log
> ++ mktemp -d
> + tmpdir=/tmp/tmp.bCCbATKu43
> + trap 'rm -rf -- /tmp/tmp.bCCbATKu43' EXIT
> + tar xjf /home/huangying/elf/elfutils_main/tests/testfile-sysroot.tar.bz2 -C 
> /tmp/tmp.bCCbATKu43
> + testrun /home/huangying/elf/elfutils_main/src/stack --core 
> /tmp/tmp.bCCbATKu43/core.bash --sysroot /tmp/tmp.bCCbATKu43/sysroot
> + built_testrun /home/huangying/elf/elfutils_main/src/stack --core 
> /tmp/tmp.bCCbATKu43/core.bash --sysroot /tmp/tmp.bCCbATKu43/sysroot
> + 
> LD_LIBRARY_PATH=/home/huangying/elf/elfutils_main/libdw:/home/huangying/elf/elfutils_main/backends:/home/huangying/elf/elfutils_main/libelf:/home/huangying/elf/elfutils_main/libasm:/home/huangying/elf/elfutils_main/debuginfod
> + /home/huangying/elf/elfutils_main/src/stack --core 
> /tmp/tmp.bCCbATKu43/core.bash --sysroot /tmp/tmp.bCCbATKu43/sysroot
> + testrun diff /tmp/tmp.bCCbATKu43/stack.out -
> + built_testrun diff /tmp/tmp.bCCbATKu43/stack.out -
> + 
> LD_LIBRARY_PATH=/home/huangying/elf/elfutils_main/libdw:/home/huangying/elf/elfutils_main/backends:/home/huangying/elf/elfutils_main/libelf:/home/huangying/elf/elfutils_main/libasm:/home/huangying/elf/elfutils_main/debuginfod
> + diff /tmp/tmp.bCCbATKu43/stack.out -
> 4,5c4,5
> < #1  0x0000aaaae5663f20
> < #2  0x0000aaaae5667a98
> ---
> > #1  0x0000aaaae5663f20 kill_shell
> > #2  0x0000aaaae5667a98 termsig_handler.part.0
> + rm -rf -- /tmp/tmp.bCCbATKu43
> FAIL run-sysroot.sh (exit status: 1)
>
>
> There are two lines where the function name cannot be parsed.

I took a look at this but I'm still not sure what's going on.  I ran
the run-sysroot.sh testcase by hand on the extracted contents of
testfile-sysroot.tar.bz2.  eu-stack's /proc/PID/fd contained the
correct binaries located under the sysroot.  The testcase passes
on my Fedora 40 x86_64 machine as well as on all elfutils buildbots.

It's also strange that those two particular stack frames from
/bin/bash are missing the function name yet the other /bin/bash
frames include proper function names.

I'll look into this some more.

Aaron

Reply via email to