From owner-freebsd-questions@freebsd.org Thu Feb 15 15:54:47 2018 Return-Path: Delivered-To: freebsd-questions@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 E37DBF0337D for ; Thu, 15 Feb 2018 15:54:46 +0000 (UTC) (envelope-from peo@nethead.se) Received: from ns1.nethead.se (ns1.nethead.se [5.150.237.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ns1.nethead.se", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 77C547F4CD for ; Thu, 15 Feb 2018 15:54:46 +0000 (UTC) (envelope-from peo@nethead.se) X-Virus-Scanned: amavisd-new at Nethead AB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nethead.se; s=NETHEADSE; t=1518710084; bh=iTlm8uObqQtrbH5M7VQEDe+f44toMqqeeEF5K3UzJlk=; h=Subject:To:References:From:Date:In-Reply-To; b=WtW0ZhuimSYGIJE76AhArwuicBHbMYOnw2iD8thjfJl5HpnJHZiVvvzCpD4VDR6+U KaZYoqM4PzyYkJ8NDXh5RdhtIWJoi+9WSyIz4EdMQp5+Deqj2D67Q5LYTS3ZRNKH1J CaqpGRHASfkE8ehiZjTl8TPBXKiKkzyL00TZD3lo= Subject: Re: which limit is hit here? To: freebsd-questions@freebsd.org References: From: Per olof Ljungmark Message-ID: <8ff3e3d7-6861-313f-9689-10bb7eccf779@nethead.se> Date: Thu, 15 Feb 2018 16:54:42 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Feb 2018 15:54:47 -0000 On 02/15/18 08:56, Michael Schuster wrote: > Hi Per, > > On Thu, Feb 15, 2018 at 8:41 AM, Per olof Ljungmark wrote: > >> Hi, >> >> A process "squatter" from Cyrus-IMAP version 2.5.11 exits with signal >> 11. The purpose of the process is to create an index of the content in a >> mailbox. >> >> On large mailboxes, squatter coredumps, the final message from truss reads: >> >> mmap(0x0,700448768,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = >> 34783363072 (0x819400000) >> mmap(0x0,936334732,PROT_READ,MAP_SHARED,107,0x0) = 35483811840 >> (0x843000000) >> SIGNAL 11 (SIGSEGV) >> process killed, signal = 11 (core dumped) Some ktrace output before crash if of any use, please let me know what more info can be produced: 49022 squatter RET write 154/0x9a 49022 squatter CALL lseek(0x96,0,SEEK_SET) 49022 squatter RET lseek 0 49022 squatter CALL mmap(0,0x9a,0x1,0x1,0x96,0) 49022 squatter RET mmap 34366210048/0x80062c000 49022 squatter CALL munmap(0x80062c000,0x9a) 49022 squatter RET munmap 0 49022 squatter CALL close(0x96) 49022 squatter RET close 0 49022 squatter CALL write(0x6b,0x80f105000,0xf884) 49022 squatter GIO fd 107 wrote 4096 bytes 49022 squatter RET write 63620/0xf884 49022 squatter CALL lseek(0x6b,0,SEEK_SET) 49022 squatter RET lseek 0 49022 squatter CALL mmap(0,0x29c00000,0x3,0x1002,0xffffffff,0) 49022 squatter RET mmap 34636562432/0x810800000 49022 squatter CALL mmap(0,0x37cf558c,0x1,0x1,0x6b,0) 49022 squatter RET mmap 35337011200/0x83a400000 49022 squatter PSIG SIGSEGV SIG_DFL code=SEGV_ACCERR 49022 squatter NAMI "squatter.core" > to me this looks like the error is happening *after* mmap() returned > successfully - most likely because "someone" miscalculates some pointer and > tries to access an unmapped address. Maybe (but that's conjecture), > PROT_READ is wrong here and someone is attempting to write to that mapped > region; I'm not 100% sure though whether that'd actually trigger SIGSEGV. > > I'd suggest you do something like > $ gdb squatter core > (gdb) bt > > and look at the output, and maybe go to the maintainers of Cyrus-IMAP... > > HTH > Michael > > >> and a tempfile is produced, always same size: >> 3017208832 cyrus.squat.NEW >> >> Same result on 10.3 and 11-STABLE. >> >> Is there a knob to let squatter have the necessary resource to complete >> the indexing? >> >> Thanks, >> >> //per >> > > -- Per olof Ljungmark +46 707 50 20 46 Nethead AB Registered in Stockholm, Sweden SE556815226701