View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002832 | GNUnet | transport service | public | 2013-03-12 17:39 | 2013-12-24 20:55 |
| Reporter | Sree Harsha Totakura | Assigned To | Matthias Wachs | ||
| Priority | normal | Severity | crash | Reproducibility | random |
| Status | closed | Resolution | unable to reproduce | ||
| Product Version | Git master | ||||
| Target Version | 0.10.0 | Fixed in Version | 0.10.0 | ||
| Summary | 0002832: crash in transport service | ||||
| Description | observed crash in transport service while using statistics API. | ||||
| Additional Information | backtrace: totakura@nautophone:~/repos/gnunet/src/testbed$ gdb /usr/local/lib/gnunet/libexec/gnunet-service-transport /tmp/cores/gnunet-service--1363104501.30356 GNU gdb (GDB) 7.4.1-debian Copyright (C) 2012 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-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /usr/local/lib/gnunet/libexec/gnunet-service-transport...done. warning: core file may not match specified executable file. [New LWP 30356] warning: Can't read pathname for load map: Input/output error. Core was generated by `/usr/local/lib/gnunet/libexec/gnunet-service-transport -c /tmp/testbedg8Uk5B/7/'. Program terminated with signal 11, Segmentation fault. #0 0x00007f1e69f00256 in ?? () from /lib/x86_64-linux-gnu/libc.so.6 (gdb) bt #0 0x00007f1e69f00256 in ?? () from /lib/x86_64-linux-gnu/libc.so.6 #1 0x00007f1e6a86fe3d in add_setter_action (h=0x103bb00, name=0x7f1e690289c1 "# TCP sessions active", make_persistent=0, value=0, type=ACTION_SET) at statistics_api.c:1308 #2 0x00007f1e6a8702fc in GNUNET_STATISTICS_set (handle=0x103bb00, name=0x7f1e690289c1 "# TCP sessions active", value=0, make_persistent=0) at statistics_api.c:1389 #3 0x00007f1e69028374 in libgnunet_plugin_transport_tcp_init (cls=0x103c978) at plugin_transport_tcp.c:2461 #4 0x00007f1e6a639dab in GNUNET_PLUGIN_load (library_name=0x103dd40 "libgnunet_plugin_transport_tcp", arg=0x103c978) at plugin.c:229 #5 0x0000000000415537 in GST_plugins_load (recv_cb=0x41a11d <GST_manipulation_recv>, address_cb=0x404523 <plugin_env_address_change_notification>, session_end_cb=0x4045ca <plugin_env_session_end>, address_type_cb=0x40484e <plugin_env_address_to_type>) at gnunet-service-transport_plugins.c:146 #6 0x0000000000405552 in key_generation_cb (cls=0x0, pk=0x103c1a0, emsg=0x0) at gnunet-service-transport.c:671 #7 0x00007f1e6a61fd0e in async_return_key (cls=0x103dd70, tc=0x7fff5d6d7ae0) at crypto_ecc.c:814 #8 0x00007f1e6a6427b9 in run_ready (rs=0x103a220, ws=0x103a2b0) at scheduler.c:597 #9 0x00007f1e6a643008 in GNUNET_SCHEDULER_run (task=0x7f1e6a64fca0 <service_task>, task_cls=0x7fff5d6d7e80) at scheduler.c:786 #10 0x00007f1e6a6517d1 in GNUNET_SERVICE_run (argc=3, argv=0x7fff5d6d80e8, service_name=0x41aa12 "transport", options=GNUNET_SERVICE_OPTION_NONE, task=0x4055d1 <run>, task_cls=0x0) at service.c:1816 #11 0x00000000004057ef in main (argc=3, argv=0x7fff5d6d80e8) at gnunet-service-transport.c:742 (gdb) bt full #0 0x00007f1e69f00256 in ?? () from /lib/x86_64-linux-gnu/libc.so.6 No symbol table info available. #1 0x00007f1e6a86fe3d in add_setter_action (h=0x103bb00, name=0x7f1e690289c1 "# TCP sessions active", make_persistent=0, value=0, type=ACTION_SET) at statistics_api.c:1308 ai = 0x103b910 slen = 10 nlen = 22 nsize = 48 delta = 0 __FUNCTION__ = "add_setter_action" #2 0x00007f1e6a8702fc in GNUNET_STATISTICS_set (handle=0x103bb00, name=0x7f1e690289c1 "# TCP sessions active", value=0, make_persistent=0) at statistics_api.c:1389 __FUNCTION__ = "GNUNET_STATISTICS_set" #3 0x00007f1e69028374 in libgnunet_plugin_transport_tcp_init (cls=0x103c978) at plugin_transport_tcp.c:2461 my_handlers = {{callback = 0x7f1e6902593d <handle_tcp_welcome>, callback_cls = 0x0, type = 61, expected_size = 68}, {callback = 0x7f1e69024fea <handle_tcp_nat_probe>, callback_cls = 0x0, type = 60, expected_size = 68}, {callback = 0x7f1e69025fea <handle_tcp_data>, callback_cls = 0x0, type = 65535, expected_size = 0}, {callback = 0, callback_cls = 0x0, type = 0, expected_size = 0}} env = 0x103c978 api = 0x103e660 plugin = 0x103e790 service = 0x103e5a0 aport = 12115 bport = 12115 max_connections = 128 i = 4 idle_timeout = {rel_value = 139768610795415} ret = 0 addrs = 0x103d330 addrlens = 0x103d350 __FUNCTION__ = "libgnunet_plugin_transport_tcp_init" #4 0x00007f1e6a639dab in GNUNET_PLUGIN_load (library_name=0x103dd40 "libgnunet_plugin_transport_tcp", arg=0x103c978) at plugin.c:229 libhandle = 0x103cbe0 plug = 0x103ca60 init = 0x7f1e69027837 <libgnunet_plugin_transport_tcp_init> ret = 0x103bf78 __FUNCTION__ = "GNUNET_PLUGIN_load" #5 0x0000000000415537 in GST_plugins_load (recv_cb=0x41a11d <GST_manipulation_recv>, address_cb=0x404523 <plugin_env_address_change_notification>, session_end_cb=0x4045ca <plugin_env_session_end>, address_type_cb=0x40484e <plugin_env_address_to_type>) at gnunet-service-transport_plugins.c:146 plug = 0x103c950 next = 0x0 tneigh = 50 libname = 0x103dd40 "libgnunet_plugin_transport_tcp" plugs = 0x103bf60 "" pos = 0x0 __FUNCTION__ = "GST_plugins_load" #6 0x0000000000405552 in key_generation_cb (cls=0x0, pk=0x103c1a0, emsg=0x0) at gnunet-service-transport.c:671 max_fd_cfg = 0 max_fd_rlimit = 921 max_fd = 921 __FUNCTION__ = "key_generation_cb" r_file = {rlim_cur = 1024, rlim_max = 4096} #7 0x00007f1e6a61fd0e in async_return_key (cls=0x103dd70, tc=0x7fff5d6d7ae0) at crypto_ecc.c:814 gc = 0x103dd70 #8 0x00007f1e6a6427b9 in run_ready (rs=0x103a220, ws=0x103a2b0) at scheduler.c:597 p = GNUNET_SCHEDULER_PRIORITY_SHUTDOWN pos = 0x103cef0 tc = {reason = 3, read_ready = 0x103a220, write_ready = 0x103a2b0} __FUNCTION__ = "run_ready" #9 0x00007f1e6a643008 in GNUNET_SCHEDULER_run (task=0x7f1e6a64fca0 <service_task>, task_cls=0x7fff5d6d7e80) at scheduler.c:786 rs = 0x103a220 ws = 0x103a2b0 timeout = {rel_value = 0} ret = 0 shc_int = 0x103b540 shc_term = 0x103b5f0 ---Type <return> to continue, or q <return> to quit--- shc_quit = 0x103b750 shc_hup = 0x103b800 shc_pipe = 0x103b6a0 last_tr = 2 busy_wait_warning = 0 pr = 0x103a1b0 c = 0 '\000' __FUNCTION__ = "GNUNET_SCHEDULER_run" #10 0x00007f1e6a6517d1 in GNUNET_SERVICE_run (argc=3, argv=0x7fff5d6d80e8, service_name=0x41aa12 "transport", options=GNUNET_SERVICE_OPTION_NONE, task=0x4055d1 <run>, task_cls=0x0) at service.c:1816 err = 0 ret = 3 cfg_fn = 0x1038090 "/tmp/testbedg8Uk5B/7/config" loglev = 0x0 logfile = 0x0 do_daemonize = 0 i = 4216273 skew_offset = 1 skew_variance = 139766825746433 clock_offset = 3 sctx = {cfg = 0x1037f60, server = 0x103bb00, addrs = 0x0, service_name = 0x41aa12 "transport", task = 0x4055d1 <run>, task_cls = 0x0, v4_denied = 0x0, v6_denied = 0x0, v4_allowed = 0x103a160, v6_allowed = 0x103a1d0, my_handlers = 0x104aa60, addrlens = 0x0, lsocks = 0x103a0e0, shutdown_task = 0, timeout = {rel_value = 18446744073709551615}, ret = 1, ready_confirm_fd = -1, require_found = 1, match_uid = 0, match_gid = 1, options = GNUNET_SERVICE_OPTION_NONE} cfg = 0x1037f60 service_options = {{shortName = 99 'c', name = 0x7f1e6a65d4a5 "config", argumentHelp = 0x7f1e6a65d4ac "FILENAME", description = 0x7f1e6a65d4b8 "use configuration file FILENAME", require_argument = 1, processor = 0x7f1e6a6303ef <GNUNET_GETOPT_set_string>, scls = 0x7fff5d6d7f38}, {shortName = 100 'd', name = 0x7f1e6a65d4d8 "daemonize", argumentHelp = 0x0, description = 0x7f1e6a65d4e8 "do daemonize (detach from terminal)", require_argument = 0, processor = 0x7f1e6a6303c2 <GNUNET_GETOPT_set_one>, scls = 0x7fff5d6d7f24}, {shortName = 104 'h', name = 0x7f1e6a65d50c "help", argumentHelp = 0x0, description = 0x7f1e6a65d511 "print this help", require_argument = 0, processor = 0x7f1e6a62fe82 <GNUNET_GETOPT_format_help_>, scls = 0x0}, { shortName = 76 'L', name = 0x7f1e6a65d521 "log", argumentHelp = 0x7f1e6a65d525 "LOGLEVEL", description = 0x7f1e6a65d530 "configure logging to use LOGLEVEL", require_argument = 1, processor = 0x7f1e6a6303ef <GNUNET_GETOPT_set_string>, scls = 0x7fff5d6d7f30}, {shortName = 108 'l', name = 0x7f1e6a65d552 "logfile", argumentHelp = 0x7f1e6a65d55a "LOGFILE", description = 0x7f1e6a65d568 "configure logging to write logs to LOGFILE", require_argument = 1, processor = 0x7f1e6a6303ef <GNUNET_GETOPT_set_string>, scls = 0x7fff5d6d7f28}, {shortName = 118 'v', name = 0x7f1e6a65d593 "version", argumentHelp = 0x0, description = 0x7f1e6a65d59b "print the version number", require_argument = 0, processor = 0x7f1e6a62fe3c <GNUNET_GETOPT_print_version_>, scls = 0x7f1e6a65d5b4}, { shortName = 0 '\000', name = 0x0, argumentHelp = 0x0, description = 0x0, require_argument = 0, processor = 0, scls = 0x0}} __FUNCTION__ = "GNUNET_SERVICE_run" #11 0x00000000004057ef in main (argc=3, argv=0x7fff5d6d80e8) at gnunet-service-transport.c:742 No locals. (gdb) select-frame 1 (gdb) p *ai $2 = {next = 0x0, prev = 0x0, sh = 0x4057fc, subsystem = 0x0, name = 0xdf0adba0df0adba <Address 0xdf0adba0df0adba out of bounds>, cont = 0x31, proc = 0, cls = 0x0, timeout = { abs_value = 8}, value = 1, make_persistent = 1409353728, aborted = 0, type = 401, msize = 0} (gdb) | ||||
| Tags | No tags attached. | ||||
| duplicate of | 0002774 | closed | Matthias Wachs | Segfault using statistics API |
|
|
This looks like a statistics issue for me: - the plugin tries to set a value - In statistics API: GNUNET_STATISTICS_set -> add_setter_action: Iterate over all GetHandles and compare: for (ai = h->action_head; NULL != ai; ai = ai->next) { if (! ( (0 == strcmp (ai->subsystem, h->subsystem)) && (0 == strcmp (ai->name, name)) && ( (ACTION_UPDATE == ai->type) || (ACTION_SET == ai->type) ) ) ) continue; ... } ai: next = 0x0 prev = 0x0 sh = 0x4057fc, subsystem = 0x0, name = 0xdf0adba0df0adba <Address 0xdf0adba0df0adba out of bounds>, cont = 0x31, proc = 0, cls = 0x0, timeout = {abs_value = 8}, value = 1, make_persistent = 1409353728, aborted = 0, type = 401, msize = 0} So: name is BAADFOOD ... but why is subsystem 0x0? Because: In free_action_item GNUNET_free_non_null (gh->subsystem); GNUNET_free_non_null (gh->name); GNUNET_free (gh); |
|
|
Why would only transport have that issue? Are you destroying statistics, not NULLing the handle and then still using it (i.e if this is on shutdown)? Or do you have some rampant memory corruption issue? |
|
|
After discussion with Sree with closed 0002774 ... so we can close this bug too ... and if it reoccurs we can open again |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2013-03-12 17:39 | Sree Harsha Totakura | New Issue | |
| 2013-03-12 17:39 | Sree Harsha Totakura | Status | new => assigned |
| 2013-03-12 17:39 | Sree Harsha Totakura | Assigned To | => Matthias Wachs |
| 2013-03-13 11:57 | Matthias Wachs | Relationship added | duplicate of 0002774 |
| 2013-03-14 11:43 | Matthias Wachs | Note Added: 0006975 | |
| 2013-03-15 21:13 | Christian Grothoff | Note Added: 0006985 | |
| 2013-05-27 09:42 | Matthias Wachs | Status | assigned => feedback |
| 2013-05-28 09:17 | Matthias Wachs | Note Added: 0007134 | |
| 2013-05-28 09:18 | Matthias Wachs | Status | feedback => resolved |
| 2013-05-28 09:18 | Matthias Wachs | Resolution | open => unable to reproduce |
| 2013-06-01 14:50 | Christian Grothoff | Fixed in Version | => 0.10.0 |
| 2013-06-01 14:50 | Christian Grothoff | Target Version | => 0.10.0 |
| 2013-12-24 20:55 | Christian Grothoff | Status | resolved => closed |