moby / hyperkit

A toolkit for embedding hypervisor capabilities in your application
BSD 2-Clause "Simplified" License
3.62k stars 328 forks source link

docker crashes frequently on startup #242

Open alexfs opened 5 years ago

alexfs commented 5 years ago

This is the crash stack from the docker logs: ..... 2019-01-13 13:05:13.434372-0800 localhost com.docker.hyperkit[2914]: [ 0.105693] Speculative Store Bypass: Vulnerable 2019-01-13 13:05:13.577543-0800 localhost com.docker.hyperkit[2914]: [ 0.249247] Freeing SMP alternatives memory: 20K 2019-01-13 13:05:13.707308-0800 localhost com.docker.hyperkit[2914]: [ 0.376386] ftrace: allocating 35645 entries in 140 pages 2019-01-13 13:05:15.855677-0800 localhost com.docker.hyperkit[2914]: [ 2.532161] smpboot: Max logical packages: 2 2019-01-13 13:05:15.882920-0800 localhost com.docker.hyperkit[2914]: [ 2.557769] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1 2019-01-13 13:05:15.992164-0800 localhost com.docker.hyperkit[2914]: [ 2.666219] ..MP-BIOS bug: 8254 timer not connected to IO-APIC 2019-01-13 13:05:15.998739-0800 localhost com.docker.hyperkit[2914]: [ 2.673452] ...trying to set up timer (IRQ0) through the 8259A ... 2019-01-13 13:05:16.003099-0800 localhost com.docker.hyperkit[2914]: [ 2.680027] ..... (found apic 0 pin 2) ... 2019-01-13 13:05:16.108382-0800 localhost com.docker.hyperkit[2914]: [ 2.786819] ....... failed. 2019-01-13 13:05:16.114403-0800 localhost com.docker.hyperkit[2914]: [ 2.789899] ...trying to set up timer as Virtual Wire IRQ... 2019-01-13 13:05:16.218349-0800 localhost com.docker.hyperkit[2914]: [ 2.896338] ..... failed. 2019-01-13 13:05:16.224222-0800 localhost com.docker.hyperkit[2914]: [ 2.900103] ...trying to set up timer as ExtINT IRQ... 2019-01-13 13:05:16.442003-0800 localhost com.docker.hyperkit[2914]: [ 3.121066] ..... failed :(. 2019-01-13 13:05:16.456839-0800 localhost com.docker.hyperkit[2914]: [ 3.125149] Kernel panic - not syncing: IO-APIC + timer doesn't work! Boot with apic=debug and send a report. Then try booting with the 'noapic' option. 2019-01-13 13:05:16.458492-0800 localhost com.docker.hyperkit[2914]: [ 3.125149] 2019-01-13 13:05:16.465514-0800 localhost com.docker.hyperkit[2914]: [ 3.140709] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.9.125-linuxkit #1 2019-01-13 13:05:16.471039-0800 localhost com.docker.hyperkit[2914]: [ 3.147726] Hardware name: BHYVE, BIOS 1.00 03/14/2014 2019-01-13 13:05:16.480892-0800 localhost com.docker.hyperkit[2914]: [ 3.153287] 0000000000000000 ffffffffaf420789 0000000000000000 ffffbab400007e30 2019-01-13 13:05:16.490131-0800 localhost com.docker.hyperkit[2914]: [ 3.163238] ffffffffaf19fbf5 0000000000000008 ffffbab400007e40 ffffbab400007dd8 2019-01-13 13:05:16.501249-0800 localhost com.docker.hyperkit[2914]: [ 3.172450] ca7f16cd286c8b68 0000000000000008 ffffbab400007e58 0000000000000000 2019-01-13 13:05:16.504028-0800 localhost com.docker.hyperkit[2914]: [ 3.183596] Call Trace: 2019-01-13 13:05:16.509580-0800 localhost com.docker.hyperkit[2914]: [ 3.186327] [] ? dump_stack+0x5a/0x6f 2019-01-13 13:05:16.514995-0800 localhost com.docker.hyperkit[2914]: [ 3.191881] [] ? panic+0xe7/0x230 2019-01-13 13:05:16.521318-0800 localhost com.docker.hyperkit[2914]: [ 3.197336] [] ? setup_IO_APIC+0x633/0x6d1 2019-01-13 13:05:16.528372-0800 localhost com.docker.hyperkit[2914]: [ 3.203685] [] ? clear_IO_APIC_pin+0x108/0x135 2019-01-13 13:05:16.535932-0800 localhost com.docker.hyperkit[2914]: [ 3.210752] [] ? apic_bsp_setup+0x8a/0x99 2019-01-13 13:05:16.543870-0800 localhost com.docker.hyperkit[2914]: [ 3.218357] [] ? native_smp_prepare_cpus+0x24a/0x2ef 2019-01-13 13:05:16.550666-0800 localhost com.docker.hyperkit[2914]: [ 3.226272] [] ? kernel_init_freeable+0xa2/0x1ea 2019-01-13 13:05:16.557199-0800 localhost com.docker.hyperkit[2914]: [ 3.233084] [] ? kernel_init_freeable+0xa2/0x1ea 2019-01-13 13:05:16.562795-0800 localhost com.docker.hyperkit[2914]: [ 3.239635] [] ? rest_init+0x6e/0x6e 2019-01-13 13:05:16.568904-0800 localhost com.docker.hyperkit[2914]: [ 3.245243] [] ? kernel_init+0xa/0xe6 2019-01-13 13:05:16.575027-0800 localhost com.docker.hyperkit[2914]: [ 3.251341] [] ? ret_from_fork+0x57/0x70 2019-01-13 13:05:16.582010-0800 localhost com.docker.hyperkit[2914]: [ 3.258727] Rebooting in 1 seconds..

rn commented 5 years ago

what kind of system are you running this on?

alexfs commented 5 years ago

This happens frequently when running docker inside a macOS VM on a Mac Pro machine. I know that kvm/vmware expose timing virtiaulization features in CPUID instruction, so Linux could handle timing properly. I think you should implement this as well so Linux won't complain about timing.