-
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
Memory leaks from xrootd #1424
Comments
In such cases, it's very useful to run valgrind with |
I just re-run it with the following options:
These are xrd-related entries that I get now:
and
and
I also uploaded the full log here: https://cernbox.cern.ch/index.php/s/ztbGo5drEuuOuNA |
Sadly, the initial conditional jump is missing from the new full log. The first one likely comes from here, or an earlier variant of that code: xrootd/src/XrdNet/XrdNetUtils.cc Lines 363 to 367 in 61b1e81
but I do not detect the logic error there... I think the last "possibly lost" is not a real issue, it is happening inside But I'll leave a better diagnosis to the XRootD devs :-). |
Several things to consider,
a) Conditional on an uninitialized variable. When this happens in a
system library it's invariably something we can't control. Rarely, we
found, it's uninitialized input to the library API. We can look at these
but likely we won't find anything. Most of these are due to using
particular instructions that don't initialize all the bytes in a word that
is later fetched (e.g. a single bit) that causes the false positive.
b) Access to unitialized memory. This also happens frequently in
optimized code when the code uses SSE instruction (e.g. strcmp, strncmp,
strcpy, etc are common culprits). This is a known problem with valgrind.
c) The server does allocate memory that will never be freed as it's
permanently needed to hold various information. Sometimes Valgrind looses
track that it's still accessible and reports it as likely or definitely
lost. In fact, it's not. The key here is when the memory area is involved
in anything method that has "config" in it.
Hope that explains the source of many of the false reports.
Andy
…On Thu, 11 Mar 2021, Oliver Freyermuth wrote:
Sadly, the initial conditional jump is missing from the new full log.
Also, that seems to be an older XRootD 4 version, so some of these may already have been addressed.
The first one likely comes from here, or an earlier variant of that code:
https://github.com/xrootd/xrootd/blob/61b1e815cb683eb420ad02d7cef17851584797f3/src/XrdNet/XrdNetUtils.cc#L363-L367
but I do not detect the logic error there...
I think the last "possibly lost" is not a real issue, it is happening inside `ld` by library loading.
But I'll leave a better diagnosis to the XRootD devs :-).
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#1424 (comment)
|
I think it is safe to close this issue. |
Hello,
My program use a lot of memory and I decided to check it with valgrind.
What I get are lots of errors from xrootd, like this:
Are those intentional? If so, is there a suppression file that I could use?
The instance of
xrootd
I use is this one (which reportsunknown
version withxrootd -v
):The text was updated successfully, but these errors were encountered: