Docker Community Forums

Share and learn in the Docker community.

Double free in docker 1.12, has anybody seen this before?

bugfixes

(Maxim Belooussov) #1

While cooking a docker container on my laptop, have encountered something I haven’t seen before: “double free” error:

[root@4591bf6cca50 /]# cd /var/lo^C*** Error in `/bin/bash': double free or corruption (fasttop): 0x0000555e51b3c090 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x77de5)[0x7f6c54a1ade5]
/lib64/libc.so.6(+0x8022a)[0x7f6c54a2322a]
/lib64/libc.so.6(cfree+0x4c)[0x7f6c54a2678c]
/bin/bash(rl_complete_internal+0x1ba)[0x555e50244cda]
/bin/bash(_rl_dispatch_subseq+0x228)[0x555e5023c548]
/bin/bash(readline_internal_char+0x93)[0x555e5023c9c3]
/bin/bash(readline+0x45)[0x555e5023d095]
/bin/bash(+0x308e7)[0x555e501c88e7]
/bin/bash(+0x32a39)[0x555e501caa39]
/bin/bash(+0x35808)[0x555e501cd808]
/bin/bash(yyparse+0x3d9)[0x555e501d0dd9]
/bin/bash(parse_command+0x5f)[0x555e501c81cf]
/bin/bash(read_command+0x58)[0x555e501c8298]
/bin/bash(reader_loop+0x11b)[0x555e501c847b]
/bin/bash(main+0xf22)[0x555e501c6f62]
/lib64/libc.so.6(__libc_start_main+0xf0)[0x7f6c549c3580]
/bin/bash(_start+0x29)[0x555e501c76e9]
======= Memory map: ========
555e50198000-555e50290000 r-xp 00000000 fd:02 201326736                  /usr/bin/bash
555e5048f000-555e50493000 r--p 000f7000 fd:02 201326736                  /usr/bin/bash
555e50493000-555e5049c000 rw-p 000fb000 fd:02 201326736                  /usr/bin/bash
555e5049c000-555e504a1000 rw-p 00000000 00:00 0 
555e51b36000-555e51b78000 rw-p 00000000 00:00 0                          [heap]
7f6c48000000-7f6c48021000 rw-p 00000000 00:00 0 
7f6c48021000-7f6c4c000000 ---p 00000000 00:00 0 
7f6c4dab6000-7f6c4dacc000 r-xp 00000000 fd:02 117441077                  /usr/lib64/libgcc_s-5.3.1-20151207.so.1
7f6c4dacc000-7f6c4dccb000 ---p 00016000 fd:02 117441077                  /usr/lib64/libgcc_s-5.3.1-20151207.so.1
7f6c4dccb000-7f6c4dccc000 r--p 00015000 fd:02 117441077                  /usr/lib64/libgcc_s-5.3.1-20151207.so.1
7f6c4dccc000-7f6c4dccd000 rw-p 00016000 fd:02 117441077                  /usr/lib64/libgcc_s-5.3.1-20151207.so.1
7f6c4dccd000-7f6c54791000 r--p 00000000 fd:02 184549516                  /usr/lib/locale/locale-archive
7f6c54791000-7f6c5479c000 r-xp 00000000 fd:02 117441201                  /usr/lib64/libnss_files-2.22.so
7f6c5479c000-7f6c5499b000 ---p 0000b000 fd:02 117441201                  /usr/lib64/libnss_files-2.22.so
7f6c5499b000-7f6c5499c000 r--p 0000a000 fd:02 117441201                  /usr/lib64/libnss_files-2.22.so
7f6c5499c000-7f6c5499d000 rw-p 0000b000 fd:02 117441201                  /usr/lib64/libnss_files-2.22.so
7f6c5499d000-7f6c549a3000 rw-p 00000000 00:00 0 
7f6c549a3000-7f6c54b5a000 r-xp 00000000 fd:02 117441029                  /usr/lib64/libc-2.22.so
7f6c54b5a000-7f6c54d5a000 ---p 001b7000 fd:02 117441029                  /usr/lib64/libc-2.22.so
7f6c54d5a000-7f6c54d5e000 r--p 001b7000 fd:02 117441029                  /usr/lib64/libc-2.22.so
7f6c54d5e000-7f6c54d60000 rw-p 001bb000 fd:02 117441029                  /usr/lib64/libc-2.22.so
7f6c54d60000-7f6c54d64000 rw-p 00000000 00:00 0 
7f6c54d64000-7f6c54d67000 r-xp 00000000 fd:02 117441055                  /usr/lib64/libdl-2.22.so
7f6c54d67000-7f6c54f66000 ---p 00003000 fd:02 117441055                  /usr/lib64/libdl-2.22.so
7f6c54f66000-7f6c54f67000 r--p 00002000 fd:02 117441055                  /usr/lib64/libdl-2.22.so
7f6c54f67000-7f6c54f68000 rw-p 00003000 fd:02 117441055                  /usr/lib64/libdl-2.22.so
7f6c54f68000-7f6c54f8e000 r-xp 00000000 fd:02 117441309                  /usr/lib64/libtinfo.so.5.9
7f6c54f8e000-7f6c5518d000 ---p 00026000 fd:02 117441309                  /usr/lib64/libtinfo.so.5.9
7f6c5518d000-7f6c55191000 r--p 00025000 fd:02 117441309                  /usr/lib64/libtinfo.so.5.9
7f6c55191000-7f6c55192000 rw-p 00029000 fd:02 117441309                  /usr/lib64/libtinfo.so.5.9
7f6c55192000-7f6c551b3000 r-xp 00000000 fd:02 117440940                  /usr/lib64/ld-2.22.so
7f6c553a2000-7f6c553a5000 rw-p 00000000 00:00 0 
7f6c553a8000-7f6c553aa000 rw-p 00000000 00:00 0 
7f6c553aa000-7f6c553b1000 r--s 00000000 fd:02 234881626                  /usr/lib64/gconv/gconv-modules.cache
7f6c553b1000-7f6c553b2000 rw-p 00000000 00:00 0 
7f6c553b2000-7f6c553b3000 r--p 00020000 fd:02 117440940                  /usr/lib64/ld-2.22.so
7f6c553b3000-7f6c553b4000 rw-p 00021000 fd:02 117440940                  /usr/lib64/ld-2.22.so
7f6c553b4000-7f6c553b5000 rw-p 00000000 00:00 0 
7fff029f1000-7fff02a12000 rw-p 00000000 00:00 0                          [stack]
7fff02a33000-7fff02a35000 r--p 00000000 00:00 0                          [vvar]
7fff02a35000-7fff02a37000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
[mabe@p42 devtop]$ docker version
Client:
 Version:      1.12.1
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   23cf638
 Built:        
 OS/Arch:      linux/amd64

Server:
 Version:      1.12.1
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   23cf638
 Built:        
 OS/Arch:      linux/amd64
[mabe@p42 devtop]$ uname -a
Linux p42.home.lan 4.7.2-101.fc23.x86_64 #1 SMP Fri Aug 26 15:59:00 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

The docker container in question was running fedora:latest (fedora 24), had a shell in it running /bin/bash via exec.