Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loops other than event-loop thread- application locks up completely. #2178

Open
RomanSpies opened this issue Oct 3, 2024 · 3 comments
Open

Comments

@RomanSpies
Copy link

Describe the bug
The application locks up fully when "too much screen distance" is between DbClient + ORM Coro Mapper definition and location of usage.

If I define coro mappers, redis and db fast clients at the start of a code block (which executes if the client has successfully authenticated, there's no loops / if flows in that block anymore), the application locks up . not terminatable via CTRL-C and

20241003 20:00:57.504808 UTC 59703 FATAL It is forbidden to run loop on threads other than event-loop thread - EventLoop.cc:269

To Reproduce
Steps to reproduce the behavior:
File attached. Drogon 1.9.6-7 (occurs with both), trantor 1.5.20-21, spdlog on, clang 18.1.8, ubuntu 24.04 LTS server, postgres 16.4, dragonfly.

Expected behavior
For the code to not care where I define my coro mappers and redis client as long as they are accessible.

ex.txt

@GuidoHeintz
Copy link

GuidoHeintz commented Oct 23, 2024

i got the same error, since some weeks - in v1.9.6 & v1.9.7
"FATAL It is forbidden to run loop on threads other than event-loop thread - EventLoop.cc:269"

v1.9.6 was running before
i didn't analyzed it - so i have no more info

after the log i get a segmention fault

error happens on linux - OpenSuse Leap 15.5
its working on Windows 11

related to this issue from 2020: #489

  • i have no loop implemented, like getIoLoop() or getLoop()

  • i have a client of an own database implemented -> communication over network

  • i removed all plugins from configuration -> does not help

@GuidoHeintz
Copy link

i forgot something -> additionally i get a segmention fault after this log entry

but yesterday i found a solution in my case -> maybe it helps anybody too
after many try out and downgrade to really old versions i had no success

the solution was:
i had ssl certificates configured, but there there was no files
after copy the certificate files to the configured folders all is running perfectly like before

i upgrade to newest versions of ares and drogon again

@hwc0919
Copy link
Member

hwc0919 commented Nov 12, 2024

Fast clients work on IO loops. Those loops currently start running at the end of app starting process. Early access (like during plugin initialization) will not work.

It should be fine for IO loops to start earlier. PR is welcomed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@hwc0919 @RomanSpies @GuidoHeintz and others