dasch-swiss/sipi

Kakadu error when uploading PNG image

benjamingeer opened this issue · 0 comments

Steps to reproduce

  1. Save this PNG image to your desktop:

on-local-machine

  1. In dsp-api, do make stack-up.
  2. On the command line:
$ curl -X POST -F filename=@on-local-machine.png 'http://0.0.0.0:1024/upload?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJLbm9yYSIsInN1YiI6Imh0dHA6Ly9yZGZoLmNoL3VzZXJzL3pjLVZFaEZxVFNlZ3FwZUJSZG9SS2ciLCJhdWQiOlsiS25vcmEiLCJTaXBpIl0sImV4cCI6MTYxMzc0ODQwMCwiaWF0IjoxNjExMTU2NDAwLCJqdGkiOiJWZkZWTzBrYVJiT3JrM19wWVhydG53In0.XLC0DBRoFxnygwuWyImVoIsl7DepHFZ7k-6_Y3_9390' 

Expected results

A JSON response describing the uploaded file.

Actual results

Curl says:

curl: (52) Empty reply from server

Sipi's log says:

Sipi: Accepted connection from 172.23.0.
Sipi: Kakadu-library: Kakadu Core Error:
Attempting to wait for a background tile opening operation inside `kdu_codestream::access_tile', while another thread appears to be concurrently waiting upon the same condition -- see API docs for an explanation!
Sipi: Kakadu-library: Kakadu Core Warning:
Attempting to destroy a `kdu_thread_queue' object before waiting for its removal from the thread group to which it is attached -- see `kdu_thread_entity::join' or `kdu_thread_entity::terminate'.
Sipi: Kakadu-library: Kakadu Core Warning:
Attempting to destroy a `kdu_thread_queue' object before waiting for its removal from the thread group to which it is attached -- see `kdu_thread_entity::join' or `kdu_thread_entity::terminate'.Kakadu Core Warning:
Attempting to destroy a `kdu_thread_queue' object before waiting for its removal from the thread group to which it is attached -- see `kdu_thread_entity::join' or `kdu_thread_entity::terminate'.
Sipi: Kakadu-library: Kakadu Core Warning:
Attempting to destroy a `kdu_thread_queue' object before waiting for its removal from the thread group to which it is attached -- see `kdu_thread_entity::join' or `kdu_thread_entity::terminate'.Kakadu Core Warning:
Attempting to destroy a `kdu_thread_queue' object before waiting for its removal from the thread group to which it is attached -- see `kdu_thread_entity::join' or `kdu_thread_entity::terminate'.Kakadu Core Warning:
Calls to `kdu_sample_allocator::release_permit' do not match successful `kdu_sample_allocator::seek_permit' calls. Memory leak seems likely!
Sipi: Kakadu-library: Kakadu Core Warning:
Attempting to destroy a `kdu_thread_queue' object before waiting for its removal from the thread group to which it is attached -- see `kdu_thread_entity::join' or `kdu_thread_entity::terminate'.Kakadu Core Warning:
Attempting to destroy a `kdu_thread_queue' object before waiting for its removal from the thread group to which it is attached -- see `kdu_thread_entity::join' or `kdu_thread_entity::terminate'.Kakadu Core Warning:
Calls to `kdu_sample_allocator::release_permit' do not match successful `kdu_sample_allocator::seek_permit' calls. Memory leak seems likely!Kakadu Core Warning:
Attempting to destroy a `kdu_thread_queue' object before waiting for its removal from the thread group to which it is attached -- see `kdu_thread_entity::join' or `kdu_thread_entity::terminate'.
BUILD_TIMESTAMP: 2020-11-06 10:22
BUILD_SCM_TAG: v3.0.0-rc.9
BUILD_SCM_REVISION: 453fd94601e0e732a65839e5fbde55bcc94bf72f
Sipi: BUILD_TIMESTAMP: 2020-11-06 10:22
Sipi: BUILD_SCM_TAG: v3.0.0-rc.9
Sipi: BUILD_SCM_REVISION: 453fd94601e0e732a65839e5fbde55bcc94bf72f
Sipi: Cache at "/sipi/cache" cachesize=104857600 nfiles=0 hysteresis=0.100000
Sipi: File "cache_XXXXS2xGj6" not in cache file! Deleting...
Sipi: Couldn't remove cache for /sipi/cache/cache_XXXXS2xGj6: not existing!
Sipi: File "cache_XXXXRjNAkj" not in cache file! Deleting...
Sipi: Couldn't remove cache for /sipi/cache/cache_XXXXRjNAkj: not existing!
Sipi: File "cache_XXXXIFEzGT" not in cache file! Deleting...
Sipi: Couldn't remove cache for /sipi/cache/cache_XXXXIFEzGT: not existing!
Sipi: Starting SipiHttpServer::run()
Sipi: Sipi server starting
Sipi: Serving images from /sipi/images
Sipi: In Server::run
Sipi: Starting shttps server with 16 threads
Sipi: Creating thread pool....
Sipi: Added route /upload with script /sipi/scripts/upload.lua
Sipi: Added route /store with script /sipi/scripts/store.lua
Sipi: Added route /delete_temp_file with script /sipi/scripts/delete_temp_file.lua
Sipi: Added route /test_functions with script /sipi/scripts/test_functions.lua
Sipi: Added route /test_file_info with script /sipi/scripts/test_file_info.lua
Sipi: Added route /test_knora_session_cookie with script /sipi/scripts/test_knora_session_cookie.lua
Sipi: Server listening on HTTP port 1024

This seems to indicate that Sipi has crashed and restarted.