drogonframework / drogon

Drogon: A C++14/17/20 based HTTP web application framework running on Linux/macOS/Unix/Windows
MIT License
11.38k stars 1.09k forks source link

SIGABRT crash #2142

Open xliao-neology opened 2 weeks ago

xliao-neology commented 2 weeks ago

we use sqlite3, we occasionally see below crash with coredump, the complain is "database is lock". Any further info about how this happen and how we can avoid it?

(gdb) bt

0 __pthread_kill_implementation (threadid=, signo=signo@entry=6, no_tid=no_tid@entry=0)

at ./nptl/pthread_kill.c:44

1 0x00007f751f4a9e8f in __pthread_kill_internal (signo=6, threadid=)

at ./nptl/pthread_kill.c:78

2 0x00007f751f45afb2 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26

3 0x00007f751f445472 in __GI_abort () at ./stdlib/abort.c:79

4 0x00007f751f69d919 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6

5 0x00007f751f6a8e1a in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6

6 0x00007f751f6a8e85 in std::terminate() () from /lib/x86_64-linux-gnu/libstdc++.so.6

7 0x00007f751f6a8e0e in std::rethrow_exception(std::__exception_ptr::exception_ptr) ()

from /lib/x86_64-linux-gnu/libstdc++.so.6

8 0x00005646e6680d3f in trantor::EventLoop::loop() ()

9 0x00005646e6501d90 in drogon::HttpAppFrameworkImpl::run() ()

0x7ffdd8fbce08: "20240826 21:00:45.437284 UTC 2255895 WARN  Exception thrown from event loop, rethrowing after running functions on quit: database is locked - EventLoop.cc:245

an-tao commented 2 weeks ago

The "database is locked" error in SQLite3 occurs when the database is being accessed by another process or connection, please check if your application has concurrency issues.