Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Trace Cache Iteration Crash #692

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions newrelic/core/trace_cache.py
Expand Up @@ -197,7 +197,7 @@ def active_threads(self):
debug = global_settings().debug

if debug.enable_coroutine_profiling:
for thread_id, trace in list(self._cache.items()):
for thread_id, trace in self._cache.copy().items():
transaction = trace.transaction
if transaction and transaction._greenlet is not None:
gr = transaction._greenlet()
Expand Down Expand Up @@ -359,7 +359,7 @@ def record_event_loop_wait(self, start_time, end_time):
task = getattr(transaction.root_span, "_task", None)
loop = get_event_loop(task)

for trace in list(self._cache.values()):
for trace in self._cache.copy().values():
if trace in seen:
continue

Expand Down