www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8582] New: std.parallelism unittest failure on single processor

reply d-bugmail puremagic.com writes:
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



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: -------
Aug 24 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8582




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: -------
Aug 24 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8582


David Simcha <dsimcha yahoo.com> changed:

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



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: -------
Aug 24 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8582




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


Fix Bug 8582

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 26 2012
prev sibling parent d-bugmail puremagic.com writes:
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: -------
Aug 26 2012