Skip to content

Runtime instrumentation error. Exception occurred during exit. Report this issue to New Relic support. #749

Open
@tadeoos

Description

@tadeoos

Description
We frequently see this in our Sentry:

Runtime instrumentation error. Attempt to drop the root when it is not the current trace. Report this issue to New Relic support.
  File "/app/.heroku/python/bin/gunicorn", line 8, in <module>
    sys.exit(run())
  File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 67, in run
    WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
  File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/app/base.py", line 231, in run
    super().run()
  File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/app/base.py", line 72, in run
    Arbiter(self).run()
  File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/arbiter.py", line 211, in run
    self.manage_workers()
  File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/arbiter.py", line 551, in manage_workers
    self.spawn_workers()
  File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/arbiter.py", line 622, in spawn_workers
    self.spawn_worker()
  File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
    worker.init_process()

This is happening in newrelic/core/trace_cache.py in complete_root at line 339:

                "drop the root when it is not the current "
                "trace. Report this issue to New Relic support.\n%s",
                "".join(traceback.format_stack()[:-1]),
            )
            raise RuntimeError("not the current trace")

Looks like it's happening when gunicorn tries to kill timed out workers?

Expected Behavior
Don't see this error.

Steps to Reproduce
Hard to say unfortunately.

Your Environment
Python 3.10.6
newrelic==8.5.0
gunicorn==20.1.0
django==3.0.4

Running Django with gunicorn and using sentry as an error tracker.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions