Project

General

Profile

Bug #30705

Fix for Error 22:'FakeMiddleware' object has no attribute 'run_in_thread'

Added by Brandon Golway over 1 year ago. Updated over 1 year ago.

Status:
Done
Priority:
No priority
Assignee:
William Grzybowski
Category:
Middleware
Target version:
Severity:
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

Trying to install the Deluge plugin into a jail (no jails setup, new pool).

FreeNAS-11-MASTER-201803260406

Fails with this traceback:

Error: concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/local/lib/python3.6/concurrent/futures/process.py", line 175, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 102, in main_worker
res = loop.run_until_complete(coro)
File "/usr/local/lib/python3.6/asyncio/base_events.py", line 467, in run_until_complete
return future.result()
File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 62, in _call
return methodobj(*args)
File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 60, in _call
return await methodobj(*args)
File "/usr/local/lib/python3.6/site-packages/middlewared/service.py", line 259, in delete
rv = await self.middleware.run_in_thread(self.do_delete, id, *args)
AttributeError: 'FakeMiddleware' object has no attribute 'run_in_thread'
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 151, in call_method
result = await self.middleware.call_method(self, message)
File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 128, in throw
return self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 941, in call_method
return await self._call(message['method'], serviceobj, methodobj, params, app=app)
File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 128, in throw
return self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 895, in call
return await self._call_worker(serviceobj, name, *args)
File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 128, in throw
return self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 918, in _call_worker
job,
File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 128, in throw
return self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 853, in run_in_proc
return await self.run_in_executor(self.
_procpool, method, *args, **kwargs)
File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 128, in throw
return self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 847, in run_in_executor
return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
AttributeError: 'FakeMiddleware' object has no attribute 'run_in_thread'

debug.tgz (539 KB) debug.tgz Brandon Golway, 03/26/2018 08:23 AM

Associated revisions

Revision 5c0129ca (diff)
Added by William Grzybowski over 1 year ago

fix(middlewared/worker): implement run_in_thread in FakeMiddleware

Ticket: #30705

Revision fc30dff9 (diff)
Added by William Grzybowski over 1 year ago

fix(middlewared/worker): prevent SystemExit exception from breaking process poll

Ticket: #30705

Revision 61b09771 (diff)
Added by William Grzybowski over 1 year ago

fix(middlewared/worker): do not use context manager

Avoid worker blocking per Vladimir Vinogradenko suggestion.

Ticket: #30705

Revision 76cc65b1 (diff)
Added by William Grzybowski over 1 year ago

fix(middlewared/worker): implement run_in_thread in FakeMiddleware

Ticket: #30705

Revision fe9162d3 (diff)
Added by William Grzybowski over 1 year ago

fix(middlewared/worker): prevent SystemExit exception from breaking process poll

Ticket: #30705

Revision 636c0104 (diff)
Added by William Grzybowski over 1 year ago

fix(middlewared/worker): do not use context manager

Avoid worker blocking per Vladimir Vinogradenko suggestion.

Ticket: #30705

History

#1 Updated by Dru Lavigne over 1 year ago

  • Category changed from GUI (new) to Middleware
  • Assignee changed from Release Council to William Grzybowski
  • Target version set to 11.2-RC2
  • Private changed from No to Yes
  • Reason for Blocked set to Need additional information

Brandon: please attach a debug (System -> Advanced -> Save Debug) to this ticket.

#2 Updated by Brandon Golway over 1 year ago

  • File debug.tgz debug.tgz added
  • Category changed from Middleware to GUI (new)
  • Private changed from Yes to No
  • Reason for Blocked deleted (Need additional information)

It setup the plugin almost all the way, the network setup failed. I deleted the plugin and reinstalled it again and it created it successfully.

I've attached the debug log anyway.

#3 Updated by William Grzybowski over 1 year ago

  • Category changed from GUI (new) to Middleware
  • Status changed from Unscreened to Not Started
  • Target version changed from 11.2-RC2 to 11.2-BETA1

#4 Updated by William Grzybowski over 1 year ago

  • Status changed from Not Started to In Progress

#5 Updated by Dru Lavigne over 1 year ago

  • Subject changed from Error 22:'FakeMiddleware' object has no attribute 'run_in_thread' to Fix for Error 22:'FakeMiddleware' object has no attribute 'run_in_thread'
  • Needs Doc changed from Yes to No

#6 Updated by William Grzybowski over 1 year ago

  • Status changed from In Progress to Done
  • Needs QA changed from Yes to No
  • Needs Merging changed from Yes to No

Also available in: Atom PDF