Bug #45732
Move pysnmp initialization to thread
Status:
Done
Priority:
No priority
Assignee:
Vladimir Vinogradenko
Category:
Middleware
Target version:
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No
Description
There seem to be many similar tracebacks like this:
[2018/09/11 13:15:36] (WARNING) middlewared._loop_monitor_thread():1106 - Task seems blocked: File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/alert.py", line 194, in process_alerts alert_service = factory(self.middleware, alert_service_desc["attributes"]) File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/../alert/service/snmp_trap.py", line 30, in __init__ resolveWithMib(mib_view_controller) File "/usr/local/lib/python3.6/site-packages/pysnmp/smi/rfc1902.py", line 357, in resolveWithMib ifAvailable=True, ifNotAdded=True) File "/usr/local/lib/python3.6/site-packages/pysnmp/smi/compiler.py", line 51, in addMibCompiler compiler = MibCompiler(parserFactory(**smiV1Relaxed)(), File "/usr/local/lib/python3.6/site-packages/pysmi/parser/smi.py", line 59, in __init__ errorlog=logger) File "/usr/local/lib/python3.6/site-packages/ply/yacc.py", line 3438, in yacc lr = LRGeneratedTable(grammar, method, debuglog) File "/usr/local/lib/python3.6/site-packages/ply/yacc.py", line 2135, in __init__ self.lr_parse_table() File "/usr/local/lib/python3.6/site-packages/ply/yacc.py", line 2551, in lr_parse_table self.add_lalr_lookaheads(C) File "/usr/local/lib/python3.6/site-packages/ply/yacc.py", line 2515, in add_lalr_lookaheads trans = self.find_nonterminal_transitions(C) File "/usr/local/lib/python3.6/site-packages/ply/yacc.py", line 2292, in find_nonterminal_transitions if t not in trans:
It seems we are running synchronous code within a coroutine while instantiating the alert service class.
There are a few ways I can think of we can improve this but obviously you're more familiar with that than me ; )
Associated revisions
Move pysnmp initialization to thread
Ticket: #45732
Move pysnmp initialization to thread
Ticket: #45732
History
#1
Updated by Bug Clerk over 2 years ago
- Status changed from Unscreened to In Progress
#2
Updated by Bug Clerk over 2 years ago
- Status changed from In Progress to Ready for Testing
#3
Updated by Dru Lavigne over 2 years ago
- Subject changed from Synchronous code in AlertService init method to Move pysnmp initialization to thread
- Needs QA changed from No to Yes
- Needs Doc changed from Yes to No
- Needs Merging changed from Yes to No
#4
Updated by William Grzybowski over 2 years ago
- Status changed from Ready for Testing to Done
There is no sensible way for QA to test this.