Bug 13123 - package.PackageTests.test_gdb_hardlink_debug failed
Summary: package.PackageTests.test_gdb_hardlink_debug failed
Status: RESOLVED WORKSFORME
Alias: None
Product: Functional (self) Testing
Classification: QA/Testing
Component: oe-selftest (show other bugs)
Version: 2.7
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 4.2 M1
Assignee: Randy MacLeod
QA Contact:
URL:
Whiteboard: AB-INT
: 13676 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-01-07 02:07 UTC by Chen Qi
Modified: 2022-10-27 15:05 UTC (History)
8 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chen Qi 2019-01-07 02:07:31 UTC
'oe-selftest -r package.PackageTests.test_gdb_hardlink_debug' fails. 
Below is some output from oe-selftest.
[snip]
2018-12-26 09:27:58,440 - oe-selftest - INFO - test_gdb_hardlink_debug (package.PackageTests)
2018-12-26 09:37:55,333 - oe-selftest - INFO - gdbtest /usr/bin/hello1
2018-12-26 09:37:59,904 - oe-selftest - ERROR - GDB result:
1: Reading symbols from /usr/bin/hello1...Reading symbols from /usr/bin/.debug/hello4...done.
done.
(gdb) Breakpoint 1 at 0x1060: file /usr/include/bits/stdio2.h, line 107.
(gdb) Starting program: /usr/bin/hello1

Breakpoint 1, main () at /usr/include/bits/stdio2.h:107
107    /usr/include/bits/stdio2.h: No such file or directory.
(gdb) Continuing.
Hello World!
[Inferior 1 (process 312) exited normally]
(gdb)
2018-12-26 09:38:00,907 - oe-selftest - INFO -  ... FAIL
[snip]

The hello world problem is as follows.
$ cat meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink/hello.c
#include <stdio.h>

int main() {
    printf("Hello World!\n");
} 


Two ways to reproduce the problem:

I) reproduce it via oe-selftest
1) . oe-init-build-env build-selftest
2) SANITY_TESTED_DISTROS = ""
3) oe-selftest -r package.PackageTests.test_gdb_hardlink_debug

II) reproduce it manually
1) add meta-selftest to bblayers.conf
2) IMAGE_INSTALL_append = " selftest-hardlink selftest-hardlink-dbg selftest-hardlink-gdb"
3) bitbake core-image-minimal
4) On target:
     gdb /usr/bin/hello1
     (gdb) b main
Comment 1 Richard Purdie 2019-01-10 15:43:34 UTC
Add glibc-dev to the IMAGE_INSTALL?
Comment 2 Chen Qi 2019-01-11 01:46:36 UTC
(In reply to comment #1)
> Add glibc-dev to the IMAGE_INSTALL?

I tried this, but it did not work.

On qemux86:
1: Reading symbols from /usr/bin/hello1...Reading symbols from /usr/bin/.debug/hello4...done.
done.
(gdb) Breakpoint 1 at 0x1060: file /usr/include/bits/stdio2.h, line 107.
(gdb) Starting program: /usr/bin/hello1

Breakpoint 1, main () at /usr/include/bits/stdio2.h:107
107      return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
(gdb) Continuing.
Hello World!
[Inferior 1 (process 309) exited normally]
(gdb)
2018-12-29 10:58:11,538 - oe-selftest - INFO -  ... FAIL

For qemux86-64, things are the same.

Best Regards,
Chen Qi
Comment 3 Castro B 2019-06-21 06:56:43 UTC
Hi Chen Qi i also have the same issue
may i know if you have now the solution? Thanks!

Castro B,
Comment 4 Chen Qi 2019-06-21 07:05:05 UTC
(In reply to comment #3)
> Hi Chen Qi i also have the same issue
> may i know if you have now the solution? Thanks!
> 
> Castro B,
> 

Unfortunately no. No progress has been made on this issue.
Comment 5 Randy MacLeod 2020-08-27 10:28:16 UTC
*** Bug 13676 has been marked as a duplicate of this bug. ***
Comment 6 Steve Sakoman 2020-09-18 07:20:49 UTC
Another occurrence (oe-selftest-ubuntu, ubuntu1804-ty-2)

https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/1388
Comment 7 Richard Purdie 2020-09-18 07:23:52 UTC
And another: https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/1390/steps/8/logs/step2d (master-next, oe-selftest-ubuntu, ubuntu1804-ty-1
Comment 8 Richard Purdie 2020-09-18 11:05:00 UTC
Both recent failures were run_serial timing out (with a 60s timeout). Maybe we need to give these more time as they're perhaps conflicting with other boot process startup?
Comment 9 Richard Purdie 2020-10-19 06:03:56 UTC
2020-10-17 14:55:48,626 - oe-selftest - INFO - gdbtest /usr/bin/hello1
2020-10-17 14:56:48,684 - oe-selftest - ERROR - GDB result:
0: Reading symbols from /usr/bin/hello1...
Reading symbols from /usr/bin/.debug/hello1...
(gdb) Breakpoint 1 at 0x1050: file /usr/include/bits/stdio2.h, line 110.
(gdb) Starting program: /usr/bin/hello1 
<<< run_serial(): command timed out after 60 seconds without output >>>
2020-10-17 14:56:49,743 - oe-selftest - INFO - package.PackageTests.test_gdb_hardlink_debug (subunit.RemotedTestCase)
2020-10-17 14:56:49,744 - oe-selftest - INFO -  ... FAIL
2020-10-17 14:56:49,744 - oe-selftest - INFO - 6: 6/12 217/416 (377.96s) (package.PackageTests.test_gdb_hardlink_debug)
2020-10-17 14:56:49,744 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/meta/lib/oeqa/selftest/cases/package.py", line 150, in test_gdb_hardlink_debug
    self.fail('GDB %s failed' % binary)
  File "/usr/lib/python3.6/unittest/case.py", line 670, in fail
    raise self.failureException(msg)
AssertionError: GDB /usr/bin/hello1 failed

from https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/1475 on ubuntu1804-ty-3
Comment 10 Richard Purdie 2020-10-21 03:36:21 UTC
Another case from dunfell: https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/1483/steps/8/logs/step2d
Comment 11 Steve Sakoman 2020-11-20 14:36:27 UTC
Another case from dunfell (oe-selftest-ubuntu, ubuntu1804-ty-3)

https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/1584/steps/9/logs/step2d
Comment 13 Randy MacLeod 2021-03-25 01:15:38 UTC
I wonder if I have out-waited this bug or if people have just stopped reporting on it.
Comment 14 Randy MacLeod 2021-05-13 15:03:51 UTC
Not seen in ages, reopen if new data.
Comment 15 Alexandre Belloni 2021-06-16 01:12:25 UTC
https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/2159/steps/14/logs/stdio

  File "/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/meta/lib/oeqa/selftest/cases/package.py", line 150, in test_gdb_hardlink_debug
    self.fail('GDB %s failed' % binary)
  File "/usr/lib/python3.6/unittest/case.py", line 670, in fail
    raise self.failureException(msg)
AssertionError: GDB /usr/bin/hello1 failed


2021-05-22 12:58:37,814 - oe-selftest - INFO - gdbtest /usr/bin/hello1
2021-05-22 12:59:37,871 - oe-selftest - ERROR - GDB result:
0: <<< run_serial(): command timed out after 60 seconds without output >>>

The timeout is still an issue :(

oe-selftest-ubuntu
ubuntu1804-ty-1
Comment 16 Richard Purdie 2021-07-08 12:54:46 UTC
https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/2298
looks like a related failure.

I did check and found nothing unusual in any logs I could find.
Comment 17 Richard Purdie 2021-09-19 18:59:11 UTC
FWIW this selftest always fails with the error in the original report if MACHINE=qeuarm64. That may not be the cause of the autobuilder failures but does explain some of the issues.
Comment 18 Alexandre Belloni 2021-09-23 14:42:20 UTC
https://autobuilder.yoctoproject.org/typhoon/#/builders/79/builds/2546/steps/14/logs/stdio
oe-selftest-centos centos8-ty-1
Comment 21 Steve Sakoman 2022-02-26 16:00:48 UTC
After quite some time not seeing this on dunfell, it happened once again:

https://autobuilder.yoctoproject.org/typhoon/#/builders/80/builds/3181/steps/14/logs/stdio

oe-selftest-debian debian9-ty-2
Comment 22 Richard Purdie 2022-03-10 10:00:56 UTC
ubuntu1804-ty-3 master-next (non-SSD)

https://autobuilder.yoctoproject.org/typhoon/#builders/87/builds/3247/steps/14/logs/stdio
Comment 23 Randy MacLeod 2022-10-27 15:05:53 UTC
Closing since it happens so rarely. If it happens again, please re-open.