Weird pointer errors... Stackless problem? PyString_InternI nPlace Fatal error

Mike Fletcher mfletch at tpresence.com
Tue Sep 19 02:10:22 EDT 2000


Well, I made the changes to uthread9.  Works exactly the same as before
(well, it doesn't work, the same as before).  During my testing I noticed
that lots of tests in the test suite do blocking during atomic calls.
Anyway, the change is rather minor, and seems like a "good thing", so I kept
it, the "block" method of the Scheduler object just adds a few lines of
code.

I've posted my updated copy of uthread9 at
http://members.home.com/mcfletch/programming/ in case people want to test
it.  Anyway, doesn't look like this was the source of the errors, so I guess
I'll have to roll-back for the demo.

Oh, and nope, I don't remember machine code :o) .  I started with Apple
Basic when I was 6, then Prolog when I was ~12 and again at 20, Perl when I
was 20 (for about 3 weeks), then found the Holy Grail (a.k.a. Python).  No
exposure to any of those languages real programmers use (but I write a mean
essay on architectural design theory :o) ).  Uthread9 did treat the lock in
the way described, it's just that users of uthread9 seemed to think the lock
was carried across an explicit block (which it now is :o) ).

Enjoy yourself,
Mike(y)


-----Original Message-----
From: Christian Tismer [mailto:tismer at appliedbiometrics.com]
Sent: Monday, September 18, 2000 12:51 PM
To: Mike Fletcher
Cc: Python List (E-mail)
Subject: Re: Weird pointer errors... Stackless problem?
PyString_InternInPlace Fatal error
...
Well, that's the point.
The lock is meant for switching auto-scheduling on and off.
Nobody should assume ownership when scheduling is done.
The lock should be used to perform atomic actions.
This is especially doing things in synchronous, blocking
mode. Atomic means that no other thing can happen meanwhile.

No, if I set the lock, and then call something that runs
the scheduler, this assumption is of course broken.

Do you remember machine code? I had really those simple
cli/sti instructions in mind, in order to protect
a critical section. I'm not aware if uthread9 treats
it this way, or if other assumptions are made.

Still, this all doesn't allow me to crash, and I hope
to find time for some investigation, soon.
...



More information about the Python-list mailing list