-
Notifications
You must be signed in to change notification settings - Fork 8
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
Expected behavior of AXL after being killed #57
Comments
from today's meeting, if AXL Init notices that it is restarting (i.e., a previous state file exists) it should do nothing / have no smarts. It would be up to the orchestrating layer above AXL to call stop or resume. |
So basically applications calling AXL should do this:
|
For apps that didn't want to deal with ID's it could be:
but we have to be clear that this stops all transfers and isn't safe if AXL is being used by 2 separate components. |
FYI, here is where SCRV stops flushes during SCR_Init: SCR_Init() --> scr_flush_async_stop(): scr_flush_async_stop() --> Filo_Flush_stop(): Filo_Flush_stop() --> filo_axl_stop --> AXL_Stop: |
Now that I'm digging into the code I see there's no way to get your old ID back. So my example in #57 (comment) doesn't work. Here's what would happen:
So in reality the application would have to remember it's
This is a problem, as I'm guessing most apps are not going to diligently save their id to disk so that they can do a proper cleanup in case they crash. One solution is to update Alternatively, we can do the same "cancel/cleanup all transfers for dead processes" as part of |
Additional info after some digging for LLNL/scr#163:
TL;DR: I don't see the need to cancel transfers for sync/pthread, and I don't see how we could cancel them for BBAPI. |
Questions for IBM related to this: |
I'd like to propose one possible solution to the "how do I cancel BB API transfers if my job restarts" problem: Imagine your using AXL to copy a file called
What you could do is first copy it to a temp file called Now imagine the job is cancelled halfway though the transfer. We'd still have a Alternatively, instead of using a temporary filename to store the transfer handle, you could store it in as xattr in The downside of this whole solution is that you'd have to do some extra metadata calls to destination before the transfer starts. It also doesn't solve the problem of cancelling all old transfers, it just cancels the ones that you attempt to transfer again, which may be good enough. |
Attaching the handle id to a temporary file name is a clever idea. There is a race condition we'd need to worry about where the application could die after it submits the transfer and then be restarted before the BB has started the transfer. In that case, the file would not exist when the process restarts and looks to cancel it. A possible work around to that would be to have the process touch the file before it even submits the transfer, but then we have to wait on the file system to create all of the inodes before we can initiate the transfer. I also don't know if this work around eliminates the race or just reduces the window of exposure. Having said that, I do think this idea would be helpful to other users. Let's keep it in mind. |
The race is possible, but unlikely. Keep in mind that the new process is going to have to do several BB API calls for setup before it even starts transferring it's files. So if the bbserver is slow starting up the previous transfer, it's presumably going to be slow for the new process calling Even if it did race, the worst that would happen is that you'd have an old |
True, but it's not the file on GPFS that is the problem. It's the source file on the SSD that SCR will be overwriting and truncating and/or deleting while the BB software is still trying to read it. I'd prefer to know that the BB is done trying to access that source file before SCR starts to mess with it. |
It shouldn't matter. The worst that would happen would be that job1's leftover |
Yeah, maybe. I get the feeling we'll trip up problems if we start messing with the source file while the BB is still reading from it. We need to be sure that the source file on the SSD can be successfully overwritten, truncated, renamed, have its permissions, group, and timestamps changed, and/or be unlinked. For a truncate or unlink, we also need the physical space on the disk to be freed up so that it can be used by new files. We need all of that to work without having the BB software hang or crash. We could run that question by IBM. |
Yea, we'll see what they say: IBM/CAST#931 |
@adammoody you can see IBM's response here: IBM/CAST#931 (comment) TL;DR there shouldn't be an issue. |
It's not entirely clear yet. I don't remember, have all files been created on GPFS when Start_transfer returns? I don't think that has to be true. Start_transfer might just queue the files in a list and return to the caller, and then the files get created at some later point when the BB server gets around to it. |
Correct, |
There's a subtle detail here between "job" and "job step" we should be clear about. A subsequent job (that runs under a different bsub allocation) will get its own logical volume and will not bother the extents created by the first job. These two jobs have different job ids under bsub. We don't know yet whether a second job step, one that runs in the same bsub allocation as another job step can trample on the extents from the first job step. |
Let's say you SIGKILL or crash an app in the middle of an AXL transfer, and then reload it with the same state file (via AXL_Init), what is the expected behaviour? Should the failed transfer be resumed as part of the call to AXL_Init? Should AXL_Init return an error and do nothing?
I started writing a test case for this but didn't know what to expect.
The text was updated successfully, but these errors were encountered: