Bug 291571

Summary: rhythmbox needs a few tries to index files with spaces in the filenames
Product: [Fedora] Fedora Reporter: Michael Wiktowy <michael.wiktowy>
Component: rhythmboxAssignee: Bastien Nocera <bnocera>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: medium    
Version: 7   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.10.1-5.fc7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-26 18:57:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
rhythmbox.0.10.1-1.fc7.clean.debug.log
none
diagnostic info requested by bnocera@redhat.com in Comment #6 none

Description Michael Wiktowy 2007-09-14 20:21:50 UTC
rhythmbox.i386 0.10.1-1.fc7 installed

This update going live to F7 caused Rhythmbox to stop indexing any songs with
spaces in the filenames. I get repeated errors under "Import Errors" of the form:
file:///my_home_dir/Music/file%20with%20spaces.wav.or.mp3.or.ogg
    Couldn't access file:///my_home_dir/Music/file%20with%20spaces.wav.or.mp3.or.ogg

The files do exist and have the proper permissions as I can play them with other
players.

The previous indexing of these files was preserved and the version previous to
this indexed them fine.

Comment 1 Bastien Nocera 2007-09-20 14:51:52 UTC
That's weird, especially as you're the only person to have reported it so far.

Could you attach the output of "rhythmbox -d" when you reproduce the problem?

Comment 2 Michael Wiktowy 2007-09-21 00:15:24 UTC
*sigh*

In trying to reproduce the problem, it seemed to be magically fixed.

I ran the rhythmbox -d command and it produced *a lot* of data. So I piped it to
a file using &> but that was still too large to attach because I have many music
files that RB indexes. All these steps were producing the errors. So I looked in
the preferences to see if there was an option to scrap the database and reindex
from square-one with the intention of making a small test case with a directory
full of a couple files. There was not but I changed an unrelated setting.

Now RB indexes all the files it should properly and those recently added files
now show up.

So if all traces get cleared up on yum removing rhythmbox, I can try to
reproduce the error by installing the old version and then updating ... all
using a minimal set of music files so the log isn't enormous. 

Comment 3 Bastien Nocera 2007-09-21 00:53:22 UTC
at least a portion of that log would have helped. Which setting did you change?
It's possible that some notifications from inotify got through gnome-vfs wrongly
for example, a log showing that might help fix the problem.

Comment 4 Michael Wiktowy 2007-09-21 01:27:02 UTC
OK ... I have recreated the errors ... sort of.

* I uninstalled rhythmbox and deleted .gconf/apps/rhythmbox directory.
* Grabbed the original f7 rhythmbox.0.10.0-8 and installed it using yum
localinstall.
* put a few files in my Music directly ... some with spaces in the file name,
some without.
* started rhythmbox in debug mode and logged the result 
  - somehow it still knew about the files that were there ... where is this info
located if not .gconf?
  - at this point all files were detected and indexed
* went into preferences and turned on "watch my library for new files" option
  - it was off by default
* shut down rhythmbox and yum updated it
* rebooted for a clean slate
* started rhythmbox again and errors described before occur
  - files still are indexed
* added some more files to the Library directory
  - they were indexed too but each file with a space in the path generated an
error ... although this time it was indexed and shows up in the library.

I took some different debug logs at each step (didn't foolishly overwrite the
logs) and I will do my best to clean up  the thousands of lines of log generated
from files that were no longer there and attach the results.

Comment 5 Michael Wiktowy 2007-09-21 02:32:22 UTC
Created attachment 201611 [details]
rhythmbox.0.10.1-1.fc7.clean.debug.log

Figured out how to get rid of the thousands of missing file errors by deleting
them from within RB.

Attached is the debug log resulting from opening RB, letting it generate the
errors on the files with spaces in the names and then closing RB. Nothing has
been removed from the log.

Opening up the preferences and changing options does not seem to get rid of the
errors so that might not have been why they went away last time.

Comment 6 Bastien Nocera 2007-09-21 09:47:30 UTC
Looks like I was right about the wrong data getting from gnome-vfs (or maybe RB
itself):
21:54:16) [0x8f8b5c8] [queue_stat_uri] rhythmdb.c:2097: queueing stat for
"file:///home/mwiktowy/Music/weakerthans%2520the-left%2520and%2520leaving-08-elegy%2520for%2520elsabet.ogg"
(21:54:16) [0x88cf478] [make_access_failed_error] rhythmdb.c:496: got error on
file:///home/mwiktowy/Music/weakerthans%20the-left%20and%20leaving-08-elegy%20for%20elsabet.ogg:
Couldn't access
file:///home/mwiktowy/Music/weakerthans%20the-left%20and%20leaving-08-elegy%20for%20elsabet.ogg:
File not found

It looks like the URI is double-quoted in queue_stat_uri.

Could you please attach the output of:
gnomevfs-info
"file:///home/mwiktowy/Music/weakerthans%2520the-left%2520and%2520leaving-08-elegy%2520for%2520elsabet.ogg"
gnomevfs-info
"file:///home/mwiktowy/Music/weakerthans%20the-left%20and%20leaving-08-elegy%20for%20elsabet.ogg"

And run:
gnomevfs-monitor file:///home/mwiktowy/Music/
and run "touch" on the file mentioned above. That would help see which part of
rhythmbox is causing the problem.

Could you please also send the output of gst-inspect-0.10 and "rpm -Va *gst*
gnome-vfs2"?

Comment 7 Bastien Nocera 2007-09-21 09:51:31 UTC
BTW, the RB database is in ~/.gnome2/rhythmbox/rhythmdb.xml

Comment 8 Michael Wiktowy 2007-09-21 22:14:50 UTC
Created attachment 202851 [details]
diagnostic info requested by bnocera in Comment #6

Attached is the output of:
gnomevfs-info
"file:///home/mwiktowy/Music/weakerthans%2520the-left%2520and%2520leaving-08-elegy%2520for%2520elsabet.ogg"

gnomevfs-info
"file:///home/mwiktowy/Music/weakerthans%20the-left%20and%20leaving-08-elegy%20for%20elsabet.ogg"


The output of gnomevfs-monitor file:///home/mwiktowy/Music/ while running
"touch" on the file mentioned above and the output of gst-inspect-0.10 and rpm
-Va *gst* gnome-vfs2

Comment 9 Bastien Nocera 2007-09-25 12:51:12 UTC
I can't see anything wrong in the debug you've provided.

I believe that the errors are probably due to old files still being present in
the database with the broken escaping. This was fixed quite some time ago, but
we had a quite old version of Rhythmbox in Fedora 7, and FC6.

I'd advise to remove all the stale files from the database (remove the files
from the missing files source), and see whether it fixes your problem.

Comment 10 Michael Wiktowy 2007-09-26 02:37:18 UTC
In that particular debug, I couldn't reproduce the exact problem I initially
saw. It seems that it doesn't ignore those files, it just takes a long time to
index them. So if you drop music files with spaces in the filename into your
watched music directory, they are not immediately available. It generates a lot
of import errors and takes a few tries for it to silently get it right.

Not a show stopper I suppose so I dropped the priority. But I think there is
something non-ideal going on here.

Comment 11 Bastien Nocera 2007-10-17 19:38:32 UTC
It's a bug in Rhythmbox, see:
http://bugzilla.gnome.org/show_bug.cgi?id=487415

Comment 12 Michael Wiktowy 2007-10-17 23:34:58 UTC
Kudos for hunting this down.

Comment 13 Bastien Nocera 2007-10-18 09:18:48 UTC
I'm building a test package for Fedora 7. If the patch works for you, I'll push
it in rawhide/F8 as well.

Follow the links at:
http://koji.fedoraproject.org/koji/taskinfo?taskID=201680
for RPMs

Comment 14 Michael Wiktowy 2007-10-23 04:23:31 UTC
Installed and tried out
http://koji.fedoraproject.org/koji/getfile?taskID=201684&name=rhythmbox-0.10.1-3.fc7.i386.rpm

I haven't run into the same intermittent issue after beating it with a stick for
a while. Looks good to me. Thanks.

Comment 15 Fedora Update System 2007-11-09 23:53:34 UTC
rhythmbox-0.10.1-5.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update rhythmbox'

Comment 16 Fedora Update System 2007-11-26 18:57:04 UTC
rhythmbox-0.10.1-5.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.