From nobody Sat Aug 21 10:41:41 2021 X-Original-To: freebsd-arm@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 5C2FE177A21F for ; Sat, 21 Aug 2021 10:41:41 +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 4GsFRn25HHz4VVg for ; Sat, 21 Aug 2021 10:41:41 +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 27440347C for ; Sat, 21 Aug 2021 10:41:41 +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 17LAff68059418 for ; Sat, 21 Aug 2021 10:41:41 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 17LAffVM059417 for freebsd-arm@FreeBSD.org; Sat, 21 Aug 2021 10:41:41 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: freebsd-arm@FreeBSD.org Subject: [Bug 257981] Segmentation fault on pkg install Date: Sat, 21 Aug 2021 10:41:41 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: arm X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: dan.kotowski@a9development.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-arm@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter 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: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D257981 Bug ID: 257981 Summary: Segmentation fault on pkg install Product: Base System Version: CURRENT Hardware: arm64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: arm Assignee: freebsd-arm@FreeBSD.org Reporter: dan.kotowski@a9development.com For about a week or so I've been experiencing regular segfaults when using poudriere: ``` =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D> dialog4ports-0.1.6 depends on file: /usr/local/sbin/pkg - not = found =3D=3D=3D> Installing existing package /packages/All/pkg-1.17.1.pkg [14arm64-usrports-job-02] Installing pkg-1.17.1... [14arm64-usrports-job-02] Extracting pkg-1.17.1: .........Child process pid=3D27588 terminated abnormally: Segmentation fault *** Error code 139 Stop. make: stopped in /usr/ports/ports-mgmt/dialog4ports =3D>> Cleaning up wrkdir =3D=3D=3D> Cleaning for dialog4ports-0.1.6 build of ports-mgmt/dialog4ports | dialog4ports-0.1.6 ended at Mon Aug 16 10:14:11 UTC 2021 build time: 00:00:04 !!! build failure encountered !!! ``` Diving into the jail I can reproduce by hand as well: ``` root@14arm64-usrports:/tmp # /tmp/usr/local/sbin/pkg-static -d install pkg DBG(1)[17023]> pkg initialized Updating local repository catalogue... DBG(1)[17023]> PkgRepo: verifying update for local DBG(1)[17023]> PkgRepo: need forced update of local DBG(1)[17023]> Pkgrepo, begin update of '/var/db/pkg/repo-local.sqlite' DBG(1)[17023]> Request to fetch file:///packages/meta.conf DBG(1)[17023]> Fetch: fetcher chosen: file [14arm64-usrports] Fetching meta.conf: 100% 163 B 0.2kB/s 00:01 DBG(1)[17023]> Request to fetch file:///packages/packagesite.pkg DBG(1)[17023]> Fetch: fetcher chosen: file [14arm64-usrports] Fetching packagesite.pkg: 100% 1 KiB 1.1kB/s 00:= 01 DBG(1)[17023]> PkgRepo: extracting packagesite.yaml of repo local DBG(1)[17326]> PkgRepo: extracting signature of repo in a sandbox Sandboxed process pid=3D17326 terminated abnormally by signal: 11 pkg-static: Repo extraction failed Unable to update repository local Error updating repositories! ``` Notice that it terminated abnomrally while extracting the signature. Then t= he stack trace: ``` [New LWP 100493] Core was generated by `pkg-static add /tmp//pkg.pkg.buINJX'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x0000000000000000 in ?? () (gdb) bt #0 0x0000000000000000 in ?? () #1 0x00000000006007cc in SHA256_Pad (ctx=3D0x40cb6928) at /usr/src/sys/crypto/sha2/sha256c.c:257 #2 _libmd_SHA256_Final (digest=3D0x40cb68e8 '\245' , "g\346\tj\205\256g\273r\363n<:\365O\245\177R\016Q\214h\005\233\253=D9=83\03= 7\031\315\340[\200", ctx=3D0x40cb6928) at /usr/src/sys/crypto/sha2/sha256c.c:328 #3 0x00000000005f3584 in lzma_sha256_finish (check=3D0x40cb6928, check@entry=3D0x40cb68e8) at /usr/src/contrib/xz/src/liblzma/check/check.h:= 167 #4 0x00000000005f309c in lzma_index_hash_decode (index_hash=3D0x40cb68c0, in=3Din@entry=3D0x40d2d58d "(z/\376?\232f8\374\334\061V?\374f0@m\n\214\346E=E5=8D=86YE\327\343~4e\232\= 376-Z\377\a+k\003=C4=BCN0\035\022\006\253C\257 L\352`<_\377`=CA=9A~\362\a\236\273&\021\221\357\306\313=3D\202\271c\027\066= D\217\004\066\377\a\305h\271\260\376\"=3D\215\252n\023\235\f\022\004L\201\3= 52L\374\237\"z\327\320\037\322\325\325\322\350qa\b\327\017SjY\034j~\351\372= ]dI$\354\347\237Sz\224\376\355\204W\022\027\365\064\207\241\311\353\302&\27= 6zY\001\311F\352\222>x9\206{?)\246\312\024\202)\036#\227\310{\337\\\002\232= \201\354$(\242\261=C3=A3\276\b\374:\376\032&\351", , in_pos=3Din_pos@entry=3D0xffffffff5150, in_size=3D, in_size@entry=3D12435) at /usr/src/contrib/xz/src/liblzma/common/index_hash.c:295 #5 0x00000000005f2010 in stream_decode (coder_ptr=3D0x40d0d200, allocator= =3D0x0, in=3D0x40d2d58d "(z/\376?\232f8\374\334\061V?\374f0@m\n\214\346E=E5=8D=86YE\327\343~4e\232\= 376-Z\377\a+k\003=C4=BCN0\035\022\006\253C\257 L\352`<_\377`=CA=9A~\362\a\236\273&\021\221\357\306\313=3D\202\271c\027\066= D\217\004\066\377\a\305h\271\260\376\"=3D\215\252n\023\235\f\022\004L\201\3= 52L\374\237\"z\327\320\037\322\325\325\322\350qa\b\327\017SjY\034j~\351\372= ]dI$\354\347\237Sz\224\376\355\204W\022\027\365\064\207\241\311\353\302&\27= 6zY\001\311F\352\222>x9\206{?)\246\312\024\202)\036#\227\310{\337\\\002\232= \201\354$(\242\261=C3=A3\276\b\374:\376\032&\351", , in_pos=3D0xffffffff5150, in_size=3D12435, out=3D0x40d398c0 "rotect", out_pos=3D0xffffffff5148, out_size=3D65536, action=3DLZMA_RUN) at /usr/src/contrib/xz/src/liblzma/common/stream_decoder= .c:282 #6 0x00000000005edaa4 in lzma_code (strm=3D, strm@entry=3D0x40cdc5c0, action=3D) at /usr/src/contrib/xz/src/liblzma/common/common.c:287 #7 0x00000000005a45fc in xz_filter_read (self=3D0x40cdc500, p=3D0x40cdc590= ) at /usr/src/contrib/libarchive/libarchive/archive_read_support_filter_xz.c:692 #8 0x0000000000595184 in __archive_read_filter_ahead (filter=3D0x40cdc500, min=3D1, avail=3D0xffffffff5280) at /usr/src/contrib/libarchive/libarchive/archive_read.c:1385 #9 0x00000000005a5c10 in archive_read_format_tar_read_data (a=3D0x40c7c800, buff=3D0xffffffff52e0, size=3D0xffffffff52d8, offset=3D0xffffffff52d0) at /usr/src/contrib/libarchive/libarchive/archive_read_support_format_tar.c:623 #10 0x000000000059660c in archive_read_data_into_fd (a=3D0x40c7c800, fd=3D1= 0) at /usr/src/contrib/libarchive/libarchive/archive_read_data_into_fd.c:101 #11 0x000000000051b23c in create_regfile () #12 0x000000000051bd60 in do_extract_regfile () #13 0x0000000000519780 in pkg_add_common () #14 0x000000000039e6f0 in exec_add () #15 0x00000000003a7dcc in main () ``` My best guess is that this was introduced somehow by one of 69d8dc20be6ca10cf87c98223121c4121aff42cc or c81ea895b563c4d1e39468a8525284b7474fe850, but I can't say for sure just yet. Hardware: SolidRun HoneyComb LX2 Workstation, based on NXP Layerscape LX216= 0A 16-core Arm Cortex A72 OS Version: CURRENT at 9781c28c6d63 --=20 You are receiving this mail because: You are the assignee for the bug.=