From owner-freebsd-hackers@FreeBSD.ORG Sat May 22 12:38:41 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9987116A4CE for ; Sat, 22 May 2004 12:38:41 -0700 (PDT) Received: from chaos.evolve.za.net (chaos.evolve.za.net [196.34.172.107]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F30B43D46 for ; Sat, 22 May 2004 12:38:40 -0700 (PDT) (envelope-from cole@opteqint.net) Received: from root by chaos.evolve.za.net with scanned-ok (Exim 3.36 #1) id 1BRcJb-000Dhe-00 for freebsd-hackers@freebsd.org; Sat, 22 May 2004 21:37:51 +0200 Received: from [196.39.126.250] (helo=stalker) by chaos.evolve.za.net with asmtp (TLSv1:RC4-MD5:128) (Exim 3.36 #1) id 1BRcJa-000DhD-00 for freebsd-hackers@freebsd.org; Sat, 22 May 2004 21:37:50 +0200 Message-ID: <000701c44034$89dbffb0$4206000a@stalker> From: "Cole" To: Date: Sat, 22 May 2004 21:39:44 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 X-Virus-Scanned: by Opteq - www.optec.co.za Subject: Pthread_create and memory issues. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 May 2004 19:38:41 -0000 Hi Ok this is just a more direct question that the thread Memory Leak. I have a program using pthread_create, and it runs fine, no compile errors or warnings, it all works fine, not a single issue, but it very very slowly uses up memory. The program creates a fixed number of threads, and after each one has run to completion it stores them for a while for use again if needed soon, else it destroys them after a specified amount of time. Now i have tried to use ElectricFence to try track down the program, and it created cores all pointing round about to pthread_create. So then i tried to use mpatrol, and it either doesnt even crash, or cause errors, or it creates a core file that is so large with so many instructions, that is well over 1000 instruction calls, but as far as i can see they both seem to be pointing to pthread_create. With mpatrol i set MPATROL_OPTIONS=LEAKTABLE, but it never produces any output and crashes before i can even test the program. It also uses up close to 100% of the cpu before crashing. I was just wondering if anyone else has had any other memory debugging program suggestions, or has had any issues with pthread_create. If you want i can post the code or at the very least my pthread_create call. Thanks /Cole