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. From owner-freebsd-threads@freebsd.org Wed Oct 14 09:05:54 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 99E8DA0E553 for ; Wed, 14 Oct 2015 09:05:54 +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 86CAF159B for ; Wed, 14 Oct 2015 09:05:54 +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 t9E95sG6084418 for ; Wed, 14 Oct 2015 09:05:54 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:05:54 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed 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: Message-ID: In-Reply-To: References: 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:05:54 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203765 --- Comment #1 from Emiel Kollof --- More people with the same problem can be found here: https://forums.freebsd.org/threads/issues-with-python-web-applications-in-jails.53440 -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-threads@freebsd.org Wed Oct 14 10:10:19 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 6D6F5A11F42 for ; Wed, 14 Oct 2015 10:10:19 +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 5A54D10A8 for ; Wed, 14 Oct 2015 10:10:19 +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 t9EAAJvD017314 for ; Wed, 14 Oct 2015 10:10:19 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 10:10:19 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed 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: kib@FreeBSD.org 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: cc Message-ID: In-Reply-To: References: 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 10:10:19 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203765 Konstantin Belousov changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kib@FreeBSD.org --- Comment #2 from Konstantin Belousov --- (In reply to Emiel Kollof from comment #0) I cannot reproduce this on stable/10: pooma% stty tostop pooma% ./pr203765& [1] 62024 pooma% [1] + 62024 suspended (tty output) ./pr203765 pooma% fg [1] + 62024 continued ./pr203765 Thread 1 message Thread 1 Thread 2 message Thread 2 pooma% jobs pooma% Same when I tried the same sequence jailed. First question, can you reproduce the behavior on the host ? If no, compare the libc and libthr on the host and in the jail. Second question, if the behavior is reproducable on host, try, at least temporary, installing stable/10 kernel without touching the userland, and see if the issue is still there -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-threads@freebsd.org Fri Oct 16 12:05:00 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 17FDCA16380 for ; Fri, 16 Oct 2015 12:05:00 +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 04ED819DF for ; Fri, 16 Oct 2015 12:05:00 +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 t9GC4xsZ027764 for ; Fri, 16 Oct 2015 12:04:59 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: Fri, 16 Oct 2015 12:05:00 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed 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: Message-ID: In-Reply-To: References: 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: Fri, 16 Oct 2015 12:05:00 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203765 --- Comment #3 from Emiel Kollof --- Those indeed seemed to differ. I unpacked a base release tarball in the jail root (while excluding /etc and /var) and used freebsd-update to get it up to date. So, not a bug. Thanks for the effort. -- You are receiving this mail because: You are the assignee for the bug.