Hi Ben,

How much does changing the parameters affect the behavior?

A lot. Someone at Palm is really going to have to try it. They can just copy and paste my code. I think I've done about all I can do.

If your
records were under 512 bytes each, do you still get the corruption?
What about fewer records?

It's deleted, not corrupted. But maybe it's deleted because it's corrupted.

I just tried 511 bytes and it didn't disappear.

It's very finicky. I don't know the necessary conditions to make it disappear. It's slow to test.

It's not just the record size. That separate DmWrite for record 0 seems necessary. I tried writing to records 1 to 8000, instead of 1 to 10000, and it didn't disappear. I tried writing to all 10003 and it didn't disappear. I tried creating only 10000 records total and that didn't disappear.

At first I just wrote to all the records, a few bytes. Then all the records, the whole record. Those didn't disappear. Then I made it more exactly like my application and that disappeared. So, that's why the numbers are like they are.

These disappear:
4.9MB/20003 records
5.0MB/10003 records
5.2MB/10003 records
6.0MB/10003 records
6.6MB/10003 records

The main thing I see wrong with this is that you're keeping over
10,000 records locked at one time.  That's a real stress test for the
MemHandleLock-based NVFS implementation.

I doesn't look like a result of stress. It looks like a math or logic error in NVFS. The reasons it doesn't look like stress are:

- It works fine forever as long as you don't reset.
- More "stress" doesn't make it worse.
- More "stress" makes it better, because if you run DoTest() twice it won't disappear. - It either disappears or it doesn't. It's fine, or it's gone. There's no more severity to it or other symptoms. - There are no signs, no errors, no symptoms, that you are getting close to some limit. - The lowest the cache ever gets in DoTest() is 6.2MB total free, and 4.7MB max block (that's checking at every point using the "1 | dbCacheFlag"). - It's not a problem for databases with over 20000 records. 30000 works fine. 32740 works fine, which is the most my app uses. - Databases that are 8.6MB, 7.7MB, and maybe anything over 6.6MB are okay. - Even at the point where the cache is truly running out and I'm getting Dm errors back, the databases don't disappear. - There's a range, or specific values, that don't work. It does not appear to be a line it's crossing where everything past that line fails.

If locking 10,000 records is wrong, then it should give an error. If there are limits then we need to know what those are. I'm fine with telling my customers they are limited to X records on NVFS devices.

Also, what happens if you add a "SysTaskDelay(100)" before the SysReset call?

It gets deleted. Again, you don't have to reset within the program. You can comment out the SysReset (which, in my app then goes on to my event loop), quit to the launcher, even use MemInfo to flush the cache, then reset, and it's still gone.

Terry




--
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to