bugKawa - Bugs: bug #5789, ClassCastException using heavily...

 
 

bug #5789: ClassCastException using heavily multithreaded fluid-let bindings

Submitted by:  Todd Dampier <dampier>
Submitted on:  Tue 07 Oct 2003 06:45:25 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Per Bothner <bothner>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Thu 09 Oct 2003 10:25:09 PM UTC, comment #2:

I checked in the missing synchronization.

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Tue 07 Oct 2003 07:08:42 PM UTC, comment #1:

It is worth noting that -- consistent with a race condition bug -- the frequency of occurrence of the ClassCastException from this example seems very much correlated to the machine we're running it on.

On a fast, unloaded, multiprocessor machine, it happens a lot.

On a slower, more heavily used multiproc machine, it happens sometimes.

We have never seen it happen on a single-processor machine.

Todd Dampier <dampier>
Tue 07 Oct 2003 06:45:25 PM UTC, original submission:

Under heavy loads, fluid-let bindings in our app can expierence ClassCastExceptions from within CallContext.resetFluids().

Isolated repeat: Evaluating the following on a sufficiently powered machine here exhibits the same bug:

(define iterations 20000)

(map (lambda (thread) (force thread))
(map (lambda (iterations)
(future
(begin
(try-catch
(let iter ((iterations iterations))
(if (> iterations 0)
(begin
(fluid-let ((foo 'bar))
(format "~A~%" foo))
(iter (- iterations 1)))))
(e <java.lang.Throwable>
(format #t "~A~%" (invoke e 'toString)))))))
(list
iterations iterations iterations iterations iterations
iterations iterations iterations iterations iterations
iterations iterations iterations iterations iterations
iterations iterations iterations iterations iterations
iterations iterations iterations iterations iterations
iterations iterations iterations iterations iterations
iterations iterations iterations iterations iterations
iterations iterations iterations iterations iterations)))

The ClassCastException is thrown from the line in resetFluids() that says:

FluidConstraint constraint = (FluidConstraint) symbol.constraint;

We inserted some additional instrumentation in resetFluids(); a transcript of running the above with this modification may be found in the attached file.

Todd Dampier <dampier>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #714:  fluid-let-run added by dampier (5KiB - transcript of run with instrumented resetFluids())

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

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 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Thu 09 Oct 2003 10:25:09 PM UTCbothnerStatusNone=>(Error - Not Found)
  Assigned toNone=>NA
  Open/ClosedOpen=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup1