google / novm

Experimental KVM-based VMM for containers, written in Go.
Apache License 2.0
1.68k stars 123 forks source link

VM freezes when I try to run anything #7

Closed pwaller closed 9 years ago

pwaller commented 9 years ago

I had this working earlier, but now it reliably freezes and I can't get anything to work.

Steps taken:

# novm-import-kernel
# novm create
# novm list
# novm run --id <output from novm list> echo hi

I then observe the CPU get pegged in novmm. stracing reveals it's stuck on the KVM_RUN ioctl. I sent sigquit to the binary consuming 100% CPU, here's the trace. Do we expect so many IoHandlers in particular?

https://gist.github.com/pwaller/78271959acac8d97adcc

excerpt:

SIGQUIT: quit
PC=0x7ff2bdaaa867
signal arrived during cgo execution

goroutine 54 [syscall]:
runtime.cgocall(0x4049a0, 0x7ff2bc0c4e50)
    /usr/lib/go/src/pkg/runtime/cgocall.c:143 +0xe5 fp=0x7ff2bc0c4e38 sp=0x7ff2bc0c4df0
novmm/platform._Cfunc_kvm_run(0xa00000004, 0xc208026a78, 0x0)
    novmm/platform/_obj/_cgo_defun.c:443 +0x31 fp=0x7ff2bc0c4e50 sp=0x7ff2bc0c4e38
novmm/platform.(*Vcpu).Run(0xc208026840, 0x0, 0x0)
    /home/pwaller/.local/src/github.com/google/novm/src/novmm/platform/kvm_run.go:107 +0x12c fp=0x7ff2bc0c4e98 sp=0x7ff2bc0c4e50
main.Loop(0xc2080281c0, 0xc208026840, 0xc20801ad70, 0xc2093f4980, 0x0, 0x0)
    /home/pwaller/.local/src/github.com/google/novm/src/novmm/loop.go:34 +0xd2 fp=0x7ff2bc0c4f40 sp=0x7ff2bc0c4e98
main.func·001(0xc208026840)
    /home/pwaller/.local/src/github.com/google/novm/src/novmm/main.go:286 +0x55 fp=0x7ff2bc0c4fa0 sp=0x7ff2bc0c4f40
runtime.goexit()
    /usr/lib/go/src/pkg/runtime/proc.c:1445 fp=0x7ff2bc0c4fa8 sp=0x7ff2bc0c4fa0
created by main.main
    /home/pwaller/.local/src/github.com/google/novm/src/novmm/main.go:288 +0xd69
pwaller commented 9 years ago

I've tried a variety of different programs specified by /bin/ls or just ls. I'm sure I had them working at some point but now they reliably freeze. I also deleted my .novm directory and started again, but this failed too.

pwaller commented 9 years ago

Aha! If I specify --init to novm create then run works. But I can't figure out how to run things inside novm in any other way so far..

amscanne commented 9 years ago

Yes, the goroutines are expected.

I was hoping that 302881d0ff0b3e13385a96b564731c768208b73b would help with this issue but it doesn't seem to. I've seen the spinning before, and I'll invest some time to track it down when I can. (There's a lot to do before novm is reliable!)

foxwang commented 9 years ago

@pwaller hello what‘s your full comand?

amscanne commented 9 years ago

I believe this issue is related to #23. Please reopen if it persists.