gitpod
                                
                                
                                
                                    gitpod copied to clipboard
                            
                            
                            
                        Building dockerfile and running inside gitpod throws runtime stacktrace
Bug description
runtime/cgo: pthread_create failed: Operation not permitted
SIGABRT: abort
PC=0x7f5dc828bc1f m=0 sigcode=18446744073709551610
goroutine 0 [idle]:
runtime: unknown pc 0x7f5dc828bc1f
stack: frame={sp:0x7ffe713add20, fp:0x0} stack=[0x7ffe70baf260,0x7ffe713ae2a0)
0x00007ffe713adc20:  0x2525252525252525  0x2525252525252525 
0x00007ffe713adc30:  0x000000ffffffffff  0x0000000000000000 
0x00007ffe713adc40:  0x000000ffffffffff  0x0000000000000000 
0x00007ffe713adc50:  0x415353454d5f434c  0x505f434c00534547 
0x00007ffe713adc60:  0x00007f5da1693600  0x00007ffe713adf28 
0x00007ffe713adc70:  0x00007f5da188ffff  0x00007ffe713adf00 
0x00007ffe713adc80:  0x0000000000203000  0x0000000000000400 
0x00007ffe713adc90:  0x0000000000000000  0x0000000000000000 
0x00007ffe713adca0:  0x6e75720000000000  0x6f67632f656d6974 
0x00007ffe713adcb0:  0x0000000000000000  0x0000000000000000 
0x00007ffe713adcc0:  0x2f3a2f6e6962732f  0x656d61672f727375 
0x00007ffe713adcd0:  0x6c2f7273752f3a73  0x6962732f6c61636f 
0x00007ffe713adce0:  0x6c2f7273752f3a6e  0x6e69622f6c61636f 
0x00007ffe713adcf0:  0x62732f7273752f3a  0x2f7273752f3a6e69 
0x00007ffe713add00:  0x6962732f3a6e6962  0x2f3a6e69622f3a6e 
0x00007ffe713add10:  0x0000000000000000  0x00007f5dc828bc11 
0x00007ffe713add20: <0x0000000000000000  0x0000000000000000 
0x00007ffe713add30:  0x0000000000000000  0x0000000000000000 
0x00007ffe713add40:  0x00007f5da1693600  0x00007ffe713adf70 
0x00007ffe713add50:  0x00007ffe713adf28  0x000000000041638f <runtime.heapBits.initSpan+0x00000000000000cf> 
0x00007ffe713add60:  0x00007f5da1693600  0x00007ffe713adf28 
0x00007ffe713add70:  0x00007f5da188ffff  0x00007ffe713adf00 
0x00007ffe713add80:  0x0000000000000002  0x8000000000000006 
0x00007ffe713add90:  0x0000000000000000  0x0000000000000000 
0x00007ffe713adda0:  0x0000000000000006  0x00007ffe713ae010 
0x00007ffe713addb0:  0x00000000007e33f2  0x00007ffe713ae0d0 
0x00007ffe713addc0:  0x0000000000a059c0  0x00007f5dc8241042 
0x00007ffe713addd0:  0x00007f5dc8201740  0x00007f5dc822c49c 
0x00007ffe713adde0:  0x0000000000000020  0x6e69622f6c61636f 
0x00007ffe713addf0:  0x62732f7273752f3a  0x2f7273752f3a6e69 
0x00007ffe713ade00:  0x6962732f3a6e6962  0x00007f5dc8281eed 
0x00007ffe713ade10:  0x0000000000000000  0x00007f5dc83f44c0 
runtime: unknown pc 0x7f5dc828bc1f
stack: frame={sp:0x7ffe713add20, fp:0x0} stack=[0x7ffe70baf260,0x7ffe713ae2a0)
0x00007ffe713adc20:  0x2525252525252525  0x2525252525252525 
0x00007ffe713adc30:  0x000000ffffffffff  0x0000000000000000 
0x00007ffe713adc40:  0x000000ffffffffff  0x0000000000000000 
0x00007ffe713adc50:  0x415353454d5f434c  0x505f434c00534547 
0x00007ffe713adc60:  0x00007f5da1693600  0x00007ffe713adf28 
0x00007ffe713adc70:  0x00007f5da188ffff  0x00007ffe713adf00 
0x00007ffe713adc80:  0x0000000000203000  0x0000000000000400 
0x00007ffe713adc90:  0x0000000000000000  0x0000000000000000 
0x00007ffe713adca0:  0x6e75720000000000  0x6f67632f656d6974 
0x00007ffe713adcb0:  0x0000000000000000  0x0000000000000000 
0x00007ffe713adcc0:  0x2f3a2f6e6962732f  0x656d61672f727375 
0x00007ffe713adcd0:  0x6c2f7273752f3a73  0x6962732f6c61636f 
0x00007ffe713adce0:  0x6c2f7273752f3a6e  0x6e69622f6c61636f 
0x00007ffe713adcf0:  0x62732f7273752f3a  0x2f7273752f3a6e69 
0x00007ffe713add00:  0x6962732f3a6e6962  0x2f3a6e69622f3a6e 
0x00007ffe713add10:  0x0000000000000000  0x00007f5dc828bc11 
0x00007ffe713add20: <0x0000000000000000  0x0000000000000000 
0x00007ffe713add30:  0x0000000000000000  0x0000000000000000 
0x00007ffe713add40:  0x00007f5da1693600  0x00007ffe713adf70 
0x00007ffe713add50:  0x00007ffe713adf28  0x000000000041638f <runtime.heapBits.initSpan+0x00000000000000cf> 
0x00007ffe713add60:  0x00007f5da1693600  0x00007ffe713adf28 
0x00007ffe713add70:  0x00007f5da188ffff  0x00007ffe713adf00 
0x00007ffe713add80:  0x0000000000000002  0x8000000000000006 
0x00007ffe713add90:  0x0000000000000000  0x0000000000000000 
0x00007ffe713adda0:  0x0000000000000006  0x00007ffe713ae010 
0x00007ffe713addb0:  0x00000000007e33f2  0x00007ffe713ae0d0 
0x00007ffe713addc0:  0x0000000000a059c0  0x00007f5dc8241042 
0x00007ffe713addd0:  0x00007f5dc8201740  0x00007f5dc822c49c 
0x00007ffe713adde0:  0x0000000000000020  0x6e69622f6c61636f 
0x00007ffe713addf0:  0x62732f7273752f3a  0x2f7273752f3a6e69 
0x00007ffe713ade00:  0x6962732f3a6e6962  0x00007f5dc8281eed 
0x00007ffe713ade10:  0x0000000000000000  0x00007f5dc83f44c0 
goroutine 1 [running]:
runtime.systemstack_switch()
        runtime/asm_amd64.s:350 fp=0xc000056780 sp=0xc000056778 pc=0x462f20
runtime.main()
        runtime/proc.go:174 +0x7b fp=0xc0000567e0 sp=0xc000056780 pc=0x43749b
runtime.goexit()
        runtime/asm_amd64.s:1581 +0x1 fp=0xc0000567e8 sp=0xc0000567e0 pc=0x465141
rax    0x0
rbx    0xec
rcx    0x7f5dc828bc1f
rdx    0x6
rdi    0xec
rsi    0xec
rbp    0x7ffe713ae010
rsp    0x7ffe713add20
r8     0x0
r9     0x7f5dc83a9f40
r10    0x8
r11    0x246
r12    0x7e33f2
r13    0x7ffe713ae0d0
r14    0x6
r15    0x7f5da169005b
rip    0x7f5dc828bc1f
rflags 0x246
cs     0x33
fs     0x0
gs     0x0
Steps to reproduce
- Build a dockerfile inside gitpod with docker.
 - Run it as 
docker run -it <name> - Notice that the stacktrace is being printed after every shell prompt.
 
Workspace affected
No response
Expected behavior
No response
Example repository
No response
Anything else?
Oddly, it doesn't happen if I do exec sudo bash  inside that docker interactive shell.
I'm getting the same error. Is this related to the host container runtime having a policy that doesn't allow clone3?
Customer reported another way to reproduce this. Run:  docker run -it gitpod/workspace-full:latest bash this will fail with the same SIGABRT behavior. It also seems to kill Docker for this workspace.
If you run docker run -it gitpod/workspace-full:latest sudo bash it runs fine.
I'm getting the same error. Is this related to the host container runtime having a policy that doesn't allow clone3?
clone3 is disabled when CAP_SYS_ADMIN is unset
ping @csweichel https://github.com/moby/moby/pull/42681