Quantcast

[gnutls-devel] valgrind test openpgp-certs woodo

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[gnutls-devel] valgrind test openpgp-certs woodo

Alon Bar-Lev-3
Hi,

I go this strange error in openpgp-certs and only in this test when
running under valgrind. I could not find any reason for this so I
describe what I do get.

To make it short, after configure edit tests/cert-tests/Makefile and
leave only openpgp-certs in TESTS.

Then run make check, I experience the following valgrind error that
fails the test:
---
Checking OpenPGP certificate verification
==25840== Conditional jump or move depends on uninitialised value(s)
==25840==    at 0x401A5D8: index (in /lib64/ld-2.23.so)
==25840==    by 0x4007DEF: expand_dynamic_string_token (in /lib64/ld-2.23.so)
==25840==    by 0x4007F84: fillin_rpath (in /lib64/ld-2.23.so)
==25840==    by 0x400874B: _dl_init_paths (in /lib64/ld-2.23.so)
==25840==    by 0x4002E21: dl_main (in /lib64/ld-2.23.so)
==25840==    by 0x401820B: _dl_sysdep_start (in /lib64/ld-2.23.so)
==25840==    by 0x4004EC8: _dl_start (in /lib64/ld-2.23.so)
==25840==    by 0x4000CB7: ??? (in /lib64/ld-2.23.so)
==25840==    by 0x7: ???
==25840==    by 0xFFEFFFAEA: ???
==25840==    by 0xFFEFFFB4B: ???
==25840==    by 0xFFEFFFB56: ???
==25840==
Failure: Connection to signed PGP certificate should have succeeded!
(error code 15)
FAIL openpgp-certs (exit status: 1)
---

Interesting... if I run only the test using the following command it passes!

$ rm openpgp-certs.log && make openpgp-certs.log

I tried to compare the environment/usage and found nothing. I noticed
the ss failures so prepared this[1] but errors to be harmless.

Then found that the following does pass!!!
PATH=$PATH:/usr/sbin:/sbin make check

I tried to figure out where the problem comes from but could not... I
thought you may have a better idea. Something in this specific test
that uses the same utilities as any other similar tests is doing
something special.

Thanks,
Alon

[1] https://gitlab.com/gnutls/gnutls/merge_requests/300

_______________________________________________
Gnutls-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnutls-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [gnutls-devel] valgrind test openpgp-certs woodo

Nikos Mavrogiannopoulos
On Sun, Mar 12, 2017 at 2:16 PM, Alon Bar-Lev <[hidden email]> wrote:

> Hi,
>
> I go this strange error in openpgp-certs and only in this test when
> running under valgrind. I could not find any reason for this so I
> describe what I do get.
>
> To make it short, after configure edit tests/cert-tests/Makefile and
> leave only openpgp-certs in TESTS.
>
> Then run make check, I experience the following valgrind error that
> fails the test:
> ---
> Checking OpenPGP certificate verification
> ==25840== Conditional jump or move depends on uninitialised value(s)
> ==25840==    at 0x401A5D8: index (in /lib64/ld-2.23.so)
> ==25840==    by 0x4007DEF: expand_dynamic_string_token (in /lib64/ld-2.23.so)
> ==25840==    by 0x4007F84: fillin_rpath (in /lib64/ld-2.23.so)
> ==25840==    by 0x400874B: _dl_init_paths (in /lib64/ld-2.23.so)
> ==25840==    by 0x4002E21: dl_main (in /lib64/ld-2.23.so)
> ==25840==    by 0x401820B: _dl_sysdep_start (in /lib64/ld-2.23.so)
> ==25840==    by 0x4004EC8: _dl_start (in /lib64/ld-2.23.so)
> ==25840==    by 0x4000CB7: ??? (in /lib64/ld-2.23.so)
> ==25840==    by 0x7: ???
> ==25840==    by 0xFFEFFFAEA: ???
> ==25840==    by 0xFFEFFFB4B: ???
> ==25840==    by 0xFFEFFFB56: ???

Hi,
 That looks like something happening even before gnutls is loaded. You
may need debugging symbols in libc and dynamic loader to figure out.

regards,
Nikos

_______________________________________________
Gnutls-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnutls-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [gnutls-devel] valgrind test openpgp-certs woodo

Alon Bar-Lev-3
On 13 March 2017 at 09:04, Nikos Mavrogiannopoulos <[hidden email]> wrote:
> Hi,
>  That looks like something happening even before gnutls is loaded. You
> may need debugging symbols in libc and dynamic loader to figure out.

Well, I kinda give up... but narrowed it to the following... if
LD_LIBRARY_PATH contains absolute directory then it fails... libtool
uses absolute path.

In strace I could not find anything strange, it searches the shared
libraries absolute or relative as expected.

Many other tests that are expected to fail actually failed because of
this a false positive... we do not check for the valgrind exit code
explicitly.

I found those[1][2][3] and more.
Added this to suppression at [4] please consider.

Thanks!
Alon

[1] http://stackoverflow.com/questions/11506370/valgrind-reports-unitialized-values-on-empty-c-program
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=623876
[3] http://stackoverflow.com/questions/23663008/valgrind-reports-conditional-jump-or-move-depends-on-uninitialised-values-on
[4] https://gitlab.com/gnutls/gnutls/merge_requests/304

---
$ LD_LIBRARY_PATH=$(cd ../../lib/.libs && pwd) valgrind -q
--leak-check=full
--suppressions=../../../gnutls-3.5.10/tests/cert-tests/suppressions.valgrind
--error-exitcode=15  ../../src/.libs/gnutls-cli --help > /dev/null;
echo $?
==32377== Conditional jump or move depends on uninitialised value(s)
==32377==    at 0x401A5D8: index (in /lib64/ld-2.23.so)
==32377==    by 0x4007DEF: expand_dynamic_string_token (in /lib64/ld-2.23.so)
==32377==    by 0x4007F84: fillin_rpath (in /lib64/ld-2.23.so)
==32377==    by 0x400874B: _dl_init_paths (in /lib64/ld-2.23.so)
==32377==    by 0x4002E21: dl_main (in /lib64/ld-2.23.so)
==32377==    by 0x401820B: _dl_sysdep_start (in /lib64/ld-2.23.so)
==32377==    by 0x4004EC8: _dl_start (in /lib64/ld-2.23.so)
==32377==    by 0x4000CB7: ??? (in /lib64/ld-2.23.so)
==32377==    by 0x1: ???
==32377==    by 0xFFEFFFE1E: ???
==32377==    by 0xFFEFFFE39: ???
==32377==
15
$ LD_LIBRARY_PATH=../../lib/.libs valgrind -q --leak-check=full
--suppressions=../../../gnutls-3.5.10/tests/cert-tests/suppressions.valgrind
--error-exitcode=15  ../../src/.libs/gnutls-cli --help > /dev/null;
echo $?
0
---

_______________________________________________
Gnutls-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnutls-devel
Loading...