From owner-freebsd-questions Tue Oct 30 1:56: 4 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mail.romtelenet.org (ns.romtelenet.org [193.226.59.19]) by hub.freebsd.org (Postfix) with ESMTP id C973437B406 for ; Tue, 30 Oct 2001 01:55:57 -0800 (PST) Received: from romtelenet.org (Dionysos.romtelenet.org [193.226.59.5]) by mail.romtelenet.org (Postfix) with ESMTP id 99B7D4666 for ; Tue, 30 Oct 2001 11:55:51 +0200 (EET) Message-ID: <3BDE7927.66CB49FA@romtelenet.org> Date: Tue, 30 Oct 2001 11:55:51 +0200 From: Mihai Chelaru Organization: RomTeleNet X-Mailer: Mozilla 4.78 [en] (X11; U; Linux 2.0.38 i386) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-questions@FreeBSD.ORG Subject: Pthread implementation Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hello, I have a problem using freebsd pthreads. After i launch a number of aprox. 10000 threads (not concomitent but in a period of 1 day) the process suddenly goes up to 99% of CPU. i did a truss on that process and look what i got: gettimeofday(0x28125188,0x0) = 0 (0x0) poll(0x8070000,0x4,0x253a) = 1 (0x1) gettimeofday(0x28125188,0x0) = 0 (0x0) poll(0x8070000,0x4,0x253a) = 1 (0x1) gettimeofday(0x28125188,0x0) = 0 (0x0) poll(0x8070000,0x4,0x253a) = 1 (0x1) gettimeofday(0x28125188,0x0) = 0 (0x0) poll(0x8070000,0x4,0x2538) = 1 (0x1) gettimeofday(0x28125188,0x0) = 0 (0x0) poll(0x8070000,0x4,0x2537) = 1 (0x1) gettimeofday(0x28125188,0x0) = 0 (0x0) poll(0x8070000,0x4,0x2537) = 1 (0x1) gettimeofday(0x28125188,0x0) = 0 (0x0) poll(0x8070000,0x4,0x2537) = 1 (0x1) gettimeofday(0x28125188,0x0) = 0 (0x0) poll(0x8070000,0x4,0x2537) = 1 (0x1) gettimeofday(0x28125188,0x0) = 0 (0x0) poll(0x8070000,0x4,0x2536) = 1 (0x1) gettimeofday(0x28125188,0x0) = 0 (0x0) poll(0x8070000,0x4,0x2536) = 1 (0x1) gettimeofday(0x28125188,0x0) = 0 (0x0) poll(0x8070000,0x4,0x2536) = 1 (0x1) gettimeofday(0x28125188,0x0) = 0 (0x0) poll(0x8070000,0x4,0x2535) = 1 (0x1) First i thought the problem was in my program but after a couple of days i saw that mysql entered the same loop. I tested this on i386 architecture (single and multiprocessor machines) with FreeBSD 4.3 and 4.4. Any ideas ? Thank you, Mihai Chelaru To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message