Closed perlun closed 5 years ago
More info on startup exception: fired up qemu -s
and attached a gdb
, placed a breakpoint on the failing line (the error was reproducible in QEMU also). Managed to see the kernel output before the crash:
Starting (null)
(process ID 0).
storm 0.5.1+ booting...
Compiled by per@ceres-debian on Sep 28 2018 22:32:36 (revision 4931669).
Machine: Celeron (Mendocino) at 950373170 Hz (~950 MHz).
Memory: Total 511 MB, kernel 23672 KB, reserved 384 KB, free 500104 KB.
VM subsystem initialized.
Global memory initialized.
ISA-based I/O initialized.
DMA initialized.
IPC initialized.
Thread subsystem initialized.
Process subsystem initialized.
Started (process ID 1).
Started (process ID 2).
Started (process ID 3).
Started (process ID 4).
Started (process ID 5).
Started (process ID 6).
Started (process ID 7).
Started (process ID 8).
Started (process ID 9).
Started (process ID 10).
Started (process ID 11).
The missing process names is an indication that some of the Multiboot info is not being passed from the GRUB 2 bootloader to the kernel as expected.
Let's face it:
grub-legacy
is, after all, legacy. GRUB 2 was released 6 years ago at the time of writing (June 2012). We should adopt these new changes.There are a few steps involved:
grub.cfg
file using the new syntax. Done in 01b373d74910acd0b6b3db0e3b9b6d3f05c8a5e6ipc_receive
with mailbox_receive calls being messed up. Some form of evil race condition, not managed to find the root cause even after many hours of debugging. Finally managed to find and fix this in #124. The text below was written while working on the fix and is kept for historical purposes.grub-legacy
also: https://github.com/chaos4ever/chaos/compare/grub-1-reproducing-mailbox-receive-bugwhile (TRUE)
loop insidehandle_connection
- the value in this variable was thread-local, as it ought to be according to the design.-O3
instead of-O0
as before - negative, doesn't change a dime.genisoimage
to build our bootable ISO image and usegrub-mkrescue
instead. This should allow us to generate hybrid ISO/USB bootable images, making it possible to boot either as a CD ISO or by burning the ISO to a USB flash drive - this can be really useful if you want to run chaos on physical hardware. This part is done, but not merged since it revealed the error below.