Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Running on not-Linux results in constant logcontext spam #6055

Closed
jryans opened this issue Sep 18, 2019 · 5 comments
Closed

Running on not-Linux results in constant logcontext spam #6055

jryans opened this issue Sep 18, 2019 · 5 comments
Assignees

Comments

@jryans
Copy link
Contributor

jryans commented Sep 18, 2019

Description

I am running Synapse on macOS and getting constant (many times per second) log messages like:

2019-09-18 14:57:24,338 - synapse.logging.context - 362 - WARNING - GET-16 - Called stop on logcontext GET-16 without calling start
2019-09-18 14:57:24,339 - synapse.logging.context - 362 - WARNING - GET-16 - Called stop on logcontext GET-16 without calling start
2019-09-18 14:57:24,340 - synapse.logging.context - 362 - WARNING - GET-16 - Called stop on logcontext GET-16 without calling start
2019-09-18 14:57:25,219 - synapse.logging.context - 362 - WARNING - update_client_ips-13 - Called stop on logcontext update_client_ips-13 without calling start
2019-09-18 14:57:25,221 - synapse.logging.context - 362 - WARNING - update_client_ips-13 - Called stop on logcontext update_client_ips-13 without calling start
2019-09-18 14:57:25,223 - synapse.logging.context - 362 - WARNING - update_client_ips-13 - Called stop on logcontext update_client_ips-13 without calling start
2019-09-18 14:57:25,285 - synapse.logging.context - 362 - WARNING - handle_presence_timeouts-7 - Called stop on logcontext handle_presence_timeouts-7 without calling start

For a longer log snippet, see this gist.

@richvdh took an initial look and suggested there's something that would likely fail on macOS that causes this.

Version information

  • Homeserver: local on my development machine

If not matrix.org:

  • Version: Synapse/1.3.1 (b=anoa/msc2290,cd6f3a89d,dirty)

  • Install method: pip install from source

  • Platform: macOS 10.14.6
@richvdh
Copy link
Member

richvdh commented Sep 18, 2019

we have this code which attempts to fail gracefully when resource.getrusage(RUSAGE_THREAD) is unavailable

But that means that when we get here, usage_start is always None, resulting in the warning spam.

@jryans
Copy link
Contributor Author

jryans commented Sep 18, 2019

I assume you want to keep the warnings for platforms that do have support...?

@jryans
Copy link
Contributor Author

jryans commented Sep 18, 2019

IRL answer is yes.

@jryans
Copy link
Contributor Author

jryans commented Sep 18, 2019

I'll give a try given I can clearly reproduce quite easily... 😅

@jryans jryans self-assigned this Sep 18, 2019
@jryans jryans changed the title Running on macOS results in constant logcontext spam Running on not-Linux results in constant logcontext spam Sep 18, 2019
jryans added a commit that referenced this issue Sep 18, 2019
This checks whether the current platform supports thread resource usage tracking
before logging a warning to avoid log spam.

Fixes #6055
richvdh pushed a commit that referenced this issue Sep 18, 2019
This checks whether the current platform supports thread resource usage tracking
before logging a warning to avoid log spam.

Fixes #6055
@richvdh
Copy link
Member

richvdh commented Sep 18, 2019

fixed by #6059

@richvdh richvdh closed this as completed Sep 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants