Problem with shell func backtracing and BB_VERBOSE_LOGS
A message that is not in the archive (sent off-list or not yet received): [email protected]
Bah, just ignore this. I just noticed that you have already sent a patch to fix this. :)
//Peter
Quoted 101 lines
-----Original Message-----
From: [email protected] <bitbake- [email protected]> On Behalf Of Peter Kjellerstedt
Sent: den 20 augusti 2020 20:28
To: Chris Laplante <[email protected]>; BitBake Development ([email protected]) <bitbake- [email protected]>
Subject: [bitbake-devel] Problem with shell func backtracing andBB_VERBOSE_LOGSThe recent changes to improve the logging for failing shell functions Does not seem to work correctly when
BB_VERBOSE_LOGSis enabled.The following is an example of a build failure with
BB_VERBOSE_LOGSenabled:| ninja: build stopped: subcommand failed. | ++ bb_bash_debug_handler | ++ local line=1 | ++ '[' 1 -eq 1 ']' | ++ return | + bb_bash_exit_handler 'ninja -v -j 16' | ++ bb_bash_debug_handler | ++ local line=14 | ++ '[' 14 -eq 1 ']' | ++ '[' bb_bash_exit_handler '!=' bb_bash_exit_handler ']' | ++ bb_bash_debug_handler | ++ local line=15 | ++ '[' 15 -eq 1 ']' | ++ '[' bb_bash_exit_handler '!=' bb_bash_exit_handler ']' | + ret=1 | ++ bb_bash_debug_handler | ++ local line=16 | ++ '[' 16 -eq 1 ']' | ++ '[' bb_bash_exit_handler '!=' bb_bash_exit_handler ']' | + trap '' DEBUG | + '[' 1 '!=' 0 ']' | + echo 'WARNING: <builddir>/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/<recipe>/1.1.24-r0/temp/run.do_compile.5204:157 exit 1 from '\''ninja -v -j 16'\'''
| WARNING: <builddir>/tmp/work/cortexa9hf-neon-poky-linux- gnueabi/<recipe>/1.1.24-r0/temp/run.do_compile.5204:157 exit 1 from 'ninja -v -j 16'| + echo 'WARNING: Backtrace (BB generated script): ' | WARNING: Backtrace (BB generated script): | ++ seq 1 3 | + for i in $(seq 1 $((${#FUNCNAME[@]} - 1))) | + '[' 1 -eq 1 ']' | + echo -e ' #1: meson_do_compile, <builddir>/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/<recipe>/1.1.24-r0/temp/run.do_compile.5204, line 157'
| #1:meson_do_compile, <builddir>/tmp/work/cortexa9hf-neon-poky-
linux-gnueabi/<recipe>/1.1.24-r0/temp/run.do_compile.5204, line 157| + for i in $(seq 1 $((${#FUNCNAME[@]} - 1))) | + '[' 2 -eq 1 ']' | + echo -e ' #2: do_compile, <builddir>/tmp/work/cortexa9hf-neon-poky- linux-gnueabi/<recipe>/1.1.24-r0/temp/run.do_compile.5204, line 152' | #2: do_compile, <builddir>/tmp/work/cortexa9hf-neon-poky-linux- gnueabi/<recipe>/1.1.24-r0/temp/run.do_compile.5204, line 152 | + for i in $(seq 1 $((${#FUNCNAME[@]} - 1))) | + '[' 3 -eq 1 ']' | + echo -e ' #3: main, <builddir>/tmp/work/cortexa9hf-neon-poky-linux- gnueabi/<recipe>/1.1.24-r0/temp/run.do_compile.5204, line 162' | #3: main, <builddir>/tmp/work/cortexa9hf-neon-poky-linux- gnueabi/<recipe>/1.1.24-r0/temp/run.do_compile.5204, line 162 | + exit 1 | | Backtrace (metadata-relative locations): | #1: meson_do_compile, <workdir>/meta/classes/meson.bbclass, line 180 | #1: meson_do_compile, <workdir>/meta/classes/meson.bbclass, line 180 | #2: do_compile, autogenerated, line 2 | #2: do_compile, autogenerated, line 2 | #3: main, <workdir>/meta/classes/meson.bbclass, line 185And the following is the same build failure, but without
BB_VERBOSE_LOGS:| ninja: build stopped: subcommand failed.
| WARNING: <builddir>/tmp/work/cortexa9hf-neon-poky-linux- gnueabi/<recipe>/1.1.24-r0/temp/run.do_compile.6232:157 exit 1 from 'ninja -v -j 16'
| WARNING: Backtrace (BB generated script):
| #1:meson_do_compile, <builddir>/tmp/work/cortexa9hf-neon-poky-
linux-gnueabi/<recipe>/1.1.24-r0/temp/run.do_compile.6232, line 157
| #2:do_compile, <builddir>/tmp/work/cortexa9hf-neon-poky-linux-
gnueabi/<recipe>/1.1.24-r0/temp/run.do_compile.6232, line 152
| #3: main, <builddir>/tmp/work/cortexa9hf-neon-poky-linux-
gnueabi/<recipe>/1.1.24-r0/temp/run.do_compile.6232, line 161| | Backtrace (metadata-relative locations): | #1: meson_do_compile, <workdir>/meta/classes/meson.bbclass, line180
| #2:do_compile, autogenerated, line 2As can be seen, the frames are reported twice when
BB_VERBOSE_LOGSis enabled. Also interesting is that the third frame is reported whenBB_VERBOSE_LOGSis enabled (though only once).//Peter
Quoted 4 lines
Bah, just ignore this. I just noticed that you have already sent a patch to fix this. :)
//Peter
Quoted 4 lines
Quoted 4 lines
Bah, just ignore this. I just noticed that you have already sent a patch to fix this. :)
//Peter
[Damn, accidentally hit Ctrl + Enter in Outlook]
No problem :) please let me know if it is still not working after you give the patch a try.
Thanks,
Chris