Skip to content
This repository has been archived by the owner on May 18, 2023. It is now read-only.

Sentry SDK compatibility bug #21

Closed
NikitosnikN opened this issue Jun 8, 2020 · 1 comment
Closed

Sentry SDK compatibility bug #21

NikitosnikN opened this issue Jun 8, 2020 · 1 comment

Comments

@NikitosnikN
Copy link

  • Celery Executor version: 4.4.5
  • Python version: 3.8.3
  • Operating System: in-Docker execution
  • celery-pool-asyncio 0.2.0
  • celery-decorator-taskcls 0.1.4
  • Sentry SDK: 0.14.4

Description

Async pool conflicting with Sentry SDK threading while trying to start Celery beat (with --beat command). I am not confident if this error is directly connected with celery-pool-asyncio library, but the bug is exists.

There are also some interesting cases:

  • asyncio pool correctly work with Sentry SDK without beat command
  • asyncio pool correctly work with Sentry SDK with beat command if CeleryIntegration plugin is initialized

So there is only one case, that causes such problem:

  • asyncio pool + celery beat + Sentry SDK without CeleryIntegration plugin

What I Did

Celery command:
celery -A celery_app worker --beat --loglevel=INFO -P celery_pool_asyncio:TaskPool

Traceback:

[2020-06-08 14:37:08,085: INFO/MainProcess] Connected to amqp://**:**@rabbitmq:5672//
[2020-06-08 14:37:08,126: INFO/MainProcess] mingle: searching for neighbors
[2020-06-08 14:37:09,198: INFO/MainProcess] mingle: all alone
[2020-06-08 14:37:09,235: INFO/MainProcess] celery@3491f822d9e5 ready.
[2020-06-08 14:37:12,945: INFO/Beat] beat: Starting...
[2020-06-08 14:37:12,973: WARNING/Beat] Exception in thread
[2020-06-08 14:37:12,974: WARNING/Beat] Thread-1
[2020-06-08 14:37:12,975: WARNING/Beat] :
[2020-06-08 14:37:12,975: WARNING/Beat] Traceback (most recent call last):
[2020-06-08 14:37:12,977: WARNING/Beat] File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
[2020-06-08 14:37:12,978: WARNING/Beat] self.run()
[2020-06-08 14:37:12,978: WARNING/Beat] File "/usr/local/lib/python3.8/site-packages/sentry_sdk/integrations/threading.py", line 69, in run
[2020-06-08 14:37:12,981: WARNING/Beat] reraise(*_capture_exception())
[2020-06-08 14:37:12,981: WARNING/Beat] File "/usr/local/lib/python3.8/site-packages/sentry_sdk/_compat.py", line 57, in reraise
[2020-06-08 14:37:12,982: WARNING/Beat] raise value
[2020-06-08 14:37:12,983: WARNING/Beat] File "/usr/local/lib/python3.8/site-packages/sentry_sdk/integrations/threading.py", line 67, in run
[2020-06-08 14:37:12,984: WARNING/Beat] return old_run_func(self, *a, **kw)
[2020-06-08 14:37:12,984: WARNING/Beat] File "/usr/local/lib/python3.8/threading.py", line 870, in run
[2020-06-08 14:37:12,986: WARNING/Beat] self._target(*self._args, **self._kwargs)
[2020-06-08 14:37:12,987: WARNING/Beat] File "/usr/local/lib/python3.8/asyncio/base_events.py", line 570, in run_forever
[2020-06-08 14:37:12,988: WARNING/Beat] self._run_once()
[2020-06-08 14:37:12,988: WARNING/Beat] File "/usr/local/lib/python3.8/asyncio/base_events.py", line 1823, in _run_once
[2020-06-08 14:37:12,988: WARNING/Beat] event_list = self._selector.select(timeout)
[2020-06-08 14:37:12,990: WARNING/Beat] File "/usr/local/lib/python3.8/selectors.py", line 468, in select
[2020-06-08 14:37:12,991: WARNING/Beat] fd_event_list = self._selector.poll(timeout, max_ev)
[2020-06-08 14:37:12,992: WARNING/Beat] OSError
[2020-06-08 14:37:12,992: WARNING/Beat] :
[2020-06-08 14:37:12,992: WARNING/Beat] [Errno 9] Bad file descriptor
@kai3341
Copy link
Owner

kai3341 commented Jun 11, 2020

@NikitosnikN, did I understand correctly, broken only startup with embedded scheduler? It doesn't work correctly without Sentry SDK

@kai3341 kai3341 closed this as completed Jun 22, 2020
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