GithubHelp home page GithubHelp logo

running programs which use networking when the networking isn't configured in qemu causes crashes in uninitialized lip about nanos HOT 7 CLOSED

nanovms avatar nanovms commented on May 22, 2024
running programs which use networking when the networking isn't configured in qemu causes crashes in uninitialized lip

from nanos.

Comments (7)

convolvatron avatar convolvatron commented on May 22, 2024

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)

from nanos.

talshadow avatar talshadow commented on May 22, 2024

@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?

from nanos.

convolvatron avatar convolvatron commented on May 22, 2024

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.

from nanos.

talshadow avatar talshadow commented on May 22, 2024

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

from nanos.

convolvatron avatar convolvatron commented on May 22, 2024

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)

from nanos.

talshadow avatar talshadow commented on May 22, 2024

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

from nanos.

convolvatron avatar convolvatron commented on May 22, 2024

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

from nanos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.