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

running programs which use networking when the networking isn't configured in qemu causes crashes in uninitialized lip #15

Closed
convolvatron opened this issue May 14, 2018 · 7 comments

Comments

@convolvatron
Copy link
Contributor

No description provided.

@convolvatron
Copy link
Contributor Author

i guess there are two choices here:

  • serialize the relevant syscalls (particularily socket()) since thats necessary to go anywhere
    on networking coming up
  • only register the syscall handlers until they are useful

neither of these provides any useful feedback as to whether networking is expected to
ever come up (hardware is available)

@talshadow
Copy link
Contributor

talshadow commented Sep 10, 2018

@convolvatron
Can you clarify this task?
I prepared test image from webs. I i run it with command
qemu-system-x86_64 -hda image -nographic -m 2G -device isa-debug-exit -drive file=image,format=raw,if=virtio -device virtio-net
looks like start of program successful

if i don't have network device
qemu-system-x86_64 -hda image -nographic -m 2G -device isa-debug-exit -drive file=image,format=raw,if=virtio
I have a lot of error 'page fault' (under debugger it looks curiosly i return to beginning of function tcp_alloc from each call memp_malloc )

What should i do in each case?

@convolvatron
Copy link
Contributor Author

in the first case I think we're ok :)

i think there are plenty of arguable solutions in the second case. but when this came up last time Will made a good point - the overarching concern here is that we act like the existing system.

so my best guess is to just bring up lwip unconditionally, and attach an interface when it arrives.

@talshadow
Copy link
Contributor

still it not looks enough clear for me. For now it looks as memory management error. I will try to investigate it more deep.

@convolvatron
Copy link
Contributor Author

i think it is. in this case lwip was never initialized since we didn't find the pci device for the virtio nic and attach it. so nothing in lwip has been set up.

my suggestion is to set up lwip unconditionally outside the virtio code, then hopefully it will be able to handle api calls (maybe with errors if there is no interface)

@talshadow talshadow self-assigned this Sep 18, 2018
@talshadow
Copy link
Contributor

@convolvatron
I can't reproduce this issue after change net.c. It looks like fixed issue.

@convolvatron
Copy link
Contributor Author

yeah, i pulled out the init.. thanks for checking..closing

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