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 758029 - Install race in helpers
Install race in helpers
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
1.6.1
Other Mac OS
: Normal normal
: 1.6.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-11-12 19:59 UTC by Ross Burton
Modified: 2015-12-04 14:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (1.18 KB, patch)
2015-11-12 19:59 UTC, Ross Burton
committed Details | Review
Really fix (1.91 KB, patch)
2015-12-04 14:42 UTC, Ross Burton
committed Details | Review

Description Ross Burton 2015-11-12 19:59:24 UTC
Created attachment 315364 [details] [review]
Patch

libs/gst/helpers/Makefile.am has a install hook which can cause install races and thus errors:

| /usr/bin/install: cannot create regular file `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-pam/build/build/tmp/work/core2-64-poky-linux/gstreamer1.0/1.6.1-r0/image/usr/lib/gstreamer1.0/gstreamer-1.0/gst-plugin-scanner': File exists

This needs to be a install-data-hook not an install-exec-hook as the helpers are
installed into helperdir which is considered data (only path variables with
"exec" in are considered executables).

http://www.gnu.org/software/automake/manual/html_node/The-Two-Parts-of-Install.html#The-Two-Parts-of-Install

The explicit dependency on install-helpersPROGRAMS was an attempt at solving
this, but this causes occasional races where install-helpersPROGRAMS can run
twice in parallel (once via install-all, once via the hook's dependency).
Comment 1 Sebastian Dröge (slomo) 2015-11-13 08:41:31 UTC
commit 09aa20746a0fef97fb811c5503928c13a1f55eb5
Author: Ross Burton <ross.burton@intel.com>
Date:   Thu Nov 12 19:46:44 2015 +0000

    helpers: fix install race
    
    The install hook needs to be a install-data-hook not an install-exec-hook as the
    helpers are installed into helperdir which is considered data (only path
    variables with "exec" in are considered executables).
    
    The explicit dependency on install-helpersPROGRAMS was an attempt at solving
    this, but this causes occasional races where install-helpersPROGRAMS can run
    twice in parallel (once via install-all, once via the hook's dependency).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=758029
Comment 2 Ross Burton 2015-12-04 14:36:27 UTC
So my patch wasn't entirely right and there's still a race, just even more rare now.
Comment 3 Ross Burton 2015-12-04 14:42:05 UTC
Created attachment 316770 [details] [review]
Really fix
Comment 4 Sebastian Dröge (slomo) 2015-12-04 14:45:42 UTC
commit 0c6be6604aafa84b525088d1ef4a4486d907743c
Author: Ross Burton <ross.burton@intel.com>
Date:   Fri Dec 4 14:39:29 2015 +0000

    helpers: really fix install race
    
    My previous fix for #758029 wasn't quite right and simply made the race rarer.
    Some of the files are installed by install-exec and others by install-exec, so
    the hooks need to be split too.