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

Enable faulthandler to provide more fault information. #301

Merged
merged 1 commit into from
Nov 22, 2023

Conversation

liuh-80
Copy link
Contributor

@liuh-80 liuh-80 commented Nov 20, 2023

Enable faulthandler to provide more fault information.

Work item tracking

Microsoft ADO (number only): 17637258

- What I did
Enable faulthandler to provide more fault information.

- How I did it
Enable faulthandler when snmp-subagent startup.

- How to verify it
Pass all UT

- Description for the changelog
Enable faulthandler to provide more fault information.

@liuh-80
Copy link
Contributor Author

liuh-80 commented Nov 21, 2023

Code change in this PR verified with sonic-net/sonic-buildimage#17228

Will manually verify again and publish PR.

@liuh-80
Copy link
Contributor Author

liuh-80 commented Nov 21, 2023

With fault handler, crash will provide more info:

Nov 21 09:00:38.611361 vlab-01 INFO snmp#supervisord: snmp-subagent Fatal Python error: Segmentation fault
Nov 21 09:00:38.611361 vlab-01 INFO snmp#supervisord: snmp-subagent
Nov 21 09:00:38.611361 vlab-01 INFO snmp#supervisord: snmp-subagent Thread 0x00007fc1e5fc7700 (most recent call first):
Nov 21 09:00:38.611361 vlab-01 INFO snmp#supervisord: snmp-subagent File "/usr/lib/python3.9/concurrent/futures/thread.py", line 75 in _worker
Nov 21 09:00:38.611361 vlab-01 INFO snmp#supervisord: snmp-subagent File "/usr/lib/python3.9/th
Nov 21 09:00:38.615471 vlab-01 INFO snmp#supervisord: snmp-subagent reading.py", line 892 in run
Nov 21 09:00:38.615471 vlab-01 INFO snmp#supervisord: snmp-subagent File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner
Nov 21 09:00:38.615471 vlab-01 INFO snmp#supervisord: snmp-subagent File "/usr/lib/python3.9/threading.py", line 912 in _bootstrap
Nov 21 09:00:38.615471 vlab-01 INFO snmp#supervisord: snmp-subagent
Nov 21 09:00:38.615471 vlab-01 INFO snmp#supervisord: snmp-subagent Current thread 0x00007fc1e86b0740 (most recent call first):
Nov 21 09:00:38.615471 vlab-01 INFO snmp#supervisord: snmp-subagent File "/usr/lib/python3.9/selectors.py", line 469 in select
Nov 21 09:00:38.615471 vlab-01 INFO snmp#supervisord: snmp-subagent File "/usr/lib/python3.9/asyncio/base_events.py", line 1854 in _run_once
Nov 21 09:00:38.615471 vlab-01 INFO snmp#supervisord: snmp-subagent File "/usr/lib/python3.9/asyncio/base_events.py", line 596 in run_forever
Nov 21 09:00:38.615471 vlab-01 INFO snmp#supervisord: snmp-subagent File "/usr/lib/python3.9/asyncio/base_events.py", line 629 in run_until_complete
Nov 21 09:00:38.615471 vlab-01 INFO snmp#supervisord: snmp-subagent File "/usr/local/lib/python3.9/dist-packages/sonic_ax_impl/main.py", line 74 in main
Nov 21 09:00:38.615471 vlab-01 INFO snmp#supervisord: snmp-subagent File "/usr/local/lib/python3.9/dist-packages/sonic_ax_impl/main.py", line 113 in
Nov 21 09:00:38.615471 vlab-01 INFO snmp#supervisord: snmp-subagent File "/usr/lib/python3.9/runpy.py", line 87 in _run_code
Nov 21 09:00:38.615471 vlab-01 INFO snmp#supervisord: snmp-subagent File "/usr/lib/python3.9/runpy.py", line 197 in _run_module_as_main
Nov 21 09:00:39.376130 vlab-01 INFO snmp#supervisord 2023-11-21 09:00:39,374 INFO exited: snmp-subagent (terminated by SIGSEGV (core dumped); not expected)
Nov 21 09:00:40.411336 vlab-01 INFO snmp#supervisor-proc-exit-listener: Process 'snmp-subagent' exited unexpectedly. Terminating supervisor 'snmp'

@liuh-80 liuh-80 marked this pull request as ready for review November 21, 2023 09:02
@liuh-80 liuh-80 requested a review from ganglyu November 21, 2023 09:02
@liuh-80 liuh-80 merged commit 3b6a4ad into sonic-net:master Nov 22, 2023
5 checks passed
qiluo-msft pushed a commit that referenced this pull request Dec 2, 2023
Enable faulthandler to provide more fault information.

#### Work item tracking
Microsoft ADO (number only): 17637258

**- What I did**
Enable faulthandler to provide more fault information.

**- How I did it**
Enable faulthandler when snmp-subagent startup.

**- How to verify it**
Pass all UT

**- Description for the changelog**
Enable faulthandler to provide more fault information.
mssonicbld pushed a commit to mssonicbld/sonic-snmpagent that referenced this pull request Dec 15, 2023
Enable faulthandler to provide more fault information.

#### Work item tracking
Microsoft ADO (number only): 17637258

**- What I did**
Enable faulthandler to provide more fault information.

**- How I did it**
Enable faulthandler when snmp-subagent startup.

**- How to verify it**
Pass all UT

**- Description for the changelog**
Enable faulthandler to provide more fault information.
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202305: #302

mssonicbld pushed a commit that referenced this pull request Dec 15, 2023
Enable faulthandler to provide more fault information.

#### Work item tracking
Microsoft ADO (number only): 17637258

**- What I did**
Enable faulthandler to provide more fault information.

**- How I did it**
Enable faulthandler when snmp-subagent startup.

**- How to verify it**
Pass all UT

**- Description for the changelog**
Enable faulthandler to provide more fault information.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment