http://d.puremagic.com/issues/show_bug.cgi?id=6155

           Summary: thread message boxes block infinitely with
                    OnCrowding.block
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: Phobos
        AssignedTo: nob...@puremagic.com
        ReportedBy: edelkind+purema...@gmail.com


--- Comment #0 from ari edelkind <edelkind+purema...@gmail.com> 2011-06-14 
13:28:21 PDT ---
Created an attachment (id=997)
Code to demonstrate OnCrowding.block deadlock

When std.concurrency.setMaxMailboxSize(..., OnCrowding.block) is used, and the
mailbox fills (thus calling m_notFull.wait() ), the corresponding notify
procedure is never called, and the threads deadlock.

This is due to the fact that m_count is not always incremented correctly, and
can become 0xffffffff (-1).  When mboxFull() checks the length of the list, it
sees an astronomical size, thus never returns false.

A test case is attached (messagebox.d).
I will attach a patch as well.

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

Reply via email to