Bug 181718 - threads caused hung on ARM/RPI
Summary: threads caused hung on ARM/RPI
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: arm (show other bugs)
Version: 10.0-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-arm (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-01 11:00 UTC by Chie Taguchi
Modified: 2016-04-14 17:40 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (375 bytes, patch)
2013-09-01 11:00 UTC, Chie Taguchi
no flags Details | Diff
patch-nspr-pr-include-md-_freebsd_cfg.txt (315 bytes, patch)
2013-09-01 11:18 UTC, Chie Taguchi
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chie Taguchi 2013-09-01 11:00:00 UTC
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.

Fix: Patch attached with submission follows:
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
Comment 1 Chie Taguchi 2013-09-01 11:18:07 UTC
it is looks like missing one of my patches. and i will reattach it.

thanks.

C.Taguchi

On Sun, 1 Sep 2013 10:00:00 GMT
FreeBSD-gnats-submit@FreeBSD.org wrote:

> Thank you very much for your problem report.
> It has the internal identification `arm/181718'.
> The individual assigned to look at your
> report is: freebsd-arm. 
> 
> You can access the state of your problem report at any time
> via this link:
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=181718
> 
> >Category:       arm
> >Responsible:    freebsd-arm
> >Synopsis:       threads caused hung on ARM/RPI
> >Arrival-Date:   Sun Sep 01 10:00:00 UTC 2013


-- 
Chie Taguchi <taguchi.ch@gmail.com>
Comment 2 Oleksandr Tymoshenko freebsd_committer freebsd_triage 2016-04-14 17:40:42 UTC
I ran nspr's tests overnight, Pi is still up and running. Original hang must have been  fixed some time along the way and submitted patches are now in upstream code. So closing this bug as fixed