Print

Print


Hi Brian,

   the client's recovery code is not triggered in this place. The message is put in the outgoing queue, immediately after this happens (before the poller/stream picks it up), it's being examined by the timeout handler (tick task) and expired. `FileStateHandler::OnOpen` is then called with an error status code, which changes the internal state of the file object to reflect the error. The crash happens in there, before your handler could be called.

   In the parts of code that we narrowed down the issue to, the only obvious place where this crash could occur is line 877, which reads: `std::string lastServer = pFileUrl->GetHostId();` This could really happen only if the `pFileUrl` object was deleted and it's pointer made reference invalid memory. This pointer is initialized when `File::Open` is called and deleted in `File::~File`. So I don't really see what else could happen, other than the deletion of the file.

   The crash could have also happened in another place, but it's not immediately apparent to me. Providing a trace with line numbers would be immensely helpful in this case.

   The fix https://github.com/xrootd/xrootd/commit/ba8e604c9621c1073e3cb72a6da17a4f1622c61f should prevent this code path from being executed in this case and limit it only to the cases with heavy uploads which is what it was meant for.

Cheers,
   Lukasz

---
Reply to this email directly or view it on GitHub:
https://github.com/xrootd/xrootd/issues/107#issuecomment-42665751

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1