From owner-freebsd-ports-bugs@freebsd.org Fri Oct 2 21:16:14 2020 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7DACE4375C8 for ; Fri, 2 Oct 2020 21:16:14 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4C32q22ql0z4gHp for ; Fri, 2 Oct 2020 21:16:14 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 6120D43764A; Fri, 2 Oct 2020 21:16:14 +0000 (UTC) Delivered-To: ports-bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 60EAC4374D4 for ; Fri, 2 Oct 2020 21:16:14 +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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C32q21w55z4gQm for ; Fri, 2 Oct 2020 21:16:14 +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 25A8D83CC for ; Fri, 2 Oct 2020 21:16:14 +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 092LGEiG095726 for ; Fri, 2 Oct 2020 21:16:14 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 092LGEMM095725 for ports-bugs@FreeBSD.org; Fri, 2 Oct 2020 21:16:14 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 250059] Keywords/sample.ucl: Installing sample files broken on aarch64 Date: Fri, 02 Oct 2020 21:16:13 +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 Some People X-Bugzilla-Who: chris@chrullrich.net X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: ports-bugs@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 MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Oct 2020 21:16:14 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D250059 Bug ID: 250059 Summary: Keywords/sample.ucl: Installing sample files broken on aarch64 Product: Ports & Packages Version: Latest Hardware: arm64 OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: ports-bugs@FreeBSD.org Reporter: chris@chrullrich.net Upgrading pkg from 1.15.6 to 1.15.8 on an aarch64 system (a Raspi 3) running 12.1-RELEASE-p6 results in a /usr/local/etc/pkg.conf file containing nothing but NULs: # ls -l pkg.conf* -rw-r--r-- 1 root wheel 2366 Oct 2 21:08 pkg.conf -rw-r--r-- 1 root wheel 2366 Oct 2 20:40 pkg.conf.sample # hd < pkg.conf 00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |..............= ..| * 00000930 I have no clue about what exactly is going on, but the difference between my 1.15.6 and 1.15.8 packages (built locally with poudriere) is that in 1.15.6, the post-install script is sh, while in 1.15.8, it's lua. Also, there is th= is bit in the ktrace output from installing the 1.15.8 package: 64549 pkg CALL=20 fstatat(0xb,0x4182a809,0xffffffffc348,0x200) 64549 pkg NAMI "usr/local/etc/pkg.conf" 64549 pkg RET fstatat -1 errno 2 No such file or directory 64549 pkg CALL=20 fstatat(0xb,0x4186efd9,0xffffffffc348,0x200) 64549 pkg NAMI "usr/local/etc/pkg.conf.sample" 64549 pkg STRU struct stat {dev=3D88, ino=3D27515, mode=3D0100644, n= link=3D1, uid=3D0, gid=3D0, rdev=3D97055, atime=3D0, mtime=3D1601664004, ctime=3D1601664713.277981000, birthtime=3D1601664004, size=3D2366, blksize= =3D32768, blocks=3D8, flags=3D0x0 } 64549 pkg RET fstatat 0 64549 pkg CALL openat(0xb,0x4186efd9,0) 64549 pkg NAMI "usr/local/etc/pkg.conf.sample" 64549 pkg RET openat 12/0xc 64549 pkg CALL=20 openat(0xb,0x4182a809,0xe01,0666) 64549 pkg NAMI "usr/local/etc/pkg.conf" 64549 pkg RET openat 15/0xf 64549 pkg CALL ftruncate(0xf,0x93e) 64549 pkg RET ftruncate 0 64549 pkg CALL mmap(0,0x93e,0x1,0x1,0xc,0) 64549 pkg RET mmap 1100906496/0x419e8000 64549 pkg CALL mmap(0,0x93e,0x2,0x1,0xf,0) 64549 pkg RET mmap 1100910592/0x419e9000 64547 pkg RET poll 1 64547 pkg CALL fstat(0xc,0xffffffffd078) 64547 pkg STRU struct stat {dev=3D18446744073709551615, ino=3D135317, mode=3D0140000, nlink=3D0, uid=3D0, gid=3D0, rdev=3D0, atime=3D0, mtime=3D0= , ctime=3D0, birthtime=3D0, size=3D0, blksize=3D8192, blocks=3D0, flags=3D0x0 } 64547 pkg RET fstat 0 64547 pkg CALL read(0xc,0x41855000,0x2000) 64547 pkg GIO fd 12 read 0 bytes "" 64547 pkg RET read 0 64547 pkg CALL close(0xc) 64547 pkg RET close 0 64547 pkg CALL wait4(0xfc25,0xffffffffd504,0,0) 64549 pkg PSIG SIGSEGV SIG_DFL code=3DSEGV_ACCERR 64549 pkg CAP restricted VFS lookup 64547 pkg RET wait4 64549/0xfc25 I don't know which exact operation it was that caused capsicum to kill the process (64549) forked to copy pkg.conf.sample to pkg.conf, but this appear= s to be what happened. It finds that pkg.conf does not exist, determines the siz= e of pkg.conf.sample, creates pkg.conf and ftruncate()s it to the same size full= of NULs (where have I seen that before?), mmap()s the two---and suffers spontaneous existence failure. In contrast, the sh version of the script ru= ns /bin/cp, which works perfectly fine. The same behavior does not occur with 12.1-RELEASE-p10 on amd64. There do n= ot appear to be changes between 12.1-RELEASE-p6 and current -p10 that might ha= ve fixed this. --=20 You are receiving this mail because: You are the assignee for the bug.=