From: Paul Guyot (pguyot_at_kallisys.net)
Date: Wed Dec 03 2003 - 12:09:29 PST
Aux environs du 3/12/03 ā 21:27 +0200, sous le titre "Re: [NTLK] my
Newt just experienced a hiccup of the mos", Eckhart Köppen prit sa
plus belle plume pour écrire les mots suivants:
>Paul, thanks for your further explanations. Just to make sure, Courier
>uses VBOs as the storage for the protoTXView, and I am trying to use
>them as reasonable as possible. But the particular combination of VBOs
>and protoTXView seems at least a bit "underdocumented" and I've seen
>some strange behaviour before (such as redraws not working system wide
>after feeding corrupt data to a protoTXView). Would it be possible that
>the Newton engineers were using some undocumented features or shortcuts
>when implementing protoTXView?
Umm.
About the -10606. As I mentioned, it's an error returned by store
engines to say: no such object. With its friend, -10600 (out of
bounds), these errors are not supposed to occur.
Storage is layered. At the top you have your application, then the
system handles soups/VBOs and accesses the store engines at the
bottom (which actually are layered on top of linear/ata drivers).
You normally only access to high-level APIs for VBOs, Soups and Store
frame information.
The system organizes this in objects that it creates/modifies/deletes
on the stores within transactions.
The store engines say no such object or out of bounds when the system
asks for an object that doesn't exist or for bytes out of the bounds
of the object.
So as long as you use high-level APIs, it's not your business how the
system organizes things in objects or how the store engine organizes
objects in sectors/blocks. It's also not your business whether you're
creating your VBO on an ATA card with the ATA Support store engine
and the ATA driver or on a Flash card with the Flash store engine and
the Flash driver or on a SRAM card with the Flash store engine (it
shares it with the Flash cards) and the SRAM driver.
What I meant is that I'm pretty sure your don't use low-level APIs to
actually create/read/write/modify/delete objects (even if these are
available from NewtonScript). I think only SBM Secret does use these
(and I'm not even sure). Consequently, the problem is not on your
side. It's either a bug in protoTXView (wouldn't be the first, this
prototype leaks memory when you search for strings, I released a
patch eons ago) or between VBOs APIs and the store engine or in the
store engine or a hardware problem.
So I do rule out a problem in Courier. I don't rule out a bug in the
store engine and in ATA Support in particular. It's just curious that
Nathan had issues with his ATA card after having ones with the same
symptoms on his Linear card and after moving data between the two.
Also, I noticed that problems like this worsened by restarting. I
wasn't aware you offered to restart when memory gets low (I'm
confident you do call ClearVBOCache, don't you?). Do you garbage
collect all your VBOs before you do restart?
You see, when the Newton will restart, the store engine will start
with an Abortion to clean up the transaction. Let's say there's a bug
that corrupted data before the restart. The abortion may fail and
worsen the problem. If you close the transaction or at least clean as
much things as you can, the restart may cause less problems.
I cannot tell for linear cards but this was definitely true with ATA
Support < RC6. My test suites didn't include extreme cases like
random restarts. They do now and consequently I fixed several bugs
that caused corruptions on restarts.
Besides, VBOs seems to be the less tested bit of the storage system.
Simply because they're very low-level playing with both virtual
memory and storage (and ClearVBOCache is definitely a big hack).
Plus, although they're much faster than using heap directly, they're
not really suitable for Newton stores, as the system cuts the
binaries in small chunks before passing them to the store engines. I
was actually considering bypassing the system to handle VBOs directly
myself on free sectors at some point.
Paul
-- Philosophie de baignoire - consultations sur rendez-vous. NPDS/NewtonOS: http://newton.kallisys.net:8080/ Apache/FreeBSD: http://www.kallisys.com/ -- This is the NewtonTalk list - http://www.newtontalk.net/ for all inquiries List FAQ/Etiquette/Terms: http://www.newtontalk.net/faq.html Official Newton FAQ: http://www.chuma.org/newton/faq/
This archive was generated by hypermail 2.1.5 : Wed Dec 03 2003 - 14:00:00 PST