Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rusty-demo crashes at the end of rusty-demo #70

Closed
jschwe opened this issue Oct 1, 2020 · 3 comments
Closed

Rusty-demo crashes at the end of rusty-demo #70

jschwe opened this issue Oct 1, 2020 · 3 comments

Comments

@jschwe
Copy link
Contributor

jschwe commented Oct 1, 2020

Rusty-demo runs fine until the end using qemu on WSL2, however it crashes after the last test has finished ( somewhere after main returns). It is then stuck and the qemu process does not end.
This does not happen when using the integration tests in libhermit-rs, however those are exited via the debug device in qemu.

I'll do some further investigating when I have the time.

Update: This seems to be a general problem, since this is also happening in CI - See https://github.com/jschwe/rusty-hermit/runs/1192410905 .

Log

$ qemu-system-x86_64 -cpu qemu64,apic,fsgsbase,rdtscp,xsave,fxsr -display none -smp 1 -m 1G -serial stdio -kernel loader/target/x86_64-unknown-hermit-loader/debug/rusty-loader -initrd target/x86_64-unknown-hermit/debug/rusty_demo
[LOADER] Loader: [0x100000 - 0x336018]
[LOADER] Found Multiboot information at 0x9500
[LOADER] Found module: [0x338000 - 0x205af10]
[LOADER] Module length: 0x1d22f10
[LOADER] Found an ELF module at 0x338000
[LOADER] Map 200 pages at 0x338000 (page size 4 KByte)
[LOADER] Map 15 pages at 0x400000 (page size 2048 KByte)
[LOADER] Allocating 0x268 bytes at 0x133E00, index 0
[LOADER] Allocating 0x8B8 bytes at 0x134080, index 640
[LOADER] Allocating 0xD0 bytes at 0x134980, index 2944
[LOADER] Allocating 0xE0 bytes at 0x134A80, index 3200
[LOADER] This is a supported HermitCore Application
[LOADER] Found entry point: 0x197710
[LOADER] File Size: 3094321 Bytes
[LOADER] Mem Size: 3104840 Bytes
[LOADER] start 0x338000, size 0x2f6048
[LOADER] Load HermitCore Application at 0x2200000
[LOADER] Found TLS starts at 0x2469e78 (size 304 Bytes)
[LOADER] BootInfo located at 0x133140
[LOADER] Use stack address 0x3f8000
[LOADER] Jumping to HermitCore Application Entry Point at 0x597710
[0][INFO] Welcome to HermitCore-rs 0.3.40
[0][INFO] Kernel starts at 0x400000
[0][INFO] BSS starts at 0x6f3780
[0][INFO] TLS starts at 0x2469e78 (size 304 Bytes)
[0][INFO] Found Multiboot info at 0x9500
[0][INFO] Found cmdline at 0x33703e (size 62)
[0][INFO] Total memory size: 1023 MB
[0][INFO] Kernel region: [0x400000 - 0x800000]
[0][INFO] A pure Rust application is running on top of HermitCore!
[0][INFO] Heap: size 910 MB, start address 0x800000
[0][INFO] Heap is located at 0x800000 -- 0x39600000 (0 Bytes unmapped)
[0][INFO]
[0][INFO] ===================== PHYSICAL MEMORY FREE LIST ======================
[0][INFO] 0x00000039600000 - 0x0000003FFE0000
[0][INFO] ======================================================================
[0][INFO]
[0][INFO]
[0][INFO] ================== KERNEL VIRTUAL MEMORY FREE LIST ===================
[0][INFO] 0x00000039600000 - 0x00800000000000
[0][INFO] ======================================================================
[0][INFO]
[0][INFO]
[0][INFO] ========================== CPU INFORMATION ===========================
[0][INFO] Model: QEMU Virtual CPU version 2.5+
[0][INFO] Frequency: 2589 MHz (from Measurement)
[0][INFO] SpeedStep Technology: Not Available
[0][INFO] Features: MMX SSE SSE2 SSE3 MCE FXSR XSAVE RDTSCP CLFLUSH HYPERVISOR FSGSBASE
[0][INFO] Physical Address Width: 40 bits
[0][INFO] Linear Address Width: 48 bits
[0][INFO] Supports 1GiB Pages: No
[0][INFO] ======================================================================
[0][INFO]
[0][INFO] HermitCore-rs booted on 2020-10-01 at 09:28:46
[0][WARN] PCI Device @8086:7000 has multiple functions! Currently only one is handled.
[0][INFO]
[0][INFO] ======================== PCI BUS INFORMATION =========================
[0][INFO] 00:00 Host bridge [0600]: Intel Corporation 440FX - 82441FX PMC [Natoma] [8086:1237]
[0][INFO] 00:01 ISA bridge [0601]: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II] [8086:7000]
[0][INFO] 00:02 VGA compatible controller [0300]: Unknown Vendor Unknown Device [1234:1111], MemoryBar: 0xfd000000 (size 0x1000000), MemoryBar: 0xfebb0000 (size 0x1000)
[0][INFO] 00:03 Ethernet controller [0200]: Intel Corporation 82540EM Gigabit Ethernet Controller [8086:100E], IRQ 11, MemoryBar: 0xfeb80000 (size 0x20000), IOBar: 0xc000 (size 0x40)
[0][INFO] ======================================================================
[0][INFO]
[0][INFO] Found an ACPI revision 0 table at 0xF5AD0 with OEM ID "BOCHS "
[0][INFO] IOAPIC v32 has 24 entries
[0][INFO] Disable IOAPIC timer
[0][INFO]
[0][INFO] ===================== MULTIPROCESSOR INFORMATION =====================
[0][INFO] APIC in use: xAPIC
[0][INFO] Initialized CPUs: 1
[0][INFO] ======================================================================
[0][INFO]
[0][INFO] HermitCore is running on common system!
[INFO] Spawn network thread with id 2
[WARN] Ethernet interface not available
Hello, world!
Привет мир!
こんにちは世界
你好,世界
สวัสดีชาวโลก
Chào thế giới
Crab emoji: 🦀
Test hello ... ok
x = 23.87, e^x = 23259977111.3123, ln(e^x) = 23.87
Test arithmetic ... ok
argument[0] = {name}
Test print_argv ... ok
Test print_env ... ok
[0][INFO] Trying to open file on non-existing mount point 'etc'!
Test read_file ... failed!
[0][INFO] Trying to open file on non-existing mount point 'tmp'!
Test create_file ... failed!
this is thread number 0
this is thread number 1
Test threading ... ok
Pi: 3.141592653589587 (sequential)
Test pi_sequential ... ok
Pi: 3.1415926535897665 (with 2 threads)
Test pi_parallel ... ok
Time to solve 18.27907 s, iterations 1000, residuum 0.000804262515677571
Test laplace ... ok
Time to multiply matrix 24.962718 s
Test test_matmul_strassen ... ok
Time to create and to join a thread: 88880003 ticks
Test thread_creation ... ok
[0][ERROR] General Protection (#GP) Exception: ExceptionStackFrame {
instruction_pointer: 0xf000ff53f000ff53,
code_segment: 0x8,
cpu_flags: 0x1206,
stack_pointer: 0x39645d28,
stack_segment: 0x10,
}, error 0x0
[0][ERROR] fs = 0x802340, gs = 0x6F4C80

@jschwe jschwe changed the title Rusty-demo crashes at the end of rusty-demo when using qemu on WSL2 Rusty-demo crashes at the end of rusty-demo Oct 1, 2020
@stlankes
Copy link
Contributor

stlankes commented Oct 7, 2020

Do you use the latest nightly compiler. In this case, it could be same issue like #73

@jschwe
Copy link
Contributor Author

jschwe commented Oct 7, 2020

Yes, that's definitely possible. I was using nightly-2020-10-02.

@jschwe
Copy link
Contributor Author

jschwe commented Nov 28, 2020

Closing since this doesn't happen anymore.

@jschwe jschwe closed this as completed Nov 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants