Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go 1.14 is incompatible with the alpine images #320

Closed
karalabe opened this issue Feb 25, 2020 · 9 comments
Closed

Go 1.14 is incompatible with the alpine images #320

karalabe opened this issue Feb 25, 2020 · 9 comments
Labels
question Usability question, not directly related to an error with the image

Comments

@karalabe
Copy link

Go 1.14 added some weird mlocks in its runtime, which make Go spectacularly crash on a variety of kernels. Among them, the alpine docker images on docker hub. Upstream points fingers to everyone else to fix it, they won't.

golang/go#37436 (comment)

@wglambert
Copy link

So from the error message:

runtime: mlock of signal stack failed: 12
runtime: increase the mlock limit (ulimit -l) or
runtime: update your kernel to 5.3.15+, 5.4.2+, or 5.5+
fatal error: mlock failed

Setting the memlock ulimit should work, I'm using kernel 4.15

$ docker run -it --rm --ulimit memlock=-1 golang:1.14-rc-alpine ash

/go # ulimit -l
unlimited

For building your image

Dockerfile
FROM golang:1.14-rc-alpine
  
RUN ulimit -l

RUN apk add --no-cache make gcc musl-dev linux-headers git wget

RUN set -eux; \
wget -O geth.tgz "https://github.com/ethereum/go-ethereum/archive/v1.9.11.tar.gz"; \
mkdir /go-etherium; \
tar -C /go-etherium -xzf geth.tgz --strip-components=1; \
rm geth.tgz; \
cd /go-etherium; \
make geth
docker build --ulimit memlock=-1
$ docker build --ulimit memlock=-1 . -t golang:test  
Sending build context to Docker daemon  2.048kB                                                                                                               
Step 1/4 : FROM golang:1.14-rc-alpine                                                                                                                         
 ---> a9180f527c36                                                                                                                                            
Step 2/4 : RUN ulimit -l                                                                                                                                      
 ---> Using cache                                                                                                                                             
 ---> edb5d5780f5d                                                                                                                                            
Step 3/4 : RUN apk add --no-cache make gcc musl-dev linux-headers git wget                                                                                    
 ---> Using cache                                                                                                                                             
 ---> 4593746a73c8                                                                                                                                            
Step 4/4 : RUN set -eux; wget -O geth.tgz "https://github.com/ethereum/go-ethereum/archive/v1.9.11.tar.gz"; mkdir /go-etherium; tar -C /go-etherium -xzf geth.tgz --strip-components=1; rm geth.tgz; cd /go-etherium; make geth                                                                                             
 ---> Running in 78e6f825cdd5                                                                                                                                 
+ wget -O geth.tgz https://github.com/ethereum/go-ethereum/archive/v1.9.11.tar.gz                                                                             
--2020-02-25 21:08:43--  https://github.com/ethereum/go-ethereum/archive/v1.9.11.tar.gz                                                                       
Resolving github.com... 192.30.255.112                                                                                                                        
Connecting to github.com|192.30.255.112|:443... connected.                                                                                                    
HTTP request sent, awaiting response... 302 Found                                                                                                             
Location: https://codeload.github.com/ethereum/go-ethereum/tar.gz/v1.9.11 [following]                                                                         
--2020-02-25 21:08:44--  https://codeload.github.com/ethereum/go-ethereum/tar.gz/v1.9.11                                                                      
Resolving codeload.github.com... 192.30.253.120                                                                                                               
Connecting to codeload.github.com|192.30.253.120|:443... connected.                                                                                           
HTTP request sent, awaiting response... 200 OK                                                                                                                
Length: unspecified [application/x-gzip]                                                                                                                      
Saving to: 'geth.tgz'                                                                                                                                         

     0K .......... .......... .......... .......... ..........  338K                                                                                          
    50K .......... .......... .......... .......... ..........  684K                                                                                          
   100K .......... .......... .......... .......... .......... 10.6M                                                                                          
   150K .......... .......... .......... .......... ..........  730K                                                                                          
   200K .......... .......... .......... .......... .......... 10.7M                                                                                          
   250K .......... .......... .......... .......... .......... 11.1M                                                                                          
   300K .......... .......... .......... .......... .......... 10.7M                                                                                          
   350K .......... .......... .......... .......... .......... 1.44M                                                                                          
   400K .......... .......... .......... .......... .......... 1.64M                                                                                          
   450K .......... .......... .......... .......... .......... 11.0M                                                                                          
   500K .......... .......... .......... .......... .......... 8.28M                                                                                          
   550K .......... .......... .......... .......... .......... 7.60M                                                                                          
   600K .......... .......... .......... .......... .......... 18.4M                                                                                          
   650K .......... .......... .......... .......... .......... 13.3M                                                                                          
   700K .......... .......... .......... .......... .......... 11.4M                                                                                          
   750K .......... .......... .......... .......... .......... 2.97M                                                                                          
   800K .......... .......... .......... .......... .......... 1.66M                                                                                          
   850K .......... .......... .......... .......... .......... 11.3M                                                                                          
   900K .......... .......... .......... .......... .......... 9.15M                                                                                          
   950K .......... .......... .......... .......... .......... 11.5M                                                                                          
  1000K .......... .......... .......... .......... .......... 11.5M                                                                                          
  1050K .......... .......... .......... .......... .......... 11.4M                                                                                          
  1100K .......... .......... .......... .......... .......... 11.1M                                                                                          
  1150K .......... .......... .......... .......... .......... 11.0M                                                                                          
  1200K .......... .......... .......... .......... .......... 11.5M                                                                                          
  1250K .......... .......... .......... .......... .......... 11.7M                                                                                          
  1300K .......... .......... .......... .......... .......... 8.85M                                                                                          
  1350K .......... .......... .......... .......... .......... 11.6M                                                                                          
  1400K .......... .......... .......... .......... .......... 11.3M                                                                                          
  1450K .......... .......... .......... .......... ..........  473K                                                                                          
  1500K .......... .......... .......... .......... .......... 27.1M                                                                                          
  1550K .......... .......... .......... .......... .......... 19.7M                                                                                          
  1600K .......... .......... .......... .......... .......... 28.5M                                                                                          
  1650K .......... .......... .......... .......... .......... 69.5M                                                                                          
  1700K .......... .......... .......... .......... .......... 71.3M                                                                                          
  1750K .......... .......... .......... .......... .......... 72.1M                                                                                          
  1800K .......... .......... .......... .......... .......... 84.5M                                                                                          
  1850K .......... .......... .......... .......... .......... 79.7M                                                                                          
  1900K .......... .......... .......... .......... .......... 72.0M                                                                                          
  1950K .......... .......... .......... .......... .......... 71.1M                                                                                          
  2000K .......... .......... .......... .......... .......... 75.1M                                                                                          
  2050K .......... .......... .......... .......... .......... 77.5M                                                                                          
  2100K .......... .......... .......... .......... .......... 76.8M                                                                                          
  2150K .......... .......... .......... .......... .......... 81.6M                                                                                          
  2200K .......... .......... .......... .......... .......... 82.9M                                                                                          
  2250K .......... .......... .......... .......... .......... 82.9M                                                                                          
  2300K .......... .......... .......... .......... .......... 1.41M                                                                                          
  2350K .......... .......... .......... .......... .......... 24.6M                                                                                          
  2400K .......... .......... .......... .......... .......... 19.1M                                                                                          
  2450K .......... .......... .......... .......... .......... 30.9M                                                                                          
  2500K .......... .......... .......... .......... .......... 61.5M                                                                                          
  2550K .......... .......... .......... .......... .......... 70.1M                                                                                          
  2600K .......... .......... .......... .......... .......... 66.6M                                                                                          
  2650K .......... .......... .......... .......... .......... 66.1M                                                                                          
  2700K .......... .......... .......... .......... .......... 3.01M                                                                                          
  2750K .......... .......... .......... .......... ..........  130M                                                                                          
  2800K .......... .......... .......... .......... ..........  120M                                                                                          
  2850K .......... .......... .......... .......... ..........  126M                                                                                          
  2900K .......... .......... .......... .......... ..........  112M                                                                                          
  2950K .......... .......... .......... .......... ..........  125M                                                                                          
  3000K .......... .......... .......... .......... ..........  145M                                                                                          
  3050K .......... .......... .......... .......... ..........  156M                                                                                          
  3100K .......... .......... .......... .......... ..........  138M                                                                                          
  3150K .......... .......... .......... .......... ..........  154M                                                                                          
  3200K .......... .......... .......... .......... ..........  141M                                                                                          
  3250K .......... .......... .......... .......... ..........  121M                                                                                          
  3300K .......... .......... .......... .......... .......... 32.2M                                                                                          
  3350K .......... .......... .......... .......... .......... 11.1M                                                                                          
  3400K .......... .......... .......... .......... .......... 11.9M                                                                                          
  3450K .......... .......... .......... .......... .......... 11.7M                                                                                          
  3500K .......... .......... .......... .......... .......... 11.5M                                                                                          
  3550K .......... .......... .......... .......... .......... 11.4M                                                                                          
  3600K .......... .......... .......... .......... .......... 11.5M                                                                                          
  3650K .......... .......... .......... .......... .......... 8.68M                                                                                          
  3700K .......... .......... .......... .......... .......... 11.4M                                                                                          
  3750K .......... .......... .......... .......... .......... 11.5M                                                                                          
  3800K .......... .......... .......... .......... .......... 12.3M                                                                                          
  3850K .......... .......... .......... .......... .......... 10.3M                                                                                          
  3900K .......... .......... .......... .......... .......... 13.7M                                                                                          
  3950K .......... .......... .......... .......... .......... 10.8M                                                                                          
  4000K .......... .......... .......... .......... .......... 10.6M                                                                                          
  4050K .......... .......... .......... .......... .......... 11.1M                                                                                          
  4100K .......... .......... .......... .......... .......... 9.43M                                                                                          
  4150K .......... .......... .......... .......... .......... 12.4M                                                                                          
  4200K .......... .......... .......... .......... .......... 9.83M                                                                                          
  4250K .......... .......... .......... .......... .......... 9.73M                                                                                          
  4300K .......... .......... .......... .......... .......... 12.3M                                                                                          
  4350K .......... .......... .......... .......... .......... 11.0M                                                                                          
  4400K .......... .......... .......... .......... .......... 10.8M                                                                                          
  4450K .......... .......... .......... .......... .......... 10.9M                                                                                          
  4500K .......... .......... .......... .......... .......... 11.0M                                                                                          
  4550K .......... .......... .......... .......... .......... 11.0M                                                                                          
  4600K .......... .......... .......... .......... .......... 10.8M                                                                                          
  4650K .......... .......... .......... .......... .......... 8.68M                                                                                          
  4700K .......... .......... .......... .......... .......... 13.9M                                                                                          
  4750K .......... .......... .......... .......... .......... 10.9M                                                                                          
  4800K .......... .......... .......... .......... .......... 10.7M                                                                                          
  4850K .......... .......... .......... .......... .......... 11.2M                                                                                          
  4900K .......... .......... .......... .......... .......... 10.1M                                                                                          
  4950K .......... .......... .......... .......... .......... 12.0M                                                                                          
  5000K .......... .......... .......... .......... .......... 8.64M                                                                                          
  5050K .......... .......... .......... .......... .......... 15.2M                                                                                          
  5100K .......... .......... .......... .......... .......... 10.7M                                                                                          
  5150K .......... .......... .......... .......... .......... 10.9M                                                                                          
  5200K .......... .......... .......... .......... .......... 11.1M                                                                                          
  5250K .......... .......... .......... .......... .......... 11.0M                                                                                          
  5300K .......... .......... .......... .......... .......... 7.05M                                                                                          
  5350K .......... .......... .......... .......... .......... 14.8M                                                                                          
  5400K .......... .......... .......... .......... .......... 15.4M                                                                                          
  5450K .......... .......... .......... .......... .......... 11.0M                                                                                          
  5500K .......... .......... .......... .......... .......... 11.0M                                                                                          
  5550K .......... .......... .......... .......... .......... 9.06M                                                                                          
  5600K .......... .......... .......... .......... .......... 10.7M                                                                                          
  5650K .......... .......... .......... .......... .......... 11.2M                                                                                          
  5700K .......... .......... .......... .......... .......... 10.6M                                                                                          
  5750K .......... .......... .......... .......... .......... 11.2M                                                                                          
  5800K .......... .......... .......... .......... .......... 10.2M                                                                                          
  5850K .......... .......... .......... .......... .......... 9.70M                                                                                          
  5900K .......... .......... .......... .......... .......... 13.1M                                                                                          
  5950K .......... .......... .......... .......... .......... 11.0M                                                                                          
  6000K .......... .......... .......... .......... .......... 11.0M                                                                                          
  6050K .......... .......... .......... .......... .......... 10.9M                                                                                          
  6100K .......... .......... .......... .......... .......... 10.8M                                                                                          
  6150K .......... .......... .......... .......... .......... 11.0M                                                                                          
  6200K .......... .......... .......... .......... .......... 10.9M                                                                                          
  6250K .......... .......... .......... .......... .......... 11.0M                                                                                          
  6300K .......... .......... .......... .......... .......... 10.8M                                                                                          
  6350K .......... .......... .......... .......... .......... 10.9M                                                                                          
  6400K .......... .......... .......... .......... .......... 10.7M                                                                                          
  6450K .......... .......... .......... .......... .......... 11.3M                                                                                          
  6500K .......... .......... .......... .......... .......... 10.4M                                                                                          
  6550K .......... .......... .......... .......... .......... 11.2M                                                                                          
  6600K .......... .......... .......... .......... .......... 10.8M                                                                                          
  6650K .......... .......... .......... .......... .......... 11.0M                                                                                          
  6700K .......... .......... .......... .......... .......... 10.8M                                                                                          
  6750K .......... .......... .......... .......... .......... 10.9M                                                                                          
  6800K .......... .......... .......... .......... .......... 10.0M                                                                                          
  6850K .......... .......... .......... .......... .......... 7.66M                                                                                          
  6900K .......... .......... .......... .......... .......... 7.64M                                                                                          
  6950K .......... .......... .......... .......... .......... 7.31M                                                                                          
  7000K .......... .......... .......... .......... .......... 6.94M                                                                                          
  7050K .......... .......... .......... .......... .......... 8.17M                                                                                          
  7100K .......... .......... .......... .......... .......... 5.98M                                                                                          
  7150K .......... .......... .......... .......... .......... 8.30M                                                                                          
  7200K .......... .......... .......... .......... .......... 6.23M                                                                                          
  7250K .......... .......... .......... .......... .......... 7.02M                                                                                          
  7300K .......... .......... .......... .......... .......... 6.58M                                                                                          
  7350K .......... .......... .......... .......... .......... 6.18M                                                                                          
  7400K .......... .......... .......... .......... .......... 10.7M                                                                                          
  7450K .......... .......... .......... .......... .......... 6.95M                                                                                          
  7500K .......... .......... .......... .......... .......... 7.19M                                                                                          
  7550K .......... .......... .......... .......... .......... 8.14M                                                                                          
  7600K .......... .......... .......... .......... .......... 6.14M                                                                                          
  7650K .......... .......... .......... .......... .......... 7.02M                                                                                          
  7700K .......... .......... .......... .......... .......... 7.23M                                                                                          
  7750K .......... .......... .......... .......... .......... 6.99M                                                                                          
  7800K .......... .......... .......... .......... .......... 7.86M                                                                                          
  7850K .......... .......... .......... .......... .......... 6.62M                                                                                          
  7900K .......... .......... .......... .......... .......... 7.74M                                                                                          
  7950K .......... .......... .......... .......... .......... 7.20M                                                                                          
  8000K .......... .......... .......... .......... .......... 6.73M                                                                                          
  8050K .......... .......... .......... .......... .......... 4.96M                                                                                          
  8100K .......... .......... .......... .......... .......... 10.6M                                                                                          
  8150K .......... .......... .......... .......... .......... 6.05M                                                                                          
  8200K .......... .......... .......... .......... .......... 7.95M                                                                                          
  8250K .......... .......... .......... .......... .......... 6.82M                                                                                          
  8300K .......... .......... .......... .......... .......... 4.05M                                                                                          
  8350K .......... .......... .......... .......... .......... 4.70M                                                                                          
  8400K .......... .......... .......... .......... .......... 6.31M                                                                                          
  8450K .......... .......... .......... .......... ....       8.39M=1.2s                                                                                     

2020-02-25 21:08:46 (6.73 MB/s) - 'geth.tgz' saved [8698235]                                                                                                  

+ mkdir /go-etherium                                                                                                                                          
+ tar -C /go-etherium -xzf geth.tgz '--strip-components=1'                                                                                                    
+ rm geth.tgz                                                                                                                                                 
+ cd /go-etherium                                                                                                                                             
+ make geth                                                                                                                                                   
env GO111MODULE=on go run build/ci.go install ./cmd/geth
go: downloading github.com/cespare/cp v0.1.0
go: downloading golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2                                                                                        
go: downloading github.com/Azure/azure-storage-blob-go v0.7.0                                                                                                 
go: downloading github.com/Azure/azure-pipeline-go v0.2.2                                                                                                     
go: downloading github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d                                                                                
>>> /usr/local/go/bin/go install -v ./cmd/geth
go: downloading gopkg.in/urfave/cli.v1 v1.20.0
go: downloading github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416                                                                                   
go: downloading github.com/rjeczalik/notify v0.9.1                                                                                                            
go: downloading github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc                                                                                     
go: downloading github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570                                                                          
go: downloading github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222                                                                                    
go: downloading github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d                                                                              
go: downloading github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c                                                                        
go: downloading github.com/mattn/go-colorable v0.1.0                                                                                                          
go: downloading github.com/hashicorp/golang-lru v0.0.0-20160813221303-0a025b7e63ad                                                                            
go: downloading golang.org/x/sync v0.0.0-20181108010431-42b317875d0f                                                                                          
go: downloading github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847                                                                         
go: downloading github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356                                                                                    
go: downloading github.com/mattn/go-runewidth v0.0.4                                                                                                          
go: downloading github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff                                                                          
go: downloading golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7                                                                                           
go: downloading github.com/golang/protobuf v1.3.2-0.20190517061210-b285ee9cfc6c                                                                               
go: downloading github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3                                                                              
go: downloading github.com/VictoriaMetrics/fastcache v1.5.3                                                                                                   
go: downloading github.com/naoina/go-stringutil v0.1.0                                                                                                        
go: downloading github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea                                                                             
go: downloading github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989                                                                             
go: downloading github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277                                                                        
go: downloading github.com/cespare/xxhash v1.1.0                                                                                                              
go: downloading gopkg.in/olebedev/go-duktape.v3 v3.0.0-20190213234257-ec84240a7772                                                                            
go: downloading github.com/mattn/go-isatty v0.0.5-0.20180830101745-3fb116b82035                                                                               
go: downloading github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00                                                                                         
go: downloading github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208                                                                                   
go: downloading github.com/cespare/xxhash/v2 v2.1.1                                                                                                           
go: downloading github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef                                                                          
go: downloading github.com/dop251/goja v0.0.0-20200106141417-aaec0e7bde29                                                                                     
go: downloading github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7                                                                                  
go: downloading github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521                                                                                     
go: downloading github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4                                                                            
go: downloading github.com/huin/goupnp v0.0.0-20161224104101-679507af18f3                                                                                     
go: downloading github.com/davecgh/go-spew v1.1.1                                                                                                             
go: downloading github.com/opentracing/opentracing-go v1.1.0                                                                                                  
go: downloading golang.org/x/net v0.0.0-20190628185345-da137c7871d7                                                                                           
go: downloading github.com/fatih/color v1.3.0                                                                                                                 
go: downloading github.com/go-stack/stack v1.8.0                                                                                                              
go: downloading github.com/elastic/gosigar v0.8.1-0.20180330100440-37f05ff46ffa                                                                               
go: downloading github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150                                                                               
go: downloading github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458                                                                            
go: downloading github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883                                                                           
go: downloading golang.org/x/text v0.3.2                                                                                                                      
go: downloading github.com/golang/snappy v0.0.1                                                                                                               
go: downloading github.com/go-sourcemap/sourcemap v2.1.2+incompatible                                                                                         
go: downloading golang.org/x/time v0.0.0-20190308202827-9d24e82272b4                                                                                          
go: downloading github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c                                                                                  
go: downloading github.com/dlclark/regexp2 v1.2.0                                                                                                             
go: downloading github.com/pkg/errors v0.8.1                                                                                                                  
golang.org/x/net/html/atom                                                                                                                                    
golang.org/x/text/encoding/internal/identifier                                                                                                                
golang.org/x/crypto/curve25519                                                                                                                                
golang.org/x/text/internal/utf8internal                                                                                                                       
github.com/ethereum/go-ethereum/internal/web3ext                                                                                                              
github.com/ethereum/go-ethereum/ethdb                                                                                                                         
github.com/steakknife/hamming                                                                                                                                 
github.com/cespare/xxhash/v2                                                                                                                                  
github.com/golang/snappy                                                                                                                                      
golang.org/x/sys/unix                                                                                                                                         
github.com/aristanetworks/goarista/monotime                                                                                                                   
github.com/go-stack/stack                                                                                                                                     
github.com/deckarep/golang-set                                                                                                                                
github.com/ethereum/go-ethereum/common/mclock                                                                                                                 
github.com/pborman/uuid                                                                                                                                       
github.com/ethereum/go-ethereum/log                                                                                                                           
github.com/VictoriaMetrics/fastcache                                                                                                                          
golang.org/x/crypto/pbkdf2                                                                                                                                    
github.com/ethereum/go-ethereum/common/prque                                                                                                                  
github.com/ethereum/go-ethereum/event                                                                                                                         
golang.org/x/crypto/scrypt                                                                                                                                    
github.com/steakknife/bloomfilter                                                                                                                             
github.com/ethereum/go-ethereum/common/fdlimit                                                                                                                
github.com/hashicorp/golang-lru/simplelru                                                                                                                     
github.com/ethereum/go-ethereum/p2p/netutil                                                                                                                   
golang.org/x/net/context                                                                                                                                      
github.com/gorilla/websocket                                                                                                                                  
github.com/hashicorp/golang-lru                                                                                                                               
github.com/edsrzf/mmap-go                                                                                                                                     
github.com/ethereum/go-ethereum/common/bitutil                                                                                                                
github.com/syndtr/goleveldb/leveldb/util                                                                                                                      
github.com/rs/xhandler                                                                                                                                        
github.com/syndtr/goleveldb/leveldb/comparer                                                                                                                  
github.com/syndtr/goleveldb/leveldb/storage                                                                                                                   
github.com/ethereum/go-ethereum/ethdb/memorydb                                                                                                                
github.com/mattn/go-runewidth                                                                                                                                 
github.com/pkg/errors                                                                                                                                         
github.com/syndtr/goleveldb/leveldb/cache                                                                                                                     
github.com/rs/cors                                                                                                                                            
github.com/syndtr/goleveldb/leveldb/filter                                                                                                                    
golang.org/x/sys/cpu                                                                                                                                          
github.com/olekukonko/tablewriter                                                                                                                             
golang.org/x/crypto/ripemd160                                                                                                                                 
github.com/ethereum/go-ethereum/accounts/abi                                                                                                                  
github.com/syndtr/goleveldb/leveldb/opt                                                                                                                       
github.com/elastic/gosigar                                                                                                                                    
github.com/rjeczalik/notify                                                                                                                                   
github.com/ethereum/go-ethereum/rpc                                                                                                                           
github.com/syndtr/goleveldb/leveldb/errors                                                                                                                    
github.com/prometheus/tsdb/fileutil                                                                                                                           
github.com/syndtr/goleveldb/leveldb/iterator                                                                                                                  
github.com/syndtr/goleveldb/leveldb/journal                                                                                                                   
github.com/ethereum/go-ethereum/crypto/blake2b                                                                                                                
github.com/ethereum/go-ethereum/metrics                                                                                                                       
github.com/syndtr/goleveldb/leveldb/memdb                                                                                                                     
github.com/syndtr/goleveldb/leveldb/table                                                                                                                     
github.com/davecgh/go-spew/spew                                                                                                                               
github.com/gballet/go-libpcsclite                                                                                                                             
github.com/ethereum/go-ethereum/crypto/bn256/cloudflare                                                                                                       
github.com/status-im/keycard-go/derivationpath                                                                                                                
github.com/wsddn/go-ecdh                                                                                                                                      
golang.org/x/text/transform                                                                                                                                   
github.com/ethereum/go-ethereum/crypto/ecies                                                                                                                  
github.com/ethereum/go-ethereum/p2p/enr                                                                                                                       
github.com/huin/goupnp/httpu                                                                                                                                  
github.com/huin/goupnp/scpd                                                                                                                                   
golang.org/x/text/unicode/norm                                                                                                                                
github.com/huin/goupnp/soap                                                                                                                                   
github.com/huin/goupnp/ssdp                                                                                                                                   
github.com/syndtr/goleveldb/leveldb                                                                                                                           
github.com/ethereum/go-ethereum/crypto/bn256                                                                                                                  
golang.org/x/net/html                                                                                                                                         
golang.org/x/text/encoding                                                                                                                                    
golang.org/x/text/runes                                                                                                                                       
golang.org/x/text/internal/tag                                                                                                                                
golang.org/x/text/encoding/internal                                                                                                                           
golang.org/x/text/internal/language                                                                                                                           
github.com/ethereum/go-ethereum/trie                                                                                                                          
golang.org/x/text/encoding/charmap                                                                                                                            
golang.org/x/text/encoding/japanese                                                                                                                           
golang.org/x/text/encoding/korean                                                                                                                             
golang.org/x/text/encoding/simplifiedchinese                                                                                                                  
golang.org/x/text/encoding/traditionalchinese                                                                                                                 
golang.org/x/text/encoding/unicode                                                                                                                            
golang.org/x/text/internal/language/compact                                                                                                                   
github.com/jackpal/go-nat-pmp                                                                                                                                 
github.com/ethereum/go-ethereum/core/types                                                                                                                    
golang.org/x/text/language                                                                                                                                    
github.com/tyler-smith/go-bip39/wordlists                                                                                                                     
github.com/ethereum/go-ethereum/ethdb/leveldb                                                                                                                 
github.com/ethereum/go-ethereum/p2p/enode                                                                                                                     
github.com/ethereum/go-ethereum/p2p/discv5                                                                                                                    
github.com/tyler-smith/go-bip39                                                                                                                               
github.com/golang/protobuf/proto                                                                                                                              
github.com/karalabe/usb                                                                                                                                       
github.com/ethereum/go-ethereum/signer/storage                                                                                                                
golang.org/x/crypto/ssh/terminal                                                                                                                              
golang.org/x/text/encoding/htmlindex                                                                                                                          
github.com/ethereum/go-ethereum/eth/tracers/internal/tracers                                                                                                  
github.com/ethereum/go-ethereum                                                                                                                               
github.com/ethereum/go-ethereum/core/state                                                                                                                    
github.com/ethereum/go-ethereum/core/rawdb                                                                                                                    
github.com/ethereum/go-ethereum/core/vm                                                                                                                       
github.com/ethereum/go-ethereum/core/bloombits                                                                                                                
github.com/ethereum/go-ethereum/accounts                                                                                                                      
github.com/ethereum/go-ethereum/p2p/discover                                                                                                                  
golang.org/x/net/html/charset                                                                                                                                 
github.com/ethereum/go-ethereum/accounts/keystore                                                                                                             
github.com/ethereum/go-ethereum/accounts/scwallet                                                                                                             
github.com/ethereum/go-ethereum/consensus                                                                                                                     
github.com/ethereum/go-ethereum/consensus/misc                                                                                                                
github.com/huin/goupnp                                                                                                                                        
gopkg.in/olebedev/go-duktape.v3                                                                                                                               
github.com/ethereum/go-ethereum/consensus/clique                                                                                                              
github.com/ethereum/go-ethereum/consensus/ethash                                                                                                              
github.com/ethereum/go-ethereum/metrics/prometheus                                                                                                            
github.com/huin/goupnp/dcps/internetgateway1                                                                                                                  
github.com/huin/goupnp/dcps/internetgateway2                                                                                                                  
github.com/ethereum/go-ethereum/metrics/exp                                                                                                                   
github.com/ethereum/go-ethereum/core                                                                                                                          
github.com/golang/protobuf/protoc-gen-go/descriptor                                                                                                           
github.com/fjl/memsize                                                                                                                                        
github.com/mattn/go-isatty                                                                                                                                    
gopkg.in/urfave/cli.v1                                                                                                                                        
github.com/mattn/go-colorable                                                                                                                                 
github.com/ethereum/go-ethereum/p2p/nat                                                                                                                       
github.com/fjl/memsize/memsizeui                                                                                                                              
golang.org/x/time/rate                                                                                                                                        
github.com/ethereum/go-ethereum/les/flowcontrol                                                                                                               
github.com/ethereum/go-ethereum/p2p/dnsdisc                                                                                                                   
github.com/ethereum/go-ethereum/accounts/usbwallet/trezor                                                                                                     
github.com/ethereum/go-ethereum/p2p                                                                                                                           
github.com/graph-gophers/graphql-go/errors                                                                                                                    
github.com/ethereum/go-ethereum/internal/debug                                                                                                                
github.com/graph-gophers/graphql-go/internal/common                                                                                                           
github.com/graph-gophers/graphql-go/log                                                                                                                       
github.com/graph-gophers/graphql-go/internal/schema                                                                                                           
github.com/graph-gophers/graphql-go/internal/query                                                                                                            
github.com/opentracing/opentracing-go/log                                                                                                                     
github.com/influxdata/influxdb/pkg/escape                                                                                                                     
github.com/opentracing/opentracing-go                                                                                                                         
github.com/influxdata/influxdb/models                                                                                                                         
golang.org/x/sync/syncmap                                                                                                                                     
github.com/graph-gophers/graphql-go/internal/exec/packer                                                                                                      
github.com/graph-gophers/graphql-go/introspection                                                                                                             
github.com/opentracing/opentracing-go/ext                                                                                                                     
github.com/graph-gophers/graphql-go/internal/validation                                                                                                       
github.com/graph-gophers/graphql-go/internal/exec/resolvable                                                                                                  
github.com/ethereum/go-ethereum/whisper/whisperv6                                                                                                             
github.com/graph-gophers/graphql-go/trace                                                                                                                     
github.com/dlclark/regexp2/syntax                                                                                                                             
github.com/ethereum/go-ethereum/eth/downloader                                                                                                                
github.com/ethereum/go-ethereum/core/forkid                                                                                                                   
github.com/ethereum/go-ethereum/eth/fetcher                                                                                                                   
github.com/ethereum/go-ethereum/eth/filters                                                                                                                   
github.com/ethereum/go-ethereum/light                                                                                                                         
github.com/influxdata/influxdb/client                                                                                                                         
github.com/dlclark/regexp2                                                                                                                                    
github.com/graph-gophers/graphql-go/internal/exec/selected                                                                                                    
github.com/ethereum/go-ethereum/internal/ethapi                                                                                                               
github.com/ethereum/go-ethereum/miner                                                                                                                         
github.com/graph-gophers/graphql-go/internal/exec                                                                                                             
github.com/dop251/goja/file                                                                                                                                   
github.com/ethereum/go-ethereum/metrics/influxdb                                                                                                              
github.com/dop251/goja/token                                                                                                                                  
github.com/go-sourcemap/sourcemap/internal/base64vlq                                                                                                          
github.com/go-sourcemap/sourcemap                                                                                                                             
golang.org/x/text/internal                                                                                                                                    
golang.org/x/text/internal/colltab                                                                                                                            
golang.org/x/text/cases                                                                                                                                       
github.com/fatih/color                                                                                                                                        
github.com/dop251/goja/ast                                                                                                                                    
github.com/graph-gophers/graphql-go                                                                                                                           
github.com/ethereum/go-ethereum/internal/jsre/deps                                                                                                            
github.com/dop251/goja/parser                                                                                                                                 
github.com/peterh/liner
github.com/ethereum/go-ethereum/ethclient
golang.org/x/text/collate
github.com/graph-gophers/graphql-go/relay
github.com/ethereum/go-ethereum/eth/gasprice
github.com/ethereum/go-ethereum/graphql
github.com/naoina/go-stringutil
github.com/naoina/toml/ast
github.com/naoina/toml
github.com/dop251/goja
github.com/ethereum/go-ethereum/accounts/usbwallet
github.com/ethereum/go-ethereum/signer/core
github.com/ethereum/go-ethereum/accounts/external
github.com/ethereum/go-ethereum/internal/jsre
github.com/ethereum/go-ethereum/node
github.com/ethereum/go-ethereum/accounts/abi/bind
github.com/ethereum/go-ethereum/console
github.com/ethereum/go-ethereum/contracts/checkpointoracle/contract
github.com/ethereum/go-ethereum/accounts/abi/bind/backends
github.com/ethereum/go-ethereum/contracts/checkpointoracle
github.com/ethereum/go-ethereum/les/checkpointoracle
# gopkg.in/olebedev/go-duktape.v3
duk_logging.c: In function 'duk__logger_prototype_log_shared':
duk_logging.c:184:64: warning: 'Z' directive writing 1 byte into a region of size between 0 and 9 [-Wformat-overflow=]
  184 |  sprintf((char *) date_buf, "%04d-%02d-%02dT%02d:%02d:%02d.%03dZ",
      |                                                                ^
duk_logging.c:184:2: note: 'sprintf' output between 25 and 85 bytes into a destination of size 32
  184 |  sprintf((char *) date_buf, "%04d-%02d-%02dT%02d:%02d:%02d.%03dZ",
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  185 |          (int) comp.year, (int) comp.month + 1, (int) comp.day,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  186 |          (int) comp.hours, (int) comp.minutes, (int) comp.seconds,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  187 |          (int) comp.milliseconds);
      |          ~~~~~~~~~~~~~~~~~~~~~~~~
github.com/ethereum/go-ethereum/eth/tracers
github.com/ethereum/go-ethereum/eth
github.com/ethereum/go-ethereum/les
github.com/ethereum/go-ethereum/ethstats
github.com/ethereum/go-ethereum/cmd/utils
github.com/ethereum/go-ethereum/cmd/geth
Done building.
Run "./build/bin/geth" to launch geth.
Removing intermediate container 78e6f825cdd5
 ---> b390a12dcfe0
Successfully built b390a12dcfe0
Successfully tagged golang:test

@wglambert wglambert added the question Usability question, not directly related to an error with the image label Feb 25, 2020
@karalabe
Copy link
Author

Yes, the workaround is one possible path. However that entails everyone using the alpine image to modify their build infra. Not sure that that is a good path to go down on.

@karalabe
Copy link
Author

I'm also unsure if this workaround would work on automated builds on docker hub, since I can only specify the Dockerfile to use, but have no control over the build flags. Maybe I can set the limits within my build container? But we're again entering a weird territory of modifying build infra to handle a Go issue.

@networkimprov
Copy link

networkimprov commented Feb 25, 2020

This is a bug report, not a question. What's the policy for updating Docker library image kernels?

@yosifkit
Copy link
Member

Our docker images do not contain Linux kernels. The kernel is the host kernel (that's how docker containers work).

@tianon
Copy link
Member

tianon commented Feb 25, 2020

I happen to be on 5.3.9 on my Debian box (been holding off on the update for unrelated reasons), so I should be able to reproduce the issue.

Sure enough, when I build the sample Dockerfile that @wglambert posted in #320 (comment), I am able to reproduce the failure.

Additionally, to determine whether this is Alpine related, I switched to FROM golang:1.14-rc (dropping the apk add line entirely since the necessary dependencies are already installed in the Debian-based images), and sure enough I was able to reproduce there too, as expected.

So to summarize:

  • Go 1.13 has a nasty bug related to memory corruption (runtime: memory corruption on Linux 5.2+ golang/go#35777)
  • for Go 1.14, there was desire to fix this, but there was no clean, easy fix, so the Go developers opted to go for a trade-off that requires either runtime environment settings to be modified (ulimit) or for newer kernels to be employed (specifically, 5.3.15+, 5.4.2+, or 5.5+)
  • neither the kernel version nor the default ulimit settings can be controlled, influenced, or modified by the container image
    • the kernel version is controlled by the host and shared with the host (that's how containers work)
    • the ulimit settings are considered a container runtime setting (because they have security implications) and thus must be set on docker run, docker service create, docker build, etc and cannot be influenced (or increased) from within a container or image

This is unfortunate, but there's really nothing we can change in the image to accommodate this change -- the only way to satisfy this memory corruption mitigation is unfortunately going to be updating the host kernel to one of those listed or adding the necessary runtime parameters to adjust the relevant ulimit.

For the case of Docker Hub's automated builds, I would suggest filing a support/wishlist issue with them to request the ability to adjust ulimit parameters during builds on their platform. Alternatively, you could build your images elsewhere (such as on Travis CI) to get more control over how docker build gets invoked.

@tianon tianon closed this as completed Feb 25, 2020
@networkimprov
Copy link

To clarify, Go 1.14 added a feature based on OS signals. Use of signals can trigger a Linux kernel bug introduced in 5.3.

sendrex added a commit to sendrex/simple-imageboard-golang that referenced this issue Feb 27, 2020
nickolaev pushed a commit to nickolaev/examples that referenced this issue Mar 8, 2020
Go 1.14 which we use to build our code in golang:alpine docker images
aparenlty has some issues, which are fixed by setting these flags
as described here: docker-library/golang#320

Signed-off-by: Nikolay Nikolaev <nnikolay@vmware.com>
nickolaev pushed a commit to nickolaev/examples that referenced this issue Mar 8, 2020
Go 1.14 which we use to build our code in golang:alpine docker images
aparenlty has some issues, which are fixed by setting these flags
as described here: docker-library/golang#320

Signed-off-by: Nikolay Nikolaev <nnikolay@vmware.com>
nickolaev pushed a commit to networkservicemesh/examples that referenced this issue Mar 8, 2020
* Update the NSM version to the latest available

* Fix docker build of golang images

Go 1.14 which we use to build our code in golang:alpine docker images
apparently has some issues, which are fixed by setting these flags
as described here: docker-library/golang#320

* Update Makefile and go.mod for vpp v3

* Migrate the bridge-domain to vpp v3

* Migrate the load-balancer to vpp v3

* Migrate universal-cnf to vpp v3

* Migrate vpp-icmp to vpp v3

* Go 1.14 update

Signed-off-by: Nikolay Nikolaev <nnikolay@vmware.com>
@xin-au

This comment has been minimized.

@tianon

This comment has been minimized.

@docker-library docker-library locked as resolved and limited conversation to collaborators Jul 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Usability question, not directly related to an error with the image
Projects
None yet
Development

No branches or pull requests

6 participants