~alpine/users

2 2

[alpine-user] APK hangs on some packages

Tristan Kohl <tristan@iceity.de>
Details
Message ID
<bba9404b-2e6c-6d76-6fe1-256d393cc181@iceity.de>
Sender timestamp
1554300892
DKIM signature
missing
Download raw message
Hey guys,

I build most of my images on top of Alpine. However for the last couple
of days I come accross some weird problem which causes apk add to hang
for some packages. I tried following Dockerfile on an Alpine 3.9 host
with Docker 18.09.1-ce and my Void Linux desktop with docker 18.09.4.


FROM alpine:latest

RUN apk add --no-cache build-base cmake git linux-headers perl

<snip>



#> docker build -t test .
Sending build context to Docker daemon   2.56kB
Step 1/18 : FROM alpine:latest
 ---> 5cb3aa00f899
Step 2/18 : RUN apk add --no-cache build-base cmake git linux-headers perl
 ---> Running in 9736754a88cc
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
fetch
http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
(1/41) Upgrading musl (1.1.20-r3 -> 1.1.20-r4)
(2/41) Installing binutils (2.31.1-r2)
(3/41) Installing libmagic (5.35-r0)
(4/41) Installing file (5.35-r0)
(5/41) Installing gmp (6.1.2-r1)
(6/41) Installing isl (0.18-r0)
(7/41) Installing libgomp (8.2.0-r2)
(8/41) Installing libatomic (8.2.0-r2)
(9/41) Installing libgcc (8.2.0-r2)
(10/41) Installing mpfr3 (3.1.5-r1)
(11/41) Installing mpc1 (1.0.3-r1)
(12/41) Installing libstdc++ (8.2.0-r2)
(13/41) Installing gcc (8.2.0-r2)


Process hangs here (I let it alone for >1h and then killed it), but
running an Alpine instance via

docker run -it --rm alpine

and trying to install those packages manually one by one has worked both
times I tried this (today and on Sunday). However, installing gcc or
build-base did not work (aka. hang) two or three times and only
succedded on consecutive tries. Weirdly enough, calling

apk add g++

pulled in gcc and finished within seconds as I was used to...

So I "think" there is no problem with docker's network setup but I have
no idea of the inner workings so please tell me where to look if you
think this is a docker issue.

Cheers,
Tristan

P.S.: Previous builds ~2 weeks ago worked and there was no docker update
as far as I can remember.


---
Unsubscribe:  alpine-user+unsubscribe@lists.alpinelinux.org
Help:         alpine-user+help@lists.alpinelinux.org
---
Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20190403155340.7b4df67e@ncopa-macbook.copa.dup.pw>
In-Reply-To
<bba9404b-2e6c-6d76-6fe1-256d393cc181@iceity.de> (view parent)
Sender timestamp
1554303220
DKIM signature
missing
Download raw message
On Wed, 3 Apr 2019 16:14:52 +0200
Tristan Kohl <tristan@iceity.de> wrote:

> Hey guys,
> 
> I build most of my images on top of Alpine. However for the last couple
> of days I come accross some weird problem which causes apk add to hang
> for some packages. I tried following Dockerfile on an Alpine 3.9 host
> with Docker 18.09.1-ce and my Void Linux desktop with docker 18.09.4.
> 
> 
> FROM alpine:latest
> 
> RUN apk add --no-cache build-base cmake git linux-headers perl
> 
> <snip>
> 
> 
> 
> #> docker build -t test .  
> Sending build context to Docker daemon   2.56kB
> Step 1/18 : FROM alpine:latest
>  ---> 5cb3aa00f899  
> Step 2/18 : RUN apk add --no-cache build-base cmake git linux-headers perl
>  ---> Running in 9736754a88cc  
> fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
> fetch
> http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
> (1/41) Upgrading musl (1.1.20-r3 -> 1.1.20-r4)
> (2/41) Installing binutils (2.31.1-r2)
> (3/41) Installing libmagic (5.35-r0)
> (4/41) Installing file (5.35-r0)
> (5/41) Installing gmp (6.1.2-r1)
> (6/41) Installing isl (0.18-r0)
> (7/41) Installing libgomp (8.2.0-r2)
> (8/41) Installing libatomic (8.2.0-r2)
> (9/41) Installing libgcc (8.2.0-r2)
> (10/41) Installing mpfr3 (3.1.5-r1)
> (11/41) Installing mpc1 (1.0.3-r1)
> (12/41) Installing libstdc++ (8.2.0-r2)
> (13/41) Installing gcc (8.2.0-r2)
> 
> 
> Process hangs here (I let it alone for >1h and then killed it), but
> running an Alpine instance via
> 
> docker run -it --rm alpine
> 
> and trying to install those packages manually one by one has worked both
> times I tried this (today and on Sunday). However, installing gcc or
> build-base did not work (aka. hang) two or three times and only
> succedded on consecutive tries. Weirdly enough, calling
> 
> apk add g++
> 
> pulled in gcc and finished within seconds as I was used to...
> 
> So I "think" there is no problem with docker's network setup but I have
> no idea of the inner workings so please tell me where to look if you
> think this is a docker issue.

This sounds like an MTU blackhole issue. I know that Fastly
(dl-cdn.a.o) does not have a working PMTU, because they filter
out need-to-frag ICMP packets. I guess its their DDoS feature that
does.

Check the MTU size in your container, on the host and in your LAN.

If you host and container have differnet MTU size, then you can
probably resolve it with clamp-mss on your host.

There is also a tool called 'mtu' that can help you find where a
blackhole is, in case it is a problem with your ISP or somewhere else
on the internet.

  apk add mtu

-nc


> 
> Cheers,
> Tristan
> 
> P.S.: Previous builds ~2 weeks ago worked and there was no docker update
> as far as I can remember.
> 
> 
> ---
> Unsubscribe:  alpine-user+unsubscribe@lists.alpinelinux.org
> Help:         alpine-user+help@lists.alpinelinux.org
> ---
> 



---
Unsubscribe:  alpine-user+unsubscribe@lists.alpinelinux.org
Help:         alpine-user+help@lists.alpinelinux.org
---
Tristan Kohl <tristan@iceity.de>
Details
Message ID
<241e1a68-f52c-66bb-4443-b26d4b0b1c01@iceity.de>
In-Reply-To
<20190403155340.7b4df67e@ncopa-macbook.copa.dup.pw> (view parent)
Sender timestamp
1554306535
DKIM signature
missing
Download raw message
Thanks for your suggestion. I ran mtu on both of my machines and inside
alpine containers, this is what I got in all instances (calling Alpine
CDN and my router):

#> mtu -d dl-cdn.alpinelinux.org
>From 151.101.112.249: icmp_seq=1 bytes=8
>From 151.101.112.249: icmp_seq=2 bytes=1480
1500

Looks to me as they all have the same value, to be honest I never heard
of MTU before (networking is like black magic to me) so I have no idea
what to do here. Will try to find some lecture about that topic. Also I
can not find clamp-mss in Alpine's repository.

Cheers,

Tristan


On 03.04.19 16:53, Natanael Copa wrote:
> On Wed, 3 Apr 2019 16:14:52 +0200
> Tristan Kohl <tristan@iceity.de> wrote:
>
>> Hey guys,
>>
>> I build most of my images on top of Alpine. However for the last couple
>> of days I come accross some weird problem which causes apk add to hang
>> for some packages. I tried following Dockerfile on an Alpine 3.9 host
>> with Docker 18.09.1-ce and my Void Linux desktop with docker 18.09.4.
>>
>>
>> FROM alpine:latest
>>
>> RUN apk add --no-cache build-base cmake git linux-headers perl
>>
>> <snip>
>>
>>
>>
>> #> docker build -t test .  
>> Sending build context to Docker daemon   2.56kB
>> Step 1/18 : FROM alpine:latest
>>  ---> 5cb3aa00f899  
>> Step 2/18 : RUN apk add --no-cache build-base cmake git linux-headers perl
>>  ---> Running in 9736754a88cc  
>> fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
>> fetch
>> http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
>> (1/41) Upgrading musl (1.1.20-r3 -> 1.1.20-r4)
>> (2/41) Installing binutils (2.31.1-r2)
>> (3/41) Installing libmagic (5.35-r0)
>> (4/41) Installing file (5.35-r0)
>> (5/41) Installing gmp (6.1.2-r1)
>> (6/41) Installing isl (0.18-r0)
>> (7/41) Installing libgomp (8.2.0-r2)
>> (8/41) Installing libatomic (8.2.0-r2)
>> (9/41) Installing libgcc (8.2.0-r2)
>> (10/41) Installing mpfr3 (3.1.5-r1)
>> (11/41) Installing mpc1 (1.0.3-r1)
>> (12/41) Installing libstdc++ (8.2.0-r2)
>> (13/41) Installing gcc (8.2.0-r2)
>>
>>
>> Process hangs here (I let it alone for >1h and then killed it), but
>> running an Alpine instance via
>>
>> docker run -it --rm alpine
>>
>> and trying to install those packages manually one by one has worked both
>> times I tried this (today and on Sunday). However, installing gcc or
>> build-base did not work (aka. hang) two or three times and only
>> succedded on consecutive tries. Weirdly enough, calling
>>
>> apk add g++
>>
>> pulled in gcc and finished within seconds as I was used to...
>>
>> So I "think" there is no problem with docker's network setup but I have
>> no idea of the inner workings so please tell me where to look if you
>> think this is a docker issue.
> This sounds like an MTU blackhole issue. I know that Fastly
> (dl-cdn.a.o) does not have a working PMTU, because they filter
> out need-to-frag ICMP packets. I guess its their DDoS feature that
> does.
>
> Check the MTU size in your container, on the host and in your LAN.
>
> If you host and container have differnet MTU size, then you can
> probably resolve it with clamp-mss on your host.
>
> There is also a tool called 'mtu' that can help you find where a
> blackhole is, in case it is a problem with your ISP or somewhere else
> on the internet.
>
>   apk add mtu
>
> -nc
>
>
>> Cheers,
>> Tristan
>>
>> P.S.: Previous builds ~2 weeks ago worked and there was no docker update
>> as far as I can remember.
>>
>>
>> ---
>> Unsubscribe:  alpine-user+unsubscribe@lists.alpinelinux.org
>> Help:         alpine-user+help@lists.alpinelinux.org
>> ---
>>


---
Unsubscribe:  alpine-user+unsubscribe@lists.alpinelinux.org
Help:         alpine-user+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)