From nobody Fri Jan 14 13:19:49 2022 X-Original-To: ports-bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0A455195AEE4 for ; Fri, 14 Jan 2022 13:19:50 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Jb22s3flBz4pyT for ; Fri, 14 Jan 2022 13:19:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 26AFF14905 for ; Fri, 14 Jan 2022 13:19:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 20EDJnEE016093 for ; Fri, 14 Jan 2022 13:19:49 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 20EDJndM016092 for ports-bugs@FreeBSD.org; Fri, 14 Jan 2022 13:19:49 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 261196] databases/db5: __db_pthread_mutex_lock fails with EINVAL on armv7 Date: Fri, 14 Jan 2022 13:19:49 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: fuz@fuz.su X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: mandree@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports-bugs@freebsd.org X-BeenThere: freebsd-ports-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642166389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BiUcxPH2cDPBfxZJoT2WTVi7u3wZiWLozH0y9oro2Qo=; b=lfAeA9sej027jdDSIJyERMpSuuEodsTXwRqrUdypTQVoIg5IX54QCkYo39OFf3oaoTzKZI fdC/JVitZ4l1FiZgagTZ/VzKYVcsJRth3ndFKUMhlKW6SdVIT0KNawe20enaHyxwYt9YBA H4+q43ctg7021Oq1QwJq3xbiF+TZkKYf3aO64UT6omHugbTDi9zUETKIEmQ/bik92VG422 2x/nvZs3tcBzCNn33nbS4u3L9+wyMPJ9JaUnGBXdJ1I2alJ2S8jG2C/CYXDPi6YZo5vQBP dXnQs17Ljd9IEndNzCd/E2CcT2g+e89bD4a7OKZw1pLmUOx31wl4bA/FmMoQJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642166389; a=rsa-sha256; cv=none; b=EUnRoS3N1iRC5wWvDEVeCOtXW5wjVl8sHBaxGKWndH+eMUUJwp+Gu4AR76lG0UxPQjuYJL PGBqAD8OKBnVD7E0aJQp9u+Dm1wWv5wpzgN5PGNoVdJK9CUP9YSAV88mRzl9oBNRU5M6vK SMsrLAlEkin2tW//Xif/7idNdXKstpI4TcZXreTz1Tbr8MIretApBpsIWWJ9zu7It7Sc7v yP1MTu5Oetd3pKioLd23Cf5sBd7wbsKZQ2KukVFS/dMqKwHCy4zrfNQvt3OvRrx7o157vN rj5cpazY/3qakUVpwfUgLxjpd0+NtapBirX+Q1Tp7n4+/0f1tvPXZHtSY1fpog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D261196 Bug ID: 261196 Summary: databases/db5: __db_pthread_mutex_lock fails with EINVAL on armv7 Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: mandree@FreeBSD.org Reporter: fuz@fuz.su Assignee: mandree@FreeBSD.org Flags: maintainer-feedback?(mandree@FreeBSD.org) A build of mail/bogofilter (databases/db5 consumer) fails during the test s= uite with failure cause: FAIL: t.probe =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D BDB2023 pthread lock failed: Invalid argument BDB0061 PANIC: Invalid argument BDB0060 PANIC: fatal region error detected; run recovery bogofilter[5027]: DB_ENV->open, err: -30973, BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery To recover, run: bogoutil -v --db-recover "./checks.4991.20220114T122654" FAIL t.probe (exit status: 3) This error seems to be produced by function __db_pthread_mutex_lock in db-5.3.28/src/mutex/mut_pthread.c. It appears that it only occurs when building on armv7 (and possibly armv6 which I cannot test). Unfortunately the db5 code is quite convoluted and I have not been able to figure out what specific function has been called with an invalid argument.= =20 Given that databases/db5 is subject to special treatment on armv6/armv7 (see bug #197227), this latent issue might have been hidden on other architectur= es. If desired, I also volunteer to develop a patch to replace the SWP instruct= ion with modern exclusive loads/stores to avoid having to go through the pthrea= ds code path. --=20 You are receiving this mail because: You are the assignee for the bug.=