From owner-freebsd-threads@FreeBSD.ORG Fri May 23 07:09:40 2008 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF5421065679 for ; Fri, 23 May 2008 07:09:40 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from hosted.kievnet.com (hosted.kievnet.com [193.138.144.10]) by mx1.freebsd.org (Postfix) with ESMTP id 6DFFF8FC28 for ; Fri, 23 May 2008 07:09:40 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from localhost ([127.0.0.1] helo=edge.pp.kiev.ua) by hosted.kievnet.com with esmtpa (Exim 4.62) (envelope-from ) id 1JzRPH-0003gH-AV for freebsd-threads@freebsd.org; Fri, 23 May 2008 10:09:39 +0300 Message-ID: <48366DAB.2000200@icyb.net.ua> Date: Fri, 23 May 2008 10:09:31 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.12 (X11/20080320) MIME-Version: 1.0 To: freebsd-threads@freebsd.org References: <48299715.8010303@icyb.net.ua> In-Reply-To: <48299715.8010303@icyb.net.ua> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: RELENG_7 libthr: _umtx_op -1 errno 60 Operation timed out X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2008 07:09:40 -0000 on 13/05/2008 16:26 Andriy Gapon said the following: > I observe the following issue with some programs (e.g. firefox) from > time. A completely idle program suddenly starts using a lot of CPU and > sometimes memory too. For example, minimized firefox with no pages open. > Restarting the program make the behavior go away. > On one such occasion I ran ktrace on firefox and I saw a lot of messages > like the following in kdump: > 13974 firefox-bin RET _umtx_op -1 errno 60 Operation timed out > Attaching with gdb I also saw a quite strange stack (unfortunately > firefox and the libs are without debug). I didn't save it but it looked > something like the following: > __error() > ?? > ?? > pthread_cond_init() > ?? > > I wonder what could be a cause of this. > Could it be some sort of resource limitation? Here is more details from userland part. I re-built libthr with debugging and here's a typical stack trace for the described above condition: 0x28ad26b3 in _umtx_op_err () at /system/src/lib/libthr/arch/i386/i386/_umtx_op_err.S:36 36 SYSCALL_ERR(_umtx_op) (gdb) bt #0 0x28ad26b3 in _umtx_op_err () at /system/src/lib/libthr/arch/i386/i386/_umtx_op_err.S:36 #1 0x28ad22bd in _thr_ucond_wait (cv=0x8209860, m=0x8209840, timeout=0x0, check_unparking=1) at /system/src/lib/libthr/thread/thr_umtx.c:129 #2 0x28ad0609 in cond_wait_common (cond=0x8208108, mutex=0x820810c, abstime=0x0, cancel=1) at /system/src/lib/libthr/thread/thr_cond.c:204 #3 0x28ad06e8 in __pthread_cond_wait (cond=0x8208108, mutex=0x820810c) at /system/src/lib/libthr/thread/thr_cond.c:228 I am a newbie in this area - what is the difference between _pthread_cond_wait and __pthread_cond_wait? And _X vs __X in general? -- Andriy Gapon