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

Crashing on HTTPS #9

Open
Ivan-Velickovic opened this issue Jan 29, 2024 · 3 comments
Open

Crashing on HTTPS #9

Ivan-Velickovic opened this issue Jan 29, 2024 · 3 comments

Comments

@Ivan-Velickovic
Copy link
Contributor

Was just clicking around after getting the example building/running and ran into this:

MON|INFO: Microkit Bootstrap
MON|INFO: bootinfo untyped list matches expected list
MON|INFO: Number of bootstrap invocations: 0x0000000e
MON|INFO: Number of system invocations:    0x000013cd
MON|INFO: completed bootstrap invocations
MON|INFO: completed system invocations
INFO  [sel4_async_network] DHCP config lost
INFO  [sel4_async_network] DHCP config acquired
INFO  [sel4_async_network] IP address: 10.0.2.15/24
INFO  [sel4_async_network] Default gateway: 10.0.2.2
INFO  [sel4_async_network] DNS server 0: 10.0.2.3
http_server: panicked at 'assertion failed: `(left != right)`
  left: `0`,
 right: `0`', /work/crates/pds/server/core/src/server.rs:44:17
aborted at 'main thread panicked', /home/x/.cargo/git/checkouts/rust-sel4-a4edf3b9624837c3/4a2e125/crates/sel4-microkit/src/entry.rs:68:19
received message 0x00000003  badge: 0x0000000000000001  tcb cap: 0x800000000000138d
faulting PD: http_server
Registers: 
pc : 0x00000000002c4914
spsr : 0x0000000060000040
x0 : 0x0000000000000000
x1 : 0x0000000000000000
x2 : 0x0000000000000000
x3 : 0x0000000000000000
x4 : 0x0000000000000000
x5 : 0x0000000000000000
x6 : 0x0000000000000000
x7 : 0xfffffffffffffff4
UserException
<<seL4(CPU 0) [receiveIPC/142 T0xffffff807ffe7400 "rootserver" @8a000300]: Reply object already has unexecuted reply!>>

I'm not sure what caused it, but I think it's something to do with requesting another page before the current one finishes loading? E.g say going to https://localhost:9443/news/index.html and then reloading before the page is finished loading.

@Ivan-Velickovic
Copy link
Contributor Author

The same kind of behaviour on HTTP ends up with these messages rather than crashing:

WARN  [microkit_http_server_example_server_core] error: Other(InvalidState(CloseWait))
WARN  [microkit_http_server_example_server_core] error: Other(InvalidState(Closed))
WARN  [microkit_http_server_example_server_core] error: Other(InvalidState(Closed))
WARN  [microkit_http_server_example_server_core] error: Other(InvalidState(Closed))
WARN  [microkit_http_server_example_server_core] error: Other(InvalidState(Closed))
WARN  [microkit_http_server_example_server_core] error: Other(InvalidState(Closed))
WARN  [microkit_http_server_example_server_core] error: Other(InvalidState(Closed))
WARN  [microkit_http_server_example_server_core] error: Other(InvalidState(CloseWait))

@nspin
Copy link
Member

nspin commented Feb 3, 2024

These bugs and warnings are due to the server assuming certain behavior from the client.

I haven't put much time into addressing TCP/IP and HTTP-level edge cases in this demo yet.

Using a third-party HTTP implementation (https://github.com/sammhicks/picoserve is the only no_std one I've found) would be one effort-efficient way to solve problems like this.

Whether I fix these issues myself or switch to using a third-party HTTP implementation instead, I'll post my progress in this thread.

@nspin
Copy link
Member

nspin commented Feb 5, 2024

The crash in this issue has been fixed with seL4/rust-sel4#78, pulled into this repo with #10.

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