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
SPDK backend uses detached controller #107
Comments
Hi @LiadOz,
Would be good to know to reproduce the issue. |
I haven't been able to reproduce the crash itself in a simple environment but I can reproduce the issue: I have created 3 namespace using nvmf app
And made the following changes to add logs
here are the logs I get
Here are the important bits:
As you can see the controller can still be fetched after it was detached, in this example no harm is done since spdk_nvme_ns_is_active fails but it can succeed since the controller is freed and any data can be inside of it. |
It seems to me that xnvme_be_spdk_state_init is using the controller lookup wrong, each time a controller is reused it both updates the reference count (_cref_lookup) and creates a new entry (with _cref_insert). |
#114 seems to fail due to a similar issue, in that pull request I added a function that gets called with a detached controller and it crashes. |
Hi @LiadOz, this should be fixed in xNVMe v0.5.0. |
This issue seems doesn't happen to me on 0.5.0 |
Great then I am closing this issue. |
I have found the following issue when working with version 0.3.0 and using ip:port for opening devices, here is the flow:
In step 4 I crash sporadically, when debugging the issue I noticed that the controller has garbage values at this stage.
This is what I see when debugging:
It seems to me that the root cause of the issue is creating the 5 entries instead of only 1. assuming _cref_deref would be called enough times to clear every entry in the table it will detach the controller 5 times which should not happen.
With these changes the I stop crashing
The text was updated successfully, but these errors were encountered: