openwallet-foundation / acapy

ACA-Py is a foundation for building decentralized identity applications and services running in non-mobile environments.
https://aca-py.org
Apache License 2.0
420 stars 513 forks source link

Error running performance demo with “—trace-log” parameter set #2205

Closed swcurran closed 1 year ago

swcurran commented 1 year ago

When running the performance demo with:

./run_demo performance -c 1 --mediation --timing --trace-log

Many errors were generated like the following. Likely to do with the —trace-log parameter as without that, the run works correctly.

AssertionError
Exception in default exception handler
Traceback (most recent call last):
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/prompt_toolkit/eventloop/coroutine.py", line 94, in step_next
    new_f = coroutine.send(f.result())
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/prompt_toolkit/application/run_in_terminal.py", line 104, in _run_in_t
    result = yield From(async_func())
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/prompt_toolkit/application/run_in_terminal.py", line 47, in async_func
    result = func()
  File "/home/indy/demo/runners/support/agent.py", line 665, in handle_output
    log_msg(*output, color=color, prefix=self.prefix_str, end=end, **kwargs)
  File "/home/indy/demo/runners/support/utils.py", line 120, in log_msg
    run_in_terminal(lambda: print_ext(*msg, color=color, **kwargs))
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/prompt_toolkit/application/run_in_terminal.py", line 50, in run_in_terminal
    return run_coroutine_in_terminal(async_func, render_cli_done=render_cli_done)
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/prompt_toolkit/application/run_in_terminal.py", line 71, in run_coroutine_in_terminal
    assert app._is_running
AssertionError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/prompt_toolkit/eventloop/base.py", line 132, in call_exception_handler
    self._exception_handler(context)
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/prompt_toolkit/application/application.py", line 729, in handle_exception
    run_coroutine_in_terminal(print_exception)
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/prompt_toolkit/application/run_in_terminal.py", line 71, in run_coroutine_in_terminal
    assert app._is_running
swcurran commented 1 year ago

@usingtechnology — adding this to your list since this is related to what you are working on right now. Worst case you ask @ianco about it when you are talking with him.

ianco commented 1 year ago

@swcurran I wonder if this is a timing issue ... the agents seem to all start up ok, but the errors are generated in the logging to the terminal

swcurran commented 1 year ago

Any idea what to do with it @ianco ? If the agents are starting up fine, but we are getting errors, do we just document that the errors should be ignored? Or do we have @usingtechnology dig into see what is up?

I wondered if something other than just saying “—trace-log” is needed — e.g. is there an environment variable needed? Is this happening because of permissions about where ACA-Py is trying to put the log (e.g. the problem with docker creating the folder with root:root ownership so that a running ACA-Py can’t write to the file).

The only reason I added this to @usingtechnology ’s list is because it is so close (I think!) to the tracing work he is doing. If that is not the case, we can remove it from his list.

Advice welcome! :-)

usingtechnology commented 1 year ago

quick update. running against https://github.com/hyperledger/aries-cloudagent-python/pull/2075 which brings in the mediation fix, but still encounter errors as above with --trace-log.

will dig in and tackle this now.