CosmosOS / Cosmos

Cosmos is an operating system "construction kit". Build your own OS using managed languages such as C#, VB.NET, and more!
https://www.goCosmos.org
BSD 3-Clause "New" or "Revised" License
2.94k stars 552 forks source link

OS reaches an unrecoverable state during DHCP Discover #3075

Closed Neil-Ciciglycerin closed 2 weeks ago

Neil-Ciciglycerin commented 3 months ago

Area of Cosmos - What area of Cosmos are we dealing with?

DHCP discover?

Expected Behaviour - What do you think that should happen?

It should continue running, as normal

Actual Behaviour - What unexpectedly happens?

Vmware reports "vcpu-0" error, which means CosmosOS accessed an invalid part of memory. Debug engine reports a NullReferenceException at addr. 0x0138363A.

Core dump: EAX = 0x01383601 EBX = 0x0104FFAC ECX = 0x00000000 EDX = 0x01070000 EDI = 0x10508B8 ESI = 0x00000000 EBP = 0x010508B0 ESP = 0x10508B4 EIP = 0x010508B8 Call stack: at 0x0137C25B at 0x01373209 at 0x017AC349 at 0x01372121

Reproduction - How did you get this error to appear?

Trying to run a DHCP discover? I modified some of the network settings in the vmx in an attempt to get DHCP to not return 0.0.0.0 I will put my code, map file, and VMX in a github repo, and add a reply once I do.

Version - Were you using the User Kit or Dev Kit? And what User Kit version or Dev Kit commit (Cosmos, IL2CPU, X#)?

Man, not even I know. It's probably the newest user kit? VMWare, VS2022

Neil-Ciciglycerin commented 3 months ago

Neil-Ciciglycerin/GLaDOSOS Repo containing all of my code. The map file was too big, but you should be able to reproduce it by recompiling.

Neil-Ciciglycerin commented 3 months ago

NOTE: This happens w./w.o. Cosmos Debugger.

Neil-Ciciglycerin commented 3 months ago

I'mma try updating to the newest devkit to see if that does anything.

Neil-Ciciglycerin commented 3 months ago

The newest devkit is broken. 1>IL2CPU : error : Exception: System.Exception: Native code encountered, plug required. Check build output for more information. 1> DO NOT REPORT THIS AS A BUG. 1> Please see http://www.gocosmos.org/docs/plugs/missing/ 1> Need plug for: System.Void System.String..ctor(System.ReadOnlySpan1)(Plug Signature: System_VoidSystem_String__ctor_System_ReadOnlySpan_1_System_Char ). 1> Static: False 1> Assembly: System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e 1> Called from: 1>System.Runtime.CompilerServices.DefaultInterpolatedStringHandler::System.String ToStringAndClear() 1>Cosmos.System.Kernel::Void Start()`

Neil-Ciciglycerin commented 3 months ago

Commit 1f3bb52

Neil-Ciciglycerin commented 3 months ago

On the most recent Userkit, it doesn't crash, but just returns 0.0.0.0

Neil-Ciciglycerin commented 3 months ago

I tried changing the connection type to NAT and it didn't do nothing, although it was able to recognize eth0 now.

Neil-Ciciglycerin commented 3 months ago

Nevermind, tried to run it on QEmu, (E1000) it crashed again. What on god's green earth is going on here

Neil-Ciciglycerin commented 3 months ago

It works on QEmu PCNet.

Neil-Ciciglycerin commented 2 months ago

bump

Neil-Ciciglycerin commented 2 months ago

bump

Neil-Ciciglycerin commented 1 month ago

anyone out there? i've been waiting forever.

ADev531 commented 3 weeks ago

Hello! @Neil-Ciciglycerin It's maybe too late... after Installing Devkit, You need to install Cosmos.Plugs in Userkit project. How? : In NuGet Package Manager -> Cosmos Local Feed -> Cosmos.Plugs. Please see this!

Neil-Ciciglycerin commented 3 weeks ago

I updated the devkit, installed Cosmos.Plugs and it started working.

ADev531 commented 2 weeks ago

Good! Can you close this, please?