Date: Sun, 1 Sep 2013 09:52:27 GMT From: Chie Taguchi <taguchi.ch@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: arm/181718: threads caused hung on ARM/RPI Message-ID: <201309010952.r819qR5G016511@oldred.freebsd.org> Resent-Message-ID: <201309011000.r81A00VX096392@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309010952.r819qR5G016511>