Received: from smtp2.axis.com (smtp2.axis.com [195.60.68.18]) by mx.groups.io with SMTP id smtpd.web12.116226.1597948072359411774 for ; Thu, 20 Aug 2020 11:27:53 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@axis.com header.s=axis-central1 header.b=FeRHZ9Dx; spf=pass (domain: axis.com, ip: 195.60.68.18, mailfrom: peter.kjellerstedt@axis.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; l=3747; q=dns/txt; s=axis-central1; t=1597948072; x=1629484072; h=from:to:subject:date:message-id: content-transfer-encoding:mime-version; bh=UQ8saDesL5MKXwm9eaZQgaiIyO/Av0UQlZqABp1kYY0=; b=FeRHZ9DxsE5GbTifFAqp4eij4BydE4w5PDB9v3aNzREWJ2nAjN7Fj14H GA4gjIF/RzPuZvRzLMa0kPn1m5YeJVw008Q3NITXhMdumqtBQuaUkWEkw Q0eXUuDmJ+4USpBLzdiLVKXRrk/IVdlmXZNq+6wggIGkAyPoAp4NdzTzF c8iU6yby4636G8BVLekctseVDSb1kiil3W47KCRE003XSQXPeDFEXaxyI lbzix8AvuSvGaex/SDtJ5XD80TWVh1ePbK3noGShy/dYLjDVsNxwmLZIC Hl0J1ZUs/w5D0JBbIraXR9Bo9S6rbaQRaSBO2yL+ub6kQVSAzVfMG89mf w==; IronPort-SDR: WvueL73EXzks12jHa8o1B5EyuiYxFoZbIC7Ct4acN4l/+QigUDYiaVMePWF1Wp3bf/kU/bYsMh oROorHM2ZLreycu3OtCouvTD7qhywscd6OTz+I6YxBDKKsp6uwG1+xKjmmleiAj8oRTYmAhnDP gLIejt4SM6VJOxu+chbBGR17fdRQUzIGPtt/fzeT0eudo18U/8/fPSwBNMlnUa+3cv0nJBQ8DL dd7bsVw2EkVXYBg7iYaX4AtVvJ+Bq0X6OAJtXTHKLxiU+DCotC9goSbf9T2A4K2TLff1bERgzc aCs= X-IronPort-AV: E=Sophos;i="5.76,334,1592863200"; d="scan'208";a="11696942" From: "Peter Kjellerstedt" To: Chris Laplante , "BitBake Development (bitbake-devel@lists.openembedded.org)" Subject: Problem with shell func backtracing and BB_VERBOSE_LOGS Thread-Topic: Problem with shell func backtracing and BB_VERBOSE_LOGS Thread-Index: AdZ3H5kzgzO3bGd5QKaII5Jeb0tgLw== Date: Thu, 20 Aug 2020 18:27:50 +0000 Message-ID: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.0.5.60] MIME-Version: 1.0 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable The recent changes to improve the logging for failing shell functions=20 Does not seem to work correctly when BB_VERBOSE_LOGS is enabled. The following is an example of a build failure with BB_VERBOSE_LOGS=20 enabled: | ninja: build stopped: subcommand failed. | ++ bb_bash_debug_handler | ++ local line=3D1 | ++ '[' 1 -eq 1 ']' | ++ return | + bb_bash_exit_handler 'ninja -v -j 16' | ++ bb_bash_debug_handler | ++ local line=3D14 | ++ '[' 14 -eq 1 ']' | ++ '[' bb_bash_exit_handler '!=3D' bb_bash_exit_handler ']' | ++ bb_bash_debug_handler | ++ local line=3D15 | ++ '[' 15 -eq 1 ']' | ++ '[' bb_bash_exit_handler '!=3D' bb_bash_exit_handler ']' | + ret=3D1 | ++ bb_bash_debug_handler | ++ local line=3D16 | ++ '[' 16 -eq 1 ']' | ++ '[' bb_bash_exit_handler '!=3D' bb_bash_exit_handler ']' | + trap '' DEBUG | + '[' 1 '!=3D' 0 ']' | + echo 'WARNING: /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: /tmp/work/cortexa9hf-neon-poky-linux-gnueabi//= 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, /tmp/work/cortexa9hf-neon-p= oky-linux-gnueabi//1.1.24-r0/temp/run.do_compile.5204, line 157' | #1: meson_do_compile, /tmp/work/cortexa9hf-neon-poky-linu= x-gnueabi//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, /tmp/work/cortexa9hf-neon-poky-li= nux-gnueabi//1.1.24-r0/temp/run.do_compile.5204, line 152' | #2: do_compile, /tmp/work/cortexa9hf-neon-poky-linux-gnue= abi//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, /tmp/work/cortexa9hf-neon-poky-linux-gn= ueabi//1.1.24-r0/temp/run.do_compile.5204, line 162' | #3: main, /tmp/work/cortexa9hf-neon-poky-linux-gnueabi//1.1.24-r0/temp/run.do_compile.5204, line 162 | + exit 1 | | Backtrace (metadata-relative locations): | #1: meson_do_compile, /meta/classes/meson.bbclass, line 18= 0 | #1: meson_do_compile, /meta/classes/meson.bbclass, line 18= 0 | #2: do_compile, autogenerated, line 2 | #2: do_compile, autogenerated, line 2 | #3: main, /meta/classes/meson.bbclass, line 185 And the following is the same build failure, but without BB_VERBOSE_LOGS: | ninja: build stopped: subcommand failed. | WARNING: /tmp/work/cortexa9hf-neon-poky-linux-gnueabi//= 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, /tmp/work/cortexa9hf-neon-poky-linu= x-gnueabi//1.1.24-r0/temp/run.do_compile.6232, line 157 | #2: do_compile, /tmp/work/cortexa9hf-neon-poky-linux-gnue= abi//1.1.24-r0/temp/run.do_compile.6232, line 152 | #3: main, /tmp/work/cortexa9hf-neon-poky-linux-gnueabi//1.1.24-r0/temp/run.do_compile.6232, line 161 | | Backtrace (metadata-relative locations): | #1: meson_do_compile, /meta/classes/meson.bbclass, line 18= 0 | #2: do_compile, autogenerated, line 2 As can be seen, the frames are reported twice when BB_VERBOSE_LOGS is=20 enabled. Also interesting is that the third frame is reported when=20 BB_VERBOSE_LOGS is enabled (though only once). //Peter