Thread overview
[Issue 8582] New: std.parallelism unittest failure on single processor
Aug 24, 2012
David Simcha
Aug 26, 2012
Jonathan M Davis
August 24, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8582

           Summary: std.parallelism unittest failure on single processor
           Product: D
           Version: D2
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Phobos
        AssignedTo: nobody@puremagic.com
        ReportedBy: edmccard@verizon.net


--- Comment #0 from edmccard@verizon.net 2012-08-24 12:04:37 PDT ---
On a single-processor machine, the unittest for std.parallelism fails with the message

  Testing generated/linux/debug/64/unittest/std/parallelism
  totalCPUs = 1
  core.exception.AssertError@std.parallelism(4082): unittest failure

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
August 24, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8582



--- Comment #1 from edmccard@verizon.net 2012-08-24 12:06:03 PDT ---
The problem seems to be deterministic; it happens every time (15 out of the last 15 tries) I try to run the phobos unittests, under various CPU loads.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
August 24, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8582


David Simcha <dsimcha@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dsimcha@yahoo.com


--- Comment #2 from David Simcha <dsimcha@yahoo.com> 2012-08-24 12:43:00 PDT ---
I'm pretty sure this is because on a single core machine the default number of
threads in the TaskPool is zero.  finish() waits for all tasks to be finished
by calling Thread.join().  The worker threads are supposed to finish the tasks.
 If there are no worker threads there's nothing to wait on.

Instead, while the calling thread is waiting, it should pop tasks off the queue and execute them.  Furthermore, put() should throw if new tasks are placed on the queue while it's in this state.

Will make a pull request soon.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
August 26, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8582



--- Comment #3 from github-bugzilla@puremagic.com 2012-08-26 00:15:51 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/ab9691df2e74d042dd6e7ba78fbca0edb479f494 Fix Bug 8582.

https://github.com/D-Programming-Language/phobos/commit/15adb861b09e1f2455f9a2685319a890671e3c32 Merge pull request #757 from dsimcha/master

Fix Bug 8582

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
August 26, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8582


Jonathan M Davis <jmdavisProg@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |jmdavisProg@gmx.com
         Resolution|                            |FIXED


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