View Issue Details

IDProjectCategoryView StatusLast Update
0004619GNUnetbuild processpublic2018-06-07 00:24
Reporterng0Assigned ToChristian Grothoff 
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionfixed 
Platformamd64OSGuixSDOS Version
Product VersionSVN HEAD 
Target Version0.11.0pre66Fixed in Version0.11.0pre66 
Summary0004619: 4 quota compliance tests are failing, I require information for patching them.
Descriptiongnunet 37742 fails these tests on Guix currently:
test_quota_compliance_tcp_asymmetric , test_quota_compliance_unix_asymmetric , test_quota_compliance_http_asymmetric , test_quota_compliance_https_asymmetric

I'd like to know how these tests function, and what these tests do that they can no succeed in our isolated build environment or if I can help the tests somehow to succeed (start something, patch something, set environment variables,...).
Steps To ReproduceSee https://dl.n0.is/debug/gnunet/ or http://dl.far37qbrwiredyo5.onion/debug/gnunet/ for "/logs/" directory containing test-suite.log and "/patches/" for tests which can be applied on a guix checkout to reproduce the make check failures.
Additional InformationDK5W is no peerid in gnunet, so I assume it is not trying to "call outside", which would not work in the environment for builds we have.
TagsNo tags attached.

Activities

Christian Grothoff

2016-08-22 17:49

manager   ~0011061

It looks like the real reason why the test failed is at the very end:

Aug 20 10:39:57-040899 test_quota_compliance_tcp_asymmetric-29940 ERROR Assertion failed at common_allocation.c:433.

This happens if GNUNET_snprintf() is called with a buffer that is too small. If you enable core dumps, you should get one, and then please obtain the stack trace (gdb test-binary core-file => bt full). That'll help me find what went wrong.

ng0

2016-08-28 15:29

developer   ~0011068

In short, this is not possible in the environment guixbuilder has and it has been suggested to me to not try to do this in a package build.

I don't know if I can reproduce the failures in a user build, I will try.

ng0

2016-09-26 15:39

developer   ~0011161

Question: If this error is exclusive to the guix build system, and I can not core dump, are there other ways to help and fix this? In revision 38016 the 4 tests still fail.
I could attach the new log.

ng0

2016-09-26 15:43

developer   ~0011162

Could, if it wouldn't hit the file limit of mantis.
https://ptpb.pw/2O-X.log (10 MB)

Christian Grothoff

2016-09-26 16:35

manager   ~0011165

This is the ONLY relevant line:

Sep 26 10:57:47-069422 test_quota_compliance_https_asymmetric-30331 ERROR Assertion failed at common_allocation.c:497.

However, it should dump a core file (if enabled) and I need the stack trace to diagnose this. (gdb 'bt full', ideally).

jah

2016-10-01 15:12

reporter  

core-lt-test_quota_c-6-1000-1000-31057-1475320110 (1,003,520 bytes)

jah

2016-10-01 15:15

reporter   ~0011220

Backtrace from the attached core file:-

/code/projects/gnu/gnunet/gnunet-dist-head/src/transport$ gdb .libs/test_quota_compliance_tcp /tmp/core-lt-test_quota_c-6-1000-1000-31057-1475320110

Reading symbols from .libs/test_quota_compliance_tcp...done.

warning: core file may not match specified executable file.
[New LWP 31057]
Core was generated by `/code/projects/gnu/gnunet/gnunet-dist-head/src/transport/.libs/lt-test_quota_co'.
Program terminated with signal SIGABRT, Aborted.
#0 0x00002afd9fdc9c37 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) fg
The program is not being run.
(gdb) bt full
#0 0x00002afd9fdc9c37 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
        resultvar = 0
        pid = 31057
        selftid = 31057
#1 0x00002afd9fdcd028 in __GI_abort () at abort.c:89
        save_stage = 2
        act = {__sigaction_handler = {sa_handler = 0x0, sa_sigaction = 0x0}, sa_mask = {
            __val = {0, 29559088, 47268787828007, 1, 0, 1, 47268796931376, 58, 29559088,
              29559088, 47268787856597, 0, 47268797867792, 0, 47268800838096,
              47268800831936}}, sa_flags = -1621956224, sa_restorer = 0x6d6d6f6320746120}
        sigs = {__val = {32, 0 <repeats 15 times>}}
#2 0x00002afd9f922ec9 in GNUNET_abort_ () at common_logging.c:293
No locals.
#3 0x00002afd9f92279a in GNUNET_snprintf (
    buf=buf@entry=0x1c30930 "/code/projects/gnu/gnunet/gnunet-dist-head/src/transport/",
    size=size@entry=58, format=format@entry=0x2afd9f973d47 "%s%s%s")
    at common_allocation.c:497
        args = {{gp_offset = 48, fp_offset = 48, overflow_arg_area = 0x7fffd2b15280,
            reg_save_area = 0x7fffd2b151c0}}
        __FUNCTION__ = "GNUNET_snprintf"
#4 0x00002afd9f96a4bb in GNUNET_STRINGS_filename_expand (fil=<optimised out>)
    at strings.c:615
        buffer = 0x1c30930 "/code/projects/gnu/gnunet/gnunet-dist-head/src/transport/"
        len = <optimised out>
        n = 58
        fm = 0x1c19e50 "/code/projects/gnu/gnunet/gnunet-dist-head/src/transport"
        fil_ptr = 0x1c30930 "/code/projects/gnu/gnunet/gnunet-dist-head/src/transport/"
        __FUNCTION__ = "GNUNET_STRINGS_filename_expand"
#5 0x00002afd9f940c9e in GNUNET_DISK_file_test (fil=<optimised out>) at disk.c:671
        filestat = {st_dev = 2057, st_ino = 2814500, st_nlink = 1, st_mode = 33200,
          st_uid = 1000, st_gid = 1000, __pad0 = 0, st_rdev = 0, st_size = 0,
          st_blksize = 4096, st_blocks = 32, st_atim = {tv_sec = 1475320028,
            tv_nsec = 831702843}, st_mtim = {tv_sec = 1475320028, tv_nsec = 827702843},
          st_ctim = {tv_sec = 1475320028, tv_nsec = 827702843}, __glibc_reserved = {2,
            0, 4199623}}
        rdir = <optimised out>
        __FUNCTION__ = "GNUNET_DISK_file_test"
#6 0x000000000040142e in deregister_tm_clones ()
No symbol table info available.
#7 0x0000000000000000 in ?? ()
No symbol table info available.

Christian Grothoff

2016-10-01 15:50

manager   ~0011221

Should be fixed in SVN 38059.

ng0

2016-10-01 17:15

developer   ~0011222

I've just build 38059 and the 4 tests still fail.

It's still running make check, but this is the progress currently:

PASS: test_transport_api_reliability_bluetooth
PASS: test_quota_compliance_tcp
../../test-driver: line 107: 31405 Aborted "$@" > $log_file 2>&1
FAIL: test_quota_compliance_tcp_asymmetric
PASS: test_quota_compliance_udp
PASS: test_quota_compliance_unix
../../test-driver: line 107: 31494 Aborted "$@" > $log_file 2>&1
FAIL: test_quota_compliance_unix_asymmetric
PASS: test_quota_compliance_http
../../test-driver: line 107: 31552 Aborted "$@" > $log_file 2>&1
FAIL: test_quota_compliance_http_asymmetric

ng0

2016-10-01 17:26

developer   ~0011223

Last edited: 2016-10-01 17:36

View 2 revisions

Are those tests which in any way require a connection to some outside server or other entity?

I was never able to produce a core dump as I don't do this regulary, so thanks jah for taking this on.

As soon as the second run with --keep-failed and not on my build server finishes I can push the updated guix packages to gnunet.org

jah

2016-10-01 17:50

reporter  

test_quota_compliance.c.patch (695 bytes)
Index: src/transport/test_quota_compliance.c
===================================================================
--- src/transport/test_quota_compliance.c	(revision 38059)
+++ src/transport/test_quota_compliance.c	(working copy)
@@ -305,11 +305,11 @@
   }
   for (unsigned int i=0;i<2;i++)
   {
-    if ( (NULL != gen_cfgs[0]) &&
-         (GNUNET_YES == GNUNET_DISK_file_test (gen_cfgs[0])) )
+    if ( (NULL != gen_cfgs[i]) &&
+         (GNUNET_YES == GNUNET_DISK_file_test (gen_cfgs[i])) )
     {
-      GNUNET_DISK_directory_remove (gen_cfgs[0]);
-      GNUNET_free (gen_cfgs[0]);
+      GNUNET_DISK_directory_remove (gen_cfgs[i]);
+      GNUNET_free (gen_cfgs[i]);
     }
   }
   return 0;

jah

2016-10-01 17:51

reporter   ~0011224

I think the bug may be in main in test_quota_compliance.c. It's calling twice:-

GNUNET_DISK_file_test (gen_cfgs[0])

gen_cfgs[0] is an empty string the second time round, which GNUNET_STRINGS_filename_expand treats as a relative path. I don't understand why GNUNET_snprintf fails.

Patch attached.

ng0

2016-10-01 18:05

developer   ~0011225

Last edited: 2016-10-01 19:14

View 2 revisions

I'm trying to apply and test it, I'm just a bit slow due to my unusual setup. I need to finish the guix.scm for inclusion, should speed things up for me.

It's in make check phase now.. I let you know if it succeeds and push the guix.scm and your applied patch then.

ng0

2016-10-01 19:40

developer   ~0011226

Still broken for me with your patches applied, I'll append a log.

ng0

2016-10-01 19:41

developer  

test-suite.log (69,962 bytes)

ng0

2016-10-01 20:00

developer   ~0011227

If I could edit the ticket itself, I would add: I have deactivated my server, you will not be able to reach anything at the .is and .onion in the 'steps to reproduce' anymore.

ng0

2017-01-14 18:20

developer   ~0011638

Fixed in HEAD as of 2017-01-14.

Issue History

Date Modified Username Field Change
2016-08-20 14:01 ng0 New Issue
2016-08-22 17:49 Christian Grothoff Note Added: 0011061
2016-08-22 17:49 Christian Grothoff Assigned To => Christian Grothoff
2016-08-22 17:49 Christian Grothoff Status new => feedback
2016-08-28 15:29 ng0 Note Added: 0011068
2016-08-28 15:29 ng0 Status feedback => assigned
2016-09-22 20:11 Christian Grothoff Target Version => 0.11.0pre66
2016-09-22 20:18 Christian Grothoff Status assigned => feedback
2016-09-26 15:39 ng0 Note Added: 0011161
2016-09-26 15:39 ng0 Status feedback => assigned
2016-09-26 15:43 ng0 Note Added: 0011162
2016-09-26 16:35 Christian Grothoff Note Added: 0011165
2016-09-26 16:35 Christian Grothoff Status assigned => feedback
2016-10-01 15:12 jah File Added: core-lt-test_quota_c-6-1000-1000-31057-1475320110
2016-10-01 15:15 jah Note Added: 0011220
2016-10-01 15:50 Christian Grothoff Note Added: 0011221
2016-10-01 15:50 Christian Grothoff Status feedback => resolved
2016-10-01 15:50 Christian Grothoff Fixed in Version => 0.11.0pre66
2016-10-01 15:50 Christian Grothoff Resolution open => fixed
2016-10-01 17:15 ng0 Note Added: 0011222
2016-10-01 17:15 ng0 Status resolved => feedback
2016-10-01 17:15 ng0 Resolution fixed => reopened
2016-10-01 17:26 ng0 Note Added: 0011223
2016-10-01 17:26 ng0 Status feedback => assigned
2016-10-01 17:36 ng0 Note Edited: 0011223 View Revisions
2016-10-01 17:50 jah File Added: test_quota_compliance.c.patch
2016-10-01 17:51 jah Note Added: 0011224
2016-10-01 18:05 ng0 Note Added: 0011225
2016-10-01 19:14 ng0 Note Edited: 0011225 View Revisions
2016-10-01 19:40 ng0 Note Added: 0011226
2016-10-01 19:41 ng0 File Added: test-suite.log
2016-10-01 20:00 ng0 Note Added: 0011227
2017-01-14 18:20 ng0 Note Added: 0011638
2017-01-14 19:18 amatus Status assigned => resolved
2017-01-14 19:18 amatus Resolution reopened => fixed
2018-06-07 00:24 Christian Grothoff Status resolved => closed