From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7895C47422 for ; Fri, 26 Jan 2024 09:18:00 +0000 (UTC) Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by mx.groups.io with SMTP id smtpd.web10.12014.1706260675673354737 for ; Fri, 26 Jan 2024 01:17:55 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=GXlmMvYL; spf=pass (domain: gmail.com, ip: 209.85.216.52, mailfrom: zboszor@gmail.com) Received: by mail-pj1-f52.google.com with SMTP id 98e67ed59e1d1-290b1e19101so1210065a91.0 for ; Fri, 26 Jan 2024 01:17:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706260674; x=1706865474; darn=lists.openembedded.org; h=content-transfer-encoding:subject:from:content-language:to :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=PYMRahSHeBnOA0xg8sNIRuczLqmKdyu0r3antsQNQWo=; b=GXlmMvYLjvsol/Ub+XCL+w+SCmqlfWV1UhEn34VN6E1Gh0rrBKaNJEak2wbpXKRTL3 Kt1Yk5+CSxpsyufychjNBOjg9zv1Tldvhma7YoqArgr7Dd90iAYyTSorebFZNfhua0vZ thWf96Fg69NaBmtzI3CXKTvdtjzuydg8+zMQA+1Frn3Xso49EZUZzr/rmfTGWlvcNzcf Og1NG1G8nNXB25LjI1qyQfaFPSIeMkc2DBsoTtbNu3CSMFh92lXbZSO/YAdESSmA/KoG Rp32vmPhn6hzaOmJvQ//7zJRXFlljWi1lFnIwM8MLGtK4UF8ICAG1kLZHzXtmP9pAyck bLGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706260674; x=1706865474; h=content-transfer-encoding:subject:from:content-language:to :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=PYMRahSHeBnOA0xg8sNIRuczLqmKdyu0r3antsQNQWo=; b=XyC1AtUN962vhCVAKQjV05fnOybxUh0ox3cNVIwd3HoUiGJfHmtVrh7w/th3/q6KbW MqC5wSqDnkpsNuGbOlZHfog+uLgBMcaO5Tg9J9fYjXE/la5SFGBf+4F32UBiosEffzay YDAZ4rsfCq9GNQv03TBm0hDIy1XjxCKxBIgpWwf65DmjQzKCPRJm54LxSLg5AEH0xept d6k0IQ3PQiwpxrQFiT4/AEJFbezJcPrtmegWW4an4uolb2LWue/EJVsqAtOVgkYV2bR3 18s0Ks0kRhQJrbDvghIvy5bsAl9/oScfYyh5fjGRRfjq30nUOjXR5AdVkOsyU3Xr0wbU Pnbw== X-Gm-Message-State: AOJu0YycQZ0zkiJGUp88gqrTkC0BtJ5mwOEz6mY6UZeTMDZdOdA6d85/ 2ya85j6wT/YYsT47OZInUB99TWxOLYdfg46ZFxwnVS5QREnAUFrymVf5aIOP X-Google-Smtp-Source: AGHT+IGBkSKPqkS7E/8aLld82Go/Y/C0emtxY1hDLdCdI25/9TqsOZ0i/BXa/mOoPzaXpOxavuX2rw== X-Received: by 2002:a17:90a:f317:b0:28e:75bd:45c2 with SMTP id ca23-20020a17090af31700b0028e75bd45c2mr885491pjb.6.1706260673973; Fri, 26 Jan 2024 01:17:53 -0800 (PST) Received: from [192.168.2.143] (dsl51B7D2F9.fixip.t-online.hu. [81.183.210.249]) by smtp.gmail.com with ESMTPSA id k2-20020a17090a910200b0028c952fd855sm2751287pjo.52.2024.01.26.01.17.51 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 26 Jan 2024 01:17:53 -0800 (PST) Message-ID: <4ed80c78-5940-454d-b4a7-a820f04f0f08@gmail.com> Date: Fri, 26 Jan 2024 10:17:47 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: OpenEmbedded Core Mailing List Content-Language: en-US From: =?UTF-8?B?QsO2c3rDtnJtw6lueWkgWm9sdMOhbg==?= Subject: bb.utils.vercmp_string_op() vs Python 3.12 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 26 Jan 2024 09:18:00 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/194348 Hi, Just a FYI. After the bitbake-server getting stuck after bitbake exited with Python 3.12 issue was fixed, here's another one. This time it's semi-reliably triggered by the jack recipe in meta-openembedded: ERROR: jack-1.19.22-r0 do_configure: 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:      0001:  *** 0002:waf_preconfigure(d)      0003: File: '/home/zozo/test-yocto-4.3-gh/conf/../layers/openembedded-core/meta/classes-recipe/waf.bbclass', lineno: 58, function: waf_preconfigure      0054:    wafbin = os.path.join(subsrcdir, 'waf')      0055:    try:      0056:        result = subprocess.check_output([python, wafbin, '--version'], cwd=subsrcdir, stderr=subprocess.STDOUT)      0057:        version = result.decode('utf-8').split()[1]  *** 0058:        if bb.utils.vercmp_string_op(version, "1.8.7", ">="):      0059:            d.setVar("WAF_EXTRA_CONF", "--bindir=${bindir} --libdir=${libdir}")      0060:    except subprocess.CalledProcessError as e:      0061:        bb.warn("Unable to execute waf --version, exit code %d. Assuming waf version without bindir/libdir support." % e.returncode)      0062:    except FileNotFoundError: File: '/home/zozo/test-yocto-4.3-gh/bitbake/lib/bb/utils.py', lineno: 150, function: vercmp_string_op      0146:    Compare two versions and check if the specified comparison operator matches the result of the comparison.      0147:    This function is fairly liberal about what operators it will accept since there are a variety of styles      0148:    depending on the context.      0149:    """  *** 0150:    res = vercmp_string(a, b)      0151:    if op in ('=', '=='):      0152:        return res == 0      0153:    elif op == '<=':      0154:        return res <= 0 File: '/home/zozo/test-yocto-4.3-gh/bitbake/lib/bb/utils.py', lineno: 140, function: vercmp_string      0136:    return r      0137:      0138:def vercmp_string(a, b):      0139:    """ Split version strings and compare them """  *** 0140:    ta = split_version(a)      0141:    tb = split_version(b)      0142:    return vercmp(ta, tb)      0143:      0144:def vercmp_string_op(a, b, op): File: '/home/zozo/test-yocto-4.3-gh/bitbake/lib/bb/utils.py', lineno: 91, function: split_version      0087:    """Split a version string into its constituent parts (PE, PV, PR)"""      0088:    s = s.strip(" <>=")      0089:    e = 0      0090:    if s.count(':'):  *** 0091:        e = int(s.split(":")[0])      0092:        s = s.split(":")[1]      0093:    r = ""      0094:    if s.count('-'):      0095:        r = s.rsplit("-", 1)[1] Exception: ValueError: invalid literal for int() with base 10: 'SyntaxWarning' ERROR: Logfile of failure stored in: /home/zozo/test-yocto-4.3-gh/tmp-sicom-glibc/work/corei7-64-oe-linux/jack/1.19.22/temp/log.do_configure.1709417 "Semi-reliably", i.e. about 50-50 or 60-40 percent failure vs success rate. Usually the second run succeeds after a failure. I copied vercmp_string_op() and all others called by it from bitbake/lib/bb/utils.py into a new python script as a minimum test case. Running this script inside a locally cloned jack git repository has 100% success rate. It looks like an internal Python "flake" issue. Best regards, Zoltán Böszörményi