This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#11267 - Database update hangs with CUE file
Attached to Project:
Rockbox
Opened by Boris Nazaroff (bor_ka) - Thursday, 13 May 2010, 10:15 GMT+2
Last edited by Rafaël Carré (funman) - Thursday, 03 June 2010, 15:57 GMT+2
Opened by Boris Nazaroff (bor_ka) - Thursday, 13 May 2010, 10:15 GMT+2
Last edited by Rafaël Carré (funman) - Thursday, 03 June 2010, 15:57 GMT+2
|
DetailsSansa Fuze v1. ~ r24000 and up (may be lower versions too - don't know)
It appears that database update hangs the player with the cuesheet support (and cue/flac present). It started ~ with r24000. May be with lower versions too - don't know, I had not the cue on the player then :) Steps to reproduce 1a. Delete database (for example manually), enter database in the rockbox menu to create or 1b. Start the rockbox with the existing database and choose "Update Now" 2. Start playing music (or do not start - doesn't matter) 3. After some time player hangs. If the music was playing there is a good chance that it continue playing till the end of the playlist. - Cue file is in the internal memory - Internal memory is checked for filesystem errors - If the cuesheet supoort is turned "off", player does not hang (!) - The cue/flac that causes the hang during the db update plays Ok though. No errors, no skipping, no hangs during the playback. P.S. I have C / Unix skills (some 5 years ago) and can compile RB with custom changes. If it is possible to add some logging to clarify the problem, I need only an instruction. |
This task depends upon
Closed by Rafaël Carré (funman)
Thursday, 03 June 2010, 15:57 GMT+2
Reason for closing: Fixed
Additional comments about closing: r26512
(almost) no difference in runtime, the little variation could be normal variation between benches.
Please make battery benches anyway (with r26511 and r26512) to verify, and report them on IRC / forum
thanks!
Thursday, 03 June 2010, 15:57 GMT+2
Reason for closing: Fixed
Additional comments about closing: r26512
(almost) no difference in runtime, the little variation could be normal variation between benches.
Please make battery benches anyway (with r26511 and r26512) to verify, and report them on IRC / forum
thanks!
the best help you could do is figure out which commit broke it. binchop the last X revisions to at least narrow it down to better than the last 1500 commits
1. The title should read "Sansa Fuze v1 hangs on database update"
2. Steps to reproduce
- install the new firmware
- boot the player without SD card
- enter the database and press "select" to start database population
* very rarely player hangs here, say 1 of 10 times
- reboot to commit the database
- insert SD
- select any album (I selected the first one in the DB), start playing
- return to the rockbox menu, select database "update now" in the database settings (long press on the "database" menu item in the main screen)
* player hangs after a while, may be after 2-3 minutes, but the database update never completes (or completes, but the player is not responding and one needs to use long "power-off" command"
Versions up to 25298 work Ok, 25299 and higher - hang almost 100%.
Things to consider
- playback works rock solid without the database update: more than 8h, shuffle or album-based, sd and internal memory
- it seems that it is not directly caused by the SD, since there is sometimes a hang during the first update without a SD
- if rebooted in the case of the "initial population" hang, the next boot usually pass it until the playback-hang with the same build
- I have a mix of mp3 (tagged with id1/id2 by the foobar), mpc (!!) and some flacs.
- there is total ~ 2500-3000 songs in the internal memory+sd
gcc: arm-elf-eabi-gcc (GCC) 4.4.3
ld: GNU ar (GNU Binutils) 2.20.1.20100303
Host gcc: gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44)
Host system: Linux
gcc: arm-elf-gcc (GCC) 4.0.3
ld: GNU ar 2.16.1
Host gcc: gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44)
Host system: Linux
And even it hangs with the 'official" 3.5.1 release.
format, install r26191.
shutdown, insert Transcend µSDHC 4GB class 6
init database, reboot
plugins -> pictureflow
No crash/freeze, debug menu -> database info reports 2080 entries.
Rockbox 3.5.1 was released on march 4th, and r25299 was committed on march 23rd, so
"Versions up to 25298 work Ok" and "it hangs with the 'official" 3.5.1 release" are not compatible.
But I mean not the initital population, but the database _update_ with the music playing. Here is the difference. First this bug hit me, when I got freezes with the "autoupdate database" option.
BTW, there is no number of entries in the "debug -> database info" for me. Strange.
- boot without µSD
- initialize database (reboot isn't needed anymore)
- album -> all tracks (playing start)
- insert µSD
- go to menu while playing continues
- database update now
- move to debug menu to see progress
Did that, it crashed while display was off.
Did it 2 other times with backlight forced on and it didn't crash.
Does it only happen with the µSD ? Do you have other µSD cards ?
And about 10 minutes ago, i also suffered a freeze when doing a database update. I'm just guessing this might be caused by a spurious interrupt: the fuze v1 just freezes at an unpredictable point, and i didn't see any system in it ... yet. Maybe i can be of help over here.
BTW, didn't test with the 1GB card yet - trying to find it, it hides from me somewhere...
- got 1 freeze during the database initial population (without a SD card and music playback)
- after hard reboot and chkdsk got one more "freeze" during the background update with the playback (as usual - scrollwheel is not working, music still plays).
If it freezes during the real update with the SD, the screen is off, so I can't see, if this icon is on or not. And more, I've tried several time to rotate the wheel back and forth to see the progress, it seems that in this case rockbox doesn't freeze. But I'm not 100% sure, may be it was just a coincidence.
BTW, is it possible to add some logging to the internal disk? It will be lost 99%, as the database is, but maybe chkdsk will convert it to a readable file?
Also you have to patch logf() since by default it writes to disk only on request (and if the system is crashed .. you're out of luck) - saratoga did that already.
As to see what's going on when freezing, you can still force backlight to be always on.
Player continues to play and does respond to the power button - the scrollwheel light turns on. But no scrollwheel reaction, alas.
You can check the state of audio buffer in debug -> buffering thread (but can't check database info at the same time obviously)
If we don't find a better fix I want to add this into 3.6 release.
BTW I trigger the freeze by recording FM radio: 96kHz PCM seems to be the fastest way to crash (in about 5 minutes) because it's also the heaviest on SD writes
I tried to build the pictureflow cache for 3 times, and no lockup yet ;-)
Can i test more thoroughly, i.e. repeat the building of the pictureflow cache for many more times? It was already better since a build of about 2/3 weeks ago (don't remember which one), but i still had occasional lockups on my Fuze V1. And when would you consider this entirely bug-free?
Anyhow, when the 'lockup' occured also in my situation the playback continues till the end of the playlist, but i obviously can not get into debug -> buffering thread as the pictureflow progress bar is stuck and the Fuze is not really 'listening' to the buttons and scrollwheel actions anymore.
Because this patch will cause problems with µSD and button light I think.
First I want to check if this problematic code has any effect on battery life (because its only goal).
If it has no effect I will remove it completely and I think the bug will be gone :-)
I tried to build the pictureflow cache for 3 times, and no lockup yet ;-)
Can i test more thoroughly, i.e. repeat the building of the pictureflow cache for many more times? It was already better since a build of about 2/3 weeks ago (don't remember which one), but i still had occasional lockups on my Fuze V1. And when would you consider this entirely bug-free?
Anyhow, when the 'lockup' occured also in my situation the playback continues till the end of the playlist, but i obviously can not get into debug -> buffering thread as the pictureflow progress bar is stuck and the Fuze is not really 'listening' to the buttons and scrollwheel actions anymore.
As for battery life - I believe we need a battery bench with and without the patch?