From owner-freebsd-questions@FreeBSD.ORG Fri Jan 19 20:22:57 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4BDFB16A40D for ; Fri, 19 Jan 2007 20:22:57 +0000 (UTC) (envelope-from raggen@passagen.se) Received: from av12-1-sn2.hy.skanova.net (av12-1-sn2.hy.skanova.net [81.228.8.185]) by mx1.freebsd.org (Postfix) with ESMTP id 0C7F113C457 for ; Fri, 19 Jan 2007 20:22:56 +0000 (UTC) (envelope-from raggen@passagen.se) Received: by av12-1-sn2.hy.skanova.net (Postfix, from userid 502) id 667213804C; Fri, 19 Jan 2007 21:00:41 +0100 (CET) Received: from smtp4-2-sn2.hy.skanova.net (smtp4-2-sn2.hy.skanova.net [81.228.8.93]) by av12-1-sn2.hy.skanova.net (Postfix) with ESMTP id 1C67638030 for ; Fri, 19 Jan 2007 21:00:41 +0100 (CET) Received: from [192.168.1.6] (81-231-90-251-no41.tbcn.telia.com [81.231.90.251]) by smtp4-2-sn2.hy.skanova.net (Postfix) with ESMTP id 0D4C437E42 for ; Fri, 19 Jan 2007 21:00:40 +0100 (CET) Message-ID: <45B12364.903@passagen.se> Date: Fri, 19 Jan 2007 21:00:36 +0100 From: Roger Olofsson User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: How to catch a memory leak? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jan 2007 20:22:57 -0000 Dear Mailing List, The application vlc (found in ports) when run on FBSD 5.x and 6.x behaves as if there's a memory leak somewhere hidden in it. This is appearing when starting vlc from shell playing a playlist and streaming video over udp to LAN like so: vlc --loop playlist.m3u --sout '#transcode{acodec=mpga,ab=192}:std{access=udp,mux=,dst=239.255.255.255}' The memory of the machine slowly gets eaten until the application ends with the message 'Killed' when the memory has run out. I have adressed this on the vlc forum and I have begun glancing on the massive source code of this very complex application. Kris Kennaway has pointed out that it is most likely an issue with threads. My question is how do I track down a possible memory leak and would there be a tool to monitor (from outside the application) what process that allocates memory and how much? Running it through gdb breaks it and attaching gdp to it while running breaks it. Grateful for any pointers to get me in the right direction. Thanks In Advance.