-
Notifications
You must be signed in to change notification settings - Fork 149
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
Possible memory corruption when using curl in tpc #1531
Comments
Hi Andy! Do you have any specific reports to share on this (logfiles, traceback, core files, etc). Don't recall why that line was commented out. B |
Hi Brian,
We have lots of core files and they die in various places. Usually in
malloc, though. So, it's definitely a heap corruption. None of them
indicate anything other that either null pointer in a free block, a 0x26
(usually) in a unique pointer, and the like. The log files show no
particular errors related to the crashes. I think the first step is to
determine why that line was commented out. Accoding to reports if the
buffer size is not reset, curl will likely corrupt memory. Do you recll
what commit commented that line out? That may help us find a "good"
release which would be a smoking gun.
Andy
…On Sun, 10 Oct 2021, Brian P Bockelman wrote:
Hi Andy!
Do you have any specific reports to share on this (logfiles, traceback, core files, etc).
Don't recall why that line was commented out.
B
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#1531 (comment)
|
Hello all, I can take a look this week. I will try to get the commit that commented out this line and try to understand what happens :) |
What would be great is if you could run valgind while doing a relatively
heavy http Tpc load. Maybe we will see what the real memory corruption is.
Thanks for looking into this!
…On Sun, 10 Oct 2021, ccaffy wrote:
Hello all,
I can take a look this week. I will try to get the commit that commented out this line and try to understand what happens :)
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#1531 (comment)
|
Hi Andy, Yes, @simonmichal suggested exactly the same thing to me :) My pleasure :) Cheers, Cedric |
Cedric - a few thoughts:
|
Hi Brian, Ok thanks for the hints ! I will do my best ;) |
Any progress on finding out what is happening? |
Not yet, I have a data challenge this week so i am a little bit busy... Also, I have troubles with compiling xrootd with ASAN: Here is my cmake command I run to compile with asan:
After compilation, I get this error:
I also tried this:
But after compilation, I get now another error:
I tried to add the libasan.so's directory to the LD_LIBRARY_PATH variable but this does not help. I surely do something wrong, but I do not get what :/ Do you have any idea on what is wrong ? Thanks in advance :) |
I am also trying to run a HTTP TPC transfer between two xrootd servers on my dev environment. But I don't succeed as well. Do I need to request a certificate to enable HTTPS and have a macaroon or X509 authentication to make this work ?
Thanks again :) |
Another thing has been brougght to light. The site that experiencing memory corruption is running curl 7.29.0-57. Looking at the curl changelog
|
Hi - wanted to check up on things here. Did the sites having issues upgrade? Did the problems go away? Shall we close this out? |
Indeed, moving to the current version of curl avoided the obvious memory
corruption that we saw. We still encountered another problem and are on
the way to explaining that one. However, yes, anyone running curl
7.29.0-57 will eventually crash. We strongly recommend moving to a known
stable version of curl 7.29.0-59.
…On Tue, 2 Nov 2021, Brian P Bockelman wrote:
Hi - wanted to check up on things here. Did the sites having issues upgrade? Did the problems go away? Shall we close this out?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#1531 (comment)
########################################################################
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
|
Hi, I tried with curl 7.28.0, compiled with address sanitizer on my dev box. I could not see any memory corruption on my side, even with 10000 HTTP TPC pull transfers... If the problem of this ticket went away with the new curl version, we can probably close this ticket :) |
7.28.0 is a pretty old release (2012) as curl is now at 7.79.1. All we know is that memory corruptions was introduced somewhere after that. The current version does not have the problem and apparently neither do very old versions. As for the crash, it appears that curl simply ran out of memory. So, I am going to close this ticket. |
Lately we have gotten many reports of heap corruption. This appears to happen when there is a heavy load using http TPC which uses curl. There have been other people reporting curl memory corruption as well, especially when not resetting options upon handle reuse. See curl/curl#4143
The weird thing is that what this bug report talks about seems apparent in the tpc code where XrdTpcTPC.cc:382 is
//curl_easy_setopt(curl, CURLOPT_BUFFERSIZE, 128*1024);
However, not resetting the buffer size may lead curl to corrupt the heap. Why was this line commented out?
The text was updated successfully, but these errors were encountered: