Date: Fri, 02 Oct 2020 21:16:13 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 250059] Keywords/sample.ucl: Installing sample files broken on aarch64 Message-ID: <bug-250059-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
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<AT_SYMLINK_NOF OLLOW>) 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<AT_SYMLINK_NOF OLLOW>) 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<O_RDONLY>) 64549 pkg NAMI "usr/local/etc/pkg.conf.sample" 64549 pkg RET openat 12/0xc 64549 pkg CALL=20 openat(0xb,0x4182a809,0xe01<O_WRONLY|O_CREAT|O_TRUNC|O_EXCL>,0666<S_IRUSR|S= _IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH>) 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<PROT_READ>,0x1<MAP_SHARED>,0xc,0) 64549 pkg RET mmap 1100906496/0x419e8000 64549 pkg CALL mmap(0,0x93e,0x2<PROT_WRITE>,0x1<MAP_SHARED>,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.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-250059-7788>