-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
When ID1 is specified at startup, RaSCSI fails with duplicate ID #101
Comments
Clarification: when ID1 and ID2 are both specified at startup, RaSCSI fails with duplicate ID I'll post some working/non-working examples shortly. |
|
See my comment in troubleshooting. ID0 + ID1 = working |
No, because -ID0 + -ID2 works. |
Interesting failure pattern...
If you specify ID1 and ID2, it fails. But putting ID2 then ID1, it works. |
This appears to be a problem in rascsi.cpp around line 923.
when using IDs 1+2, or 2+4, or 3+6, disk[id] gets populated after the first ID is parsed.
I haven't figured out what is setting disk[2] to something. That value is different for every execution, so it's possibly a pointer? |
commenting out this section allows the image to be mounted.
however, with the code in place, trying to mount the same ID doesn't fail as we might expect it to. I'm not exactly sure what this code block is supposed to do.
|
Thanks for investigating. I also looked at the code when reporting the bug and couldn't see where (id * 2) was getting assigned a value. It's a bit of a mystery, although your findings might help. In fact... check out what's happening in
|
I mucked around with this a bit more. That code block above also doesn't prevent you from attaching an image via rasctl to an ID that has something assigned already. I honestly don't know what it's supposed to do. @jeremybernstein going to dig into your suggestion now. |
I haven't had a chance to investigate this, but the |
@jeremybernstein I think you're on the right track. There is something related to how unitno is incremented. I think it's related to the SCSI/SASI controller stuff. Sorry for the vague explanation, but here is the output with some debug statements included...
When the function is called for ID 1, unitno is set to 2 for some reason, and disk[2] gets some data in it. This explains why mapping 1 + 2 gives an error. I haven't pinpointed what is causing this. I'm thinking Hmmm. UnitNum (Number of units around controller) is set to 2 at the beginning. In the loop, i counts up to UnitNum every time, and it's multiplied into the unitno value. I just dropped UnitNum from 2 to 1, compiled, and so far I am able to mount ID1 and ID2 at the same time. I'm going to do some more testing, but dropping UnitNum to 1 might be the solution. |
more testing
|
Yes |
@jeremybernstein agreed. @akuker looking for your comments. |
I tested the known buggy ID combinations, plus a handful of known good ones, in develop 8a3642b. This is does not reproduce for me. @akuker @jeremybernstein @phrax0 This part of the code has changed significantly since this issue was raised. Would you mind testing again in your environments? |
@rdmark I just stumbled upon this issue, and I can also not reproduce this anymore. But I know that it was not working with the old codebase. Now it is:
It's disappointing that nobody from the list above re-tested this ... |
@rdmark I suggest to close this issue, because everybody else seems to have lost interest, and it works for our setups. |
Agreed. This part of the code has changed enough that the original analysis is no longer applicable. Please raise a new ticket if there are still similar issues in certain environments! |
Info
Describe the issue
If I specify -ID1 in my service's ExecStart, the service fails to load, claiming a duplicate ID (it isn't). All other IDs appear to work.
position doesn't appear to matter. Manually attaching a device to ID 1 works fine when done through rasctl.
The text was updated successfully, but these errors were encountered: