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 agent start failed in async mode when profiling is enabled #360

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

tsonglew
Copy link
Contributor

@tsonglew tsonglew commented Nov 7, 2024

Fix agent start failed in async mode when profiling is enabled

CommandServiceAsync instance is created in the initial event loop, so as its _command async queue. But CommandServiceAsync.dispatch is called from the event loop created by SkyWalkingAgentAsync.__start_event_loop. Async queue is bound with a event loop, leading to the error below when agent starts.

2024-11-07 18:34:05,573 skywalking [pid:415062] [event_loop_thread] [ERROR] Error in Python agent asyncio event
 loop: Task <Task pending name='Task-9' coro=<SkyWalkingAgentAsync.__command_dispatch() running at 
/home/netease/.cache/pypoetry/virtualenvs/sw-flask-stage-demo-I8S3EFWq-py3.9/lib/python3.9/site-
packages/skywalking/agent/__init__.py:653> cb=[_gather.<locals>._done_callback() at 
/home/netease/.pyenv/versions/3.9.20/lib/python3.9/asyncio/tasks.py:767]> got Future <Future pending> attached to a 
different loop

@tsonglew tsonglew changed the title Fix agent start failed in async mode when profiling is enabled (#360) Fix agent start failed in async mode when profiling is enabled Nov 7, 2024
@wu-sheng wu-sheng added this to the 1.2.0 milestone Nov 7, 2024
@kezhenxu94 kezhenxu94 merged commit cb2165b into apache:master Nov 7, 2024
62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants