From owner-freebsd-ports@freebsd.org Wed Apr 20 16:48:52 2016 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E63EBB150CC for ; Wed, 20 Apr 2016 16:48:52 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citapm.icyb.net.ua (citapm.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 0E6B61769; Wed, 20 Apr 2016 16:48:50 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id TAA02249; Wed, 20 Apr 2016 19:48:48 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1asvJ2-0005PD-7L; Wed, 20 Apr 2016 19:48:48 +0300 Subject: Re: minor(?) problem with pkg crashing To: Baptiste Daroussin References: <20160420083947.GD26116@ivaldir.etoilebsd.net> <9cf498cc-4e9f-155b-9b52-88d33b418fba@FreeBSD.org> <20160420143639.GE26116@ivaldir.etoilebsd.net> Cc: ports From: Andriy Gapon Message-ID: <7d5d8cdd-cdb5-01fc-fda5-01b32d6d98d8@FreeBSD.org> Date: Wed, 20 Apr 2016 19:47:26 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <20160420143639.GE26116@ivaldir.etoilebsd.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Apr 2016 16:48:53 -0000 On 20/04/2016 17:36, Baptiste Daroussin wrote: > On Wed, Apr 20, 2016 at 03:30:08PM +0300, Andriy Gapon wrote: >> On 20/04/2016 11:39, Baptiste Daroussin wrote: >>> On Wed, Apr 20, 2016 at 11:27:22AM +0300, Andriy Gapon wrote: >>>> pkg 1.7.2 crashed at the end of upgrade run, after completing all the upgrades. >>>> Unfortunately no debug symbols, but it looks like a double free or something >>>> like that, seems that this happens only if >>>>> Conflicts with the existing packages have been found. >>>>> One more solver iteration is needed to resolve them. >>>> >>>> The crash is in pkg_jobs_free() -> pkg_free() -> free() >>>> >>> Did it happen only once, or is it a reproducible case for you? >> >> Reproducible. >> > Do you have a core file? Yes, but pkg / libpkg is without debug symbols. E.g.: Core was generated by `pkg'. Program terminated with signal SIGBUS, Bus error. #0 __je_bitmap_unset (bitmap=, binfo=, bit=) at /usr/src/lib/libc/../../contrib/jemalloc/include/jemalloc/internal/bitmap.h:248 warning: Source file is more recent than executable. 248 *gp = g; (gdb) bt #0 __je_bitmap_unset (bitmap=, binfo=, bit=) at /usr/src/lib/libc/../../contrib/jemalloc/include/jemalloc/internal/bitmap.h:248 #1 arena_run_reg_dalloc (run=, ptr=) at jemalloc_arena.c:342 #2 arena_dalloc_bin_locked_impl (arena=, chunk=, ptr=, bitselm=, junked=) at jemalloc_arena.c:2732 #3 0x00000008024ad4f1 in __je_tcache_bin_flush_small (tsd=, tcache=, tbin=, binind=, rem=) at jemalloc_tcache.c:132 #4 0x00000008024d1230 in __je_tcache_dalloc_small (tsd=0x134c4992d87fd, tcache=, ptr=, binind=2, slow_path=false) at /usr/src/lib/libc/../../contrib/jemalloc/include/jemalloc/internal/tcache.h:417 #5 __je_arena_dalloc (ptr=, tcache=, slow_path=false, tsd=) at /usr/src/lib/libc/../../contrib/jemalloc/include/jemalloc/internal/arena.h:1370 #6 __je_idalloctm (is_metadata=false, slow_path=false, tsd=, ptr=, tcache=) at /usr/src/lib/libc/../../contrib/jemalloc/include/jemalloc/internal/jemalloc_internal.h:1056 #7 __je_iqalloc (tsd=, ptr=, tcache=, slow_path=) at /usr/src/lib/libc/../../contrib/jemalloc/include/jemalloc/internal/jemalloc_internal.h:1080 #8 ifree (tsd=, ptr=, tcache=, slow_path=) at jemalloc_jemalloc.c:1823 #9 0x00000008024d161e in __free (ptr=0x80376b9e0) at jemalloc_jemalloc.c:1928 #10 0x000000080086ffa1 in ?? () from /usr/local/lib/libpkg.so.3 #11 0x00000008008608fa in ?? () from /usr/local/lib/libpkg.so.3 #12 0x000000080086055d in pkg_free () from /usr/local/lib/libpkg.so.3 #13 0x000000080088a7ee in ?? () from /usr/local/lib/libpkg.so.3 #14 0x000000080087c97e in pkg_jobs_free () from /usr/local/lib/libpkg.so.3 #15 0x00000000004163f3 in ?? () #16 0x000000000040fc1d in ?? () #17 0x00000000004064bf in ?? () #18 0x000000080064a000 in ?? () #19 0x0000000000000000 in ?? () -- Andriy Gapon