Created attachment 55201 [details] stream-restore database file from 0.9.23 Wang Xingchao reported in irc that he was getting this assertion: E: [pulseaudio] module-stream-restore.c: Assertion 'pa_hashmap_put(u->dbus_entries, de->entry_name, de) == 0' failed at modules/module-stream-restore.c:2306, function module_stream_restore_LTX_pa__init(). Aborting. I asked him to send the database file to me, and it turns out that I can reproduce this issue. The problem is that at startup module-stream-restore iterates through all database entries and calls entry_read() for each entry. If entry_read() encounters an entry that is written by Pulseaudio 0.9.23, it will call entry_write(). This should not be done while iterating through the database. At least in case of the "simple" database implementation, this can cause the same entry to get returned twice from pa_database_next(), which will cause the reported assertion. I'll attach the database file that can be used to reproduce this crash.
Assigning to myself. I plan to remove the 0.9.x -> 1.x conversion from entry_read() and add a phase to the stream-restore module initialization where the database is scanned for old or invalid entries. Old entries will be converted and invalid entries will be removed in a safe manner.
Fix sent to the mailing list for review: http://lists.freedesktop.org/archives/pulseaudio-discuss/2012-January/012570.html
Fixed: http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=e5a3d400803a2d36de98d9878469d4214af1f085 http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=ea2b80b20a919322af61cd31e381e9b70a4b918e
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.