GNOME Bugzilla – Bug 701948
JPEGWriter is leaking file descriptors
Last modified: 2013-07-23 14:47:08 UTC
Hi Rygel developers: I've built Rygel using the PPA https://launchpad.net/~yg-jensge/+archive/gupnp-unstable and the dependent PPAs and Valac-0.18 and gstreamer 1.0. Rygel is configured with --disable-tracker-plugin --enable-shared --disable-playbin-plugin --with-media-engine=simple If I harvest/inpoort large number of files (in my case, 4200 mp3 files), I get the following error after harvesting about two-thirds of the files (approximately 3000 files). Smaller quantities of mp3 files (like 1200 files) don't manifest the problem, i.e., harvesting complete without a crash. The issue is reproducible. Crash log below --------------- (rygel:19747): MediaExport-WARNING **: Failed to add item with ID a0257d1acc2533761b5fb9f0e9194763: SQLite error 14: unable to open database file (rygel:19747): MediaExport-WARNING **: rygel-media-export-trackable-db-container.vala:79: Failed to add object: SQLite error 14: unable to open database file (rygel:19747): GStreamer-CRITICAL **: gst_poll_get_read_gpollfd: assertion `set != NULL' failed (rygel:19747): GStreamer-CRITICAL **: gst_bus_create_watch: assertion `bus->priv->poll != NULL' failed (rygel:19747): GLib-CRITICAL **: g_source_set_callback: assertion `source != NULL' failed Segmentation fault (core dumped)
Sorry about the typo (its harvest/import, not harvest/inpoort)
Two ideas: a) the SQL file is corrupt b) something is leaking file descriptors.
The SQLite DB is OK. I ran simple queries on it. Please see below. How can I help with (b)? auro@auro-HP-G60-Notebook-PC:~$ sqlite3 .cache/rygel/media-export.db SQLite version 3.7.9 2011-11-01 00:52:41 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> .tables closure meta_data object schema_info sqlite> SELECT Count(*) FROM meta_data; 1226 sqlite> SELECT Count(*) FROM object; 1255 sqlite> SELECT Count(*) FROM closure; 8702 sqlite>
Another seg fault instance while harvesting 4200 music files (towards the end of the harvesting) (rygel:3172): GStreamer-CRITICAL **: gst_poll_get_read_gpollfd: assertion `set != NULL' failed (rygel:3172): GStreamer-CRITICAL **: gst_bus_create_watch: assertion `bus->priv->poll != NULL' failed (rygel:3172): GLib-CRITICAL **: g_source_set_callback: assertion `source != NULL' failed Segmentation fault (core dumped) DB fine in this case auro@auro-HP-G60-Notebook-PC:~$ sqlite3 .cache/rygel/media-export.db SQLite version 3.7.9 2011-11-01 00:52:41 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> .tables closure meta_data object schema_info sqlite> SELECT Count(*) FROM meta_data; 4231 sqlite> SELECT Count(*) FROM object; 4294 sqlite> SELECT Count(*) FROM closure; 29936 sqlite>
(In reply to comment #3) > The SQLite DB is OK. I ran simple queries on it. Please see below. > How can I help with (b)? Running rygel inside valgrind using --track-fds=yes should be one way. https://live.gnome.org/Rygel/Debugging has some hints and links about valgrinding Rygel.
reproducable with 10k files
Looks like the code that extracts embedded album art is leaking file descriptors
Looks like the bin and src and sink in JPEGWriter are freed properly
Created attachment 249899 [details] [review] media-export: Don't leak fds in JPEG writer
Attachment 249899 [details] pushed as de6b387 - media-export: Don't leak fds in JPEG writer