Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bugs
  • Category Operating System/Drivers
  • Assigned To No-one
  • Operating System iPod Nano 2G
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by Grant Whiteheart - 2009-10-16
Last edited by Michael Sparmann - 2010-02-17

FS#10679 - Nano2G "PANIC Stkov dircache" message during database auto update

I’m using r23198-091015 on my 8GB Nano 2G. I’ve noticed that if I enable Directory Cache (General → Disk → Directory Cache → Yes) and Auto Update (General → Database → Auto Update → Yes), once Rockbox restarts after adding new music files in disk mode, I always get a

*PANIC*
Stkov dircache

message. I then hold Menu and Select to reboot and the new files have been added correctly to the database, but clearly something is going wrong during the auto update.

Disabling either of these settings will stop the PANIC - meaning, if only Auto Update or only Directory Cache is enabled, the PANIC does not occur. It’s only when Directory Cache is enabled in addition to Auto Update that the PANIC will always occur a few seconds after Rockbox startup after new music files are added to the device.

Closed by  Michael Sparmann
2010-02-17 11:36
Reason for closing:  Fixed
Additional comments about closing:  

Fix committed in r24708

Dave Chapman commented on 2009-10-16 13:46

The size of the dircache stack is define on line 77 of firmware/common/dircache.c - "DEFAULT_STACK_SIZE + 0x900".

Could someone experiencing this problem who compiles their own builds try increasing this size and try and determine the smallest safe stack size? e.g. replace that "0x900" by "0x1000" (or 0x2000 etc).

The main stack size for Rockbox on the Nano2G is already twice the size of other targets, due to the larger sector size being used (and there are various places in the code where sector buffers are stored on the stack). I'm not surprised that the dircache stack also needs increasing.

Grant Whiteheart commented on 2009-10-16 14:50

I tried the 3 values you noted above. The PANIC only stopped with 0x2000. Should I try some values between 0x1000 and 0x2000? Sorry, I'm not sure if there are only certain increments I'm supposed to be trying here.

Dave Chapman commented on 2009-10-16 22:04

Grant,

Thanks for testing.

Could you also try 0x1400, 0x1800, and 0x1c00 ? You can try any increments, but it's probably not worthwhile doing anything more than those three.

Dave.

Grant Whiteheart commented on 2009-10-16 23:20

Glad to help out. Thanks to you and the other devs for all the recent Nano2g work.

0x1800 is the lowest of those that eliminates the PANIC in my tests.

Magnus Holmgren commented on 2009-10-17 08:47

Hm, I wonder if the 2 KB stack buffers in ftl_copy_page and ftl_copy_block has anything to do with it…

Michael Sparmann commented on 2010-02-10 21:40

Those stack buffers are gone now, so one may want to check if the value can be further decreased now. I think it's rather coming from some sector buffers in the FAT driver though. Those FTL functions are only called on writes, and I don't see why the dircache should perform write operations…

Grant Whiteheart commented on 2010-02-11 00:06

I tried this with r24589M-100210, first with DEFAULT_STACK_SIZE + 0x1400. I got the PANIC with that. Changed it to 0x1800 and no PANIC, so nothing seems to have changed with this so far.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing