From owner-freebsd-ports@freebsd.org Sun Jan 21 15:04:08 2018 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 49F43ECE664 for ; Sun, 21 Jan 2018 15:04:08 +0000 (UTC) (envelope-from mad@madpilot.net) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 27D926F658 for ; Sun, 21 Jan 2018 15:04:08 +0000 (UTC) (envelope-from mad@madpilot.net) Received: by mailman.ysv.freebsd.org (Postfix) id 238EAECE65F; Sun, 21 Jan 2018 15:04:08 +0000 (UTC) Delivered-To: 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 22EAEECE65E for ; Sun, 21 Jan 2018 15:04:08 +0000 (UTC) (envelope-from mad@madpilot.net) Received: from mail.madpilot.net (grunt.madpilot.net [78.47.145.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA0656F652 for ; Sun, 21 Jan 2018 15:04:06 +0000 (UTC) (envelope-from mad@madpilot.net) Received: from mail (mail [192.168.254.3]) by mail.madpilot.net (Postfix) with ESMTP id 3zPdBB12ZpzZqm; Sun, 21 Jan 2018 16:04:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=madpilot.net; h= content-transfer-encoding:content-language:content-type :content-type:in-reply-to:mime-version:user-agent:date:date :message-id:from:from:references:subject:subject:received :received; s=mail; t=1516547029; x=1518361430; bh=gHVL3oML7oLxPh u4xYn43PkFEXOMNX5/rw3uHIeFTdQ=; b=M/tMQnJ8oMncxyEkgNyeH7u7v1iVKG RUMdOzUnqxg8hq3FXOH/HjqqPINXt8e8YpIcTGjNtfzLv6iHys2lGeLDV8C6aUk7 1Vel+9aHDpTkA+K3NC7SCNIwsqt/6akYl+CDl4Kp0+vUG6+lLKGo/WNMf+AY7YmW ZkyUXnjv94Vsw= Received: from mail.madpilot.net ([192.168.254.3]) by mail (mail.madpilot.net [192.168.254.3]) (amavisd-new, port 10024) with ESMTP id ZqUlWbxcLXPm; Sun, 21 Jan 2018 16:03:49 +0100 (CET) Received: from tommy.madpilot.net (micro.madpilot.net [88.149.173.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.madpilot.net (Postfix) with ESMTPSA; Sun, 21 Jan 2018 16:03:49 +0100 (CET) Subject: Re: mousepad memory leak To: Erich Dollansky Cc: "'ports@FreeBSD.org'" References: <20180119140623.3a8116cc.freebsd.ed.lists@sumeritec.com> <5e86f329-5bda-2494-c6e7-01482b685f20@madpilot.net> <20180121084315.7f3696a7.freebsd.ed.lists@sumeritec.com> From: Guido Falsi Message-ID: <7724bcc7-9c4f-c196-6348-c4a4fde0fe97@madpilot.net> Date: Sun, 21 Jan 2018 16:03:49 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180121084315.7f3696a7.freebsd.ed.lists@sumeritec.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jan 2018 15:04:08 -0000 On 01/21/2018 01:44, Erich Dollansky wrote: >> >> The people who are most able to help you are the XFCE guys (mousepad >> being part of the xfce desktop). Is this issue FreeBSD specific? If >> not you should definitely report this to the upstream developers. >> > We are a FreeBSD-only shop. Great for you and FreeBSD, but understanding if the problem is FreeBSD specific or not helps in the diagnosis. Setting up quick jail with some linux distribution is really a fast thing. > >> I'll make a pair of tests in virtual machines to see what happens. >> >> Can you confirm simple steps to reproduce as follows: >> >> - Open 2 mousepad windows and open documents in them > > No, you have to open only one document in one windows. On a machine > with only 4GB or RAM, it happens around 10 windows with 10 documents. > The documents are small. Not more than 4KB, plain text, no I did a test in two jails, one with FreeBSD and one with arch linux. I got the same behavior, so it's not FreeBSD specific. It's not a memory leak though. It looks more like some limitation in thee mousepad architecture. What I did is open mousepad from the xfce menu, open a small text file in it (some random file from /etc), then choose "new window" from the menu, open a file in the new window, and so on. Up to 8 windows it's working as usual, after that it gets slower and slower, allocation a lot of ram for every operation. It looks like the allocated memory grows exponentially, after 10-12 windows it allocates really a lot of memory, this could explaain the behaviour you're seeing. Since it's doing the same in linux it looks like a bug in the upstream software so you should report it there: https://bugzilla.xfce.org/ I also found a bug which looks somewhat similar: https://bugzilla.xfce.org/show_bug.cgi?id=13978 But don't describe this as a memory leak, because it does not look like that. Closing the opened windows, while being slow, did actually release the used memory. I also noticed that when mousepad was working and allocating memory also the "dconf-service" process consuming a lot of CPU. I think it's the communication with this demon which actually has some problems. Just to know why do you need so many windows, when tabs are available? Since it looks like a fundamental bug in mousepad cannot you use some other editor? -- Guido Falsi