GithubHelp home page GithubHelp logo

hexsa-lab / nautilus Goto Github PK

View Code? Open in Web Editor NEW
41.0 8.0 60.0 5.73 MB

Nautilus Aerokernel

License: Other

Makefile 0.76% C 64.66% Objective-C 0.03% C++ 31.70% Shell 1.79% Lex 0.05% Yacc 0.14% Python 0.17% Assembly 0.45% CMake 0.01% M4 0.16% HTML 0.01% Perl 0.03% LLVM 0.01% Gnuplot 0.01% Rust 0.01% Dockerfile 0.01%
kernel operating-system hybrid-runtimes unikernel hpc supercomputing hvm hrt aerokernel virtual-machine nautilus os

nautilus's Introduction

Nautilus Logo Build Status Coverity Scan Build Status CodeFactor Total alerts License: MIT

Nautilus

Nautilus is an example of an Aerokernel, a very thin kernel-layer exposed (much like Unikernel) directly to a runtime system and/or application. Aerokernels are suited particularly well for parallel runtimes that need fine-grained, explicit control of the machine to squeeze every bit of performance out of it. Note that an Aerokernel does not, by default, have a user-mode! There are several reasons for this, simplicity and performance among the most important. Furthermore, there are no heavy-weight processes---only threads, all of which share an address space. Therefore, Nautilus is also an example of a single address-space OS (SASOS). The runtime can implement user-mode features or address space isolation if this is required for its execution model.

Table of Contents

Background

We call the combination of an Aerokernel and the runtime/application using it a Hybrid Runtime (HRT), in that it is both a runtime and a kernel, especially regarding its ability to use the full machine and determine the proper abstractions to the raw hardware (if the runtime developer sees a mismatch with his/her needs and the Aerokernel mechanisms, they can be overridden).

If stronger isolation or more complete POSIX/Linux compatibility is required, it is useful to run the HRT in the context of a Hybrid Virtual Machine. An HVM allows a virtual machine to split the (virtual) hardware resources among a regular OS (ROS) and an HRT. The HRT portion of the HVM can then be seen as a kind of software accelerator. Note that because of the simplicity of the hardware abstractions in a typical HRT, virtualization overheads are much, much less significant than in, e.g. a Linux guest.

Prerequisites

  • gcc cross compiler or clang (experimental)
  • grub version >= ~2.02
  • xorriso (for creating ISO images)
  • qemu or bochs (for testing and debugging)

Hardware Support

Nautilus works with the following hardware:

  • x86_64 machines (AMD and Intel)
  • Intel Xeon Phi, both KNC and KNL using Philix for easy booting
  • As a Hybrid Virtual Machine (HVM) in the Palacios VMM

Nautilus can also run as a virtual machine under QEMU, BOCHS, KVM, and in a simulated environment using Gem5

Building

First, configure Nautilus by running either make menuconfig or make defconfig. The latter generates a default configuration for you. The former allows you to customize your kernel build.

Select any options you require, then run make to build the HRT binary image. To make a bootable CD-ROM, run make isoimage. If you see weird errors, chances are there is something wrong with your GRUB2 toolchain (namely, grub-mkrescue). Make sure grub-mkrescue knows where its libraries are, especially if you've installed the latest GRUB from source. Use grub-mkrescue -d. We've run into issues with naming of the GRUB2 binaries, in which case a workaround with symlinks was sufficient.

On newer systems, Grub 2 renamed the binaries, so you might want to symlink to them, e.g. as follows:

$> ln -s /usr/bin/grub2-mkrescue /usr/bin/grub-mkrescue

Using QEMU

Here's an example:

asciicast

Recommended:

$> qemu-system-x86_64 -cdrom nautilus.iso -m 2048

Nautilus has multicore support, so this will also work just fine:

$> qemu-system-x86_64 -cdrom nautilus.iso -m 2048 -smp 4

You should see Nautilus boot up on all 4 cores.

Nautilus is a NUMA-aware Aerokernel. To see this in action, try (with a sufficiently new version of QEMU):

$> qemu-system-x86_64 -cdrom nautilus.iso \
                      -m 8G \
                      -numa node,nodeid=0,cpus=0-1 \
                      -numa node,nodeid=1,cpus=2-3 \
                      -smp 4,sockets=2,cores=2,threads=1

Nautilus supports debugging over the serial port. This is useful if you want to debug a physical machine remotely. All prints after the serial port has been initialized will be redirected to COM1. To use this, find the SERIAL_REDIRECT entry and enable it in make menuconfig. You can now run like this:

$> qemu-system-x86_64 -cdrom nautilus.iso -m 2G -serial stdio

Sometimes it is useful to interact with the Nautilus root shell via serial port, e.g. when you're running under QEMU on a system that does not have a windowing system. You'll want to first put a character device on the serial port by rebuilding Nautilus after selecting the Place a virtual console interface on a character device option. Then, after Nautilus boots (making sure you enabled the -serial stdio option in QEMU) you'll see a virtual console at your terminal. You can get to the root shell by getting to the terminal list with \``3. You can then select the root shell, and you will be able to run shell commands and see output. If you want to see more kernel output, you can use serial redirection and serial mirroring in your config.

If you'd like to use Nautilus networking with QEMU, you should use a TUN/TAP interface. First, you can run the following on your host machine:

$> sudo tunctl -d tap0
$> sudo tunctl -t tap0
$> sudo ifconfig tap0 up 10.10.10.2 netmask 255.255.255.0

Then you can use the tap interface with QEMU as follows. This particular invocation attaches both a virtual e1000 fast ethernet card and a virtio network interface:

$> sudo qemu-system-x86_64 -smp 2 \ 
                           -m 2048 \
                           -vga std \
                           -serial stdio \
                           -cdrom nautilus.iso \
                           -netdev tap,ifname=tap0,script=no,id=net0 \
                               -device virtio-net,netdev=net0 \
                           -netdev user,id=net1 \
                               -device e1000,netdev=net1 \
                           -drive if=none,id=hd0,format=raw,file=nautilus.iso \
                               -device virtio-blk,drive=hd0

Using BOCHS

While we recommend using QEMU, sometimes it is nice to use the native debugging support in BOCHS. We've used BOCHS successfully with version 2.6.8. You must have a version of BOCHS that is built with x86_64 support, which does not seem to be the default in a lot of package repos. We had to build it manually. You probably also want to enable the native debugger.

Here is a BOCHS config file (~/.bochsrc) that we used successfully:

ata0-master: type=cdrom, path=nautilus.iso, status=inserted
boot: cdrom
com1: enabled=1, mode=file, dev=serial.out
cpu: count=2
cpuid: level=6, mmx=1, level=6, x86_64=1, 1g_pages=1
megs: 2048

Using Gem5

You can configure and build Nautilus for execution in the Gem5 architectural simulator. Note that Gem5 is very slow. Simulated time is 2-3 orders of magnitude slower than real-time. If you care about interaction, and not simulation accuracy, configure Nautilus to override the APIC timing calibration results, a suboption under the Gem5 target architecture. Once you have built the kernel for the Gem5 target architecture, you can copy nautilus.bin to ~gem5/binaries, and run it using Gem5's example full system configuration (~gem5/configs/example/fs.py), like this (for two cpus):

$> cd ~gem5
$> build/X86/gem5.opt -d run.out configs/example/fs.py -n 2

Nautilus on Gem5 follows Gem5's boot model for Linux. If you don't want to change anything, just symlink binaries/nautilus.bin as the linux kernel executable the example config expects. Alternatively, you can modify the config like this, or do something similar in your own config:

     test_sys = makeLinuxX86System(...)
+++  test_sys.kernel = binary('nautilus.bin')

Once Gem5 is running, you can debug Nautilus in the following Gem5-standard ways:

$> telnet localhost 3456  # access serial0 / com1
gdb binaries/nautilus.bin
(gdb) target remote localhost:7000 # attach debugger to cpu 0
(gdb) set architecture i386:x86-64
(gdb) ...

Note that if you want to interact with Nautilus running on Gem5, you will need to use the virtual console on a char device (serial0) to do so. If you don't want to interact, please see the autoexec.bat startup script feature in src/arch/gem5/init.c.

Rapid Development

If you'd like to get started quickly with development, a good way is to use Vagrant. We've provided a Vagrantfile in the top-level Nautilus directory for provisioning a Vagrant VM which has pretty much everything you need to develop and run Nautilus. This setup currently only works for VMWare Fusion/Desktop (which requires the paid Vagrant VMWare provider). We hope to get this working for VirtualBox, and perhaps AWS soon. If you already have Vagrant installed, to get started you can do the following from the top-level Nautilus directory:

$> vagrant up

This will run for several minutes and provision a VM with all the required packages. It will automatically clone the latest version of Nautilus and build it. To connect to the VM, you can ssh into it, and immediately start running Nautilus. There is a demo put in the VM's nautilus directory which will boot Nautilus in QEMU with a virtual console on a serial port and the QEMU monitor in another tmux pane:

$> vagrant ssh
[vagrant@localhost] cd nautilus
[vagrant@localhost] . ./demo

Resources

You can find publications related to Nautilus and HRTs/HVMs at http://halek.co, http://pdinda.org, http://interweaving.org, and the lab websites below.

Our labs:

HExSA Lab at IIT

Prescience Lab at Northwestern

Maintainers

Primary development is done by Kyle Hale and Peter Dinda. However, many people contribute to the development and maintenance of Nautilus. Please see this page as well as comments in the headers and the commit logs for details.

License

MIT License

Acknowledgements

Nautilus was made possible by support from the United States National Science Foundation (NSF) via grants CCF-1533560, CRI-1730689, REU-1757964, CNS-1718252, CNS-0709168, CNS-1763743, and CNS-1763612, the Department of Energy (DOE) via grant DE-SC0005343, and Sandia National Laboratories through the Hobbes Project, which was funded by the 2013 Exascale Operating and Runtime Systems Program under the Office of Advanced Scientific Computing Research in the DOE Office of Science. Sandia National Laboratories is a multi-program laboratory managed and operated by Sandia Corporation, a wholly owned subsidiary of Lockheed Martin Corporation, for the U.S. Department of Energy's National Nuclear Security Administration under contract DE-AC04-94AL85000.

Kyle C. Hale © 2018

nautilus's People

Contributors

bradylee avatar brghena avatar btauro avatar chrisbeauchene avatar conghao-liu avatar cs450testaccount avatar dakersnar avatar defined2014 avatar khale avatar michaelcuevas avatar nalindquist avatar nandavelugoti avatar peterdinda avatar sj avatar summer2sama avatar zjp0317 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nautilus's Issues

[BUG] APIC pointer dereference after boot_kmem_cleanup

We've encountered a GPF when Nautilus is compiled with -O 0 both in gcc and clang in qemu and baremetal.

Looks like mm_boot_kmem_cleanup() corrupts cpu struct (naut->sys.cpus)

Reproducibility
qemu-system-x86_64 --enable-kvm -smp 4 -m 4G -cdrom nautilus.iso -vga vmware -serial mon:stdio
gcc version 10.2.1
Linux Kernel 5.8.14-200.fc32.x86_64 (Fedora 32)

+++ UNHANDLED EXCEPTION +++
[General Protection Fault] (0xd) error=0x0 <#GP>
    RIP=0x0043a113      (core=4294967295, thread=4294967295)
Current Thread=0x1 (0x02406000) ""
[-------------- Register Contents --------------]
RIP: 0008:000000000043a113
RSP: 0010:00000000bf3ff840 RFLAGS: 00010002 Vector: 0000000d Error: 00000000
RAX: f000f84dc0005624 RBX: 0000000000000000 RCX: 000000000286ec80
RDX: 0000000000000000 RDI: f000f84dc0005624 RSI: 0000000000000030
RBP: 00000000bf3ff860 R08: 00000000bf3ff880 R09: 00000000bf3ff880
R10: 00000000bf3ff880 R11: 00000000bf3ff880 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
FS: 0000000000000000(0010) GS: 0000000000802000(0000) knlGS: 0000000000000000
CS: 0008 DS: 0010 ES: 0010 CR0: 0000000080000033
CR2: 0000000000000000 CR3: 0000000000803000 CR4: 0000000000000620
CR8: 0000000000000000 EFER: 0000000000000500
[-----------------------------------------------]
[----------------- Call Trace ------------------]
[ 0] RIP: 0x0043a231 RBP: 0xbf3ff880
Symbol: apic_get_maxlvt   Section: .text
[ 1] RIP: 0x00346b7c RBP: 0xbf3ffbe0
Symbol: smp_bringup_aps   Section: .text
[ 2] RIP: 0x00429ab0 RBP: 0xbf3ffbf0
Symbol: init   Section: .text
[ 3] RIP: 0x00000000 RBP: 0x00000000
Symbol: ???   Section: .debug_loc
PANIC at src/nautilus/idt.c(132): +++ HALTING +++

[BUG]

Describe the bug
Nautilus fails to boot in qemu.

One potential complication is that I'm running qemu in
Nixos, a distribution of Linux. Given the nature
of the error, however, it's not obvious to me that the problem is
related to Nix or the various packages of grub, qemu, etc., that are
provided by Nix.

The version of grub2 that I'm using is the version recommended by the
Nautilus manual.

If it seems too tricky to boot Nautilus in Nixos, I can instead try
with Ubuntu. However, having a Nautilus package for Nix might be
independently useful. One perk is, for example, that all package
dependencies are handled automatically by the Nix package manager.

To Reproduce
This process can be reproduced using any distribution of Linux, as
long as the Nix package manager is installed on the target machine.

  1. Install the nix package manager.

  2. Create the file default.nix as listed below.

default.nix

{ pkgs   ? import <nixpkgs> {},
  stdenv ? pkgs.stdenv,
  gcc ? pkgs.gcc,
  grub ? pkgs.grub2,
  xorriso ? pkgs.xorriso
}:

stdenv.mkDerivation rec {
  name = "nautilus";

  # uncomment the line below, if you want to build from the official nautilus repository
  # src = pkgs.fetchFromGitHub {
  #   owner  = "HExSA-Lab";
  #   repo   = "nautilus";
  #   rev    = "85aadf2c5df31e364f19c00384d0950df6ea32e8";
  #   sha256 = "1l0dvrd1bjzx5b53nhj9hi3z1bs9fghlmfwj7dj3nzzb9zxfarg2";
  # };

  # uncomment the line below, if you want to build from local sources, in the folder ./nautilus
  #  src = ./nautilus;

  src = pkgs.fetchFromGitHub {
    owner  = "PrescienceLab";
    repo   = "nautilus-cs446";
    rev    = "7c3073ac66c78ef0e9f0b8acc6c25d6d186c5f15";
    sha256 = "0h64jgf1wfb9zfhm5mm5hhcj2fkrw72k43rn644s86h9b9hjqc54";
  };

  buildInputs = [ gcc grub xorriso ];

  buildPhase = ''
    cp configs/cs446-example-config .config
    echo "N" | make oldconfig
    make isoimage
  '';

  installPhase = ''
    mkdir -p $out
    cp nautilus.iso $out/    
  '';

}
  1. Build the Nautilus ISO image.
$ nix-build

After building, there should appear in the current folder a new
symlink named result, which points to a folder. In this folder,
there should appear the file nautilus.iso.

  1. Start a nix shell, making available the qemu package.
$ nix-shell -p qemu
  1. Try to run the iso image.
$ qemu-system-x86_64 -cdrom result/nautilus.iso -m 2048 -curses -nographic

Expected behavior
The screenshot displayed below will alternate between the grub and
Nautilus screens in an apparent infinite loop.

Screenshots
Below is the output from qemu.

SeaBIOS (version rel-1.12.0-0-ga698c8995f-prebuilt.qemu.org)


iPXE (http://ipxe.org) 00:03.0 C980 PCI2.10 PnP PMM+7FF913B0+7FEF13B0 C980
Press Ctrl-B to configure iPXE (PCI 00:03.0)...


Booting from Hard Disk...
Boot failed: could not read the boot disk

Booting from Floppy...
Boot failed: could not read the boot disk

Booting from DVD/CD...
Welcome to GRUB!

Booting `Nautilus'

error: you need to load the kernel first.
CPU ? (): dev: devices inited
CPU ? (): chardev: init
CPU ? (): blkdev: init
CPU ? (): netdev: init
Welcome to                                         
    _   __               __   _  __                
   / | / /____ _ __  __ / /_ (_)/ /__  __ _____    
  /  |/ // __ `// / / // __// // // / / // ___/    
 / /|  // /_/ // /_/ // /_ / // // /_/ /(__  )     
/_/ |_/ \__,_/ \__,_/ \__//_//_/ \__,_//____/  
+===============================================+  
 Kyle C. Hale (c) 2014 | Northwestern University   
+===============================================+  

Detected AuthenticAMD Processor
BOOTMEM: Setting up boot memory allocator
BOOTMEM: Memory map[] - [0x00000000 - 0x00000000] <>
BOOTMEM: Memory map[] - [0x00000001 - 0x000a0000]

Build Environment (please complete the following information):

  • Linux, nixos v19.03
  • grub v2.02
  • gcc v6.5
  • xorriso v1.5.0
  • qemu v3.1.0

Runtime Environment (please complete the following information):

  • Hardware: Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz

Kernel Configuration (please include):

  • It should be the same as the file cs446-example-config.

Changes Made to Nautilus (please include):
The Nix package default.nix specifies that Nautilus be built from
sources in the cs446 repository, using the student configuration
cs446-example-config.

[BUG] x2APIC lockup on Dell machines

We have a Dell R430 that we're doing some testing on, and when we ran into an issue where we receive a spurious interrupt and the machine locks up in the bootup sequence (just about when interrupts are enabled in init.c).

Curious thing is that when we disable x2APIC mode in the BIOS the issue goes away. Is there possibly some x2APIC/SPIV interaction we're missing here?

Add container template for dev environment

Would be nice to have ability to create Docker containers for quick development of Nautilus. Basically, this would involve creating a Dockerfile which creates a standard dev setup.

add gcov support

It would be great to have gcov output for generating test coverage results and for general informational purpose. Supporting this in a running kernel will require some output channel over which gcov report files can be generated. Generally, I can see the following path for this:

  • add -coverage flag to the flags for clang and gcc when we wan't to generate code coverage support
  • add a build option in Kconfig for using gcov
  • add runtime hooks for gcov (see here and search for gcov in the linux source tree (e.g. kernel/gcov/base.c))
  • output gcov data over the qemu debug device using the debugcon=xxx flag
  • build a tool to parse and separate the output from QEMU into gcov files
  • integrate gcov output into CI tool (.travis.yaml)

ARM support

For running on RPi, Mellanox Bluefield, small devices, and Pogo nodes, it'd be nice to have an ARM port. @btauro might be a good candidate.

NK Barrier notify field bug

bug discription
in nk_barrier_wait(barrier) implementation, after every threads gets out, barrier->notify is not set back to zero;
On every reuse of this barrier, it has no effect;
I found this bug when I test on pthread library tests.

Changes Made to Nautilus (please include):
in src/nautilus/barrier.c function nk_barrier_wait

if (atomic_inc_val(barrier->remaining) == init_count) {
        bspin_unlock(&barrier->lock);
    }

to

 if (atomic_inc_val(barrier->remaining) == init_count) {
        atomic_cmpswap(barrier->notify, 1, 0); 
        bspin_unlock(&barrier->lock);
 }

Additional context
Add any other context about the problem here.

[BUG] Infiniband + waitqueue commit = #GPF

This describes a bug that was somehow introduced in af70c93 (confirmed using git bisect). This commit is somehow causing memory corruption when the Infiniband driver is coming up (specifically, malloc()ing space for its memory protection tables. This has been confirmed both on virtual (Chameleon + KVM and out machine + KVM) and physical hardware (native on our IB machines), and seems to be triggered by allocations in the Infiniband driver. The driver has itself been confirmed to work before this commit. Given that this commit doesn't touch Infiniband it's making me think either something weird happened in the dev framework or maybe something more nefarious. Perhaps the per-queue allocators? This fails in the driver before it enables interrupts, so I doubt interactions like that are at play.

Here's the exception commit:

+++ UNHANDLED EXCEPTION ++++++ UNHANDLED EXCEPTION +++

[General Protection Fault] (0xd) error=0x0 <#GP>[General Protection Fault] (0xd) error=0x0 <#GP>

    RIP=0x0037c67d      (core=4294967295, thread=4294967295)    RIP=0x0037c67d      (core=4294967295, thread=4294967295)

Current Thread=0x1 (0x3fa02000) ""Current Thread=0x1 (0x3fa02000) ""

[-------------- Register Contents --------------][-------------- Register Contents --------------]

RIP: 0008:000000000037c67dRIP: 0008:000000000037c67d

RSP: 0010:000000003fdff8f0 RFLAGS: 00010087 Vector: 0000000d Error: 00000000RSP: 0010:000000003fdff8f0 RFLAGS: 00010087 Vector: 0000000d Error: 00000000

RAX: 000000003fa70000 RBX: 0000000000000200 RCX: 9130a4709130a470RAX: 000000003fa70000 RBX: 0000000000000200 RCX: 9130a4709130a470

RDX: 9130a4709130a470 RDI: 00000000008081c0 RSI: 0000000000000010RDX: 9130a4709130a470 RDI: 00000000008081c0 RSI: 0000000000000010

RBP: 000000003fdff8f0 R08: 0000000000000010 R09: 0000000000000001RBP: 000000003fdff8f0 R08: 0000000000000010 R09: 0000000000000001

R10: 0000000000000000 R11: 0000000000000001 R12: 00000000008081f0R10: 0000000000000000 R11: 0000000000000001 R12: 00000000008081f0

R13: 00000000008081c0 R14: 0000000000c08440 R15: 000000000031c3d0R13: 00000000008081c0 R14: 0000000000c08440 R15: 000000000031c3d0

FS: 0000000000000000(0010) GS: 0000000000800100(0000) knlGS: 0000000000000000FS: 0000000000000000(0010) GS: 0000000000800100(0000) knlGS: 0000000000000000

CS: 0008 DS: 0010 ES: 0010 CR0: 0000000080000033CS: 0008 DS: 0010 ES: 0010 CR0: 0000000080000033

CR2: 0000000000000000 CR3: 0000000000801000 CR4: 0000000000000620CR2: 0000000000000000 CR3: 0000000000801000 CR4: 0000000000000620

CR8: 0000000000000000 EFER: 0000000000000500CR8: 0000000000000000 EFER: 0000000000000500

----------------- Call Trace ------------------]

[ 0] RIP: 0x0037d45f RBP: 0x3fdff960[ 0] RIP: 0x0037d45f RBP: 0x3fdff960
[ 1] RIP: 0x003d4cc0 RBP: 0x3fdffa00[ 1] RIP: 0x003d4cc0 RBP: 0x3fdffa00
[ 2] RIP: 0x003d68c8 RBP: 0x3fdffa70[ 2] RIP: 0x003d68c8 RBP: 0x3fdffa70
[ 3] RIP: 0x003f2d1b RBP: 0x3fdffbe0[ 3] RIP: 0x003f2d1b RBP: 0x3fdffbe0
[ 4] RIP: 0x003a2a44 RBP: 0x3fdffbf0[ 4] RIP: 0x003a2a44 RBP: 0x3fdffbf0
[ 5] RIP: 0x00000000 RBP: 0x00000000[ 5] RIP: 0x00000000 RBP: 0x00000000
PANIC at src/nautilus/idt.c(117): +++ HALTING +++
PANIC at src/nautilus/idt.c(117): +++ HALTING +++

Here is the object dump, with the relevant line indicated with <=========

000000000037c630 <buddy_alloc>:
{
  37c630:	55                   	push   %rbp
  37c631:	48 89 e5             	mov    %rsp,%rbp
    ASSERT(mp);
  37c634:	48 85 ff             	test   %rdi,%rdi
  37c637:	0f 84 8e 01 00 00    	je     37c7cb <buddy_alloc+0x19b>
    if (order > mp->pool_order) {
  37c63d:	48 8b 4f 08          	mov    0x8(%rdi),%rcx
  37c641:	48 39 f1             	cmp    %rsi,%rcx
  37c644:	0f 82 06 01 00 00    	jb     37c750 <buddy_alloc+0x120>
    if (order < mp->min_order) {
  37c64a:	48 39 77 10          	cmp    %rsi,0x10(%rdi)
  37c64e:	48 0f 43 77 10       	cmovae 0x10(%rdi),%rsi
    for (j = order; j <= mp->pool_order; j++) {
  37c653:	48 39 f1             	cmp    %rsi,%rcx
  37c656:	0f 82 f4 00 00 00    	jb     37c750 <buddy_alloc+0x120>
        list = &mp->avail[j];
  37c65c:	48 89 f2             	mov    %rsi,%rdx
        if (list_empty(list)) {
  37c65f:	49 89 f0             	mov    %rsi,%r8
        list = &mp->avail[j];
  37c662:	48 c1 e2 04          	shl    $0x4,%rdx
  37c666:	48 03 57 28          	add    0x28(%rdi),%rdx
	return head->next == head;
  37c66a:	48 8b 02             	mov    (%rdx),%rax
        if (list_empty(list)) {
  37c66d:	48 39 c2             	cmp    %rax,%rdx
  37c670:	0f 84 e2 00 00 00    	je     37c758 <buddy_alloc+0x128>
	__list_del(entry->prev, entry->next);
  37c676:	48 8b 08             	mov    (%rax),%rcx
  37c679:	48 8b 50 08          	mov    0x8(%rax),%rdx
	next->prev = prev;
  37c67d:	48 89 51 08          	mov    %rdx,0x8(%rcx) <=======================
	prev->next = next;
  37c681:	48 89 0a             	mov    %rcx,(%rdx)
        ((ulong_t)block - mp->base_addr) >> mp->min_order;
  37c684:	48 89 c2             	mov    %rax,%rdx
	list->next = list;
  37c687:	48 89 00             	mov    %rax,(%rax)
	list->prev = list;

This is what makes me suspect memory corruption. The doubled up exception trace here makes me think there might be some weird interaction going on between threads, but that's just a wild guess.

@PeterDinda do you have any idea what might be causing this off the top of your head?

enhanced clang support

We can currently compile the core kernel with Clang, but only at -O1, and without using the rest of the clang/LLVM toolchain. For example, it'd be nice to be able to use the LLVM linker rather than ld.

refactor extensions and runtimes into modules

Now that we have the ability to dynamically link modules, we should be able to have a runtime module system with a well-defined interface which pulls in non-core critical features. This would be a step in the direction of giving runtime developers the ability to customize the kernel (easily) to their runtime. Would ideally integrate with Diver.

[BUG] Early panic in QEMU 2.11.1

Nautilus panics very early on when running on this particular version of QEMU (which ships on Ubuntu 18.04). It doesn't find the ACPI tables properly, and attempts (unsuccessfully) to parse the MP tables and falls over.

I'll add a crash dump later, just putting this here now so I don't forget.

Update: Also appears to happen on newer versions of QEMU

[BUG] OpenMP build error

Describe the bug
Nautilus does not compile with OPENMP runtime support. Looks like it's missing a header file.

I'm not building with clang openmp support.

My build produces the following errors:

In file included from src/arch/x64/init.c:149:
include/rt/openmp/openmp.h:28:10: fatal error: rt/openmp/omp/omp.h: No such file or directory
 #include <rt/openmp/omp/omp.h>
          ^~~~~~~~~~~~~~~~~~~~~

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.