View Issue Details

IDProjectCategoryView StatusLast Update
0003689GNUnetATS servicepublic2018-06-07 00:25
ReporterMatthias WachsAssigned ToChristian Grothoff 
Status closedResolutionfixed 
Product VersionSVN HEAD 
Target Version0.11.0pre66Fixed in Version0.11.0pre66 
Summary0003689: ATS running with 100% CPU load
DescriptionATS is running with 100% CPU load.

Issue is repeated preference aging:

(gdb) bt
#0 GNUNET_CONTAINER_multipeermap_get_multiple (map=0x42ad340, key=key@entry=0x7fff0f9c45f0, it=it@entry=0x405bc0 <sum_relative_preferences>, it_cls=it_cls@entry=0x7fff0f9c4570) at container_multipeermap.c:764
#1 0x0000000000405de6 in update_relative_values_for_peer (id=id@entry=0x7fff0f9c45f0, kind=kind@entry=GNUNET_ATS_PREFERENCE_LATENCY) at gnunet-service-ats_preferences.c:235
#2 0x0000000000406449 in age_values (cls=cls@entry=0x7fff0f9c4650, peer=peer@entry=0x7fff0f9c45f0, value=0x42cf9d0) at gnunet-service-ats_preferences.c:367
#3 0x00007f64c0a9f611 in GNUNET_CONTAINER_multipeermap_iterate (map=0x42cf920, it=it@entry=0x406310 <age_values>, it_cls=it_cls@entry=0x7fff0f9c4650) at container_multipeermap.c:361
#4 0x0000000000405c51 in preference_aging (cls=<optimized out>, tc=<optimized out>) at gnunet-service-ats_preferences.c:402
#5 0x00007f64c0abf106 in run_ready (ws=<optimized out>, rs=<optimized out>) at scheduler.c:587
#6 GNUNET_SCHEDULER_run (task=0x4573a50, task_cls=0x3) at scheduler.c:816
#7 0x00007f64c0ac9345 in GNUNET_SERVICE_run (argc=3, argv=0x7fff0f9c47e0, service_name=0x407e84 "ats", options=GNUNET_SERVICE_OPTION_NONE, task=0x401f40 <run>, task_cls=0x1f3f720) at service.c:1503
#8 0x0000000000401e29 in main (argc=<optimized out>, argv=<optimized out>) at gnunet-service-ats.c:241

According to the code there is only one single aging task which for the whole system.
Checked to code, scheduling seems OK on first sight...
Additional InformationYeah ... the aging task never returns from iterating over the peers
TagsNo tags attached.


related to 0003690 closedChristian Grothoff Assertion failed at gnunet-service-transport_ats.c:306. NULL == ai 


Matthias Wachs

2015-02-24 10:30

manager   ~0008926

Same on gnunet9

Christian Grothoff

2015-02-28 14:25

manager   ~0008930

Last edited: 2015-02-28 14:27

View 2 revisions

In SVN 35303:

Added solver lock/unlock around aging operation.

Also added extra check on aging_task not being scheduled already before adding it. Was the CPU at 100% all the time, or going down to "low" for 10s in the meantime?

Christian Grothoff

2015-02-28 14:49

manager   ~0008935

Ok, did some debugging, it seems a single run (!) of preference_aging takes over the CPU for a long time. Disabling solver should obviously help, but this is still crazy.

Christian Grothoff

2015-02-28 14:53

manager   ~0008936

The 'client' member of 'struct PreferenceClient' was never initialized, causing 'GAS_preference_client_disconnect' to never clean up the entries, causing the DLL to grow VERY large over time. Fixed in SVN 35305.

Issue History

Date Modified Username Field Change
2015-02-24 10:17 Matthias Wachs New Issue
2015-02-24 10:17 Matthias Wachs Status new => assigned
2015-02-24 10:17 Matthias Wachs Assigned To => Matthias Wachs
2015-02-24 10:30 Matthias Wachs Additional Information Updated View Revisions
2015-02-24 10:30 Matthias Wachs Note Added: 0008926
2015-02-28 14:07 Christian Grothoff Relationship added related to 0003690
2015-02-28 14:25 Christian Grothoff Note Added: 0008930
2015-02-28 14:25 Christian Grothoff Status assigned => feedback
2015-02-28 14:27 Christian Grothoff Note Edited: 0008930 View Revisions
2015-02-28 14:49 Christian Grothoff Note Added: 0008935
2015-02-28 14:53 Christian Grothoff Note Added: 0008936
2015-02-28 14:53 Christian Grothoff Assigned To Matthias Wachs => Christian Grothoff
2015-02-28 14:53 Christian Grothoff Status feedback => assigned
2015-02-28 14:53 Christian Grothoff Status assigned => resolved
2015-02-28 14:53 Christian Grothoff Fixed in Version => 0.11.0pre66
2015-02-28 14:53 Christian Grothoff Resolution open => fixed
2015-02-28 14:53 Christian Grothoff Target Version => 0.11.0pre66
2018-06-07 00:25 Christian Grothoff Status resolved => closed