View Issue Details

IDProjectCategoryView StatusLast Update
0002431GNUnetcore servicepublic2012-11-05 18:34
ReporterLRN Assigned ToChristian Grothoff  
PriorityhighSeveritycrashReproducibilityrandom
Status closedResolutionfixed 
PlatformW32OSNTOS Version6.1.7601
Product VersionGit master 
Target Version0.9.4Fixed in Version0.9.4 
Summary0002431: Rare crash in dht service
Descriptionr22076+6
Steps To ReproduceUnknown. Happened only once so far, during dht_monitor test.
Additional Information
Program received signal SIGSEGV, Segmentation fault.
0x695038ab in trigger_next_request (h=0x0, ignore_currently_down=0) at core_api.c:691
691       if ((GNUNET_YES == h->currently_down) && (ignore_currently_down == GNUNET_NO))
(gdb) bt
#0  0x695038ab in trigger_next_request (h=0x0, ignore_currently_down=0) at core_api.c:691
#1  0x695020f5 in request_next_transmission (pr=0x1e08ea0) at core_api.c:493
#2  0x6950678f in run_request_next_transmission (cls=0x1e08ea0, tc=0x28fc70) at core_api.c:1246
#3  0x62af5d9a in run_ready (rs=0x5baff0, ws=0x5bc008) at scheduler.c:602
#4  0x62af650b in GNUNET_SCHEDULER_run (task=0x62b0207e <service_task>, task_cls=0x28fe10) at scheduler.c:790
#5  0x62b02d69 in GNUNET_SERVICE_run (argc=3, argv=0x1dbc4f8, service_name=0x40f09c "dht", options=GNUNET_SERVICE_OPTION_NONE, task=0x4015a3 <run>, task_cls=0x0) at service.c:1785
#6  0x00401774 in main (argc=3, argv=0x1dbc4f8) at gnunet-service-dht.c:184
(gdb) p h
$1 = (struct GNUNET_CORE_Handle *) 0x0
(gdb) up
#1  0x695020f5 in request_next_transmission (pr=0x1e08ea0) at core_api.c:493
493         trigger_next_request (h, GNUNET_NO);
(gdb) l
488         pr->timeout_task = GNUNET_SCHEDULER_NO_TASK;
489       }
490       th = &pr->th;
491       if (NULL == th->peer)
492       {
493         trigger_next_request (h, GNUNET_NO);
494         return;
495       }
496       if (th->cm != NULL)
497         return;                     /* already done */
(gdb) l request_next_transmission
474      *
475      * @param pr peer to request transmission to
476      */
477     static void
478     request_next_transmission (struct PeerRecord *pr)
479     {
480       struct GNUNET_CORE_Handle *h = pr->ch;
481       struct ControlMessage *cm;
482       struct SendMessageRequest *smr;
483       struct GNUNET_CORE_TransmitHandle *th;
(gdb)
484
485       if (pr->timeout_task != GNUNET_SCHEDULER_NO_TASK)
486       {
487         GNUNET_SCHEDULER_cancel (pr->timeout_task);
488         pr->timeout_task = GNUNET_SCHEDULER_NO_TASK;
489       }
490       th = &pr->th;
491       if (NULL == th->peer)
492       {
493         trigger_next_request (h, GNUNET_NO);
(gdb) p pr->ch
$2 = (struct GNUNET_CORE_Handle *) 0x0
(gdb) up
#2  0x6950678f in run_request_next_transmission (cls=0x1e08ea0, tc=0x28fc70) at core_api.c:1246
1246      request_next_transmission (pr);
(gdb) p pr
$3 = (struct PeerRecord *) 0x1e08ea0
(gdb) p *pr
$4 = {prev = 0x0, next = 0x0, peer = {hashPubKey = {bits = {0 <repeats 16 times>}}}, ch = 0x0, th = {peer = 0x0, cm = 0x0, get_message = 0, get_message_cls = 0x0, timeout = {abs_value = 0}, priority = 0, msize = 0,
    smr_id = 0, cork = 0}, timeout_task = 0, ntr_task = 0, smr_id_gen = 0}
(gdb) l
1241                                   const struct GNUNET_SCHEDULER_TaskContext *tc)
1242    {
1243      struct PeerRecord *pr = cls;
1244
1245      pr->ntr_task = GNUNET_SCHEDULER_NO_TASK;
1246      request_next_transmission (pr);
1247    }
1248
1249
TagsNo tags attached.

Activities

Christian Grothoff

2012-06-18 21:21

manager   ~0006088

Should be fixed in SVN 22084. I think what happened is that we got a
GNUNET_CORE_notify_transmit_ready_cancel, which is buggy as it did not cancel the 'ntr_task'. That's harmless, except that we then got another GNUNET_CORE_notify_transmit_ready, creating a second ntr_task. Then we got on top of that a disconnect, which only cancelled the 2nd ntr_task. Running the 1st ntr task then ended badly...

Issue History

Date Modified Username Field Change
2012-06-18 14:54 LRN New Issue
2012-06-18 17:02 Christian Grothoff Assigned To => Christian Grothoff
2012-06-18 17:02 Christian Grothoff Status new => assigned
2012-06-18 17:03 Christian Grothoff Priority normal => high
2012-06-18 21:19 Christian Grothoff Category DHT service => core service
2012-06-18 21:19 Christian Grothoff Target Version => 0.9.4
2012-06-18 21:21 Christian Grothoff Note Added: 0006088
2012-06-18 21:21 Christian Grothoff Status assigned => resolved
2012-06-18 21:21 Christian Grothoff Fixed in Version => 0.9.4
2012-06-18 21:21 Christian Grothoff Resolution open => fixed
2012-11-05 18:34 Christian Grothoff Status resolved => closed