From owner-freebsd-current@FreeBSD.ORG Sat Apr 28 12:09:40 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 52C481065673; Sat, 28 Apr 2012 12:09:40 +0000 (UTC) (envelope-from ray@dlink.ua) Received: from smtp.dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id 08F8A8FC1C; Sat, 28 Apr 2012 12:09:39 +0000 (UTC) Received: from terran.dlink.ua (unknown [192.168.10.235]) (Authenticated sender: ray) by smtp.dlink.ua (Postfix) with ESMTPSA id E143DC4936; Sat, 28 Apr 2012 15:09:32 +0300 (EEST) Date: Sat, 28 Apr 2012 15:09:41 +0300 From: Aleksandr Rybalko To: Jason Evans Message-Id: <20120428150941.e0464900.ray@dlink.ua> In-Reply-To: <7AD8956D-AD18-4CAB-9953-06E00185A7DA@freebsd.org> References: <20120421185402.GH1743@albert.catwhisker.org> <7AD8956D-AD18-4CAB-9953-06E00185A7DA@freebsd.org> Organization: D-Link X-Mailer: Sylpheed 2.7.1 (GTK+ 2.20.1; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: current@freebsd.org Subject: Re: : jemalloc_arena.c:182: Failed assertion: "p[i] == 0" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 12:09:40 -0000 On Sat, 21 Apr 2012 13:11:16 -0700 Jason Evans wrote: >> On Apr 21, 2012, at 11:54 AM, David Wolfskill wrote: >> > After applying Dimitry Andric's patches to contrib/jemalloc and >> > replacing /usr/bin/as with one built last Sunday, I was finally(!) >> > able to rebuild head as of 234536: >> > >> > FreeBSD freebeast.catwhisker.org 10.0-CURRENT FreeBSD 10.0-CURRENT >> > #797 234536M: Sat Apr 21 10:23:33 PDT 2012 >> > #root@freebeast.catwhisker.org:/usr/obj/usr/src/sys/GENERIC i386 >> > >> > However, as I was copying a /usr/obj hierarchy via tar -- e.g.: >> > >> > root@freebeast:/common/home/david # (cd /var/tmp && rm -fr obj && >> > mkdir obj) && (cd /usr && tar cpf - obj) | (cd /var/tmp && tar xpf >> > -) >> > >> > it ran for a while, then: >> > >> > : jemalloc_arena.c:182: Failed assertion: "p[i] == 0" >> > Abort (core dumped) >> > root@freebeast:/common/home/david # echo $? >> > 134 >> > root@freebeast:/common/home/david # ls -lTio *.core >> > ls: No match. >> > root@freebeast:/common/home/david # >> > >> > So ... no core file, apparently. >> > >> > freebeast(10.0-C)[2] find /usr/src/contrib/jemalloc -type f -name >> > jemalloc_arena.c freebeast(10.0-C)[3] >> > >> > No file named "jemalloc_arena.c", either. >> > >> > But contrib/jemalloc/src/arena.c contains a function, >> > arena_chunk_validate_zeroed(): >> > >> > 175 static inline void >> > 176 arena_chunk_validate_zeroed(arena_chunk_t *chunk, size_t >> > run_ind) 177 { >> > 178 size_t i; >> > 179 UNUSED size_t *p = (size_t *)((uintptr_t)chunk + >> > (run_ind << LG_PAGE)); 180 >> > 181 for (i = 0; i < PAGE / sizeof(size_t); i++) >> > 182 assert(p[i] == 0); >> > 183 } >> > >> > Thoughts? >> >> I received a similar report yesterday in the context of filezilla, >> but didn't get as far as reproducing it. I think the problem is in >> chunk_alloc_dss(), which dangerously claims that newly allocated >> memory is zeroed. It looks like I formalized this bad assumption in >> early 2010, though the bug existed before that. It's a bigger deal >> now because sbrk() is preferred over mmap(), so the bug has >> languished for a couple of years. I'll get a fix committed today >> (and revert the order of preference between sbrk() and mmap()). >> >> By the way, I wonder why not everyone hits this (I don't). >> >> Thanks, >> Jason_______________________________________________ >> freebsd-current@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-current >> To unsubscribe, send any mail to >> "freebsd-current-unsubscribe@freebsd.org" Hi, maybe it somehow related to low count of free memory, because I see that very frequently on my box. (Atheros AR7242 mips32be with 32M of RAM) After "#ifdef" of that function body, box behave good (seems) :) WBW -- Alexandr Rybalko aka Alex RAY