mirage / synjitsu

TCP connection starter for Mirage unikernels
7 stars 3 forks source link

Doesn't work with static_website #2

Open MagnusS opened 9 years ago

MagnusS commented 9 years ago

Running static_website with patched (synjitsu branch) tcpip stack page faults:

Attempt to open(/dev/urandom)!
 sg:true gso_tcpv4:true rx_copy:true rx_flip:false smart_poll:false
Fatal error: exception Failure("Tcp.KV.create: not set")
Raised at file "src/core/lwt.ml", line 788, characters 22-23
Called from file "lib/main.ml", line 58, characters 10-20
Called from file "main.ml", line 118, characters 2-28
Mirage exiting with status 2
Do_exit called!
base is 0x2bff20 caller is 0x14c177
base is 0x4 Page fault at linear address c, rip 165f67, regs 00000000002bfe38, sp 2bfee0, our_sp 00000000002bfdf8, code 0
RIP: e030:[<0000000000165f67>]
RSP: e02b:00000000002bfee0  EFLAGS: 00010006
RAX: 000000000000000c RBX: 0000000000000004 RCX: 0000000000000704
RDX: 0000000000000704 RSI: 00000000002bfd40 RDI: 0000000000000004
RBP: 00000000002bff20 R08: 0000000000000703 R09: 0000000000000020
R10: 000000000000000c R11: 0000000000000000 R12: 0000000000000001
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
base is 0x2bff20 caller is 0x14c177
base is 0x4 Page fault in pagetable walk (access to invalid memory?).
samoht commented 9 years ago

"Tcp.KV.create: not set" seems to indicate that Tcp.Global.set is not called properly. Do you have an easy way to reproduce?

MagnusS commented 9 years ago

I just compiled and ran static_website in mirage-skeleton with this pin: https://www.github.com/samoht/mirage-tcpip.git#synjistu

Could it be because it doesn't set the mode directly?

MagnusS commented 9 years ago

It doesn't page fault any more, but if I connect to it from a remote host (telnet [ip] 80) I get lots of these:

Cannot handle page request order 1!
memalign(4096, %zu) failed.
MagnusS commented 9 years ago

Connecting from dom0 to the same ip works fine...