复现方法,限制容器内pid个数
-
docker run --pids-limit=1000 -d centos sleep 100000
-
docker exec -it id bash
3.执行 for i in $(seq 1 2000); do (sleep 100&) ; done
[root@host-226 ~]# docker stats eaec
CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
eaec 0.00% 366.4 MiB / 8.4 GiB 4.26% 126 B / 0 B 17.7 MB / 0 B 1000
4.
[root@host-226 ~]# docker exec eaec date
oci runtime error: exec failed: container_linux.go:307: starting container process caused "process_linux.go:112: decoding init error from pipe caused \"read parent: connection reset by peer\"
5.进一步报错 关键报错 dateruntime/cgo: pthread_create failed: Resource temporarily unavailable
[root@node-2:/usr/bin]$ docker-runc exec cb2dff3cec0fd52f69daa69795426c1512624ff67b25894fc915103262da006e dateruntime/cgo: pthread_create failed: Resource temporarily unavailable
SIGABRT: abortPC=0x7f3203b0037f m=0 sigcode=18446744073709551610goroutine 0 [idle]:
runtime: g 0: unknown pc 0x7f3203b0037f
stack: frame={sp:0x7ffe7d00de80, fp:0x0} stack=[0x7ffe7c80f440,0x7ffe7d00e450)0x00007ffe7d00dd80: 0x0000000000407ff6 <runtime.mmap+0x0000000000000076> 0x00007ffe7d00ddc0
0x00007ffe7d00dd90: 0x00007ffe7d00dd98 0x0000000000114c10
0x00007ffe7d00dda0: 0x0000002200000003 0x00007ffe7d00dde8
0x00007ffe7d00ddb0: 0x00000000004080d1 <runtime.mmap.func1+0x0000000000000051> 0x00007f31deac9000
0x00007ffe7d00ddc0: 0x0000000000408080 <runtime.mmap.func1+0x0000000000000000> 0x00007ffe7d00ddb8
0x00007ffe7d00ddd0: 0x00007f31deac9000 0x0000000000407000 <runtime.f32hash+0x0000000000000080>0x00007ffe7d00dde0: 0x0000003200000003 0x00000000ffffffff
0x00007ffe7d00ddf0: 0x00007ffe7d00de38 0x000000000041c239 <runtime.sysMapOS+0x0000000000000039>0x00007ffe7d00de00: 0x00007f31dc9b4000 0x0000000000408080 <runtime.mmap.func1+0x0000000000000000>0x00007ffe7d00de10: 0x000000000041c1c5 <runtime.sysHugePageOS+0x0000000000000065> 0x00007ffe7d00de60
0x00007ffe7d00de20: 0x00007ffe7d00de70 0x0000000000400000
0x00007ffe7d00de30: 0x0000000000406001 <internal/bytealg.IndexRabinKarp+0x0000000000000181> 0x0000000000b26060
0x00007ffe7d00de40: 0x00007ffe7d00df20 0x00007ffe7d00de90
0x00007ffe7d00de50: 0x00007ffe7d00dea0 0x0000000000000001
0x00007ffe7d00de60: 0x0000000000000003 0x0000000000b26060
0x00007ffe7d00de70: 0x0000000000b0e0e0 0x000000000067a4fc
0x00007ffe7d00de80: <0x0000000000000000 0x000000000046ddfe <runtime.callCgoMmap+0x000000000000003e>0x00007ffe7d00de90: 0x00007ffe7d00de90 0x0000000000000007
0x00007ffe7d00dea0: 0x0000000000000007 0x00007ffe7d00df68
0x00007ffe7d00deb0: 0x000000000042e28d <runtime.(*pageAlloc).update+0x00000000000003ad> 0x00007f3204624c00
0x00007ffe7d00dec0: 0x0000000000000007 0x00007ffe7d00df88
0x00007ffe7d00ded0: 0x000000000042e28d <runtime.(*pageAlloc).update+0x00000000000003ad> 0x00007f3204624c00
0x00007ffe7d00dee0: 0x0007bc003de00000 0x00007f3204624c00
0x00007ffe7d00def0: 0x00007f3204624c00 0x0000000000000012
0x00007ffe7d00df00: 0xfffffffe7fffffff 0xffffffffffffffff
0x00007ffe7d00df10: 0xffffffffffffffff 0xffffffffffffffff
0x00007ffe7d00df20: 0xffffffffffffffff 0xffffffffffffffff
0x00007ffe7d00df30: 0xffffffffffffffff 0xffffffffffffffff
0x00007ffe7d00df40: 0xffffffffffffffff 0xffffffffffffffff
0x00007ffe7d00df50: 0xffffffffffffffff 0xffffffffffffffff
0x00007ffe7d00df60: 0xffffffffffffffff 0xffffffffffffffff
0x00007ffe7d00df70: 0xffffffffffffffff 0xffffffffffffffff
runtime: g 0: unknown pc 0x7f3203b0037f
stack: frame={sp:0x7ffe7d00de80, fp:0x0} stack=[0x7ffe7c80f440,0x7ffe7d00e450)0x00007ffe7d00dd80: 0x0000000000407ff6 <runtime.mmap+0x0000000000000076> 0x00007ffe7d00ddc0
0x00007ffe7d00dd90: 0x00007ffe7d00dd98 0x0000000000114c10
0x00007ffe7d00dda0: 0x0000002200000003 0x00007ffe7d00dde8
0x00007ffe7d00ddb0: 0x00000000004080d1 <runtime.mmap.func1+0x0000000000000051> 0x00007f31deac9000
0x00007ffe7d00ddc0: 0x0000000000408080 <runtime.mmap.func1+0x0000000000000000> 0x00007ffe7d00ddb8
0x00007ffe7d00ddd0: 0x00007f31deac9000 0x0000000000407000 <runtime.f32hash+0x0000000000000080>0x00007ffe7d00dde0: 0x0000003200000003 0x00000000ffffffff
0x00007ffe7d00ddf0: 0x00007ffe7d00de38 0x000000000041c239 <runtime.sysMapOS+0x0000000000000039>0x00007ffe7d00de00: 0x00007f31dc9b4000 0x0000000000408080 <runtime.mmap.func1+0x0000000000000000>0x00007ffe7d00de10: 0x000000000041c1c5 <runtime.sysHugePageOS+0x0000000000000065> 0x00007ffe7d00de60
0x00007ffe7d00de20: 0x00007ffe7d00de70 0x0000000000400000
0x00007ffe7d00de30: 0x0000000000406001 <internal/bytealg.IndexRabinKarp+0x0000000000000181> 0x0000000000b26060
0x00007ffe7d00de40: 0x00007ffe7d00df20 0x00007ffe7d00de90
0x00007ffe7d00de50: 0x00007ffe7d00dea0 0x0000000000000001
0x00007ffe7d00de60: 0x0000000000000003 0x0000000000b26060
0x00007ffe7d00de70: 0x0000000000b0e0e0 0x000000000067a4fc
0x00007ffe7d00de80: <0x0000000000000000 0x000000000046ddfe <runtime.callCgoMmap+0x000000000000003e>0x00007ffe7d00de90: 0x00007ffe7d00de90 0x0000000000000007
0x00007ffe7d00dea0: 0x0000000000000007 0x00007ffe7d00df68
0x00007ffe7d00deb0: 0x000000000042e28d <runtime.(*pageAlloc).update+0x00000000000003ad> 0x00007f3204624c00
0x00007ffe7d00dec0: 0x0000000000000007 0x00007ffe7d00df88
0x00007ffe7d00ded0: 0x000000000042e28d <runtime.(*pageAlloc).update+0x00000000000003ad> 0x00007f3204624c00
0x00007ffe7d00dee0: 0x0007bc003de00000 0x00007f3204624c00
0x00007ffe7d00def0: 0x00007f3204624c00 0x0000000000000012
0x00007ffe7d00df00: 0xfffffffe7fffffff 0xffffffffffffffff
0x00007ffe7d00df10: 0xffffffffffffffff 0xffffffffffffffff
0x00007ffe7d00df20: 0xffffffffffffffff 0xffffffffffffffff
0x00007ffe7d00df30: 0xffffffffffffffff 0xffffffffffffffff
0x00007ffe7d00df40: 0xffffffffffffffff 0xffffffffffffffff
0x00007ffe7d00df50: 0xffffffffffffffff 0xffffffffffffffff
0x00007ffe7d00df60: 0xffffffffffffffff 0xffffffffffffffff
0x00007ffe7d00df70: 0xffffffffffffffff 0xffffffffffffffff
goroutine 1 [running]:
runtime.systemstack_switch()
/usr/local/go/src/runtime/asm_amd64.s:463 fp=0xc000052780 sp=0xc000052778 pc=0x469e00
runtime.main()
/usr/local/go/src/runtime/proc.go:170 +0x6d fp=0xc0000527e0 sp=0xc000052780 pc=0x43bccd
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc0000527e8 sp=0xc0000527e0 pc=0x46c021
rax 0x0
rbx 0x6
rcx 0x7f3203b0037f
rdx 0x0
rdi 0x2
rsi 0x7ffe7d00de80
rbp 0x777c86
rsp 0x7ffe7d00de80
r8 0x0
r9 0x7ffe7d00de80
r10 0x8
r11 0x246
r12 0x275f370
r13 0x2c
r14 0xb26060
r15 0x1
rip 0x7f3203b0037f
rflags 0x246
cs 0x33
fs 0x0
gs 0x0exec failed: container_linux.go:307: starting container process caused "process_linux.go:112: decoding init error from pipe caused \"read parent: connection reset by peer\""
标签:reset,parent,caused,报错,0x00007f3204624c00,go,0xffffffffffffffff,runtime,docker
From: https://www.cnblogs.com/rincloud/p/17776397.html