This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author wg
Recipients wg, yselivanov
Date 2017-06-29.17:40:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
If a process is schedule to run in the event loop with debug disabled
and debug is then enabled before the process finishes it will result in
a traceback: debug_log undefined.

[2017/06/29 14:39:13] (ERROR) asyncio.default_exception_handler():1261 - Ta
sk exception was never retrieved
future: <Task finished coro=<kmod_load() done, defined at /usr/local/lib/py
thon3.6/site-packages/middlewared/plugins/> exception=UnboundLocal
Error("local variable 'debug_log' referenced before assignment",)>
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/",
line 503, in kmod_load
    kldstat = (await (await Popen(['/sbin/kldstat'], stdout=subprocess.PIPE
  File "/usr/local/lib/python3.6/asyncio/", line 225, in creat
    stderr=stderr, **kwds)
  File "/usr/local/lib/python3.6/asyncio/", line 1194, in sub
process_exec'%s: %r', debug_log, transport)
Date User Action Args
2017-06-29 17:40:25wgsetrecipients: + wg, yselivanov
2017-06-29 17:40:25wgsetmessageid: <>
2017-06-29 17:40:25wglinkissue30805 messages
2017-06-29 17:40:24wgcreate