Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Tor Tor
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 319
    • Issues 319
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 37
    • Merge requests 37
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Core
  • TorTor
  • Issues
  • #21716
Closed
Open
Created Mar 12, 2017 by Trac@tracbot

Avoid recursive call to routerlist_remove_old_routers via router_rebuild_store

Periodic functions have their log output duplicated when using adb logcat:

orbot/external/tor/src/or/periodic.c

static void periodic_event_dispatch(evutil_socket_t fd, short what, void *data) { (void)fd; (void)what; periodic_event_item_t *event = data;

time_t now = time(NULL); const or_options_t *options = get_options(); log_debug(LD_GENERAL, "Dispatching %s", event->name); int r = event->fn(now, options);

I did uncomment the above log_debug which is then printed only once as expected. The problem starts with r=events->fn(now, options);. Every function called this way seems to have its log output duplicated. I checked with builtin atomics that the function is actually called only once but the log output is duplicated, e.g.:

03-12 20:45:22.627 17948 17948 D Tor : periodic_event_dispatch(): Dispatching check_descriptor 03-12 20:45:22.637 17948 17948 I Tor : routerlist_remove_old_routers(): We have 0 live routers and 0 old router descriptors. 03-12 20:45:22.637 17948 17948 I Tor : routerlist_remove_old_routers(): We have 0 live routers and 0 old router descriptors.

This is somewhat irritating when tracing the flow of events.

Trac:
Username: anstein

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking