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

scheduler Unrecognized compilation environment #39

Open
zcfh opened this issue Oct 18, 2022 · 1 comment
Open

scheduler Unrecognized compilation environment #39

zcfh opened this issue Oct 18, 2022 · 1 comment

Comments

@zcfh
Copy link

zcfh commented Oct 18, 2022

yadcc尝试使用一个daemon未识别的编译器,守护进程等待五分钟放弃任务,并打印日志:
Task 3 cannot be started in time. Aborted.
,但是调度器仍不断打印 Unrecognized compilation environment

@0x804d8000
Copy link
Collaborator

https://github.com/Tencent/yadcc/blob/master/yadcc/daemon/local/distributed_task_dispatcher.cc#L717

跟这儿有关,每个环境会有一个后台fiber用来获取“请求编译机的授权”。

一般来说,除了立即需要的授权之外,还会多请求一个(预取),这样下一个任务的关键路径上可以节省这一次rpc。这个主要是有些库的编译脚本写的不好(比如部分版本的openssl)的时候必须单线程编,关键路径太长会很难受。

但是对于不存在的环境,这儿就会一直取不到,反复重试。

因为本身这个case命中的比较少,然后代码改动也比较大(需要加一个对fiber的回收逻辑),所以一直也没处理这个问题。

简单的workaroun的话就是收到“环境不存在”的错误的时候直接塞一个已经过期的授权到remaining变量里面去,因为Get的时候会跳过已经过期的,所以倒是能跑。但是这个比较hack,合理的做法还是得搞个timer定期回收TaskGrantKeeper。

目前暂时没有时间规划,等next分支合并了可能会再看看这儿。

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

No branches or pull requests

2 participants