On 2 December 2014 at 13:12, Anil Madhavapeddy <anil@xxxxxxxxxx> wrote:
On 2 Dec 2014, at 12:36, Toby Moore <toby.moore.0@xxxxxxxxx> wrote:
Hi everyone,
I've been following this mailing list for a while now. I've finally managed to get a simple blog running on Mirage and AWS. I've put up a couple of posts of my experience (http://is-awesome.net) but I doubt there'll be anything that's new or exciting to readers here.
Not at all -- I just discovered the Pure CSS framework from reading it -- I was just wondering what to do while converting my own blog :-)
One outstanding issue is that I can't seem to get the CLOCK working properly on AWS. It's fine for a unix build, but I don't have another xen host available right now and the deploy test cycle to AWS is pretty painful. Trying to get the current time on AWS gets me this:
Unsupported function gmtime called in Mini-OS kernel
Do_exit called!
base is 0x0 Page fault at linear address 8, rip cb67, regs 000000000034f908, sp 34f9b0, our_sp 000000000034f8c8, code 0
Page fault in pagetable walk (access to invalid memory?).
You're using Clock.time () for this, I assume? I added this to the
start of mirage-skeleton/ethifv4/unikernel.ml (which I guess is where
you copied the code from):
let start c net =
C.log_s c (Printf.sprintf "Time is %f\n" @@ Clock.time ()) >>= fun () ->
and it printed 1417522247.474221 (which is the correct time) when I
ran it under Xen. I'm running Xen in VirtualBox for local testing,
which seems to work well.
Perhaps something else you're using has added a dependency on
mirage-clock-unix somehow?
That's almost certainly some unexpected fallout due to the switch to MiniOS-as-a-library. We'll definitely want this working on Amazon's Xen interface version! Any chance you could put this bug report up on https://github.com/mirage/mirage/issues ?
This is built with OCaml 4.01.0 with these OPAM packages:
io-page 1.1.1 Allocate memory pages suitable for aligned I/O
mirage 2.0.1 The Mirage library operating system
mirage-clock-unix 1.0.0 A Mirage-compatible Clock library for Unix
mirage-clock-xen 1.0.0 A Mirage-compatible Clock library for Xen
mirage-conduit 2.0.0 Virtual package for the Mirage Conduit transpo
mirage-console 2.0.0 A Mirage-compatible Console library for Xen an
mirage-dns 2.0.0 Virtual package for the Mirage DNS transports
mirage-http 2.0.0 Mirage HTTP client and server driver for Unix
mirage-net-unix 1.1.1 Ethernet network driver for Mirage, using tunt
mirage-net-xen 1.1.3 Ethernet network device driver for Mirage/Xen
mirage-types 2.0.1 Module type definitions for Mirage-compatible
mirage-types-lwt 2.0.1 Lwt module type definitions for Mirage-compati
mirage-unix 2.0.0 Mirage OS library for Unix compilation
mirage-xen 2.0.0 Mirage OS library for Xen compilation
mirage-xen-minios 0.4.2 Xen MiniOS guest operating system library
I'm not directly passing a clock device, my config.ml has these bits in it:
let main =
foreign "Unikernel.Main" (http @-> console @-> kv_ro @-> kv_ro @-> job)
let unix_libs =
match get_mode () with
| `Unix -> ["mirage-clock-unix"]
| _ -> []
let () =
add_to_ocamlfind_libraries unix_libs;
...
This is mostly copied out of the skeleton examples. I know the clock interface has been changing a bit recently but it works fine under unix. My guess is that the clock driver is skipped because it's not referenced (except in my code) but I'm not sure how to do that properly. How can I force it to be included?
Over to Thomas for this -- the CLOCK interface is a little special since it's only ever instantiated once.
-anil
_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel
On 2 Dec 2014, at 12:36, Toby Moore <toby.moore.0@xxxxxxxxx> wrote:
Hi everyone,
I've been following this mailing list for a while now. I've finally managed to get a simple blog running on Mirage and AWS. I've put up a couple of posts of my experience (http://is-awesome.net) but I doubt there'll be anything that's new or exciting to readers here.
Not at all -- I just discovered the Pure CSS framework from reading it -- I was just wondering what to do while converting my own blog :-)
One outstanding issue is that I can't seem to get the CLOCK working properly on AWS. It's fine for a unix build, but I don't have another xen host available right now and the deploy test cycle to AWS is pretty painful. Trying to get the current time on AWS gets me this:
Unsupported function gmtime called in Mini-OS kernel
Do_exit called!
base is 0x0 Page fault at linear address 8, rip cb67, regs 000000000034f908, sp 34f9b0, our_sp 000000000034f8c8, code 0
Page fault in pagetable walk (access to invalid memory?).
That's almost certainly some unexpected fallout due to the switch to MiniOS-as-a-library. We'll definitely want this working on Amazon's Xen interface version! Any chance you could put this bug report up on https://github.com/mirage/mirage/issues ?
This is built with OCaml 4.01.0 with these OPAM packages:
io-page 1.1.1 Allocate memory pages suitable for aligned I/O
mirage 2.0.1 The Mirage library operating system
mirage-clock-unix 1.0.0 A Mirage-compatible Clock library for Unix
mirage-clock-xen 1.0.0 A Mirage-compatible Clock library for Xen
mirage-conduit 2.0.0 Virtual package for the Mirage Conduit transpo
mirage-console 2.0.0 A Mirage-compatible Console library for Xen an
mirage-dns 2.0.0 Virtual package for the Mirage DNS transports
mirage-http 2.0.0 Mirage HTTP client and server driver for Unix
mirage-net-unix 1.1.1 Ethernet network driver for Mirage, using tunt
mirage-net-xen 1.1.3 Ethernet network device driver for Mirage/Xen
mirage-types 2.0.1 Module type definitions for Mirage-compatible
mirage-types-lwt 2.0.1 Lwt module type definitions for Mirage-compati
mirage-unix 2.0.0 Mirage OS library for Unix compilation
mirage-xen 2.0.0 Mirage OS library for Xen compilation
mirage-xen-minios 0.4.2 Xen MiniOS guest operating system library
I'm not directly passing a clock device, my config.ml has these bits in it:
let main =
foreign "Unikernel.Main" (http @-> console @-> kv_ro @-> kv_ro @-> job)
let unix_libs =
match get_mode () with
| `Unix -> ["mirage-clock-unix"]
| _ -> []
let () =
add_to_ocamlfind_libraries unix_libs;
...
This is mostly copied out of the skeleton examples. I know the clock interface has been changing a bit recently but it works fine under unix. My guess is that the clock driver is skipped because it's not referenced (except in my code) but I'm not sure how to do that properly. How can I force it to be included?
Over to Thomas for this -- the CLOCK interface is a little special since it's only ever instantiated once.
-anil
Hi everyone,
I've been following this mailing list for a while now. I've finally
managed to get a simple blog running on Mirage and AWS. I've put up a
couple of posts of my experience (
http://is-awesome.net) but I doubt
there'll be anything that's new or exciting to readers here.
One outstanding issue is that I can't seem to get the CLOCK working
properly on AWS. It's fine for a unix build, but I don't have another
xen host available right now and the deploy test cycle to AWS is pretty
painful. Trying to get the current time on AWS gets me this:
ÂÂÂ Unsupported function gmtime called in Mini-OS kernel
ÂÂÂ Do_exit called!
ÂÂÂ base is 0x0 Page fault at linear address 8, rip cb67, regs
000000000034f908, sp 34f9b0, our_sp 000000000034f8c8, code 0
ÂÂÂ Page fault in pagetable walk (access to invalid memory?).
This is built with OCaml 4.01.0 with these OPAM packages:
ÂÂÂ io-pageÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ 1.1.1Â Allocate memory pages suitable
for aligned I/O
ÂÂÂ mirageÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ 2.0.1Â The Mirage library operating
system
ÂÂÂ mirage-clock-unixÂÂÂÂÂÂÂÂÂ 1.0.0Â A Mirage-compatible Clock
library
for Unix
ÂÂÂ mirage-clock-xenÂÂÂÂÂÂÂÂÂÂ 1.0.0Â A Mirage-compatible Clock
library
for Xen
ÂÂÂ mirage-conduitÂÂÂÂÂÂÂÂÂÂÂÂ 2.0.0Â Virtual package for the Mirage
Conduit transpo
ÂÂÂ mirage-consoleÂÂÂÂÂÂÂÂÂÂÂÂ 2.0.0Â A Mirage-compatible Console
library for Xen an
ÂÂÂ mirage-dnsÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ 2.0.0Â Virtual package for the Mirage
DNS transports
ÂÂÂ mirage-httpÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ 2.0.0Â Mirage HTTP client and server
driver for Unix
ÂÂÂ mirage-net-unixÂÂÂÂÂÂÂÂÂÂÂ 1.1.1Â Ethernet network driver for
Mirage, using tunt
ÂÂÂ mirage-net-xenÂÂÂÂÂÂÂÂÂÂÂÂ 1.1.3Â Ethernet network device driver
for Mirage/Xen
ÂÂÂ mirage-typesÂÂÂÂÂÂÂÂÂÂÂÂÂÂ 2.0.1Â Module type definitions for
Mirage-compatible
ÂÂÂ mirage-types-lwtÂÂÂÂÂÂÂÂÂÂ 2.0.1Â Lwt module type definitions
for
Mirage-compati
ÂÂÂ mirage-unixÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ 2.0.0Â Mirage OS library for Unix
compilation
ÂÂÂ mirage-xenÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ 2.0.0Â Mirage OS library for Xen
compilation
ÂÂÂ mirage-xen-miniosÂÂÂÂÂÂÂÂÂ 0.4.2Â Xen MiniOS guest operating
system
library
I'm not directly passing a clock device, my config.ml has these bits
in it:
ÂÂÂ let main =
ÂÂÂÂÂ foreign "Unikernel.Main" (http @-> console @-> kv_ro
@-> kv_ro
@-> job)
ÂÂÂ let unix_libs =
ÂÂÂÂÂ match get_mode () with
ÂÂÂÂÂ | `Unix -> ["mirage-clock-unix"]
ÂÂÂÂÂ | _ -> []
ÂÂÂ let () =
ÂÂÂÂÂÂÂ add_to_ocamlfind_libraries unix_libs;
ÂÂÂÂÂÂÂ ...
This is mostly copied out of the skeleton examples. I know the clock
interface has been changing a bit recently but it works fine under unix.
My guess is that the clock driver is skipped because it's not referenced
(except in my code) but I'm not sure how to do that properly. How can I
force it to be included?
Thanks,
Toby