From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7097264153945964544 X-Received: by 2002:a7b:c4d2:0:b0:397:6403:702c with SMTP id g18-20020a7bc4d2000000b003976403702cmr1818483wmk.58.1653410207235; Tue, 24 May 2022 09:36:47 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:adf:f346:0:b0:20e:7267:9ee4 with SMTP id e6-20020adff346000000b0020e72679ee4ls17701699wrp.2.gmail; Tue, 24 May 2022 09:36:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5DtD6lcZcdHbrjGaAXMy72vMvbyyneo40VUTvDbURFZ/O/0BlkhF5gq8onGF3BN3UB0Ny X-Received: by 2002:a5d:6102:0:b0:20e:5d64:5dc8 with SMTP id v2-20020a5d6102000000b0020e5d645dc8mr24082670wrt.326.1653410206019; Tue, 24 May 2022 09:36:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1653410206; cv=pass; d=google.com; s=arc-20160816; b=M9fchdoDe+BLAfoAPhMPFGFOSx6MZFdHDpdshEArlTZkwkJuSVqz5E9XnYmx0GWxhx Cx8EhZ+4vBYx5bq9YhB1rcLIkAPl9kIQR367kjHWa45ML5mzPju2OxE62fMUx8KlPj4l oW80SOJEW4pOcetwbOKBGu6XF/z/YwfWk53vxJR6p17GlX+5A3Efb1WcjaxCDF4kWoGd gkqI2oSx3JuoHtlpMTSm/AXa1nYBkwBwS9D7eAJpR9g5G1OHecUoFbOXliE3FOXdW7PF UotWwlKa58r8k/9Tlbhmcec7lL2At5VlYrS4JZLx1o3gbvN1DIsjFfsuJTu73u/9yzzM 1zog== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :dkim-signature; bh=/I1MZB35B62Ds5295cewg/CT6QWBlP3T3BOYTKfWsM0=; b=niV+Z3+OA7rq2czU0H1+LkQ0dMunMIo7ALqVYEJ6YQ1GV4rOCf4HT3KjmEWKg9x95V a9uEAH8Rn46Yv/y7F7Qbz00sJznBmkhDltRjP2eUP940GNj4Xwr84gufunyQnOuDTJbV YYTUod+hxpX3hk6ZOYI0Q+aNaqClRz4SATOz7svevI6ncapqrcqVrfazFhiqXmIAg+sG xffNelaL5LiXlRP0X4WQCikKRyYFOWU4JVtPx+5x6oJuLOsrxV3tmKgAbKd5UXnSp4zP 7BzIjepq9xkeI6jz6+8oKr1dLTm3mcW3I/brsLJVyqKm6b81ip1cD6Z349zyTSHcd4G0 ygXw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=o19uaOTr; arc=pass (i=1 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of jan.kiszka@siemens.com designates 2a01:111:f400:fe06::61f as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-ve1eur02on061f.outbound.protection.outlook.com. [2a01:111:f400:fe06::61f]) by gmr-mx.google.com with ESMTPS id a7-20020adffb87000000b0020ee4f02214si456wrr.1.2022.05.24.09.36.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 May 2022 09:36:45 -0700 (PDT) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 2a01:111:f400:fe06::61f as permitted sender) client-ip=2a01:111:f400:fe06::61f; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=o19uaOTr; arc=pass (i=1 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of jan.kiszka@siemens.com designates 2a01:111:f400:fe06::61f as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fLWIdMMHvhvuujo9MH9A+BgNGnpxQPY4IeXDNSGXj2kMT4l5taK5wCXmO2Bayh82LTPQkQtPtZ7AtJE2pvzqBuHZSMe13ZI7k2djlIm+AxuS/pur3qIicka8SUcGdlUk+6Ap6jv4pChyFAUanaYbIYgOUuZ05aD48WAjMRz943DVt8x5Lu1Pc0K/3rSJkRpERctgnoaxV/czeHkVvouULCyreXyhoijIkTWD2/hYLjLvHbQM2YqyK4+Jlb4/Lc0Ad/OGfp+QGFVayR0zCW7A/qsLx+FNvmcthW2SJSEZcwOwuVOThprx8h9lawcXZJZLVNKJsHfvGhMc4lVzzqwgCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/I1MZB35B62Ds5295cewg/CT6QWBlP3T3BOYTKfWsM0=; b=OwO7TC7aLjPxegxKSlR153NUljnTGBCVPxKtA/HyV4U/E4snOcxSp21zIm++aYm4kAin7YrCYxs0Swwe+rIhHAMxM/X3XE0HV/n2aMkRe3Uudm8vbZbERQmdx67NGQeEsatbDA6fpI8WjWnZVuUYeLs/nzamvAT5rKdBv0OIK/7Tv9zSyJ2PMIYv4UJvTwACbetOXBlPv6VV47DQ7ffZu9ZnXAEcbE7hTyigB+qCfDLwGoWbyQd0GDvrEYawkBkui86gDu6r6uy1XfbXHY5HpKinvdEUyjt9EuhoW26Hrlnf2DsUcqGYDxsqOd9kUuM5KC2wKkP12bqnZpMr1DlRAQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 194.138.21.70) smtp.rcpttodomain=ilbers.de smtp.mailfrom=siemens.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=siemens.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=siemens.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/I1MZB35B62Ds5295cewg/CT6QWBlP3T3BOYTKfWsM0=; b=o19uaOTrWCh1eVuIttLw/76gyiynxreKBjb1i9urC9jbYIldYANhTGh3yB1WaZqHwKVOkvxIhO0/c2sUBHGxGFih/ql1dQKFEXkBe59UO0rdUhJbIwR2jPrp7N9R+J1lr8i2XcFv1E2kK/f8LkrekD5b/+RHlY2OvaOfA/oGEI8ihmYVvRxERFyfRe90YHYXQmnKqPL7IReuwJ3IBG44T0VjjPlym3/LujPNBmDQ074/XtnzkEpnDCD9eMW9KeO3r26PYMMUrBORuzjd0EU3dtGsmD1f1flvKYeaCvDCWWpUTaxiDwl5PuutsWhxIAD9P3u0EWVgTow7s6Qvnni8YQ== Received: from DB7PR05CA0072.eurprd05.prod.outlook.com (2603:10a6:10:2e::49) by AM0PR10MB2721.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:124::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.14; Tue, 24 May 2022 16:36:44 +0000 Received: from DB5EUR01FT032.eop-EUR01.prod.protection.outlook.com (2603:10a6:10:2e:cafe::ac) by DB7PR05CA0072.outlook.office365.com (2603:10a6:10:2e::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.23 via Frontend Transport; Tue, 24 May 2022 16:36:44 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 194.138.21.70) smtp.mailfrom=siemens.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=siemens.com; Received-SPF: Pass (protection.outlook.com: domain of siemens.com designates 194.138.21.70 as permitted sender) receiver=protection.outlook.com; client-ip=194.138.21.70; helo=hybrid.siemens.com; pr=C Received: from hybrid.siemens.com (194.138.21.70) by DB5EUR01FT032.mail.protection.outlook.com (10.152.4.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.14 via Frontend Transport; Tue, 24 May 2022 16:36:44 +0000 Received: from DEMCHDC89XA.ad011.siemens.net (139.25.226.103) by DEMCHDC9SJA.ad011.siemens.net (194.138.21.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.9; Tue, 24 May 2022 18:36:43 +0200 Received: from [139.25.68.37] (139.25.68.37) by DEMCHDC89XA.ad011.siemens.net (139.25.226.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.24; Tue, 24 May 2022 18:36:43 +0200 Message-ID: <8dfafe2e-de10-458b-82b2-591983d8bb8c@siemens.com> Date: Tue, 24 May 2022 18:36:43 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: Error logging broken with next? Content-Language: en-US To: Anton Mikanovich , isar-users CC: Baurzhan Ismagulov References: <75340600-5180-2f78-86f8-d5dc0c757a35@siemens.com> <3ddcda7f-41ba-5e25-3ec8-959a5ff356cc@ilbers.de> <46894ccf-242c-68fa-1553-b99a5670c160@siemens.com> <5bb4f88d-0285-4407-6bad-04e6b6e3703f@ilbers.de> <2be1421c-b534-c5c7-cf5e-1510cc3c81a5@siemens.com> <76ed79b1-4397-4329-4332-7fa1c45fe56b@siemens.com> <29defe79-8b13-9b5a-10b5-3e24bda9c7d3@ilbers.de> <34c4d2c5-2968-1f23-c89f-2d8ff8778bae@siemens.com> <13d962c5-bb1e-fb46-277f-4c6ff8fdeb3e@ilbers.de> From: Jan Kiszka In-Reply-To: <13d962c5-bb1e-fb46-277f-4c6ff8fdeb3e@ilbers.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Return-Path: jan.kiszka@siemens.com X-Originating-IP: [139.25.68.37] X-ClientProxiedBy: DEMCHDC8A0A.ad011.siemens.net (139.25.226.106) To DEMCHDC89XA.ad011.siemens.net (139.25.226.103) X-TM-AS-Product-Ver: SMEX-14.0.0.3080-8.6.1018-26680.007 X-TM-AS-Result: No-10--21.189900-8.000000 X-TMASE-MatchedRID: aZnThng3P7U5QaOxwNGfvo9bHfxDWoibr/FEr5YH5/IRyVsAxhhjrGfT ym7IX+XOGtgUcD9EcidVcXP3eMLfF6Sbp20UHklTgbRkEAJMeUhs86y/H0WfgUI4eS9mV4/szVE 3gQTykCotferJ/d7Ab2GGnAZlkbm2EEiu+Q0mwc48PKV10/eYRVLj6g9IGWlsZf3zf+xpuLjNOS gZtv1DIaMQi364g884eevydFaExT2oyWbX7i0aFMDChsRm75eVMUZ5CN98x5ACg1rav4R3Dd1eF EoaE12nWnq/tYmiZBBzEtI1el7Ah7sjlp4pVWOe2gxepR+LaTDTscJQwofGsb6EJGSqPePTJMLy F26ahp0kt9BigJAcVt/NrRi6Nnk/i+eV+4NTUtthbjuuz2EASZwZRjFC2Tk9bl4CKqupkMr0VPv T0zx0mIc9Jc7K8Zqmo8WMkQWv6iWhMIDkR/KfwI2j49Ftap9EkGUtrowrXLg= X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--21.189900-8.000000 X-TMASE-Version: SMEX-14.0.0.3080-8.6.1018-26680.007 X-TM-SNTS-SMTP: 69D6CB3FF11BBBCE727ACF4097F7AED2451C27058FE08364C769EFE9F4A2C9852000:8 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0358d9d2-4ee0-4ab8-d1ec-08da3da3969f X-MS-TrafficTypeDiagnostic: AM0PR10MB2721:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Pf1Z02MrOvg080wbrX/L7Rbq1W4ctq0DDO+g5jALWESG23u14vSDfcLeeMWZ4rv4OHKbfLyJO09leCB/OTz+brEHfLCz0NTHA01dGTVH8H5NhryZoYEocrtq7jAolJ/mfyBh5bpP5YK1bo/PA+9SguBBYH7rgT8H7Wmfbm1m5VODyT6YE8AQPNThneJmEr+PgT7YvlLpwXA9gan+y1cNSFBgiTfDj/1IMAp/uMwMdLjUeywBhr0igP1uDB1C1xorey1btiidkVikHggn3YQGZtoGZlvQqigsNSIybrSWZjol7SGkl6Mc3G02FMtbfubQUQuZ+4sO89eibd7DIcRN+D/u+S+cwS/Dd7G34BFRc7frMXVeuDB2AyXNb2l7oiJ8hlH5c7O/1u3Wz1tKIDLtZhOqWVFzrbhfr8Q0p6PqfNq9IZXVWHrlgIzFLg/GnuVTptb6gPkq/bihraQxUWlhavz6Ms2xNFpWRWZmjDWroa0+RjjxiMlTlC5//pKWHZGwYxsArnz/Pyt/8YdkmpP1lbWSneHs6CksS0g1+6DxUKqsFfP8N+Jb2KZQMcHcJkRyMs4zgxSoERxULUtl2GOUO42TYui2vHqZC50Fyig6AG159WrssRZtnXlo+KCDJtHbRfaiF0y/FmyOzIRDtJ5hMwxmHkxTb6SwKhcwnbfhY1xKNm68EWMVw83zu4D+pymw+rfO7giRcBEZJppOax87Y+6Dmxyn1QrNzh4jQmAeejE= X-Forefront-Antispam-Report: CIP:194.138.21.70;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:hybrid.siemens.com;PTR:hybrid.siemens.com;CAT:NONE;SFS:(13230001)(4636009)(40470700004)(36840700001)(46966006)(83380400001)(956004)(47076005)(336012)(70206006)(31696002)(7596003)(2616005)(86362001)(2906002)(8676002)(8936002)(4326008)(44832011)(110136005)(36860700001)(5660300002)(70586007)(31686004)(16576012)(316002)(36756003)(186003)(508600001)(16526019)(6706004)(82310400005)(53546011)(82960400001)(26005)(356005)(40460700003)(7636003)(3940600001)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2022 16:36:44.1607 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0358d9d2-4ee0-4ab8-d1ec-08da3da3969f X-MS-Exchange-CrossTenant-Id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=38ae3bcd-9579-4fd4-adda-b42e1495d55a;Ip=[194.138.21.70];Helo=[hybrid.siemens.com] X-MS-Exchange-CrossTenant-AuthSource: DB5EUR01FT032.eop-EUR01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR10MB2721 X-TUID: /GDmGBlPLpBM On 24.05.22 18:14, Anton Mikanovich wrote: > 24.05.2022 19:07, Jan Kiszka wrote: >> On 24.05.22 18:05, Anton Mikanovich wrote: >>> 24.05.2022 18:57, Jan Kiszka wrote: >>>> Just thinking loudly: Is it our try-finally that changes the output >>>> trigger for knotty? >>>> >>>>       try: >>>>           bb.build.exec_func("dpkg_runbuild", d) >>>>       finally: >>>>           bb.build.exec_func("dpkg_undo_mounts", d) >>>>           bb.utils.unlockfile(lock) >>>> >>>> Jan >>>> >>> No, this is not because of try-finally itself, but because of exec_func >>> API. >>> Look at my previous mail. >>> >> But that is just the same with glibc, and that worked fine in poky >> during my test yesterday, ie. produced the correct dump. >> >> Jan >> > No, in "glibc" example failed code is executed from the bash task. > And bb.build.exec_func is python API called from python task. > This is not the same. > > As I previously said, there is no difference between Yocto and Isar: > 1) fail in bash task generates full log > 2) fail in bash code called from python task generates masked log > > Please try do_test example from one of the previous mails on Yocto. > I'm afraid we are talking past each other. This is what I retried again: $ . oe-init-build-env build recipe.bb: LICENSE = "" test_fun() { echo "FAIL!" false } python do_test() { bb.build.exec_func("test_fun", d) } addtask test conf/local.conf: ... BBFILES += "recipe.bb" $ bitbake -c test recipe ... NOTE: No setscene tasks NOTE: Executing Tasks ERROR: recipe-1.0-r0 do_test: ExecutionError('/poky-build/tmp/work/core2-64-poky-linux/recipe/1.0-r0/temp/run.test_fun.260', 1, None, None) ERROR: Logfile of failure stored in: /poky-build/tmp/work/core2-64-poky-linux/recipe/1.0-r0/temp/log.do_test.260 Log data follows: | DEBUG: Executing python function do_test | DEBUG: Executing shell function test_fun | FAIL! | WARNING: exit code 1 from a shell command. | DEBUG: Python function do_test finished ERROR: Task (recipe.bb:do_test) failed with exit code '1' NOTE: Tasks Summary: Attempted 1 tasks of which 0 didn't need to be rerun and 1 failed. Summary: 1 task failed: recipe.bb:do_test Summary: There was 1 ERROR message, returning a non-zero exit code. All fine for me. Is this what you saw as well? Now with Isar, using isar-init-build-env instead: ... NOTE: No setscene tasks NOTE: Executing Tasks ERROR: recipe-1.0-r0 do_test: Error executing a python function in exec_python_func() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_python_func() autogenerated', lineno: 2, function: 0001: *** 0002:do_test(d) 0003: File: 'recipe.bb', lineno: 9, function: do_test File "recipe.bb", line 9, in do_test bb.build.exec_func("test_fun", d) File: '/isar/bitbake/lib/bb/build.py', lineno: 256, function: exec_func 0252: with bb.utils.fileslocked(lockfiles): 0253: if ispython: 0254: exec_func_python(func, d, runfile, cwd=adir) 0255: else: *** 0256: exec_func_shell(func, d, runfile, cwd=adir) 0257: 0258: try: 0259: curcwd = os.getcwd() 0260: except: File: '/isar/bitbake/lib/bb/build.py', lineno: 507, function: exec_func_shell 0503: with open(fifopath, 'r+b', buffering=0) as fifo: 0504: try: 0505: bb.debug(2, "Executing shell function %s" % func) 0506: with open(os.devnull, 'r+') as stdin, logfile: *** 0507: bb.process.run(cmd, shell=False, stdin=stdin, log=logfile, extrafiles=[(fifo,readfifo)]) 0508: except bb.process.ExecutionError as exe: 0509: # Find the backtrace that the shell trap generated 0510: backtrace_marker_regex = re.compile(r"WARNING: Backtrace \(BB generated script\)") 0511: stdout_lines = (exe.stdout or "").split("\n") File: '/isar/bitbake/lib/bb/process.py', lineno: 186, function: run 0182: 0183: if pipe.returncode != 0: 0184: if log: 0185: # Don't duplicate the output in the exception if logging it *** 0186: raise ExecutionError(cmd, pipe.returncode, None, None) 0187: raise ExecutionError(cmd, pipe.returncode, stdout, stderr) 0188: return stdout, stderr Exception: bb.process.ExecutionError: Execution of '/isar-build/tmp/work/debian-bullseye-armhf/recipe/1.0-r0/temp/run.test_fun.1487' failed with exit code 1 ERROR: Logfile of failure stored in: /isar-build/tmp/work/debian-bullseye-armhf/recipe/1.0-r0/temp/log.do_test.1487 ERROR: Task (recipe.bb:do_test) failed with exit code '1' NOTE: Tasks Summary: Attempted 1 tasks of which 0 didn't need to be rerun and 1 failed. Summary: 1 task failed: recipe.bb:do_test Summary: There was 1 ERROR message shown, returning a non-zero exit code. This is NOT what we want to have. And this is an Isar bug at this level. Jan -- Siemens AG, Technology Competence Center Embedded Linux