Howto solve pseudo abort issue? #bitbake #fakeroot #linux #raspberrypi #scarthgap
The problem:
Our yocto build system suddenly started failing on ‘do_package’ due to a pseudo abort issue. Even packages that have not been changed recently. The same happened on my local development system.
Searching in Yocto discussions or other sources did not provide a solution that works in our case. I tried the following solutions (NOTE: this package was not changed when the problem started):
1. bitbake -c cleanall miniflex-generate-salt && bitbake miniflex-generate-salt
2. bitbake -c cleansstate miniflex-generate-salt && bitbake miniflex-generate-salt
3. examine with bitbake -c devshell miniflex-generate-salt
4. set parallel jobs to '-j 1’ in conf/local.conf
5. remove build/tmp and rebuild entire distribution
The logfile suggests there is a path mismatch.
I have 2 questions basically:
1. What I do not understand is how this can happen, suddenly without a clear (at least for me) cause?
2. How to solve this situation?
---
Devshell output:
root@ubuntuyocto:~/Source/xxxxx/insight_test3/build-raspberrypi4-64/tmp/work/cortexa72-poky-linux/miniflex-generate-salt/1.0/git# ls ../ abort()ing pseudo client by server request. See https://wiki.yoctoproject.org/wiki/Pseudo_Abort for more details on this. Check logfile: /home/jpsaman/Source/xxxxx/insight_test3/build-raspberrypi4-64/tmp/work/cortexa72-poky-linux/miniflex-generate-salt/1.0/pseudo//pseudo.log Aborted (core dumped)
--
The pseudo.log logfile:
debug_logfile: fd 2
pid 20893 [parent 20892], doing new pid setup and server start
Setup complete, sending SIGUSR1 to pid 20892.
db cleanup for server shutdown, 07:51:05.094
memory-to-file backup complete, 07:51:05.094.
db cleanup finished, 07:51:05.094debug_logfile: fd 2
pid 21968 [parent 21967], doing new pid setup and server start
Setup complete, sending SIGUSR1 to pid 21967.
path mismatch [4 links]: ino 7341206 db '/home/jpsaman/Source/xxxxx/insight_test3/build-raspberrypi4-64/tmp/work/cortexa72-poky-linux/miniflex-generate-salt/1.0/image/usr/share/licenses/miniflex-generate-salt/xxxxx-LICENSE' req '/home/jpsaman/Source/xxxxx/insight_test3/build-raspberrypi4-64/tmp/work/cortexa72-poky-linux/miniflex-generate-salt/1.0/xxxxx-LICENSE'. path mismatch [4 links]: ino 7341206 db '/home/jpsaman/Source/xxxxx/insight_test3/build-raspberrypi4-64/tmp/work/cortexa72-poky-linux/miniflex-generate-salt/1.0/image/usr/share/licenses/miniflex-generate-salt/xxxxx-LICENSE' req '/home/jpsaman/Source/xxxxx/insight_test3/build-raspberrypi4-64/tmp/work/cortexa72-poky-linux/miniflex-generate-salt/1.0/xxxxx-LICENSE'.
--
The build output:
jpsaman@ubuntuyocto:~/Source/xxxxx/insight_test3/build-raspberrypi4-64$ bitbake miniflex-generate-salt Loading cache: 100% |###############################################################################################################################################################################| Time: 0:00:00 Loaded 5053 entries from dependency cache. NOTE: Resolving any missing task queue dependencies
Build Configuration:BB_VERSION = "2.8.0"BUILD_SYS = "aarch64-linux"
NATIVELSBSTRING = "universal"TARGET_SYS = "aarch64-poky-linux"
MACHINE = "raspberrypi4-64"
DISTRO = "sewer"DISTRO_VERSION = "5.0.4"TUNE_FEATURES = "aarch64 crc cortexa72"TARGET_FPU = ""
SDKMACHINE = "aarch64"QT_VERSION = "6.8.1"
meta
meta-poky = "HEAD:2034fc38eb4e63984d9bd6b260aa1bf95ce562e4" meta-raspberrypi = "HEAD:6df7e028a2b7b2d8cab0745dc0ed2eebc3742a17" meta-oe
meta-python
meta-networking
meta-initramfs
meta-multimedia
meta-filesystems = "HEAD:72018ca1b1a471226917e8246e8bbf9a374ccf97" meta-clang = "HEAD:2b7433611d80f6d0ee1b04156fa91fc73d3c2665" meta-boot2qt
meta-boot2qt-distro = "HEAD:c53557c18ecc60ad9688eac8d4e6ce59b9cc365b" meta-mingw = "HEAD:acbba477893ef87388effc4679b7f40ee49fc852" meta-qt6 = "HEAD:f4ef1331f0cc49bd4aa1e1aace6dc7f000b9651e" meta-rauc = "scarthgap:8f35e94b406ef9ec466a6125971b40f51ae139eb" meta-rauc-raspberrypi = "scarthgap:222c61275054974cdbd09bd5faa2b7a37ddbd840" meta-lts-mixins = "scarthgap/u-boot:a44882db02a0ed0f149371831bfbe067665eb42b" meta-webserver = "HEAD:72018ca1b1a471226917e8246e8bbf9a374ccf97" meta-xxxxx = "test/error:ce1954759448402f4ef5f004c678aa4b4daef92f"
Sstate summary: Wanted 36 Local 25 Mirrors 0 Missed 11 Current 782 (69% match, 98% complete)###################################################################################### | ETA: 0:00:00 Initialising tasks: 100% |##########################################################################################################################################################################| Time: 0:00:00
NOTE: Executing Tasks
ERROR: miniflex-generate-salt-1.0-r0 do_package: Error executing a python function in exec_func_python() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_func_python() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:perform_packagecopy(d)
0003:
File: '/home/jpsaman/Source/xxxxx/insight_test3/sources/poky/meta/classes-global/package.bbclass', lineno: 363, function: perform_packagecopy
0359: rpath_replace (dvar, d)
0360:}
0361:perform_packagecopy[cleandirs] = "${PKGD}"
0362:perform_packagecopy[dirs] = "${PKGD}"
*** 0363:
0364:python populate_packages () {
0365: oe.package.populate_packages(d)
0366:}
0367:populate_packages[dirs] = "${D}"
File: '/usr/lib/python3.10/subprocess.py', lineno: 421, function: check_output
0417: else:
0418: empty = b''
0419: kwargs['input'] = empty
0420:
*** 0421: return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
0422: **kwargs).stdout
0423:
0424:
0425:class CompletedProcess(object):
File: '/usr/lib/python3.10/subprocess.py', lineno: 526, function: run
0522: # We don't call process.wait() as .__exit__ does that for us.
0523: raise
0524: retcode = process.poll()
0525: if check and retcode:
*** 0526: raise CalledProcessError(retcode, process.args,
0527: output=stdout, stderr=stderr)
0528: return CompletedProcess(process.args, retcode, stdout, stderr)
0529:
0530:
Exception: subprocess.CalledProcessError: Command 'tar --exclude=./sysroot-only -cf - -C /home/jpsaman/Source/xxxxx/insight_test3/build-raspberrypi4-64/tmp/work/cortexa72-poky-linux/miniflex-generate-salt/1.0/image -p -S . | tar -xf - -C /home/jpsaman/Source/xxxxx/insight_test3/build-raspberrypi4-64/tmp/work/cortexa72-poky-linux/miniflex-generate-salt/1.0/package' returned non-zero exit status 2.
Subprocess output:
got *at() syscall for unknown directory, fd 4
unknown base path for fd 4, path bin
couldn't allocate absolute path for 'bin'.
tar: ./usr/bin: Cannot mkdir: Bad address
got *at() syscall for unknown directory, fd 4
unknown base path for fd 4, path bin
couldn't allocate absolute path for 'bin'.
got *at() syscall for unknown directory, fd 4
unknown base path for fd 4, path bin
couldn't allocate absolute path for 'bin'.
tar: ./usr/bin: Cannot mkdir: Bad address
tar: ./usr/bin/miniflex-generate-salt: Cannot open: No such file or directory
got *at() syscall for unknown directory, fd 4
unknown base path for fd 4, path share
couldn't allocate absolute path for 'share'.
tar: ./usr/share: Cannot mkdir: Bad address
got *at() syscall for unknown directory, fd 4
unknown base path for fd 4, path share
couldn't allocate absolute path for 'share'.
got *at() syscall for unknown directory, fd 4
unknown base path for fd 4, path share
couldn't allocate absolute path for 'share'.
tar: ./usr/share: Cannot mkdir: Bad address
tar: ./usr/share/licenses: Cannot mkdir: No such file or directory
got *at() syscall for unknown directory, fd 4
unknown base path for fd 4, path share
couldn't allocate absolute path for 'share'.
got *at() syscall for unknown directory, fd 4
unknown base path for fd 4, path share
couldn't allocate absolute path for 'share'.
tar: ./usr/share: Cannot mkdir: Bad address
tar: ./usr/share/licenses/miniflex-generate-salt: Cannot mkdir: No such file or directory got *at() syscall for unknown directory, fd 4
unknown base path for fd 4, path share
couldn't allocate absolute path for 'share'.
got *at() syscall for unknown directory, fd 4
unknown base path for fd 4, path share
couldn't allocate absolute path for 'share'.
tar: ./usr/share: Cannot mkdir: Bad address
tar: ./usr/share/licenses/miniflex-generate-salt/xxxxx-LICENSE: Cannot open: No such file or directory
tar: Exiting with failure status due to previous errors
ERROR: Logfile of failure stored in: /home/jpsaman/Source/xxxxx/insight_test3/build-raspberrypi4-64/tmp/work/cortexa72-poky-linux/miniflex-generate-salt/1.0/temp/log.do_package.21002
ERROR: Task (/home/jpsaman/Source/xxxxx/insight_test3/sources/meta-xxxxx/recipes-applications/miniflex-generate-salt/miniflex-generate-salt.bb:do_package) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1789 tasks of which 1775 didn't need to be rerun and 1 failed.
NOTE: Build completion summary:
NOTE: do_populate_sysroot: 0.0% sstate reuse(0 setscene, 1 scratch)
NOTE: do_deploy_source_date_epoch: 0.0% sstate reuse(0 setscene, 1 scratch)
NOTE: do_deploy_archives: 0.0% sstate reuse(0 setscene, 1 scratch)
NOTE: do_recipe_qa: 0.0% sstate reuse(0 setscene, 1 scratch)
NOTE: do_package: 0.0% sstate reuse(0 setscene, 1 scratch)
NOTE: do_populate_lic: 0.0% sstate reuse(0 setscene, 1 scratch)
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 1 seconds
Summary: 1 task failed:
/home/jpsaman/Source/xxxxx/insight_test3/sources/meta-xxxxx/recipes-applications/miniflex-generate-salt/miniflex-generate-salt.bb:do_package
Summary: There was 1 ERROR message, returning a non-zero exit code.
—
Kind regards,
Jean-Paul Saman
Quoted 20 lines · Jean-Paul Saman via lists.yoctoproject.org
The problem:
Our yocto build system suddenly started failing on ‘do_package’ due to a pseudo abort issue. Even packages that have not been changed recently. The same happened on my local development system.
Searching in Yocto discussions or other sources did not provide a solution that works in our case. I tried the following solutions (NOTE: this package was not changed when the problem started):
1. bitbake -c cleanall miniflex-generate-salt && bitbake miniflex-generate-salt
2. bitbake -c cleansstate miniflex-generate-salt && bitbake miniflex-generate-salt
3. examine with bitbake -c devshell miniflex-generate-salt
4. set parallel jobs to '-j 1’ inconf/local.conf
5. remove build/tmp and rebuild entire distributionThe logfile suggests there is a path mismatch.
I have 2 questions basically:
1. What I do not understand is how this can happen, suddenly without a clear (at least for me) cause?
2. How to solve this situation?---
[...]
Quoted 10 lines
tar:
./usr/share/licenses/miniflex-generate-salt: Cannot mkdir: No such file or directory got*at()syscall for unknown directory, fd 4
unknown base path for fd 4, path share
couldn't allocate absolute path for 'share'.
got*at()syscall for unknown directory, fd 4
unknown base path for fd 4, path share
couldn't allocate absolute path for 'share'.
tar: ./usr/share: Cannot mkdir: Bad address
tar:./usr/share/licenses/miniflex-generate-salt/xxxxx-LICENSE: Cannot open: No such file or directory
tar: Exiting with failure status due to previous errors
Hello,
That looks like https://bugzilla.yoctoproject.org/show_bug.cgi?id=16143
I think you just need to upgrade OE-core/poky on a more recent scarthgap. Specifically, you want pseudo >= 1.9.4.
For the explanation, Ubuntu based-distro recently got a tar upgrade that add a new syscall that pseudo needs to handle. Some user worked around that by changing their host tar version.
Does that helps?
Quoted 21 lines
ERROR: Logfile of failure stored in:
/home/jpsaman/Source/xxxxx/insight_test3/build-raspberrypi4-64/tmp/work/cortexa72-poky-linux/miniflex-generate-salt/1.0/temp/log.do_package.21002
ERROR: Task (/home/jpsaman/Source/xxxxx/insight_test3/sources/meta-xxxxx/recipes-applications/miniflex-generate-salt/miniflex-generate-salt.bb:do_package) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1789 tasks of which 1775 didn't need to be rerun and 1 failed.
NOTE: Build completion summary:
NOTE: do_populate_sysroot: 0.0% sstatereuse(0 setscene, 1 scratch)
NOTE: do_deploy_source_date_epoch: 0.0% sstatereuse(0 setscene, 1 scratch)
NOTE: do_deploy_archives: 0.0% sstatereuse(0 setscene, 1 scratch)
NOTE: do_recipe_qa: 0.0% sstatereuse(0 setscene, 1 scratch)
NOTE: do_package: 0.0% sstatereuse(0 setscene, 1 scratch)
NOTE: do_populate_lic: 0.0% sstatereuse(0 setscene, 1 scratch)
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 1 secondsSummary: 1 task failed:
/home/jpsaman/Source/xxxxx/insight_test3/sources/meta-xxxxx/recipes-applications/miniflex-generate-salt/miniflex-generate-salt.bb:do_package
Summary: There was 1 ERROR message, returning a non-zero exit code.—
Kind regards,
Jean-Paul Saman
Signature · 2 lines
Yoann Congal Smile ECS
Quoted 39 lines · Yoann Congal
Quoted 20 lines · Jean-Paul Saman via lists.yoctoproject.org
The problem:
Our yocto build system suddenly started failing on ‘do_package’ due to a pseudo abort issue. Even packages that have not been changed recently. The same happened on my local development system.
Searching in Yocto discussions or other sources did not provide a solution that works in our case. I tried the following solutions (NOTE: this package was not changed when the problem started):
1. bitbake -c cleanall miniflex-generate-salt && bitbake miniflex-generate-salt
2. bitbake -c cleansstate miniflex-generate-salt && bitbake miniflex-generate-salt
3. examine with bitbake -c devshell miniflex-generate-salt
4. set parallel jobs to '-j 1’ inconf/local.conf
5. remove build/tmp and rebuild entire distributionThe logfile suggests there is a path mismatch.
I have 2 questions basically:
1. What I do not understand is how this can happen, suddenly without a clear (at least for me) cause?
2. How to solve this situation?---
[...]
Quoted 10 lines
tar:
./usr/share/licenses/miniflex-generate-salt: Cannot mkdir: No such file or directory got*at()syscall for unknown directory, fd 4
unknown base path for fd 4, path share
couldn't allocate absolute path for 'share'.
got*at()syscall for unknown directory, fd 4
unknown base path for fd 4, path share
couldn't allocate absolute path for 'share'.
tar: ./usr/share: Cannot mkdir: Bad address
tar:./usr/share/licenses/miniflex-generate-salt/xxxxx-LICENSE: Cannot open: No such file or directory
tar: Exiting with failure status due to previous errorsHello,
That looks like https://bugzilla.yoctoproject.org/show_bug.cgi?id=16143
I think you just need to upgrade OE-core/poky on a more recent scarthgap. Specifically, you want pseudo >= 1.9.4.
Quoted 5 lines
For the explanation, Ubuntu based-distro recently got a tar upgrade that add a new syscall that pseudo needs to handle. Some user worked around that by changing their host tar version.
Does that helps?
Yes, it helps. Thanks for the swift reply.
I downgraded tar to the version (1.34+dsfg-1build3) of the official release image and Yocto builds our image correctly now. Next version I'll upgrade scarthgap to a more recent version, but for now the quick fix is preferred.
Signature · 3 lines
Kind greetings,
Jean-Paul SamanRe: [yocto] Howto solve pseudo abort issue? #raspberrypi #scarthgap #bitbake #fakeroot #linux
In reply to Jean-Paul SamanYes, me too observing this issue since morning on the Kirkstone release. Seems to be some CVE fixes in tar breaks the pseudo package