-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[Dhcprelay]dhcprelayd crashes with a traceback #19507
Comments
The log from other instance
|
Hi @dgsudharsan , could you help to provide the reproduce step? |
@yaqiangz As mentioned there is no reproduce step. Traceback is seen without any external trigger |
@dgsudharsan please provide more details (hwsku, topology, image commit id etc.) and try reinstall image I tried latest build for 202311 (commit: 74b81ff) in t0/m0, didn't hit this issue, dhcprelayd works well
|
Based on commit: https://github.com/sonic-net/sonic-buildimage/tree/156b067c875967618232c02cb51b163e5e287e45 @yaqiangz Please note that this is a very rare statistical issue. Even for us it is not seen often. As mentioned in description, it happened only twice until now. |
@yaqiangz, Seems to me the issue is in here https://github.com/sonic-net/sonic-buildimage/blob/202311/src/sonic-dhcp-utilities/dhcp_utilities/common/utils.py#L162 name() is not a safe call and might throw a psutil.NoSuchProcess exception. For a daemon dhcprelayd, the exception should be handled and process should not exit. Now, we don't know what the pid 262 is for and it's hard to figure out cause the process has ended anyway and the issue is very hard to repro. It could be any temporary process which might be spawned by a dhcpv4 related process or maybe even by rsyslogd and rsyslog plugin.
|
Got it, will check for fixing |
Why I did it After got running process list by psutil, if some of the processes exited, but invoke name() / cmdline() function of them, it will raise NoSuchProcess exception Fix issue #19507 How I did it Add try/exception in process execution Change func get_target_process_cmds to get_target_process for reuse How to verify it UT passed
Fixed by #19537 |
) Why I did it After got running process list by psutil, if some of the processes exited, but invoke name() / cmdline() function of them, it will raise NoSuchProcess exception Fix issue sonic-net#19507 How I did it Add try/exception in process execution Change func get_target_process_cmds to get_target_process for reuse How to verify it UT passed
) Why I did it After got running process list by psutil, if some of the processes exited, but invoke name() / cmdline() function of them, it will raise NoSuchProcess exception Fix issue sonic-net#19507 How I did it Add try/exception in process execution Change func get_target_process_cmds to get_target_process for reuse How to verify it UT passed
Why I did it After got running process list by psutil, if some of the processes exited, but invoke name() / cmdline() function of them, it will raise NoSuchProcess exception Fix issue #19507 How I did it Add try/exception in process execution Change func get_target_process_cmds to get_target_process for reuse How to verify it UT passed
Why I did it After got running process list by psutil, if some of the processes exited, but invoke name() / cmdline() function of them, it will raise NoSuchProcess exception Fix issue #19507 How I did it Add try/exception in process execution Change func get_target_process_cmds to get_target_process for reuse How to verify it UT passed
) Why I did it After got running process list by psutil, if some of the processes exited, but invoke name() / cmdline() function of them, it will raise NoSuchProcess exception Fix issue sonic-net#19507 How I did it Add try/exception in process execution Change func get_target_process_cmds to get_target_process for reuse How to verify it UT passed
) Why I did it After got running process list by psutil, if some of the processes exited, but invoke name() / cmdline() function of them, it will raise NoSuchProcess exception Fix issue sonic-net#19507 How I did it Add try/exception in process execution Change func get_target_process_cmds to get_target_process for reuse How to verify it UT passed
Description
The below issue happened twice in 202311 without any specific trigger. Dhcprelayd crashes and results in below error logs
There is no logs from dhcrelay during this time and hence no information on why the process is unavailable.
Steps to reproduce the issue:
Describe the results you received:
Describe the results you expected:
Output of
show version
:Output of
show techsupport
:Additional information you deem important (e.g. issue happens only occasionally):
The text was updated successfully, but these errors were encountered: