View Issue Details

IDProjectCategoryView StatusLast Update
0002125GNUnetVPN servicepublic2012-01-31 01:51
ReporterChristian Grothoff Assigned ToChristian Grothoff  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionwon't fix 
Platformi386OSfreebsd 
Summary0002125: vpn testcase segfaults on FreeBSD
Descriptionhttp://gnunet.org:8010/builders/freebsd7-amd64-wachs/builds/2026/steps/tests%20vpn/logs/stdio
TagsNo tags attached.

Activities

Christian Grothoff

2012-01-30 22:49

manager   ~0005409

Valgrind claims this is the cause:

==99069== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==99069== Access not within mapped region at address 0xC0
==99069== at 0x100EB94: ??? (in /lib/libthr.so.3)
==99069== by 0x1008910: open (in /lib/libthr.so.3)
==99069== by 0x1A24C9E: open_device (rndlinux.c:63)
==99069== by 0x1A24DBF: _gcry_rndlinux_gather_random (rndlinux.c:118)
==99069== by 0x1A23098: read_random_source (random-csprng.c:1272)
==99069== by 0x1A22E49: random_poll (random-csprng.c:1106)
==99069== by 0x1A22B03: read_pool (random-csprng.c:1000)
==99069== by 0x1A21EE7: _gcry_rngcsprng_randomize (random-csprng.c:551)
==99069== by 0x1A2172D: do_randomize (random.c:174)
==99069== by 0x1A217D2: _gcry_randomize (random.c:216)
==99069== by 0x1A2325E: _gcry_rngcsprng_create_nonce (random-csprng.c:1366)
==99069== by 0x1A21874: _gcry_create_nonce (random.c:271)
==99069== by 0x19B327E: gcry_create_nonce (visibility.c:1253)
==99069== by 0x1873C7A: GNUNET_CRYPTO_random_u32 (crypto_random.c:128)
==99069== by 0x187486F: GNUNET_CRYPTO_random_init (crypto_random.c:317)
==99069== by 0x189BAE6: ??? (in /usr/local/lib/libgnunetutil.so.6)
==99069== If you believe this happened as a result of a stack
==99069== overflow in your program's main thread (unlikely but
==99069== possible), you can try to increase the size of the
==99069== main thread stack using the --main-stacksize= flag.
==99069== The main thread stack size used in this run was 16777216.

This is odd as the same 'constructor' (from libgnunetutil) is executed from other GNUnet binaries that do not suffer from the segfault.

Christian Grothoff

2012-01-31 01:39

manager   ~0005410

Even with libgcrypt pthread initialization (which, as we are single-threaded, should not be needed), I get:

(gdb) ba
#0 0x0000000800760b94 in pthread_setcancelstate () from /lib/libthr.so.3
#1 0x000000080075a911 in open () from /lib/libthr.so.3
#2 0x0000000800fa520f in open_device (name=0x800fc7e3b "/dev/urandom") at rndlinux.c:64
#3 0x0000000800fa5388 in _gcry_rndlinux_gather_random (add=0x800fa2ba0 <add_randomness>, origin=RANDOM_ORIGIN_SLOWPOLL, length=120, level=1) at rndlinux.c:122
#4 0x0000000800fa3089 in read_random_source (orgin=RANDOM_ORIGIN_SLOWPOLL, length=120, level=1) at random-csprng.c:1283
#5 0x0000000800fa2d6e in random_poll () at random-csprng.c:1109
#6 0x0000000800fa29d4 in read_pool (buffer=0x8010d8194 "", length=8, level=0) at random-csprng.c:1003
#7 0x0000000800fa1ca8 in _gcry_rngcsprng_randomize (buffer=0x8010d8194, length=8, level=GCRY_WEAK_RANDOM) at random-csprng.c:551
#8 0x0000000800fa10be in do_randomize (buffer=0x8010d8194, length=8, level=GCRY_WEAK_RANDOM) at random.c:174
#9 0x0000000800fa11d3 in _gcry_randomize (buffer=0x8010d8194, length=8, level=GCRY_WEAK_RANDOM) at random.c:216
#10 0x0000000800fa32af in _gcry_rngcsprng_create_nonce (buffer=0x7fffffffe220, length=4) at random-csprng.c:1377
#11 0x0000000800fa1305 in _gcry_create_nonce (buffer=0x7fffffffe220, length=4) at random.c:271
#12 0x0000000800f2826f in gcry_create_nonce (buffer=0x7fffffffe220, length=4) at visibility.c:1286
#13 0x0000000800de6eab in GNUNET_CRYPTO_random_u32 (mode=GNUNET_CRYPTO_QUALITY_NONCE, i=4294967295) at crypto_random.c:128
#14 0x0000000800de7b96 in GNUNET_CRYPTO_random_init () at crypto_random.c:324
#15 0x0000000800e0ea87 in __do_global_ctors_aux () from /tmp/gnbuild/lib/libgnunetutil.so.6
#16 0x0000000800dcc836 in _init () from /tmp/gnbuild/lib/libgnunetutil.so.6
#17 0x00007fffffffe750 in ?? ()
#18 0x000000080050b8e5 in dlsym () from /libexec/ld-elf.so.1
#19 0x000000080050cc74 in dlopen () from /libexec/ld-elf.so.1
#20 0x0000000800507579 in ?? () from /libexec/ld-elf.so.1


#0 0x0000000800760b94 in pthread_setcancelstate () from /lib/libthr.so.3
No symbol table info available.
#1 0x000000080075a911 in open () from /lib/libthr.so.3
No symbol table info available.
#2 0x0000000800fa520f in open_device (name=0x800fc7e3b "/dev/urandom") at rndlinux.c:64
    fd = 0
#3 0x0000000800fa5388 in _gcry_rndlinux_gather_random (add=0x800fa2ba0 <add_randomness>, origin=RANDOM_ORIGIN_SLOWPOLL, length=120, level=1) at rndlinux.c:122
    fd = 8
    n = 5436928
    buffer = "\000�R\000\b\000\000\000�����\177\000\000@����\177\000\000\000>S\000\b\000\000\000f\022\202\001\b\000\000\000\000>S\000\b\000\000\000�����\177\000\000\020\000\000\000\020\000\000\000\0000S\000\b\000\000\000\000>S\000\b\000\000\000\0004S\000\b\000\000\0000CS\000\b\000\000\000\000>S\000\b", '\0' <repeats 11 times>, "0s\201\001\b\000\000\000f\022\202\001\b\000\000\000�\005\000\000\000\000\000\000;�P\000\b\000\000\000�����\177\000\000\000>S\000\001\000\000\000\210����\177\000\000`����\177\000\000\000>S\000\b\000\000\000\000>S\000\b\000\000\000\b� \000\000\000\000\000\000"...
    n_hw = 0
    want = 120
    last_so_far = 0
    any_need_entropy = 0
    delay = 5436416
    fd_urandom = -1
    fd_random = -1
#4 0x0000000800fa3089 in read_random_source (orgin=RANDOM_ORIGIN_SLOWPOLL, length=120, level=1) at random-csprng.c:1283
No locals.
#5 0x0000000800fa2d6e in random_poll () at random-csprng.c:1109
No locals.
#6 0x0000000800fa29d4 in read_pool (buffer=0x8010d8194 "", length=8, level=0) at random-csprng.c:1003
    i = 0
    sp = (long unsigned int *) 0x7fffffffe070
    dp = (long unsigned int *) 0x4a6a9c855d181050
    my_pid2 = 62631
    my_pid = 62631
    __FUNCTION__ = "read_pool"
#7 0x0000000800fa1ca8 in _gcry_rngcsprng_randomize (buffer=0x8010d8194, length=8, level=GCRY_WEAK_RANDOM) at random-csprng.c:551
    n = 8
    p = (unsigned char *) 0x8010d8194 ""
#8 0x0000000800fa10be in do_randomize (buffer=0x8010d8194, length=8, level=GCRY_WEAK_RANDOM) at random.c:174
No locals.
#9 0x0000000800fa11d3 in _gcry_randomize (buffer=0x8010d8194, length=8, level=GCRY_WEAK_RANDOM) at random.c:216
No locals.
#10 0x0000000800fa32af in _gcry_rngcsprng_create_nonce (buffer=0x7fffffffe220, length=4) at random-csprng.c:1377
    atime = 1327969954
    xpid = 62631
    apid = 62631
    p = (unsigned char *) 0x8010d8184 "�6'O"
    n = 140737488347696
    err = 0
    nonce_buffer = "��\000\000�6'O", '\0' <repeats 19 times>
    nonce_buffer_initialized = 0
    my_pid = 62631
    __FUNCTION__ = "_gcry_rngcsprng_create_nonce"
#11 0x0000000800fa1305 in _gcry_create_nonce (buffer=0x7fffffffe220, length=4) at random.c:271
No locals.
#12 0x0000000800f2826f in gcry_create_nonce (buffer=0x7fffffffe220, length=4) at visibility.c:1286
    __FUNCTION__ = "gcry_create_nonce"
#13 0x0000000800de6eab in GNUNET_CRYPTO_random_u32 (mode=GNUNET_CRYPTO_QUALITY_NONCE, i=4294967295) at crypto_random.c:128
    ret = 1327969954
    ul = 4294967295
    invokeCount = 0
    __FUNCTION__ = "GNUNET_CRYPTO_random_u32"
    log_call_enabled = -1
    log_call_enabled = -1
#14 0x0000000800de7b96 in GNUNET_CRYPTO_random_init () at crypto_random.c:324

Christian Grothoff

2012-01-31 01:51

manager   ~0005411

Ok, no VPN for FreeBSD for a while. That OS is just too messed up.

Issue History

Date Modified Username Field Change
2012-01-30 13:05 Christian Grothoff New Issue
2012-01-30 22:49 Christian Grothoff Note Added: 0005409
2012-01-31 01:39 Christian Grothoff Note Added: 0005410
2012-01-31 01:51 Christian Grothoff Note Added: 0005411
2012-01-31 01:51 Christian Grothoff Assigned To => Christian Grothoff
2012-01-31 01:51 Christian Grothoff Status new => closed
2012-01-31 01:51 Christian Grothoff Resolution open => won't fix