View Issue Details

IDProjectCategoryView StatusLast Update
0001874GNUnettesting librarypublic2011-11-30 17:38
ReporterBart Polot Assigned ToBart Polot Due Date
PrioritylowSeverityminorReproducibilitysometimes
Status closedResolutionfixed 
Product VersionGit master 
Target Version0.9.0Fixed in Version0.9.0 
Summary0001874: Ctrl+C causes segfault
DescriptionCancelling a test run causes the testcase to segfault.

[bart@ranger ~/g/src/mesh]$ gdb .libs/lt-test_mesh_small_unicast --core core
GNU gdb (GDB) 7.3.1
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/bart/tum/svn/gnunet/src/mesh/.libs/lt-test_mesh_small_unicast...done.

warning: core file may not match specified executable file.
[New LWP 18137]

warning: Can't read pathname for load map: Input/output error.
Core was generated by `/home/bart/g/src/mesh/.libs/lt-test_mesh_small_unicast'.
Program terminated with signal 11, Segmentation fault.
#0 0x00007f34d97b1b94 in vfprintf () from /lib/libc.so.6
(gdb) bt
#0 0x00007f34d97b1b94 in vfprintf () from /lib/libc.so.6
#1 0x00007f34d97d8432 in vsnprintf () from /lib/libc.so.6
#2 0x00007f34db237bd4 in mylog (kind=GNUNET_ERROR_TYPE_WARNING, comp=0x2541e10 "test_mesh_small-18137", message=0x7f34db022b50 "Failing peer group startup with error: `%s'!\n",
    va=0x7fff0fab61b8) at common_logging.c:727
#3 0x00007f34db237fd1 in GNUNET_log_nocheck (kind=<optimized out>, message=<optimized out>) at common_logging.c:791
#4 0x00007f34db01fabc in end_badly (cls=0x7f34db022b08, tc=<optimized out>) at testing_peergroup.c:280
#5 0x00007f34db259e11 in run_ready (ws=0x2531070, rs=0x2530fe0) at scheduler.c:685
#6 GNUNET_SCHEDULER_run (task=<optimized out>, task_cls=<optimized out>) at scheduler.c:867
#7 0x00007f34db2551c4 in GNUNET_PROGRAM_run (argc=5, argv=0x7fff0fab6560, binaryName=0x404209 "test_mesh_small", binaryHelp=<optimized out>, options=<optimized out>,
    task=0x401bc0 <run>, task_cls=0x0) at program.c:252
#8 0x000000000040185b in main (argc=<optimized out>, argv=<optimized out>) at test_mesh_small.c:940
Steps To ReproduceRun testcase
Ctrl+C

I remember it happening when testing nse, happens with mesh testcases too.
TagsNo tags attached.

Activities

Christian Grothoff

2011-11-03 20:30

manager   ~0004842

I think this must be in testing. Maybe the "fail_reason" field is not initialized (or already freed) properly. That's the only reason the vsnprintf would crash...

Bart Polot

2011-11-03 21:11

reporter   ~0004845

Last edited: 2011-11-03 21:13

From testing_peergroup.c:923

  pg_start_ctx->die_task =
      GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_absolute_get_remaining
                                    (pg_start_ctx->timeout), &end_badly,
                                    "didn't generate all hostkeys within allowed startup time!");

All other calls give, and end_badly itself treats cls as a "struct PeerGroupStartupContext *", "char *" is given.

Bart Polot

2011-11-03 21:22

reporter   ~0004847

Fixed in r17974

Issue History

Date ModifiedUsernameFieldChange
2011-11-03 19:53Bart PolotNew Issue
2011-11-03 20:30Christian GrothoffNote Added: 0004842
2011-11-03 20:30Christian GrothoffCategoryutil library => testing library
2011-11-03 21:11Bart PolotNote Added: 0004845
2011-11-03 21:13Bart PolotNote Edited: 0004845
2011-11-03 21:22Bart PolotNote Added: 0004847
2011-11-03 21:22Bart PolotStatusnew => resolved
2011-11-03 21:22Bart PolotFixed in Version => Git master
2011-11-03 21:22Bart PolotResolutionopen => fixed
2011-11-03 21:22Bart PolotAssigned To => Bart Polot
2011-11-04 09:29Christian GrothoffFixed in VersionGit master => 0.9.0
2011-11-04 09:29Christian GrothoffTarget Version => 0.9.0
2011-11-30 17:38Christian GrothoffStatusresolved => closed