-
Notifications
You must be signed in to change notification settings - Fork 41
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
Posix write of uninitialised bytes #184
Comments
ping @pnorbert do you have an idea what's uninitialised here? |
Sorry I dropped the ball on this. Can you give me an example code? I can't
recreate this valgrind error with a simple C example writing variables and
attributes.
…On Wed, Aug 8, 2018 at 5:01 AM, Axel Huebl ***@***.***> wrote:
ping @pnorbert <https://github.com/pnorbert> do you have an idea what's
uninitialised here?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#184 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADGMLTxLibRMf17dKioUn08KwmMqrqukks5uOqjvgaJpZM4UqxyQ>
.
|
If you have CMake 3.10.0+ and ADIOS 1.13.1 in your # sources
git clone https://github.com/openPMD/openPMD-api.git
mkdir -p openPMD-api-build
cd openPMD-api-build
# configure & build
cmake ../openPMD-api -DopenPMD_USE_HDF5=OFF -DopenPMD_USE_PYTHON=OFF
cmake --build .
# find uninitialised bytes
valgrind bin/SerialIOTests Corresponding unit test file: Full output:
|
@pnorbert I guess the variables for your test need to be large enough to trigger the ADIOS |
That's not it. My example works fine with 80MB variable. I can see the
valgrind error in the SerialIOTests.
How can I figure which actual test is causing this error? Where are the
output files from this test? I need to see what is so special about your
test case.
…On Wed, Aug 8, 2018 at 11:04 AM, Axel Huebl ***@***.***> wrote:
@pnorbert <https://github.com/pnorbert> I guess the variables for your
test need to be large enough, to trigger the ADIOS realloc. So > 16MB if
I remember the defaults right ;-)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#184 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADGMLUoIvRmpn2BWi3y-apKC4dyEL0d7ks5uOv4BgaJpZM4UqxyQ>
.
|
Never mind, I found them. The error is related to long double attributes,
not to buffer size.
On Wed, Aug 8, 2018 at 5:41 PM, Norbert Podhorszki <
[email protected]> wrote:
… That's not it. My example works fine with 80MB variable. I can see the
valgrind error in the SerialIOTests.
How can I figure which actual test is causing this error? Where are the
output files from this test? I need to see what is so special about your
test case.
On Wed, Aug 8, 2018 at 11:04 AM, Axel Huebl ***@***.***>
wrote:
> @pnorbert <https://github.com/pnorbert> I guess the variables for your
> test need to be large enough, to trigger the ADIOS realloc. So > 16MB if
> I remember the defaults right ;-)
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#184 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ADGMLUoIvRmpn2BWi3y-apKC4dyEL0d7ks5uOv4BgaJpZM4UqxyQ>
> .
>
|
Thanks, great news! Just ping me if I shall check again with updates in |
This simple example exhibits the valgrind problem with long doubles.
Valgrind complains about both the malloc'd and calloc'd buffers.
|
Do you know how to fix it? |
Oh dang, it's a stdlib or valgrind issue! |
Hm, maybe that's relevant: http://valgrind.org/docs/manual/manual-core.html
|
This is a valgrind issue.
The file content shows that all 16 bytes of the buffer has been filled. The last 6 bytes are zeros.
|
Ok, I'll report that upstream with your example. |
I reported your example upstream in https://bugs.kde.org/show_bug.cgi?id=397313 |
ADIOS 1.13.1 is adding noise to valgrind debugging with uninitialised byte(s) in the syscall to
write(buf)
inadios_posix_write_pg1
(adios_posix.c:733
).The issue is triggered when previously a
adios_databuffer_resize
(buffer.c:68
) is called - I guess a few unimportant but still uninitialized bytes slip into the finalwrite
call from it.Detailed valgrind warning for ADIOS 1.13.1 with
_nompi
library write API:@pnorbert do you have an idea what's uninitialised here? Maybe you can limit the
write()
to the initialized bytes or simply zero-init the reallocated buffer's hanging bytes? Even if it might not be a bug, it makes downstream analysis of memory leaks very noisy as soon as we use ADIOS.The text was updated successfully, but these errors were encountered: