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

When 'wait: no child processes' or 'waitid: no child processes' occurs, do not output an error #1062

Merged
merged 3 commits into from
Aug 14, 2023

Conversation

quzard
Copy link
Collaborator

@quzard quzard commented Aug 11, 2023

No description provided.

@quzard
Copy link
Collaborator Author

quzard commented Aug 11, 2023

部分场景下logtail进程会被存在父进程,父进程会监听子进程的释放信号,例如使用waitpid,从而导致cmd.wait() wait 不到子进程。
因此input_command对cmd.wait()的wait: no child processes和waitid: no child processes两个err不做处理。

@yyuuttaaoo
Copy link
Collaborator

如果sigchld信号收不到,那都是靠超时来结束采集的吗?可以对应建一个issue,把logtail打印的错误也贴一下。这个错误能否用一个这样的shell脚本模拟复现?

./ilogtail &
wait

@quzard
Copy link
Collaborator Author

quzard commented Aug 12, 2023

#1063

@quzard
Copy link
Collaborator Author

quzard commented Aug 14, 2023

针对脚本异常退出时,依然能只能输出err

2023-08-14 01:49:42 [ERR] [input_command.go:187] [Collect] [##1.0##xxxxxxx] AlarmType:INPUT_COLLECT_ALARM input_command Collect error:exec cmd error, stderr:Traceback (most recent call last):
File "/etc/ilogtail/scripts/IyMxLjAjI3lpdGFvLWRldi1zaxxxxVhdw==.py", line 1, in
import random123123

@yyuuttaaoo
Copy link
Collaborator

如果sigchld信号收不到,那都是靠超时来结束采集的吗?可以对应建一个issue,把logtail打印的错误也贴一下。这个错误能否用一个这样的shell脚本模拟复现?

./ilogtail &
wait

Sig chld可以收到,只是回收工作无法进行。

@yyuuttaaoo yyuuttaaoo merged commit bc3f618 into alibaba:main Aug 14, 2023
19 checks passed
@yyuuttaaoo yyuuttaaoo added this to the v1.7 milestone Aug 16, 2023
@quzard quzard deleted the fix-cmd-wait branch February 28, 2024 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants