From owner-freebsd-ports-bugs@freebsd.org Tue May 8 16:18:10 2018 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5FFAAFBA530 for ; Tue, 8 May 2018 16:18:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id CFD7F6FF8D for ; Tue, 8 May 2018 16:18:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 90D5DFBA528; Tue, 8 May 2018 16:18:09 +0000 (UTC) Delivered-To: ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69B4BFBA524 for ; Tue, 8 May 2018 16:18:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 23FA46FF89 for ; Tue, 8 May 2018 16:18:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 383EC267CA for ; Tue, 8 May 2018 16:18:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w48GI8gd021061 for ; Tue, 8 May 2018 16:18:08 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w48GI8Mg021060 for ports-bugs@FreeBSD.org; Tue, 8 May 2018 16:18:08 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 228073] ports-mgmt/pkg: pkg install fails with a segfault Date: Tue, 08 May 2018 16:18:07 +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: gray@nxg.name X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: pkg@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 MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 May 2018 16:18:10 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D228073 Bug ID: 228073 Summary: ports-mgmt/pkg: pkg install fails with a segfault Product: Ports & Packages Version: Latest Hardware: i386 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: pkg@FreeBSD.org Reporter: gray@nxg.name Flags: maintainer-feedback?(pkg@FreeBSD.org) Assignee: pkg@FreeBSD.org Summary: pkg install fails with a segfault. Overview: Running [cmd]pkg -d install nss_ldap[/cmd], I get [...snip...] DBG(1)[18232]> Binary> loading /var/cache/pkg/nss_ldap-1.265_12-d66117adb0.txz DBG(1)[18232]> Binary> loading /var/cache/pkg/openldap-client-2.4.46-98cfbc28cf.txz Checking integrity...DBG(1)[18232]> cannot load files from openldap-cli= ent and (null) to check conflicts zsh: segmentation fault (core dumped) pkg -d install nss_ldap Steps to reproduce: * Install and lock openldap-sasl-client * Install nss_ldap (...probably -- I think this is likely to produce the above behaviour, sinc= e I now suspect that it's the locked package that is the root cause, but see the additional information below). Actual results: Segfault Expected results: Not segfault. If there is a problem, pkg should diagnose and report the problem. Version information: This is pkg 1.10.5, on 11.1-RELEASE-p9. Additional information: This appears to be related to the issues in [1-5] (the first three are from 2017 or 2018), but not exactly the same as any. This is presumably very closely related to bug #228039, but I'm creating it= as a separate bug on the off-chance that that bug's relationship to dovecote a= nd poudriere is significant. In my case, I had [port]net/openldap24-sasl-client[/port] installed and locked. Unlocking th= at allowed [cmd]pkg install nss_ldap[/cmd] to work, but replaced openldap-sasl-client with openldap-client and then reinstalled openldap-sasl-client, which conflicts (so there are perhaps other problems here). Note that the messages below refer to openldap-client (which wasn't initially installed), not openldap-sasl-client (which was). This _might_ be related also to bug #218594, but that bug report refsrs to = `pkg upgrade`, and notes/speculates that it is related to perl being locked. And running [cmd]truss pkg -d install nss_ldap[/cmd], I get fstatat(4,"local.sqlite-journal",0x7fffffffda20,0x0) ERR#2 'No such fil= e or directory' fstat(5,{ mode=3D-rw-r--r-- ,inode=3D882832,size=3D3682304,blksize=3D32= 768 }) =3D 0 (0x0) pread(0x5,0x7fffffffdad0,0x10,0x18) =3D 16 (0x10) fstat(5,{ mode=3D-rw-r--r-- ,inode=3D882832,size=3D3682304,blksize=3D32= 768 }) =3D 0 (0x0) fstatat(4,"local.sqlite-wal",0x7fffffffda20,0x0) ERR#2 'No such file or directory' fstat(5,{ mode=3D-rw-r--r-- ,inode=3D882832,size=3D3682304,blksize=3D32= 768 }) =3D 0 (0x0) fcntl(5,F_SETLK,0x7fffffffda50) =3D 0 (0x0) fcntl(5,F_SETLK,0x7fffffffda58) =3D 0 (0x0) fcntl(5,F_SETLK,0x7fffffffda58) =3D 0 (0x0) fcntl(5,F_SETLK,0x7fffffffda58) =3D 0 (0x0) fstatat(4,"local.sqlite-journal",0x7fffffffda20,0x0) ERR#2 'No such fil= e or directory' fstat(5,{ mode=3D-rw-r--r-- ,inode=3D882832,size=3D3682304,blksize=3D32= 768 }) =3D 0 (0x0) pread(0x5,0x7fffffffdad0,0x10,0x18) =3D 16 (0x10) fstat(5,{ mode=3D-rw-r--r-- ,inode=3D882832,size=3D3682304,blksize=3D32= 768 }) =3D 0 (0x0) fstatat(4,"local.sqlite-wal",0x7fffffffda20,0x0) ERR#2 'No such file or directory' fstat(5,{ mode=3D-rw-r--r-- ,inode=3D882832,size=3D3682304,blksize=3D32= 768 }) =3D 0 (0x0) pread(0x5,0x803364c58,0x1000,0x5b000) =3D 4096 (0x1000) pread(0x5,0x803363b48,0x1000,0x15000) =3D 4096 (0x1000) pread(0x5,0x803362a38,0x1000,0x33e000) =3D 4096 (0x1000) fcntl(5,F_SETLK,0x7fffffffde20) =3D 0 (0x0) getpid() =3D 18596 (0x48a4) DBG(1)[18596]> cannot load files from openldap-client and (null) to che= ck conflicts write(2,"DBG(1)[18596]> cannot load files"...,84) =3D 84 (0x54) SIGNAL 11 (SIGSEGV) process killed, signal =3D 11 (core dumped) There's nothing helpful in the core dump: # lldb /usr/sbin/pkg=20=20=20=20=20=20 (lldb) target create "/usr/sbin/pkg" Current executable set to '/usr/sbin/pkg' (x86_64). (lldb) target create --core /root/pkg.core Core file '/root/pkg.core' (x86_64) was loaded. (lldb) th b * thread #1, name =3D 'pkg', stop reason =3D signal SIGSEGV * frame #0: 0x0000000800a3f393 frame #1: 0x0000000803254a80 (lldb)=20 (I tried to build [port]ports-mgmt/pkg[/port] from [file]/usr/ports[/file],= but that installed 1.10.1, which then insisted on installing 1.10.5) The [icode](null)[/icode] in the [cmd]pkg -d[/cmd] output seems broadly consistent with the discussion in [3], but there isn't an obviously related 'file not found' in the truss output. Removing `/var/cacke/pkg/nss_ldap*` doesn't have any effect. Looking at the pkg-1.10.5 source, it would appear that something is amiss in [icode]libpkg/pkg_jobs_conflicts.c:pkg_conflicts_need_conflict[/icode], but it's not obvious to me what it is, nor whether there's a file I can either delete or dummy. [1] https://github.com/freebsd/pkg/issues/1663 [2] https://github.com/freebsd/pkg/pull/1586 [3] https://forum.pfsense.org/index.php?topic=3D128154.0 [4] https://forums.freebsd.org/threads/pkg-core-dump.56957/ [5] https://forums.freebsd.org/threads/pkg-upgrade-v-segfaults-wrong-option.647= 68/#post-378491 --=20 You are receiving this mail because: You are the assignee for the bug.=