lilith icon indicating copy to clipboard operation
lilith copied to clipboard

pape causes OS to freeze in qemu

Open spencerking opened this issue 6 years ago • 5 comments

Release: 0.0.5 Qemu options: qemu-system-x86_64 -hda disk.img -vga std -m 512M -serial stdio

I cd'd into /share/papes and ran pape pape.png and the OS froze and my machine's fans spun up rapidly.

Here is qemu's output in my terminal:

rbp=2d0 
rdi=2
rsi=0
r15=100000080
r14=ffffffff
r13=100002130
r12=2d000000500
r11=246
r10=0
r9=0
r8=17
rdx=4414fc
rcx=0
rbx=1
rax=17
int_no=6
errcode=0
rip=4375a0
cs=2b
rflags=202
userrsp=7ffffffd88
ss=23
process: pape
6 0

spencerking avatar Dec 29 '19 01:12 spencerking

Can you compile the kernel with CPU exception handling disabled (passing NO_CPUEX=1 to make) and show me at which function did it break?

ffwff avatar Dec 29 '19 02:12 ffwff

Doubtful, but I will try. I never did get the project building.

spencerking avatar Dec 29 '19 05:12 spencerking

This isn't related to this issue, so could you open another one and tell me more about the build process and where it fails?

ffwff avatar Dec 29 '19 05:12 ffwff

Okay, the image currently doesn't run in debug mode so I couldn't get any function-name diagnostics, but here's what I got with release mode. (typing pape /share/papes/pape.png in cterm) The bottom three lines were printed and lilith froze.

scorbie@home:~/Projects/lilith$ make run_img RELEASE=1 NO_CPUEX=1
CR src/main.cr
LD64 build/main.o build/boot.o => build/kernel64
objcopy --output-target=binary build/kernel64 build/kernel64.bin
AS32 src/asm/bootstrap.s
i686-elf-as src/asm/bootstrap.s -o build/bootstrap.o
LD build/bootstrap.o => build/kernel
qemu-system-x86_64 -kernel build/kernel -monitor telnet:127.0.0.1:7777,server,nowait -m 512M -serial stdio -no-shutdown -no-reboot -vga std -device intel-hda,debug=9 -device hda-duplex,cad=0,debug=9 -hda disk.img
WARNING: Image format was not specified for 'disk.img' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.
qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5]
hda-duplex: hda_audio_init: cad 0
hda-duplex: dac: format: 2 x PCM-S16 @ 48000 Hz
hda-duplex: adc: format: 2 x PCM-S16 @ 48000 Hz
hda-duplex: hda_audio_reset
hda-duplex: hda_audio_reset
intel-hda: intel_hda_update_irq: level 0 [intx]
no handler for 14
no handler for 15
no handler for 15
unknown device type!
no handler for 1
no handler for 12
multiple backgrounds
retval == -1
casting nil to not-nil!

I'm not sure if this is helpful enough.

ghost avatar Jan 05 '20 09:01 ghost

The window manager currently doesn't support multiple background windows. I may need to add a communication pipe to pape in order to change backgrounds.

ffwff avatar Jan 05 '20 09:01 ffwff