I thought that each plugin was only accessed by the same thread, but it turns out this is not the case. This crash seems to be due to these multiple threads accessing the snap cache. This is now protected with a lock.
** Description changed: - Potentially a regression introduced by gnome-software - 3.20.5-0ubuntu0.16.04.6 + [Impact] + GNOME Software has a cache that can be accessed by multiple threads. This can cause GNOME Software to crash. This seems to have been caused by adding support for featured snaps (bug 1663097) as the popular, featured and installed snaps are all requested on different threads. - The Ubuntu Error Tracker has been receiving reports about a problem regarding gnome-software. This problem was most recently seen with package version 3.22.7-0ubuntu3.17.04.7, the problem page at https://errors.ubuntu.com/problem/b8d914cec850474446873c5a60feba99b1d498d9 contains more details, including versions of packages affected, stacktrace or traceback, and individual crash reports. - If you do not have access to the Ubuntu Error Tracker and are a software developer, you can request it at http://forms.canonical.com/reports/. + [Test Case] + Since this is a random crash there's not a good test case. Could be checked by looking at errors.ubuntu.com crash reports or repeated restarts of GNOME Software to see if it crashes on startup. + + [Regression Potential] + Solution is to add a lock around this cache. Some risk of breaking related code. ** Summary changed: - /usr/bin/gnome-software:11:g_str_equal:g_hash_table_lookup_node:g_hash_table_insert_internal:find_snaps:gs_plugin_add_popular + Installed, popular and featured snaps are loaded in parallel threads can crash -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1716633 Title: Installed, popular and featured snaps are loaded in parallel threads can crash To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gnome-software/+bug/1716633/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs