Hi,
I encountered an unusual issue when trying to compile BSP41. Bitbake is throwing 'permission denied' errors during every do_fetch process. It was working fine before the holiday, but now the issue occurs in both existing and newly created folders. It seems that a system change may have caused this issue. I've attached a screenshot below. Has anyone encountered a similar problem before?
NOTE: Fetching uninative binary shim http://downloads.yoctoproject.org/releases/uninative/4.3/x86_64-nativesdk-libc-4.3.tar.xz;sha256sum=1c35f09a75c4096749bbe1e009df4e3968cde151424062cf4aa3ed89db22b030 (will check PREMIRRORS first)
Initialising tasks: 100% |#########################################################################################################################################################################################################################################| Time: 0:00:01
Sstate summary: Wanted 1090 Local 0 Mirrors 0 Missed 1090 Current 0 (0% match, 0% complete)
NOTE: Executing Tasks
ERROR: gettext-minimal-native-0.21-r0 do_fetch: Execution of event handler 'defaultrun_buildstats' failed
Traceback (most recent call last):
File "/home/xd/workspace/fsl-auto-yocto-bsp/sources/poky/meta/classes/buildstats.bbclass", line 240, in defaultrun_buildstats(e=):
elif isinstance(e, bb.build.TaskSucceeded):
> write_task_data("passed", os.path.join(taskdir, e.task), e, d)
if e.task == "do_rootfs":
File "/home/xd/workspace/fsl-auto-yocto-bsp/sources/poky/meta/classes/buildstats.bbclass", line 88, in write_task_data(status='passed', logfile='/home/xd/workspace/fsl-auto-yocto-bsp/build_s32g399ardb3/tmp/buildstats/20250102212637/gettext-minimal-native-0.21-r0/do_fetch', e=, d=):
f.write(d.expand("Elapsed time: %0.2f seconds\n" % elapsedtime))
> cpu, iostats, resources, childres = get_process_cputime(os.getpid())
if cpu:
File "/home/xd/workspace/fsl-auto-yocto-bsp/sources/poky/meta/classes/buildstats.bbclass", line 29, in get_process_cputime(pid=19814):
if os.path.isfile("/proc/%d/io" % pid):
> with open("/proc/%d/io" % pid, "r") as f:
while True:
PermissionError: [Errno 13] Permission denied: '/proc/19814/io'
ERROR: gettext-minimal-native-0.21-r0 do_fetch: Build of do_fetch failed
ERROR: gettext-minimal-native-0.21-r0 do_fetch: Traceback (most recent call last):
File "/home/xd/workspace/fsl-auto-yocto-bsp/sources/poky/bitbake/lib/bb/build.py", line 763, in exec_task
return _exec_task(fn, task, d, quieterr)
File "/home/xd/workspace/fsl-auto-yocto-bsp/sources/poky/bitbake/lib/bb/build.py", line 737, in _exec_task
event.fire(TaskSucceeded(task, fn, logfn, localdata), localdata)
File "/home/xd/workspace/fsl-auto-yocto-bsp/sources/poky/bitbake/lib/bb/event.py", line 222, in fire
fire_class_handlers(event, d)
File "/home/xd/workspace/fsl-auto-yocto-bsp/sources/poky/bitbake/lib/bb/event.py", line 123, in fire_class_handlers
execute_handler(name, handler, event, d)
File "/home/xd/workspace/fsl-auto-yocto-bsp/sources/poky/bitbake/lib/bb/event.py", line 93, in execute_handler
ret = handler(event)
File "/home/xd/workspace/fsl-auto-yocto-bsp/sources/poky/meta/classes/buildstats.bbclass", line 240, in defaultrun_buildstats
write_task_data("passed", os.path.join(taskdir, e.task), e, d)
File "/home/xd/workspace/fsl-auto-yocto-bsp/sources/poky/meta/classes/buildstats.bbclass", line 88, in write_task_data
cpu, iostats, resources, childres = get_process_cputime(os.getpid())
File "/home/xd/workspace/fsl-auto-yocto-bsp/sources/poky/meta/classes/buildstats.bbclass", line 29, in get_process_cputime
with open("/proc/%d/io" % pid, "r") as f:
PermissionError: [Errno 13] Permission denied: '/proc/19814/io'
ERROR: Task (/home/xd/workspace/fsl-auto-yocto-bsp/sources/poky/meta/recipes-core/gettext/gettext-minimal-native_0.21.bb:do_fetch) failed with exit code '1'
ERROR: texinfo-dummy-native-1.0-r0 do_fetch: Execution of event handler 'defaultrun_buildstats' failed Thanks,
XD
Hi @GuilhermeS32G3 ,
Thank you for helping me again!
Yes, this workaround worked well. I haven’t updated my OS and am still using Ubuntu 20.04. However, I might have updated GCC or made another change—I’m not entirely sure. Based on the discussion you shared and the dmesg output, it seems the issue was caused by AppArmor.
Everything is back to normal now. Thank you once again for your assistance!
Thanks
XD
Hi @chenyin_h ,
Thank you for looking into this issue.
I believe this is the process initiated by Yocto to download and compile. The process should terminate once this task is completed.
Thanks,
XD
Hello @XD ,
Has your Linux operational system been updated recently?
Please take a look at this post:
https://community.nxp.com/t5/S32G/S32G399ARDB3-Yocto-Bitbake-error/m-p/1980432
Maybe it is the same issue.
Best regards,
Guilherme
Hello, @XD
Thanks for your post.
Sorry that I did not meet such issue before, from the log,
PermissionError: [Errno 13] Permission denied: '/proc/19814/io'
What is the process 19814 for? May I know if you have tried clean the yocto build and try again?(bitbake fsl-image-base -c cleanall && bitbake fsl-image-base)
BR
Chenyin
And this is the error on the existing folder
Sstate summary: Wanted 3 Local 0 Mirrors 0 Missed 3 Current 1161 (0% match, 99% complete)
NOTE: Executing Tasks
ERROR: Traceback (most recent call last):
File "/home/xd/workspace/fsl-auto-yocto-bsp41/sources/poky/bitbake/bin/bitbake-worker", line 268, in child
bb.utils.disable_network(uid, gid)
File "/home/xd/workspace/fsl-auto-yocto-bsp41/sources/poky/bitbake/lib/bb/utils.py", line 1653, in disable_network
with open("/proc/self/uid_map", "w") as f:
PermissionError: [Errno 13] Permission denied: '/proc/self/uid_map'
ERROR: Task (/home/xd/workspace/fsl-auto-yocto-bsp41/sources/meta-alb/recipes-fsl/images/fsl-image-base.bb:do_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2937 tasks of which 2936 didn't need to be rerun and 1 failed.Thanks,
XD