From owner-freebsd-pkg@freebsd.org Mon Mar 25 19:23:28 2019 Return-Path: Delivered-To: freebsd-pkg@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 8ED25154AACC for ; Mon, 25 Mar 2019 19:23:28 +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 0B05384124 for ; Mon, 25 Mar 2019 19:23:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id B8BBD154AAC6; Mon, 25 Mar 2019 19:23:27 +0000 (UTC) Delivered-To: pkg@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 94C73154AAC5 for ; Mon, 25 Mar 2019 19:23:27 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3059B84122 for ; Mon, 25 Mar 2019 19:23:27 +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 63F881DCD1 for ; Mon, 25 Mar 2019 19:23:26 +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 x2PJNQOF082663 for ; Mon, 25 Mar 2019 19:23:26 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x2PJNQrR082662 for pkg@FreeBSD.org; Mon, 25 Mar 2019 19:23:26 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: pkg@FreeBSD.org Subject: [Bug 235604] ports-mgmt/pkg: bus error / segmentation fault (core dumped) Date: Mon, 25 Mar 2019 19:23:26 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed 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: olli@FreeBSD.org 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: Message-ID: In-Reply-To: References: 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-pkg@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binary package management and package tools discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 19:23:28 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D235604 --- Comment #3 from Oliver Fromme --- Ok, I got a few minutes and rebuilt the whole thing with jemalloc debugging= and malloc option "junk:true". The crash (SIGBUS) happens in work/pkg-1.10.5/external/libucl/src/ucl_hash.c Line 229, in function ucl_hash_destroy(): 225 for (k =3D kh_begin (h); k !=3D kh_end (h); ++k) { 226 if (kh_exist (h, k)) { 227 cur =3D (kh_value (h, k)).obj; 228 while (cur !=3D NULL) { 229 ----> tmp =3D cur->next; 230 func (__DECONST (ucl_object_t *, cur= )); 231 cur =3D tmp; 232 } 233 } 234 } (lldb) print cur (const ucl_object_t *) $0 =3D 0x5a5a5a5a5a5a5a5a Obviously it is dereferencing uninitialized memory (0x5a is the value used = by jemalloc for junk-filling when debugging is enabled). Next I tried building with malloc-option "junk:false,zero:true". Result: No crash. However, some time later I tried installing libxml2, and pkg(8) crashes aga= in at exactly the same location, even with malloc option "zero:true". Now we h= ave: (lldb) print cur (const ucl_object_t *) $0 =3D 0x6c6d7862696c3a74 That looks suspiciously like ASCII characters. In fact, those bytes repres= ent the characters "lmxbil:t", which is "t:libxml" reversed. Obviously somehow = the pointer got overwritten with parts of a string. At this point I could really need some help from someone who is a little mo= re familiar with the source code. This is taking way too much time for me. This problem is preventing me from putting this machine into production. Be= ing able to properly install and update packages is crucial. If I can't get this fixed, I'll have to try to install DragonFly or NetBSD. --=20 You are receiving this mail because: You are the assignee for the bug.=