From owner-freebsd-arm@FreeBSD.ORG Sun Sep 1 10:00:00 2013 Return-Path: Delivered-To: freebsd-arm@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BD6D4948 for ; Sun, 1 Sep 2013 10:00:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9DC3F234E for ; Sun, 1 Sep 2013 10:00:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r81A00bG096393 for ; Sun, 1 Sep 2013 10:00:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r81A00VX096392; Sun, 1 Sep 2013 10:00:00 GMT (envelope-from gnats) Resent-Date: Sun, 1 Sep 2013 10:00:00 GMT Resent-Message-Id: <201309011000.r81A00VX096392@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-arm@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Chie Taguchi Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9F1557FF for ; Sun, 1 Sep 2013 09:52:27 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7A8C722EB for ; Sun, 1 Sep 2013 09:52:27 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r819qR3s016512 for ; Sun, 1 Sep 2013 09:52:27 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r819qR5G016511; Sun, 1 Sep 2013 09:52:27 GMT (envelope-from nobody) Message-Id: <201309010952.r819qR5G016511@oldred.freebsd.org> Date: Sun, 1 Sep 2013 09:52:27 GMT From: Chie Taguchi To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: arm/181718: threads caused hung on ARM/RPI X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Sep 2013 10:00:00 -0000 >Number: 181718 >Category: arm >Synopsis: threads caused hung on ARM/RPI >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-arm >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Sep 01 10:00:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Chie Taguchi >Release: FreeBSD 10.0-CURRENT >Organization: >Environment: FreeBSD RPI-1 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r255089: Sat Aug 31 17:13:40 JST 2013 user@arty:/usr/home/user/crochet-freebsd/work/obj/arm.armv6/usr/src.arm/sys/RPI-B-DBG arm >Description: i am trying to remove BROKEN on arm at devel/nspr. i had made two patches, attached, as reference OpenBSD and NetBSD. and build had succeeded. so i ran "make test" in devel/nspr. almost tests-suite were PASS. but, after running tests/cvar2 and tests/threads, RPI hunged without any core. in addition to this, there is another issue of tests/nbconn, but i will make a other PR about it. i done unit test of cvar2 and threads. these results were following: tests/cvar2: # ./cvar2 5 Thread tests Condvar simple test shared UU: 140.00 usec Condvar simple test shared UK: 110.00 usec Condvar simple test priv UU: 350.00 usec Condvar simple test priv UK: 350.00 usec Condvar simple test All: 370.00 usec Condvar timeout test: 770.00 usec 10 Thread tests Condvar simple test shared UU: 180.00 usec Condvar simple test shared UK: 170.00 usec Condvar simple test priv UU: 650.00 usec Condvar simple test priv UK: 640.00 usec Condvar simple test All: 760.00 usec Condvar timeout test: 950.00 usec 15 Thread tests Condvar simple test shared UU: 230.00 usec Condvar simple test shared UK: 240.00 usec Condvar simple test priv UU: 950.00 usec Condvar simple test priv UK: 940.00 usec Condvar simple test All: 1060.00 usec Condvar timeout test: 1120.00 usec 20 Thread tests Condvar simple test shared UU: 290.00 usec Condvar simple test shared UK: 280.00 usec Condvar simple test priv UU: 1270.00 usec Condvar simple test priv UK: 1250.00 usec Condvar simple test All: 1460.00 usec Condvar timeout test: 1320.00 usec PASS # ./cvar2 -v (debug mode) ..skipping... PrivateCondVarThread: thread 0x2085b320 notified exitcvar = 0x2080d2c0 cnt = 779 PrivateCondVarThread: thread 0x2085b320 notified exitcvar = 0x2080d2c0 cnt = 779 PrivateCondVarThread: thread 0x2085b320 notified exitcvar = 0x2080d2c0 cnt = 779 PrivateCondVarThread: thread 0x2085b320 notified exitcvar = 0x2080d2c0 cnt = 779 PrivateCondVarThread: thread 0x2085b320 notified exitcvar = 0x2080d2c0 cnt = 779 PrivateCondVarThread: thread 0x2085b320 notified exitcvar = 0x2080d2c0 cnt = 779 PrivateCondVarThread: thread 0x2085b320 notified exitcvar = 0x2080d2c0 cnt = 779 PrivateCondVarThread: thread 0x2085b320 notified exitcvar = 0x2080d2c0 cnt = 779 PrivateCondVarThread: thread 0x2085b320 notified exitcvar = 0x2080d2c0 cnt = 779 PrivateCondVarThread: thread 0x2085b320 notified exitcvar = 0x2080d2c0 cnt = 779 PrivateCondVarThread: thread 0x2085b320 notified exitcvar = 0x2080d2c0 cnt = 780 Condvar timeout test: 12840.00 usec PASS tests/threads: # ./threads -d (debug mode) ** Tests lots of thread creations. ** Create 10 native threads 50 times. ** Create 10 user threads 50 times. Create user/user threads: 3000.00 usec Create user/native threads: 2180.00 usec Create native/user threads: 2040.00 usec Create native/native threads: 2160.00 usec Create user/user threads: 2000.00 usec Create user/native threads: 1960.00 usec Create native/user threads: 2060.00 usec Create native/native threads: 2120.00 usec Create user/user threads: 2080.00 usec Create user/native threads: 2080.00 usec Create native/user threads: 2060.00 usec Create native/native threads: 1940.00 usec Create user/user threads: 2080.00 usec Create user/native threads: 1920.00 usec Create native/user threads: 2060.00 usec Create native/native threads: 2040.00 usec Create user/user threads: 2240.00 usec Create user/native threads: 2160.00 usec Create native/user threads: 2060.00 usec Create native/native threads: 1980.00 usec Create user/user threads: 1940.00 usec Create user/native threads: 2180.00 usec Create native/user threads: 1980.00 usec Create native/native threads: 1920.00 usec Create user/user threads: 2120.00 usec Create user/native threads: 2000.00 usec Create native/user threads: 2140.00 usec Create native/native threads: 1980.00 usec Create user/user threads: 1940.00 usec Create user/native threads: 2100.00 usec Create native/user threads: 2140.00 usec Create native/native threads: 1940.00 usec Create user/user threads: 2040.00 usec Create user/native threads: 1980.00 usec Create native/user threads: 2040.00 usec Create native/native threads: 1980.00 usec Create user/user threads: 1960.00 usec Create user/native threads: 2120.00 usec Create native/user threads: 2160.00 usec Create native/native threads: 1880.00 usec Now switch to recycling threads Create user/user threads: 2040.00 usec Create user/native threads: 1920.00 usec Create native/user threads: 2080.00 usec Create native/native threads: 2020.00 usec Create user/user threads: 2020.00 usec Create user/native threads: 1980.00 usec Create native/user threads: 2200.00 usec Create native/native threads: 2000.00 usec Create user/user threads: 2060.00 usec Create user/native threads: 2280.00 usec Create native/user threads: 2080.00 usec Create native/native threads: 1960.00 usec Create user/user threads: 2200.00 usec Create user/native threads: 1980.00 usec Create native/user threads: 2060.00 usec Create native/native threads: 2060.00 usec Create user/user threads: 2000.00 usec Create user/native threads: 2080.00 usec Create native/user threads: 2080.00 usec Create native/native threads: 2040.00 usec Create user/user threads: 2220.00 usec Create user/native threads: 2020.00 usec Create native/user threads: 2000.00 usec Create native/native threads: 2100.00 usec Create user/user threads: 2000.00 usec Create user/native threads: 2060.00 usec Create native/user threads: 1940.00 usec Create native/native threads: 2140.00 usec Create user/user threads: 2200.00 usec Create user/native threads: 2000.00 usec Create native/user threads: 2220.00 usec Create native/native threads: 2000.00 usec Create user/user threads: 2280.00 usec Create user/native threads: 2160.00 usec Create native/user threads: 2140.00 usec Create native/native threads: 1980.00 usec Create user/user threads: 2160.00 usec Create user/native threads: 2280.00 usec Create native/user threads: 2080.00 usec Create native/native threads: 2100.00 usec PASS ----test.log.ended--- these example of test-log were seemed to hung after test ended. but, sometimes hunged on the way, or finished nomally in rare cases. once hunged, RPI did not accept any key, perfect freeze. also /var/crash was empty. and i can not get any clue. >How-To-Repeat: # cd /usr/ports/devel/nspr # make install # make test # cd /usr/ports/devel/nspr/work/nspr-4.10/nspr/build/pr/tests # ./cvar2 # ./cvar2 -v # ./threads -d >Fix: Patch attached with submission follows: --- ../pr/include/md/_freebsd.h.orig 2013-08-28 13:16:35.000000000 +0900 +++ ../pr/include/md/_freebsd.h 2013-08-28 00:36:04.000000000 +0900 @@ -29,6 +29,8 @@ #define _PR_SI_ARCHITECTURE "powerpc64" #elif defined(__powerpc__) #define _PR_SI_ARCHITECTURE "powerpc" +#elif defined(__arm__) +#define _PR_SI_ARCHITECTURE "arm" #else #error "Unknown CPU architecture" #endif >Release-Note: >Audit-Trail: >Unformatted: