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

Fatal error when virtual RamDisk is running #412

Open
EugeneSoftwareDeveloper opened this issue Nov 12, 2023 · 9 comments
Open

Fatal error when virtual RamDisk is running #412

EugeneSoftwareDeveloper opened this issue Nov 12, 2023 · 9 comments

Comments

@EugeneSoftwareDeveloper

When run ramDisk

image

image

When ramdisk is stoped there is no error

Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at System.SpanHelpers.IndexOf(Byte ByRef, Byte, Int32)
at System.String.Ctor(SByte*)
at System.Runtime.InteropServices.Marshal.PtrToStringAnsi(IntPtr)
at LibreHardwareMonitor.Hardware.Storage.WindowsStorage+StorageInfo.GetString(IntPtr, UInt32)
at LibreHardwareMonitor.Hardware.Storage.WindowsStorage+StorageInfo..ctor(Int32, IntPtr)
at LibreHardwareMonitor.Hardware.Storage.WindowsStorage.GetStorageInfo(System.String, UInt32)
at LibreHardwareMonitor.Hardware.Storage.AbstractStorage.CreateInstance(System.String, UInt32, UInt64, Int32, LibreHardwareMonitor.Hardware.ISettings)
at LibreHardwareMonitor.Hardware.Storage.StorageGroup.AddHardware(LibreHardwareMonitor.Hardware.ISettings, System.Collections.Generic.Dictionary2<UInt32,System.Collections.Generic.List1<System.ValueTuple`2<UInt32,UInt64>>>)
at LibreHardwareMonitor.Hardware.Storage.StorageGroup..ctor(LibreHardwareMonitor.Hardware.ISettings)
at LibreHardwareMonitor.Hardware.Computer.AddGroups()
at LibreHardwareMonitor.Hardware.Computer.Open()
at OhmGraphite.SensorCollector.Start()
at OhmGraphite.PrometheusServer.b__4_0()
at OhmGraphite.LoggerUtils.LogAction(NLog.Logger, System.String, System.Action)
at OhmGraphite.PrometheusServer.Start()
at OhmGraphite.Worker+<>c__DisplayClass3_0.b__0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task+<>c.<.cctor>b__272_0(System.Object)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(System.Threading.Thread, System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef, System.Threading.Thread)
at System.Threading.Tasks.Task.ExecuteEntryUnsafe(System.Threading.Thread)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool+WorkerThread.WorkerThreadStart()
at System.Threading.Thread.StartCallback()

@nickbabcock
Copy link
Owner

Does disabling storage devices via the OhmGraphite config at least let you run without errors?

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <appSettings>
    <add key="/storage/enabled" value="false" />
  </appSettings>
</configuration>

If so, I'd be curious if the GUI version gives you the same error: https://github.com/LibreHardwareMonitor/LibreHardwareMonitor#where-can-i-download-it

@EugeneSoftwareDeveloper
Copy link
Author

Does disabling storage devices via the OhmGraphite config at least let you run without errors?

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <appSettings>
    <add key="/storage/enabled" value="false" />
  </appSettings>
</configuration>

If so, I'd be curious if the GUI version gives you the same error: https://github.com/LibreHardwareMonitor/LibreHardwareMonitor#where-can-i-download-it

Yes. Disable storage devices helped.
I would like to be able to disable a specific drive.

LibreHardwareMonitor work wihtout errors.

image

@nickbabcock
Copy link
Owner

Is the ramdisk included in the gui or has it been excluded?

@EugeneSoftwareDeveloper
Copy link
Author

The patition is not displayed. Only displayed hard disks and ssd.

RamDisk is not displayed (excluded).

image

@nickbabcock
Copy link
Owner

Do you get the same error when you run OhmGraphite interactively (in an administrator terminal)?

./OhmGraphite stop
./OhmGraphite run

@EugeneSoftwareDeveloper
Copy link
Author

EugeneSoftwareDeveloper commented Dec 24, 2023

Do you get the same error when you run OhmGraphite interactively (in an administrator terminal)?

./OhmGraphite stop
./OhmGraphite run

Also stops after starting.
Run as admin + comments line <add key="/storage/enabled" value="false" />

image

@nickbabcock
Copy link
Owner

The screenshot is a little confusing. To run interactively, execute OhmGraphite.exe run (the screenshot shows OhmGraphite.exe start)

@EugeneSoftwareDeveloper
Copy link
Author

EugeneSoftwareDeveloper commented Feb 1, 2024

The screenshot is a little confusing. To run interactively, execute OhmGraphite.exe run (the screenshot shows OhmGraphite.exe start)

Fatal error. Look logFromConsole.txt

@nickbabcock
Copy link
Owner

Thank you for posting, and your patience.

Tracing the logic, both LibreHardwareMonitor and OhmGraphite execute the same code, and while I don't know for 100%, it seems like the kernel is exposing different values to both. LibreHardwareMonitor receives either an invalid result or a false return from DeviceIoControl which is why it excludes it. For some reason, OhmGraphite doesn't and thinks the drive is valid (and thus fails).

I'm not sure what the next step is. Very confusing.

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