After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 795191 - g_udev_device_has_property: assertion 'G_UDEV_IS_DEVICE (device)' failed
g_udev_device_has_property: assertion 'G_UDEV_IS_DEVICE (device)' failed
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: metadata
1.36.x
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2018-04-12 08:57 UTC by macroc
Modified: 2018-04-13 08:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
metadata: Prevent usage of NULL if GUdevDevice is not found (1.95 KB, patch)
2018-04-12 12:00 UTC, Ondrej Holy
none Details | Review
metadata: Prevent usage of NULL if GUdevDevice is not found (2.07 KB, patch)
2018-04-12 12:22 UTC, Ondrej Holy
committed Details | Review

Description macroc 2018-04-12 08:57:41 UTC
When you are in the home directory through Thunar File Manager, journalctl reports every second:

% sudo journalctl -f

Апр 12 11:18:07 archlabs gvfsd-metadata[2806]: g_udev_device_has_property: assertion 'G_UDEV_IS_DEVICE (device)' failed
Апр 12 11:18:07 archlabs gvfsd-metadata[2806]: g_udev_device_has_property: assertion 'G_UDEV_IS_DEVICE (device)' failed
Апр 12 11:18:07 archlabs gvfsd-metadata[2806]: g_udev_device_has_property: assertion 'G_UDEV_IS_DEVICE (device)' failed
Апр 12 11:18:10 archlabs gvfsd-metadata[2806]: g_udev_device_has_property: assertion 'G_UDEV_IS_DEVICE (device)' failed
Апр 12 11:18:10 archlabs gvfsd-metadata[2806]: g_udev_device_has_property: assertion 'G_UDEV_IS_DEVICE (device)' failed
Апр 12 11:18:10 archlabs gvfsd-metadata[2806]: g_udev_device_has_property: assertion 'G_UDEV_IS_DEVICE (device)' failed
Апр 12 11:18:10 archlabs gvfsd-metadata[2806]: g_udev_device_has_property: assertion 'G_UDEV_IS_DEVICE (device)' failed
Апр 12 11:18:10 archlabs gvfsd-metadata[2806]: g_udev_device_has_property: assertion 'G_UDEV_IS_DEVICE (device)' failed
Апр 12 11:18:10 archlabs gvfsd-metadata[2806]: g_udev_device_has_property: assertion 'G_UDEV_IS_DEVICE (device)' failed
Апр 12 11:18:10 archlabs gvfsd-metadata[2806]: g_udev_device_has_property: assertion 'G_UDEV_IS_DEVICE (device)' failed
Апр 12 11:18:10 archlabs gvfsd-metadata[2806]: g_udev_device_has_property: assertion 'G_UDEV_IS_DEVICE (device)' failed
Апр 12 11:18:10 archlabs gvfsd-metadata[2806]: g_udev_device_has_property: assertion 'G_UDEV_IS_DEVICE (device)' failed
Апр 12 11:18:10 archlabs gvfsd-metadata[2806]: g_udev_device_has_property: assertion 'G_UDEV_IS_DEVICE (device)' failed
Comment 1 Ondrej Holy 2018-04-12 09:26:15 UTC
Hmm, that was probably caused by the commit c2d8564, but I wonder what is wrong here...
Comment 2 Ondrej Holy 2018-04-12 11:30:52 UTC
It happens e.g. for tmpfs, so e.g. "gio info /run" triggers this on Fedora. Old udev code just silently returned NULL, the new one returns those assertions...
Comment 3 Ondrej Holy 2018-04-12 12:00:36 UTC
Created attachment 370853 [details] [review]
metadata: Prevent usage of NULL if GUdevDevice is not found

Code to determine tree name from device has been recently ported from
udev to gudev by commit c2d8564. Unfortunately, the gudev code floods
logs by the following messages if device is not found (it can happen
e.g. for tmpfs):
g_udev_device_has_property: assertion 'G_UDEV_IS_DEVICE (device)' failed

Udev code silently returned if NULL device was used, however, corresponding
gudev code prints the mentioned messages. Let's prevent usage of NULL
device in order to prevent those messages.
Comment 4 Ondrej Holy 2018-04-12 12:22:27 UTC
Created attachment 370855 [details] [review]
metadata: Prevent usage of NULL if GUdevDevice is not found
Comment 5 Ondrej Holy 2018-04-13 08:15:05 UTC
Attachment 370855 [details] pushed as d7e1397 - metadata: Prevent usage of NULL if GUdevDevice is not found

Going to push into stable as well...