Git Product home page Git Product logo

rumprun's Introduction

Rumprun Build Status

This repository uses rump kernels to provide the Rumprun unikernel. Rumprun works on not only on hypervisors such as KVM and Xen, but also on bare metal. Rumprun can be used with or without a POSIX'y interface. The former allows existing, unmodified POSIX applications to run out-of-the-box, while the latter allows building highly customized solutions with minimal footprints.

The Rumprun unikernel supports applications written in, for example but not limited to: C, C++, Erlang, Go, Java, Javascript (node.js), Python, Ruby and Rust.

You will find ready-made software packages for Rumprun from the rumprun-packages repository. Some examples of software available from there includes LevelDB, Memcached, nanomsg, Nginx and Redis. See the packages repository for further details.

See the wiki for more information and instructions. You may also want to watch video tutorials in the Rumprun unikernel video series.

Note: some of our tools will throw a warning about them being experimental. It does not mean that they are not expected to produce a working result, just that the usage is not necessarily final. The wiki explains further.

hw

The hardware (``hw'') platform is meant for embedded systems and the cloud. It works on raw hardware, but also supports virtio drivers and KVM. For a demonstration, see this youtube video where the hw platform is booted on a laptop and plays audio using the PCI hdaudio drivers. The supported CPU architectures are x86_32, x86_64 and ARM.

Xen

The Xen platform is optimized for running on top of the Xen hypervisor as a paravirtualized guest, and provides support for virtualization functions not available on the hw platform. The Xen platform will work both against the xl tools and the Amazon EC2 cloud. The supported CPU architectures are x86_32 and x86_64.

rumprun's People

Contributors

anttikantee avatar mato avatar ijackson-citrix avatar liuw avatar ricarkol avatar justincormack avatar retrage avatar gandro avatar ananos avatar thedrow avatar sg2342 avatar tombousso avatar yarlb avatar derangedmonkeyninja avatar esotsal avatar sahilsuneja1 avatar papazof avatar kevinboulain avatar fltt avatar nyx avatar lumjjb avatar kent-mcleod avatar gaffo avatar najamelan avatar

Stargazers

Paul G avatar Samuel Walker avatar  avatar nick avatar  avatar Sid Kshatriya avatar Shotaro Gotanda avatar

Watchers

James Cloos avatar  avatar  avatar Dan Williams avatar

rumprun's Issues

solo5's ukvm-bin (soon to be called solo5-spt) should exit with with the correct rumprun's exit status

The exit status of a rumprun program should make it to the ukvm exit status. For example:

$ cat test.c
int main() {return 1;}
$ make test
$ ukvm ./test.bin
$ echo $?
0 <=== this should be 1 (right now it's always 0)

solo5 gets the return value via a solo5_exit(exit_value) call from the guest. solo5_exit effectively halts the guest which should be done at bmk_platform_halt (the very end of the rumprun execution). The issue is that by then we completely forgot the return value. Just for reference, here is a backtrace of solo5_exit: none of the parent functions know what the return value is.

(gdb) bt
#0  solo5_exit (status=0) at exit.c:24
#1  0x000000000010005c in bmk_platform_halt (panicstring=0x0) at kernel.c:54
#2  0x000000000010109a in rumpuser_exit (value=value@entry=0)
    at /home/kollerr/research/nabla-base-build/rumprun/lib/libbmk_rumpuser/rumpuser_base.c:137
#3  0x00000000002e24b7 in cpu_reboot (howto=<optimized out>, bootstr=<optimized out>)
    at /home/kollerr/research/nabla-base-build/rumprun/src-netbsd/sys/rump/librump/rumpkern/emul.c:344
#4  0x000000000028ddc3 in sys_reboot (l=<optimized out>, uap=0x4affb0, retval=<optimized out>)
    at /home/kollerr/research/nabla-base-build/rumprun/src-netbsd/sys/rump/librump/rumpkern/../../../kern/kern_xxx.c:82
#5  0x00000000002e3184 in sy_call (rval=0x4affa0, uap=0x4affb0, l=0x6c8000, sy=<optimized out>)
    at /home/kollerr/research/nabla-base-build/rumprun/src-netbsd/sys/rump/librump/rumpkern/../../../sys/syscallvar.h:65
#6  sy_invoke (code=208, rval=0x4affa0, uap=0x4affb0, l=0x6c8000, sy=<optimized out>)
    at /home/kollerr/research/nabla-base-build/rumprun/src-netbsd/sys/rump/librump/rumpkern/../../../sys/syscallvar.h:94
#7  rump_syscall (num=num@entry=208, data=data@entry=0x4affb0, dlen=dlen@entry=16, retval=retval@entry=0x4affa0)
    at /home/kollerr/research/nabla-base-build/rumprun/src-netbsd/sys/rump/librump/rumpkern/rump.c:760
#8  0x00000000002d9ece in rump___sysimpl_reboot (opt=opt@entry=0, bootstr=bootstr@entry=0x0)
    at /home/kollerr/research/nabla-base-build/rumprun/src-netbsd/sys/rump/librump/rumpkern/rump_syscalls.c:2481
#9  0x00000000002e7202 in rumprun_reboot () at /home/kollerr/research/nabla-base-build/rumprun/lib/librumprun_base/rumprun.c:378
#10 0x00000000002e6b87 in bmk_mainthread (cmdline=<optimized out>)
    at /home/kollerr/research/nabla-base-build/rumprun/lib/librumprun_base/main.c:81
#11 0x00000000001018a8 in bmk_cpu_sched_bouncer ()
#12 0x0000000000000000 in ?? ()

The return value was set somewhere way before calling bmk_platform_halt, somewhere here:

=== calling "rumprun" main() ===

hello, c++

=== main() of "rumprun" returned 1 ===

=== ERROR: _exit(1) called === <=================== here is where we actually have the exit value
rump kernel halting...
syncing disks... done
unmounting file systems...
unmounted tmpfs on /tmp type tmpfs
unmounted rumpfs on / type rumpfs
unmounting done
halted
Solo5: solo5_exit(0) called <============== this is where we are doing `solo5_exit` and where we should have the exit value

solo5 hvt (ukvm) not working

Process segfaulting here:

            |      ___|
  __|  _ \  |  _ \ __ \
\__ \ (   | | (   |  ) |
____/\___/ _|\___/____/
Solo5: Memory map: 512 MB addressable:
Solo5:   reserved @ (0x0 - 0xfffff)
Solo5:       text @ (0x100000 - 0x2f1367)
Solo5:     rodata @ (0x2f1368 - 0x339147)
Solo5:       data @ (0x339148 - 0x40dc77)
Solo5:       heap >= 0x40e000 < stack < 0x20000000
rump kernel bare metal bootstrap

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 7.99.34 (RUMP-ROAST)
total memory = 253 MB
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
cpu0 at thinair0: rump virtual cpu
root file system type: rumpfs
kern.module.path=/stand/amd64/7.99.34/modules
mainbus0 (root)
timecounter: Timecounter "bmktc" frequency 1000000000 Hz quality 100
Solo5: trap: type=#PF ec=0x0 rip=0x2f1124 rsp=0x41ff50 rflags=0x10006
Solo5: trap: cr2=0x28
Solo5: ABORT: cpu_x86_64.c:171: Fatal trap

Backtrace obtained from a core dump.

[New process 1]
#0  __guard_setup () at /home/kollerr/research/nabla-base-build/rumprun/src-netbsd/lib/libc/misc/stack_protector.c:58
58	{
(gdb) bt
#0  __guard_setup () at /home/kollerr/research/nabla-base-build/rumprun/src-netbsd/lib/libc/misc/stack_protector.c:58
#1  0x00000000002f13cd in _libc_init () at /home/kollerr/research/nabla-base-build/rumprun/src-netbsd/lib/libc/misc/initfini.c:97
#2  0x00000000002c95d9 in runinit () at /home/kollerr/research/nabla-base-build/rumprun/lib/librumprun_base/netbsd_initfini.c:68
#3  _netbsd_userlevel_init () at /home/kollerr/research/nabla-base-build/rumprun/lib/librumprun_base/netbsd_initfini.c:114
#4  0x00000000002c900e in rumprun_boot (cmdline=0x11000 "") at /home/kollerr/research/nabla-base-build/rumprun/lib/librumprun_base/rumprun.c:105
#5  0x00000000002c8d26 in bmk_mainthread (cmdline=<optimized out>) at /home/kollerr/research/nabla-base-build/rumprun/lib/librumprun_base/main.c:64
#6  0x00000000001018a8 in bmk_cpu_sched_bouncer ()
#7  0x0000000000000000 in ?? ()

Things work before this solo5 commit: 150bfa98b6a1330725f999f548c4d3fa9f64018a
The reason is that this particular commit unmaps the first 64KBs (including the NULL page).

solo5 memory layout printout is not right

            |      ___|
  __|  _ \  |  _ \ __ \
\__ \ (   | | (   |  ) |
____/\___/ _|\___/____/
Solo5: Memory map: %lu MB addressable:
Solo5:   reserved @ (0x0 - 0x%lx)
Solo5:       text @ (0x%lx - 0x%lx)
Solo5:     rodata @ (0x%lx - 0x%lx)
Solo5:       data @ (0x%lx - 0x%lx)
Solo5:       heap >= 0x%lx < stack < 0x%lx
rump kernel bare metal bootstrap

Pass the tests on the hw platform (qemu)

Currently, the hw (qemu) tests are disabled in travis as they are failing. It would be nice to get them back as the hw platform is a good reference. For example, if some test fails in both the hw and solo5 platforms, then it's very likely that the issue is in the upstream rumprun repo (like issue #20 ).

Print git version at startup

Print the git version somewhere in the middle of this.

            |      ___|
  __|  _ \  |  _ \ __ \
\__ \ (   | | (   |  ) |
____/\___/ _|\___/____/
Solo5: Memory map: 1024 MB addressable:
Solo5:     unused @ (0x0 - 0xfffff)
Solo5:       text @ (0x100000 - 0x2ed863)
Solo5:     rodata @ (0x2ed864 - 0x335777)
Solo5:       data @ (0x335778 - 0x404de7)
Solo5:       heap >= 0x405000 < stack < 0x40000000
rump kernel bare metal bootstrap

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 7.99.34 (RUMP-ROAST)
total memory = 509 MB
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
cpu0 at thinair0: rump virtual cpu
root file system type: rumpfs
kern.module.path=/stand/amd64/7.99.34/modules
mainbus0 (root)
timecounter: Timecounter "bmktc" frequency 1000000000 Hz quality 100
rumprun: could not find start of json.  no config?
mounted tmpfs on /tmp

=== calling "rumprun" main() ===

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.