Ticket #4070 (closed defect: fixed)

Opened 4 months ago

Last modified 4 months ago

'make install' occasionally fails as: /usr/bin/install: cannot create regular file '.../mc-4.8.24/image/usr/share/mc/mc.lib': File exists

Reported by: slyfox Owned by: andrew_b
Priority: major Milestone: 4.8.25
Component: mc-core Version: 4.8.24
Keywords: Cc:
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master

Description

The install failure originally reported by Rolf Eike Beer who encountered the failure on sparc machine (very high parallelism and relatively slow individual cores).

The relevant build log snippet:

$ make -j20 DESTDIR=/var/tmp/portage/app-misc/mc-4.8.24/image install
...
 /usr/lib/portage/python3.6/ebuild-helpers/xattr/install -c -m 644 mc.lib '/var/tmp/portage/app-misc/mc-4.8.24/image/usr/share/mc'
 /usr/lib/portage/python3.6/ebuild-helpers/xattr/install -c -m 644 mc.lib mc.charsets '/var/tmp/portage/app-misc/mc-4.8.24/image/usr/share/mc'
...
/usr/bin/install: cannot create regular file '/var/tmp/portage/app-misc/mc-4.8.24/image/usr/share/mc/mc.lib': File exists

Here .../xattr/install is a tiny wrapper around /usr/bin/install.

The race condition is in /usr/bin/install itself:

# sequential works:
$ ( install -c -m 644 /bin/bash . ; install -c -m 644 /bin/bash .; wait )
# parallel fails:
$ ( install -c -m 644 /bin/bash . & install -c -m 644 /bin/bash .; wait )
install: cannot create regular file './bash': File exists

I think mc.lib gets installed twice because it's lished in in two _DATA variables in misc/Makefile.am:

dist_pkgdata_DATA = \
        mc.lib

pkgdata_DATA = \
        $(dist_pkgdata_DATA) \
        $(PKGDATA_OUT)

Attachments

build.log.xz (21.3 KB) - added by slyfox 4 months ago.
build.log.xz
0001-misc-Makefile.am-install-mc.lib-only-once-4070.patch (1.6 KB) - added by slyfox 4 months ago.
0001-misc-Makefile.am-install-mc.lib-only-once-4070.patch

Change History

Changed 4 months ago by slyfox

build.log.xz

Changed 4 months ago by slyfox

0001-misc-Makefile.am-install-mc.lib-only-once-4070.patch

comment:1 Changed 4 months ago by slyfox

0001-misc-Makefile.am-install-mc.lib-only-once-4070.patch seems to fix double installation for me.

comment:2 Changed 4 months ago by andrew_b

  • Owner set to andrew_b
  • Status changed from new to accepted
  • Milestone changed from Future Releases to 4.8.25

comment:3 Changed 4 months ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset set to committed-master
  • Resolution set to fixed
  • Branch state changed from no branch to merged

comment:4 Changed 4 months ago by andrew_b

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.