Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
apk-tools
apk-tools
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 61
    • Issues 61
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 15
    • Merge Requests 15
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • alpine
  • apk-toolsapk-tools
  • Issues
  • #10648

Closed
Open
Opened Jul 02, 2019 by Alex Viscreanu@aexvir

APK Randomly failing when using virtual packages

We have randomly experienced errors while using apk to install packages using the `—virtual` fiag. As there was no apparent logic behind the issues we decided to run the same command multiple times, and we realized that the errors seem to be randomly succeeding. We performed the tests using alpine 3.9 and it never raises any error.

The command that allows as to trigger the error is

apk add --no-cache --virtual=.build-deps curl build-base postgresql-dev && apk add --no-cache --virtual=.run-deps libpq && apk add --no-cache --virtual=.webpack-deps nodejs nodejs-npm

I’ve set up a GitLab repository, with parallel pipelines so there can be easily replicated. As you can see, the only jobs that are failing are the ones running alpine 3.10, and the number of failing jobs is totally random

https://gitlab.com/alexviscreanu/test-alpine-build/pipelines/68980751/builds
https://gitlab.com/alexviscreanu/test-alpine-build/pipelines/68980779/builds
https://gitlab.com/alexviscreanu/test-alpine-build/pipelines/68980829/builds

And the error trace always seem to be the same

$ apk add --no-cache --virtual=.build-deps curl build-base postgresql-dev && apk add --no-cache --virtual=.run-deps libpq && apk add --no-cache --virtual=.webpack-deps nodejs nodejs-npm
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz
(1/31) Installing ca-certificates (20190108-r0)
(2/31) Installing nghttp2-libs (1.38.0-r0)
(3/31) Installing libcurl (7.65.1-r0)
(4/31) Installing curl (7.65.1-r0)
(5/31) Installing binutils (2.32-r0)
(6/31) Installing libmagic (5.37-r0)
(7/31) Installing file (5.37-r0)
(8/31) Installing gmp (6.1.2-r1)
(9/31) Installing isl (0.18-r0)
(10/31) Installing libgomp (8.3.0-r0)
(11/31) Installing libatomic (8.3.0-r0)
(12/31) Installing libgcc (8.3.0-r0)
(13/31) Installing mpfr3 (3.1.5-r1)
(14/31) Installing mpc1 (1.1.0-r0)
(15/31) Installing libstdc++ (8.3.0-r0)
(16/31) Installing gcc (8.3.0-r0)
(17/31) Installing musl-dev (1.1.22-r2)
(18/31) Installing libc-dev (0.7.1-r0)
(19/31) Installing g++ (8.3.0-r0)
(20/31) Installing make (4.2.1-r2)
(21/31) Installing fortify-headers (1.1-r0)
(22/31) Installing build-base (0.5-r1)
(23/31) Installing pkgconf (1.6.1-r1)
(24/31) Installing openssl-dev (1.1.1c-r0)
(25/31) Installing db (5.3.28-r1)
(26/31) Installing libsasl (2.1.27-r3)
(27/31) Installing libldap (2.4.47-r2)
(28/31) Installing libpq (11.4-r0)
(29/31) Installing postgresql-libs (11.4-r0)
(30/31) Installing postgresql-dev (11.4-r0)
(31/31) Installing .build-deps (20190702.104055)
Executing busybox-1.30.1-r2.trigger
Executing ca-certificates-20190108-r0.trigger
OK: 196 MiB in 45 packages
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz
(1/1) Installing .run-deps (20190702.104058)
OK: 196 MiB in 46 packages
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
  .webpack-deps (missing):
    required by: world[.webpack-deps=20190702.104058]

If we remove the virtual packages everything works fine, but we never had any issue until now. Are we doing something wrong? How can it be explained that it only fails sometimes?

(from redmine: issue id 10648, created on 2019-07-02)

  • Changesets:
    • Revision b45415b1 by Timo Teräs on 2019-07-02T12:27:57Z:
add: fix virtual package id generation

Fixes 37fbafcd by adding more input to the hash than just second
grained time stamp - collisions would happen when running apk
scripted.

For virtual package the hash works only as unique identifier, so
try to add elements that should make it unique in most cases.

Fixes #10648
  • Revision 1b98a2fa98c5af24a6a55cc61a4ff1ba1fa1f34f by Timo Teräs on 2019-07-08T07:56:52Z:
main/apk-tools: cherry-pick fix for #10648

ref #10648

(cherry picked from commit 129e1119ed93b1be7d0c168567a3cd8d3a970978)
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: alpine/apk-tools#10648