Plone 5.2rc3 ValueError: signal only works in main thread

Has anyone else seen these errors with Plone 5.2rc3? ValueError: signal only works in main thread

2019-06-08 17:18:18,763 WARNING [waitress.queue:115][MainThread] Task queue depth is 1
/Users/kimnguyen/src/5.2rc3-buildout/eggs/Zope-4.0-py3.7.egg/ZPublisher/HTTPResponse.py:549: ResourceWarning: unclosed file <_io.FileIO name='/Users/kimnguyen/src/5.2rc3-buildout/eggs/plone.app.mosaic-2.2.1-py3.7.egg/plone/app/mosaic/layouts/content/document.html' mode='rb' closefd=True>
  self.body = body
ResourceWarning: Enable tracemalloc to get the object allocation traceback
2019-06-08 18:18:04,361 ERROR   [waitress:38][MainThread] Socket error
Traceback (most recent call last):
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/waitress-1.2.1-py3.7.egg/waitress/channel.py", line 137, in handle_write
    flush()
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/waitress-1.2.1-py3.7.egg/waitress/channel.py", line 256, in _flush_some
    num_sent = self.send(chunk)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/waitress-1.2.1-py3.7.egg/waitress/wasyncore.py", line 401, in send
    result = self.socket.send(data)
OSError: [Errno 41] Protocol wrong type for socket
> /Users/kimnguyen/src/5.2rc3-buildout/eggs/waitress-1.2.1-py3.7.egg/waitress/wasyncore.py(401)send()
-> result = self.socket.send(data)
(Pdb) c
2019-06-08 18:18:18,662 WARNING [waitress.queue:115][MainThread] Task queue depth is 1
/Users/kimnguyen/src/5.2rc3-buildout/eggs/ZODB-5.5.1-py3.7.egg/ZODB/blob.py:339: ResourceWarning: unclosed file <_io.FileIO name='/Users/kimnguyen/src/5.2rc3-buildout/var/blobstorage/0x00/0x00/0x00/0x00/0x00/0x00/0x1f/0x55/0x03d043fe01c340aa.blob' mode='rb' closefd=True>
  super(BlobFile, self).close()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
2019-06-08 18:22:01,580 WARNING [waitress.queue:115][MainThread] Task queue depth is 1
/Users/kimnguyen/src/5.2rc3-buildout/eggs/ZODB-5.5.1-py3.7.egg/ZODB/blob.py:339: ResourceWarning: unclosed file <_io.FileIO name='/Users/kimnguyen/src/5.2rc3-buildout/var/blobstorage/0x00/0x00/0x00/0x00/0x00/0x00/0x1f/0x6b/0x03d043fe3f0ec6ee.blob' mode='rb' closefd=True>
  super(BlobFile, self).close()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
2019-06-08 18:22:32,152 WARNING [waitress.queue:115][MainThread] Task queue depth is 1
2019-06-08 18:22:47,589 WARNING [waitress.queue:115][MainThread] Task queue depth is 1
/Users/kimnguyen/src/5.2rc3-buildout/eggs/ZODB-5.5.1-py3.7.egg/ZODB/blob.py:339: ResourceWarning: unclosed file <_io.FileIO name='/Users/kimnguyen/src/5.2rc3-buildout/var/blobstorage/0x00/0x00/0x00/0x00/0x00/0x00/0x1c/0xa5/0x03d04389cec726aa.blob' mode='rb' closefd=True>
  super(BlobFile, self).close()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
2019-06-08 18:22:47,649 WARNING [waitress.queue:115][MainThread] Task queue depth is 1
/Users/kimnguyen/src/5.2rc3-buildout/eggs/ZODB-5.5.1-py3.7.egg/ZODB/blob.py:339: ResourceWarning: unclosed file <_io.FileIO name='/Users/kimnguyen/src/5.2rc3-buildout/var/blobstorage/0x00/0x00/0x00/0x00/0x00/0x00/0x1c/0x83/0x03d0438907eabf22.blob' mode='rb' closefd=True>
  super(BlobFile, self).close()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
2019-06-08 18:22:51,881 ERROR   [Zope.SiteErrorLog:18][waitress] 1560032571.8806370.8145095834887806 http://0.0.0.0:8080/resolveuid/6da881e59b4141e584cd2774808fd8a2
Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 155, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 334, in publish_module
  Module ZPublisher.WSGIPublisher, line 252, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module Products.PDBDebugMode.wsgi_runcall, line 60, in pdb_runcall
  Module plone.outputfilters.browser.resolveuid, line 65, in __call__
  Module plone.outputfilters.browser.resolveuid, line 19, in uuidToURL
  Module Products.CMFCore.utils, line 13, in check_getToolByName
  Module Products.CMFCore.utils, line 131, in getToolByName
AttributeError: portal_catalog
2019-06-08 18:22:51,882 ERROR   [waitress:38][waitress] Exception when serving /resolveuid/6da881e59b4141e584cd2774808fd8a2/@@images/image/preview
Traceback (most recent call last):
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Zope-4.0-py3.7.egg/ZPublisher/WSGIPublisher.py", line 155, in transaction_pubevents
    yield
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Zope-4.0-py3.7.egg/ZPublisher/WSGIPublisher.py", line 334, in publish_module
    response = _publish(request, new_mod_info)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Zope-4.0-py3.7.egg/ZPublisher/WSGIPublisher.py", line 252, in publish
    bind=1)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Zope-4.0-py3.7.egg/ZPublisher/mapply.py", line 85, in mapply
    return debug(object, args, context)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Products.PDBDebugMode-2.0-py3.7.egg/Products/PDBDebugMode/wsgi_runcall.py", line 60, in pdb_runcall
    return obj(*args)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/plone.outputfilters-3.1.2-py3.7.egg/plone/outputfilters/browser/resolveuid.py", line 65, in __call__
    url = uuidToURL(self.uuid)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/plone.outputfilters-3.1.2-py3.7.egg/plone/outputfilters/browser/resolveuid.py", line 19, in uuidToURL
    catalog = getToolByName(getSite(), 'portal_catalog')
  File "<string>", line 13, in check_getToolByName
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Products.CMFCore-2.4.0b8-py3.7.egg/Products/CMFCore/utils.py", line 131, in getToolByName
    raise AttributeError(name)
AttributeError: portal_catalog

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/waitress-1.2.1-py3.7.egg/waitress/channel.py", line 336, in service
    task.service()
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/waitress-1.2.1-py3.7.egg/waitress/task.py", line 175, in service
    self.execute()
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/waitress-1.2.1-py3.7.egg/waitress/task.py", line 452, in execute
    app_iter = self.channel.server.application(env, start_response)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Paste-3.0.8-py3.7.egg/paste/translogger.py", line 69, in __call__
    return self.application(environ, replacement_start_response)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Zope-4.0-py3.7.egg/ZPublisher/httpexceptions.py", line 30, in __call__
    return self.application(environ, start_response)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Zope-4.0-py3.7.egg/ZPublisher/WSGIPublisher.py", line 334, in publish_module
    response = _publish(request, new_mod_info)
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/contextlib.py", line 130, in __exit__
    self.gen.throw(type, value, traceback)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Zope-4.0-py3.7.egg/ZPublisher/WSGIPublisher.py", line 205, in transaction_pubevents
    notify(pubevents.PubFailure(request, exc_info, retry))
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/zope.event-4.4-py3.7.egg/zope/event/__init__.py", line 32, in notify
    subscriber(event)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/zope.component-4.5-py3.7.egg/zope/component/event.py", line 27, in dispatch
    component_subscribers(event, None)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/zope.component-4.5-py3.7.egg/zope/component/_api.py", line 124, in subscribers
    return sitemanager.subscribers(objects, interface)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/zope.interface-4.6.0-py3.7-macosx-10.14-x86_64.egg/zope/interface/registry.py", line 442, in subscribers
    return self.adapters.subscribers(objects, provided)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/zope.interface-4.6.0-py3.7-macosx-10.14-x86_64.egg/zope/interface/adapter.py", line 607, in subscribers
    subscription(*objects)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Products.SiteErrorLog-5.3-py3.7.egg/Products/SiteErrorLog/SiteErrorLog.py", line 360, in IPubFailureSubscriber
    error_log.raising(event.exc_info)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Products.PDBDebugMode-2.0-py3.7.egg/Products/PDBDebugMode/errorlog.py", line 22, in raising
    pdb.post_mortem(info[2])
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pdb.py", line 1622, in post_mortem
    p.interaction(None, t)
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pdb.py", line 344, in interaction
    signal.signal(signal.SIGINT, Pdb._previous_sigint_handler)
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/signal.py", line 47, in signal
    handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
ValueError: signal only works in main thread
2019-06-08 18:22:51,904 ERROR   [waitress:38][waitress] Exception when servicing <waitress.channel.HTTPChannel connected 127.0.0.1:64411 at 0x10ce48780>
Traceback (most recent call last):
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Zope-4.0-py3.7.egg/ZPublisher/WSGIPublisher.py", line 155, in transaction_pubevents
    yield
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Zope-4.0-py3.7.egg/ZPublisher/WSGIPublisher.py", line 334, in publish_module
    response = _publish(request, new_mod_info)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Zope-4.0-py3.7.egg/ZPublisher/WSGIPublisher.py", line 252, in publish
    bind=1)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Zope-4.0-py3.7.egg/ZPublisher/mapply.py", line 85, in mapply
    return debug(object, args, context)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Products.PDBDebugMode-2.0-py3.7.egg/Products/PDBDebugMode/wsgi_runcall.py", line 60, in pdb_runcall
    return obj(*args)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/plone.outputfilters-3.1.2-py3.7.egg/plone/outputfilters/browser/resolveuid.py", line 65, in __call__
    url = uuidToURL(self.uuid)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/plone.outputfilters-3.1.2-py3.7.egg/plone/outputfilters/browser/resolveuid.py", line 19, in uuidToURL
    catalog = getToolByName(getSite(), 'portal_catalog')
  File "<string>", line 13, in check_getToolByName
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Products.CMFCore-2.4.0b8-py3.7.egg/Products/CMFCore/utils.py", line 131, in getToolByName
    raise AttributeError(name)
AttributeError: portal_catalog

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/waitress-1.2.1-py3.7.egg/waitress/channel.py", line 336, in service
    task.service()
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/waitress-1.2.1-py3.7.egg/waitress/task.py", line 175, in service
    self.execute()
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/waitress-1.2.1-py3.7.egg/waitress/task.py", line 452, in execute
    app_iter = self.channel.server.application(env, start_response)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Paste-3.0.8-py3.7.egg/paste/translogger.py", line 69, in __call__
    return self.application(environ, replacement_start_response)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Zope-4.0-py3.7.egg/ZPublisher/httpexceptions.py", line 30, in __call__
    return self.application(environ, start_response)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Zope-4.0-py3.7.egg/ZPublisher/WSGIPublisher.py", line 334, in publish_module
    response = _publish(request, new_mod_info)
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/contextlib.py", line 130, in __exit__
    self.gen.throw(type, value, traceback)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Zope-4.0-py3.7.egg/ZPublisher/WSGIPublisher.py", line 205, in transaction_pubevents
    notify(pubevents.PubFailure(request, exc_info, retry))
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/zope.event-4.4-py3.7.egg/zope/event/__init__.py", line 32, in notify
    subscriber(event)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/zope.component-4.5-py3.7.egg/zope/component/event.py", line 27, in dispatch
    component_subscribers(event, None)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/zope.component-4.5-py3.7.egg/zope/component/_api.py", line 124, in subscribers
    return sitemanager.subscribers(objects, interface)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/zope.interface-4.6.0-py3.7-macosx-10.14-x86_64.egg/zope/interface/registry.py", line 442, in subscribers
    return self.adapters.subscribers(objects, provided)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/zope.interface-4.6.0-py3.7-macosx-10.14-x86_64.egg/zope/interface/adapter.py", line 607, in subscribers
    subscription(*objects)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Products.SiteErrorLog-5.3-py3.7.egg/Products/SiteErrorLog/SiteErrorLog.py", line 360, in IPubFailureSubscriber
    error_log.raising(event.exc_info)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Products.PDBDebugMode-2.0-py3.7.egg/Products/PDBDebugMode/errorlog.py", line 22, in raising
    pdb.post_mortem(info[2])
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pdb.py", line 1622, in post_mortem
    p.interaction(None, t)
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pdb.py", line 344, in interaction
    signal.signal(signal.SIGINT, Pdb._previous_sigint_handler)
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/signal.py", line 47, in signal
    handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
ValueError: signal only works in main thread

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/waitress-1.2.1-py3.7.egg/waitress/task.py", line 78, in handler_thread
    task.service()
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/waitress-1.2.1-py3.7.egg/waitress/channel.py", line 339, in service
    task.request.path)
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/__init__.py", line 1418, in exception
    self.error(msg, *args, exc_info=exc_info, **kwargs)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Products.PDBDebugMode-2.0-py3.7.egg/Products/PDBDebugMode/pdblogging.py", line 55, in error
    post_mortem(traceback)
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pdb.py", line 1622, in post_mortem
    p.interaction(None, t)
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pdb.py", line 344, in interaction
    signal.signal(signal.SIGINT, Pdb._previous_sigint_handler)
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/signal.py", line 47, in signal
    handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
ValueError: signal only works in main thread
Exception in thread waitress:
Traceback (most recent call last):
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Zope-4.0-py3.7.egg/ZPublisher/WSGIPublisher.py", line 155, in transaction_pubevents
    yield
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Zope-4.0-py3.7.egg/ZPublisher/WSGIPublisher.py", line 334, in publish_module
    response = _publish(request, new_mod_info)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Zope-4.0-py3.7.egg/ZPublisher/WSGIPublisher.py", line 252, in publish
    bind=1)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Zope-4.0-py3.7.egg/ZPublisher/mapply.py", line 85, in mapply
    return debug(object, args, context)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Products.PDBDebugMode-2.0-py3.7.egg/Products/PDBDebugMode/wsgi_runcall.py", line 60, in pdb_runcall
    return obj(*args)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/plone.outputfilters-3.1.2-py3.7.egg/plone/outputfilters/browser/resolveuid.py", line 65, in __call__
    url = uuidToURL(self.uuid)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/plone.outputfilters-3.1.2-py3.7.egg/plone/outputfilters/browser/resolveuid.py", line 19, in uuidToURL
    catalog = getToolByName(getSite(), 'portal_catalog')
  File "<string>", line 13, in check_getToolByName
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Products.CMFCore-2.4.0b8-py3.7.egg/Products/CMFCore/utils.py", line 131, in getToolByName
    raise AttributeError(name)
AttributeError: portal_catalog

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/waitress-1.2.1-py3.7.egg/waitress/channel.py", line 336, in service
    task.service()
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/waitress-1.2.1-py3.7.egg/waitress/task.py", line 175, in service
    self.execute()
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/waitress-1.2.1-py3.7.egg/waitress/task.py", line 452, in execute
    app_iter = self.channel.server.application(env, start_response)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Paste-3.0.8-py3.7.egg/paste/translogger.py", line 69, in __call__
    return self.application(environ, replacement_start_response)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Zope-4.0-py3.7.egg/ZPublisher/httpexceptions.py", line 30, in __call__
    return self.application(environ, start_response)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Zope-4.0-py3.7.egg/ZPublisher/WSGIPublisher.py", line 334, in publish_module
    response = _publish(request, new_mod_info)
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/contextlib.py", line 130, in __exit__
    self.gen.throw(type, value, traceback)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Zope-4.0-py3.7.egg/ZPublisher/WSGIPublisher.py", line 205, in transaction_pubevents
    notify(pubevents.PubFailure(request, exc_info, retry))
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/zope.event-4.4-py3.7.egg/zope/event/__init__.py", line 32, in notify
    subscriber(event)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/zope.component-4.5-py3.7.egg/zope/component/event.py", line 27, in dispatch
    component_subscribers(event, None)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/zope.component-4.5-py3.7.egg/zope/component/_api.py", line 124, in subscribers
    return sitemanager.subscribers(objects, interface)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/zope.interface-4.6.0-py3.7-macosx-10.14-x86_64.egg/zope/interface/registry.py", line 442, in subscribers
    return self.adapters.subscribers(objects, provided)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/zope.interface-4.6.0-py3.7-macosx-10.14-x86_64.egg/zope/interface/adapter.py", line 607, in subscribers
    subscription(*objects)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Products.SiteErrorLog-5.3-py3.7.egg/Products/SiteErrorLog/SiteErrorLog.py", line 360, in IPubFailureSubscriber
    error_log.raising(event.exc_info)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Products.PDBDebugMode-2.0-py3.7.egg/Products/PDBDebugMode/errorlog.py", line 22, in raising
    pdb.post_mortem(info[2])
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pdb.py", line 1622, in post_mortem
    p.interaction(None, t)
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pdb.py", line 344, in interaction
    signal.signal(signal.SIGINT, Pdb._previous_sigint_handler)
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/signal.py", line 47, in signal
    handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
ValueError: signal only works in main thread

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/waitress-1.2.1-py3.7.egg/waitress/task.py", line 78, in handler_thread
    task.service()
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/waitress-1.2.1-py3.7.egg/waitress/channel.py", line 339, in service
    task.request.path)
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/__init__.py", line 1418, in exception
    self.error(msg, *args, exc_info=exc_info, **kwargs)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Products.PDBDebugMode-2.0-py3.7.egg/Products/PDBDebugMode/pdblogging.py", line 55, in error
    post_mortem(traceback)
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pdb.py", line 1622, in post_mortem
    p.interaction(None, t)
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pdb.py", line 344, in interaction
    signal.signal(signal.SIGINT, Pdb._previous_sigint_handler)
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/signal.py", line 47, in signal
    handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
ValueError: signal only works in main thread

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/waitress-1.2.1-py3.7.egg/waitress/task.py", line 81, in handler_thread
    'Exception when servicing %r' % task)
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/__init__.py", line 1418, in exception
    self.error(msg, *args, exc_info=exc_info, **kwargs)
  File "/Users/kimnguyen/src/5.2rc3-buildout/eggs/Products.PDBDebugMode-2.0-py3.7.egg/Products/PDBDebugMode/pdblogging.py", line 55, in error
    post_mortem(traceback)
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pdb.py", line 1622, in post_mortem
    p.interaction(None, t)
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pdb.py", line 344, in interaction
    signal.signal(signal.SIGINT, Pdb._previous_sigint_handler)
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/signal.py", line 47, in signal
    handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
ValueError: signal only works in main thread

As you can see, this is a secondary error. It is caused when Products.PDBDebugMode tries to display a traceback.

The traceback seems to indicate that the error actually comes from Python's pdb module -- or the module Python.Framework which might have been monkey patched into pdb. Apparently, the pair no longer expects that pdb can be used inside a thread.

1 Like

Thanks Dieter. Yeah, so the above is the actual error...