Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

dynamic_thumbnails synapse.http.server Failed handle request via 'ThumbnailResource' sqlite3.IntegrityError #5136

Closed
532910 opened this issue May 4, 2019 · 1 comment
Labels
z-bug (Deprecated Label) z-p2 (Deprecated Label)

Comments

@532910
Copy link

532910 commented May 4, 2019

debian buster, matrix-synapse 0.99.2-4

With dynamic_thumbnails: True:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/synapse/http/server.py", line 81, in wrapped_request_handler
    yield h(self, request)
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/lib/python3/dist-packages/synapse/rest/media/v1/thumbnail_resource.py", line 78, in _async_render_GET
    width, height, method, m_type
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/lib/python3/dist-packages/synapse/rest/media/v1/thumbnail_resource.py", line 221, in _select_or_generate_remote_thumbnail
    desired_height, desired_method, desired_type
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/lib/python3/dist-packages/synapse/rest/media/v1/media_repository.py", line 540, in generate_remote_exact_thumbnail
    t_width, t_height, t_type, t_method, t_len
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/lib/python3/dist-packages/synapse/storage/_base.py", line 516, in _simple_insert
    self._simple_insert_txn, table, values,
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/lib/python3/dist-packages/synapse/storage/_base.py", line 408, in runInteraction
    *args, **kwargs
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/lib/python3/dist-packages/synapse/storage/_base.py", line 457, in runWithConnection
    inner_func, *args, **kwargs
  File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 250, in inContext
    result = inContext.theWork()
  File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 266, in <lambda>
    inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
  File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 122, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 85, in callWithContext
    return func(*args,**kw)
  File "/usr/lib/python3/dist-packages/twisted/enterprise/adbapi.py", line 306, in _runWithConnection
    compat.reraise(excValue, excTraceback)
  File "/usr/lib/python3/dist-packages/twisted/python/compat.py", line 464, in reraise
    raise exception.with_traceback(traceback)
  File "/usr/lib/python3/dist-packages/twisted/enterprise/adbapi.py", line 297, in _runWithConnection
    result = func(conn, *args, **kw)
  File "/usr/lib/python3/dist-packages/synapse/storage/_base.py", line 453, in inner_func
    return func(conn, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/synapse/storage/_base.py", line 329, in _new_transaction
    r = func(txn, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/synapse/storage/_base.py", line 536, in _simple_insert_txn
    txn.execute(sql, vals)
  File "/usr/lib/python3/dist-packages/synapse/storage/_base.py", line 119, in execute
    self._do_execute(self.txn.execute, sql, *args)
  File "/usr/lib/python3/dist-packages/synapse/storage/_base.py", line 149, in _do_execute
    sql, *args
sqlite3.IntegrityError: UNIQUE constraint failed
@neilisfragile neilisfragile added z-p2 (Deprecated Label) z-bug (Deprecated Label) labels May 7, 2019
@richvdh
Copy link
Member

richvdh commented May 16, 2019

dup #2182 (with a different database engine, hence the slightly different error message)

@richvdh richvdh closed this as completed May 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
z-bug (Deprecated Label) z-p2 (Deprecated Label)
Projects
None yet
Development

No branches or pull requests

3 participants