sentry-python icon indicating copy to clipboard operation
sentry-python copied to clipboard

Cannot trigger Celery task when I add sentry in settings.py (django)

Open amzar96 opened this issue 1 year ago • 4 comments

How do you use Sentry?

Sentry Saas (sentry.io)

Version

1.40.3

Steps to Reproduce

  1. Create celery task in the django
  2. Trigger the endpoint that containt the celery task
  3. Error show up

Expected Result

No error

Actual Result

[2024-02-09 18:46:15,606: ERROR/MainProcess] Process 'ForkPoolWorker-4' pid:3944 exited with 'signal 11 (SIGSEGV)'
[2024-02-09 18:46:15,766: ERROR/MainProcess] Task handler raised error: WorkerLostError('Worker exited prematurely: signal 11 (SIGSEGV) Job: 0.')
Traceback (most recent call last):
  File "/Users/amzar/Documents/python_env/xxx/lib/python3.11/site-packages/billiard/pool.py", line 1264, in mark_as_worker_lost
    raise WorkerLostError(
billiard.einfo.ExceptionWithTraceback:
"""
Traceback (most recent call last):
  File "/Users/amzar/Documents/python_env/xxx/lib/python3.11/site-packages/billiard/pool.py", line 1264, in mark_as_worker_lost
    raise WorkerLostError(
billiard.exceptions.WorkerLostError: Worker exited prematurely: signal 11 (SIGSEGV) Job: 0.
"""

amzar96 avatar Feb 09 '24 18:02 amzar96

Hey @amzar96, thanks for the report.

Does this still happen when you downgrade the SDK to version 1.39.2? Does it happen if you leave the SDK out of the mix completely, i.e., when you do not call sentry_sdk.init at all?

sentrivana avatar Feb 12 '24 08:02 sentrivana

@sentrivana

I realized the error only occurred after hitting the Celery task for the first time the celery worker ran. After I made the next hit to the Celery task, it worked as expected.

Till now not sure what is caused

amzar96 avatar Feb 12 '24 11:02 amzar96

@sentrivana

Not yet try to downgrade the SDK. I will try it later.

amzar96 avatar Feb 12 '24 11:02 amzar96

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

getsantry[bot] avatar Mar 06 '24 08:03 getsantry[bot]