From owner-freebsd-threads@freebsd.org Wed Oct 14 09:01:22 2015 Return-Path: Delivered-To: freebsd-threads@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 32E39A0E2A2 for ; Wed, 14 Oct 2015 09:01:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (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 0702111FB for ; Wed, 14 Oct 2015 09:01:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id t9E91LaK046713 for ; Wed, 14 Oct 2015 09:01:21 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-threads@FreeBSD.org Subject: [Bug 203765] Processes inside jail that use libthr get stuck in 'umtxn' state. Date: Wed, 14 Oct 2015 09:01:22 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: 10.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: emiel.kollof@gmail.com X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-threads@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 09:01:22 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203765 Bug ID: 203765 Summary: Processes inside jail that use libthr get stuck in 'umtxn' state. Product: Base System Version: 10.2-RELEASE Hardware: amd64 OS: Any Status: New Severity: Affects Many People Priority: --- Component: threads Assignee: freebsd-threads@FreeBSD.org Reporter: emiel.kollof@gmail.com Inside a jail, programs that use pthread (libthr) get stuck in umtxn state. This problem exhibited itself since upgrading to 10.2-RELEASE-p5 with freebsd-update. Mitigations tried: - Updated poudriere jail and rebuilt all packages - Reinstalled all packages inside jail with pkg upgrade -f Test program: ---- CUT HERE ---- #include #include #include #include #include #include #include void message(void *ptr); typedef struct stdata { int id; char msg[100]; } stdata; int main() { pthread_t t1, t2; stdata d1, d2; d1.id = 1; strcpy(d1.msg, "Thread 1"); d2.id = 2; strcpy(d2.msg, "Thread 2"); pthread_create(&t1, NULL, (void *)&message, (void *)&d1); pthread_create(&t2, NULL, (void *)&message, (void *)&d2); pthread_join(t1, NULL); pthread_join(t2, NULL); exit(0); } void message(void *ptr) { stdata *data; data = (stdata *) ptr; printf("Thread %d message %s \n", data->id, data->msg); pthread_exit(0); } ---- CUT HERE ---- Demonistration: $ cc -o pthread pthread.c -pthread $ ./pthread & [1] 45949 $ ps -aux | grep pthread ekollof 45949 0.0 0.0 14564 1708 5 SNJ 10:20AM 0:00.00 ./pthread $ procstat -kk 45949 PID TID COMM TDNAME KSTACK 45949 101151 pthread - mi_switch+0xe1 sleepq_catch_signals+0xab sleepq_wait_sig+0xf _sleep+0x27d umtxq_sleep+0x125 do_lock_umutex+0x1f74 __umtx_op_wait_umutex+0x78 amd64_syscall+0x357 Xfast_syscall+0xfb $ fg [1] + 45949 running ./pthread * I pressed Ctrl-T * load: 0.27 cmd: pthread 45949 [umtxn] 35.86r 0.00u 0.00s 0% 1692k * I pressed Ctrl-\ * ^\[1] + 45949 quit (core dumped) ./pthread -- You are receiving this mail because: You are the assignee for the bug.