December 22, 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11803

           Summary: DMD tester
                    core.exception.AssertError@core.thread(26XX): unittest
                    failure
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: druntime
        AssignedTo: nobody@puremagic.com
        ReportedBy: maxim@maxim-fomin.ru


--- Comment #0 from Maxim Fomin <maxim@maxim-fomin.ru> 2013-12-22 11:20:31 PST ---
This is similar to issue 8960:

from core/thread.d:2637

unittest
{
    import core.sync.semaphore;

    shared bool inCriticalRegion;
    auto sem = new Semaphore();

    auto thr = new Thread(
    {
        thread_enterCriticalRegion();
        inCriticalRegion = true;
        sem.notify();
        Thread.sleep(dur!"msecs"(1));
        inCriticalRegion = false;
        thread_exitCriticalRegion();
    });
    thr.start();

    sem.wait();
    assert(inCriticalRegion);
    thread_suspendAll();
    assert(!inCriticalRegion);
    thread_resumeAll();
}

Started thread may terminate before executing se,.wait() thus leaving inCriticalSection = false. The root of the problem is absence of supporting code to launch thread and wait for a semaphore. This makes current unittest to speculate whether thread will terminate before waiting semaphore or not.

Example of non-deterministic failure:

d.puremagic.com/test-results/pull.ghtml?projectid=1&runid=829992&logid=5

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 22, 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11803


Maxim Fomin <maxim@maxim-fomin.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


--- Comment #1 from Maxim Fomin <maxim@maxim-fomin.ru> 2013-12-22 13:12:46 PST ---
*** This issue has been marked as a duplicate of issue 11519 ***

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------