[Stackless] bad version in CVS

Jeff Senn senn at maya.com
Tue Sep 24 18:43:24 CEST 2002


Here is some more data...

Jeff Senn <senn at maya.com> writes:
...
> Ah -- but t.run() schedules immediately, yes?  What if the task is one
> that will not yield (there is no interrupt as in run_watchdog) ?

I noticed that I was sending to a channel outside of free_schedule()

> Tasklet thread:
>   while 1:
>     free_schedule()
>     event = eventq.get()
>     process_event_and_start_new_or_wake_old_tasklets(event)
                                     ^^^^^^^^^

...which would run them immediately.  i.e. I was mixing run_watchdog
from the main tasklet with running tasklets directly.  I guess this
should work -- but it was not what I intend...

When I changed that (so that tasklets only get started during
run_watchdog) it seemed to make my crash appear less often...

I'm not sure what that might point toward... maybe a reference
counting problem...

Also -- some place in my code I have

  ... 
  #tasklet goes to sleep
  print "WAIT",self._chan
  x = self._chan.recieve()
  #tasklet wakes up here!!!
  ...

it doesn't (usually) crash.  Changing the print statement:

  ... 
  #tasklet goes to sleep
  print "WAIT",1
  x = self._chan.recieve()
  #tasklet wakes up here!!!
  ...

causes it to crash reliably with an "Illegal Instruction"; sometimes
with a messed up stack and sometimes near channel_dealloc -- so I
suspect a reference counting problem with channels...(or a stack
mess up...)

-- 
-Jas

_______________________________________________
Stackless mailing list
Stackless at www.tismer.com
http://www.tismer.com/mailman/listinfo/stackless



More information about the Stackless mailing list