mirror of
https://git.missingno.dev/kolibrios-nvme-driver/
synced 2024-11-21 15:13:48 +01:00
Shutdown Freezes System #5
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is a followup of #1 (comment)
I was able to replicate this problem on QEMU as well, so there's definitely something suspicious going on within the driver. I'll have to investigate this later.
Update with commit
0f24000b9a
, shutdown still freezes system on VirtualBox with loaded NVMe driver.@Burer, Since this is happening at OS level I will need to setup a debugger to inspect what's going on. If possible, could you ask @dunkaist what is the listing utility used to generate virtual addresses is? (How to get it, compile it, or find documentation on it) I tried asking on IRC already but haven't received a response at the moment. That would be much appreciated, thanks. :)
@ramenu,
The listing utility is shipped with the fasm package. Firstly you need to compile its source to an object file, then to link it using your system's linker, not fasm.
I suspect the issue is in nvme_cleanup procedure. Try commenting out its call in your START procedure and see if this helps. If yes, the issue is localized.
@dunkaist,
Thank you for the insight. Unfortunately even when removing the nvme_cleanup call the issue still occurs. Removing the call the RegService does fix the shutdown problem, but I'm not sure if this is a viable solution since the controller cannot shutdown properly.
Okay, some clue at least, so I tried moving around RegService into different places:
however, invoking RegService right after detect_nvme is called, results in a page fault when trying to shut down:
Preserving the edi, esi registers seems to fix this issue:
Which makes sense, since the entrypoint to the driver follows stdcall convention. Now, let's see if I can fix this properly.
YUP, that fixes it! NICE! :) (
9ace6a4b52
)I've emitted the nvme-cleanup call for now though, will test it tomorrow. But for now, this should suffice.
Confirmed, commit
9ace6a4b52
also fixed this issue in VirtualBox for me, both when autoloading driver from IMG image and loading it manually from ISO image.Could you test this once more on Virtualbox and VMWare, with commit
19f9eb5ae6
? Thanks.EDIT: Use
c02d64b35a
Update with commit
c02d64b35a
.System with loaded NVMe driver shuts down okay in VirtualBox, but freezes in VMWare, both when using IMG-image with driver autoload and ISO-image with manual driver loading.
Thank you. Could you try again but this time print debug output to the screen? I'm guessing the driver is stuck waiting for the controller to shutdown. But I just want to be sure.
Of course, here it is. Same result and output, both with IMG autoload and ISO manual load.
@Burer Thanks. I'll check this issue out tomorrow. Seems like the controller isn't shutting down. I'm probably doing it wrong.
So, since I don't have VMWare unfortunately this might get annoying for you to test. Unfortunately I'm not smart enough to know what's going on here, so if you could screenshot the output from this commit
5f727368e8
and try again, that would be helpful and tell me if shutdown processing is occurring or not. Thanks.No problem at all!
And here are the results with commit
5f727368e8
:@Burer, does this freeze always occur on VMWare? Or does it just happen occasionally? Has this happened on previous builds?
@ramenu, happened every time on commit
5f727368e8
, but was okay on previous commits.Like, on
c02d64b35a
it loads okay but fails to shut down, and before that is just failed to load, but without freezes.@Burer: Thank you. That is a very useful hint. :)
@Burer, I've reverted that commit. But I don't think it will help with the VMWare shutdown case. Not having VMWare makes it significantly more challenging to test and debug as I kind of have to rely on just guessing what may be wrong, so sorry if I'm not active on this issue.
Also, I'm going to remove the image from the repository as its using quite a bit of storage space and git isn't really suitable for this kind of thing, so I'll edit the Makefile later to automatically update the image. :)
@ramenu, no problem at all. The first goal of driver is to work on real hardware, so if it can't run properly on one certain VM - that is sad, but not crucial, I suppose.
And okay, got it, thank you. But what do you mean by automatically update the image, if you are going to remove it from repo?
@Burer, don't get me wrong. I'm still interested in making it work on VMWare. It's just difficult to work on until I install it.
And by automatically updating the image I mean having the makefile install the driver directly into the KolibriOS image with something like 'make install'.
@ramenu, got it, just want to say, that there is nothing to be sorry about, if you are not active on it. VMWare website for some reason throws server errors when trying to download it for last few weeks, so there is possibly nothing we can do here right now. And if you will get some progress - I always will be glad to help test it.
And got it, thank you, really nice idea. Definitely would be helpful for other contributors to build it.
@Burer, I'll try and download VMWare today and see what I can do. :) That being said, were there any other issues you discovered in your testing? Does read/write work okay? No crashes or freezing? Even though the driver is beta quality me and @punk_joker still want to merge the driver upstream.
RIP. You're right. I'm getting a Cloudflare host error.
@Burer, you mentioned that it freezes on startup in VMWare right? For some reason, I'm also getting this issue when disabling debug logs on screen. It's weird.
@ramenu, first of all, sorry for ignore, was busy last few days.
I will test the newest version of driver in the next few days and write here about the results.
And in the meanwhile, I sent you an e-mail to your posteo.net mail, also regarding the GSoC. I decided to write you about it here, just in case, so that it wouldn't get lost.
@Burer, no worries. I knew you were busy, take your time. :)
And I received your email. I'll reply in a short bit, you'll get it from a different email though so check if it goes to spam.
Hello again, @ramenu!
It's been a long time, but finally I am here.
And if it is still actual, here are results of testing latest driver version (commit
c2ee9ee16d
).Hope this will help you if you are planning to continue driver development after the end of GSoC.
OFFTOP. Didn't get your email yet. Is it my miss, or you just haven't sent it yet?
Hey! I'll check this out sometime this weekend or next week. Thanks once again!
As for the email, I sent it again. My domain was on Spamhaus's DBL so it's possible that is why it didn't get sent. That should be resolved now, but if not then I'll just send it from another email.
Great, take your time and you are always welcome!
And now I got it, thank you very much.
Update with commit
53c04b912c
.Driver loads and works okay on VMWare, but system freezes on shut down.