bugGuile - Bugs: bug #27457, Threads, mutexes, and critical...

 
 

bug #27457: Threads, mutexes, and critical sections

Submitted by:  Ludovic Courtès <civodul>
Submitted on:  Tue 15 Sep 2009 11:33:00 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Wont Fix
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 11 May 2010 09:45:09 PM UTC, comment #1:

I can't reproduce the problem with 1.9.10 where `throw' is now implemented in Scheme, which scm_ithrow () simply invokes.

IOW, this bug is obsolete. :-)

Ludovic Courtès <civodul>
Project Administrator
Tue 15 Sep 2009 11:33:00 PM UTC, original submission:

With Guile 1.9.3, the test case below eventually leads to "throw from within critical section" errors (that's on a dual-core).

#v+
(use-modules (srfi srfi-18))

(let loop ()
(display ".")
(let ((t (make-thread (lambda () #t) 'thread-join-3)))
(thread-start! t)
(false-if-exception (throw 'x)))

(loop))
#v-

First, it's worth noting that `scm_ithrow ()' and `scm_dynthrow ()', which produce this kind of error, are sloppy. To be less sloppy, they should use a memory barrier (as introduced by, e.g., GCC's `__sync_fetch_and_add ()' built-in), just like `SCM_CRITICAL_SECTION_{START,END}'. But apparently that's not enough.

Presumably, it would also help if the queue primitives in `threads.c' didn't use the critical section macros.

Thanks,
Ludo'.

Ludovic Courtès <civodul>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by civodul (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 11 May 2010 09:45:09 PM UTCcivodulStatusNone=>Wont Fix
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1