Failed to run request [UPDATE Task SET attempts_left = attempts_left - 1 WHERE id_task = ?]: no such table: Task(1)
This can be reproduced fairly easily on some powerful machines by launching some tests in a loop:
while [
echo $? -eq 0 ]; do ./samples --gtest_filter=SamplesTests/ResumeTests.Parse/attached_subs; done
On my machine the test ran nicely for about an hour before I stopped it.
#0 0x00007fc01bedd781 in raise () from /lib/x86_64-linux-gnu/libc.so.6
[Current thread is 1 (Thread 0x7fc00a7fc700 (LWP 8379))]
(gdb) thread apply all bt
Thread 10 (Thread 0x7fc01a96d700 (LWP 8371)):
#0 0x00007fc01c07490a in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x00007fc01ba6fe68 in vlc_cond_timedwait (p_condvar=p_condvar@entry=0x55f096c1e140, p_mutex=p_mutex@entry=0x55f096c1e098, deadline=<optimized out>) at ../../src/posix/thread.c:280
#2 0x00007fc01ba58f71 in Thread (data=0x55f096c1e060) at ../../src/misc/background_worker.c:93
#3 0x00007fc01c06df27 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#4 0x00007fc01bf9f31f in clone () from /lib/x86_64-linux-gnu/libc.so.6
Thread 9 (Thread 0x7fc00b7fe700 (LWP 8376)):
#0 0x00007fc01c07490a in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x00007fc01c60503a in __gthread_cond_timedwait (__abs_timeout=0x7fc00b7fd7b0, __mutex=0x7fc00b7fd720, __cond=0x7fc00b7fd780) at /usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:872
#2 std::condition_variable::__wait_until_impl<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (__atime=<synthetic pointer>..., __lock=<synthetic pointer>..., this=0x7fc00b7fd780) at /usr/include/c++/9/condition_variable:188
#3 std::condition_variable::wait_until<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (__atime=..., __lock=<synthetic pointer>..., this=0x7fc00b7fd780) at /usr/include/c++/9/condition_variable:121
#4 std::condition_variable::wait_until<std::chrono::_V2::steady_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> >, medialibrary::fs::libvlc::Directory::read() const::<lambda()> > (__p=..., __atime=..., __lock=<synthetic pointer>..., this=0x7fc00b7fd780) at /usr/include/c++/9/condition_variable:138
#5 std::condition_variable::wait_for<long int, std::ratio<1>, medialibrary::fs::libvlc::Directory::read() const::<lambda()> > (__p=..., __rtime=..., __lock=<synthetic pointer>..., this=0x7fc00b7fd780) at /usr/include/c++/9/condition_variable:166
#6 medialibrary::fs::libvlc::Directory::read (this=0x7fc004000bd0) at ../src/filesystem/libvlc/Directory.cpp:95
#7 0x00007fc01c592509 in medialibrary::fs::CommonDirectory::files (this=0x7fc004000bd0) at ../src/filesystem/common/CommonDirectory.cpp:47
#8 0x00007fc01c5927ed in medialibrary::fs::CommonDirectory::file (this=<optimized out>, mrl="file:///home/videolan/medialibrary/test/samples/samples/video/attached_subs/sample.mp4") at ../src/filesystem/common/CommonDirectory.cpp:67
#9 0x00007fc01c5b7468 in medialibrary::parser::Task::restoreLinkedEntities (this=0x55f096c61170, lastTask=...) at ../src/parser/Task.cpp:356
#10 0x00007fc01c5adf48 in medialibrary::parser::Worker::mainloop (this=0x55f096d0b3f0) at ../src/parser/ParserWorker.cpp:221
#11 0x00007fc01c174be0 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#12 0x00007fc01c06df27 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#13 0x00007fc01bf9f31f in clone () from /lib/x86_64-linux-gnu/libc.so.6
Thread 8 (Thread 0x7fc01b16e700 (LWP 8370)):
#0 0x00007fc01c0745e5 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x00007fc01c16f7dc in std::condition_variable::wait(std::unique_lock<std::mutex>&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#2 0x00007fc01c58266d in std::condition_variable::wait<medialibrary::DiscovererWorker::run()::<lambda()> > (__p=..., __lock=..., this=0x55f096d2fa30) at /usr/include/c++/9/bits/atomic_base.h:413
#3 medialibrary::DiscovererWorker::run (this=0x55f096d2f9e0) at ../src/discoverer/DiscovererWorker.cpp:375
#4 0x00007fc01c174be0 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007fc01c06df27 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#6 0x00007fc01bf9f31f in clone () from /lib/x86_64-linux-gnu/libc.so.6
Thread 7 (Thread 0x7fc00affd700 (LWP 8377)):
#0 0x00007fc01c0745e5 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x00007fc01c16f7dc in std::condition_variable::wait(std::unique_lock<std::mutex>&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#2 0x00007fc01c5ac47f in std::condition_variable::wait<medialibrary::parser::Worker::mainloop()::<lambda()> > (__p=..., __lock=..., this=0x55f096d14758) at /usr/include/c++/9/bits/stl_deque.h:1384
#3 medialibrary::parser::Worker::mainloop (this=0x55f096d14730) at ../src/parser/ParserWorker.cpp:198
#4 0x00007fc01c174be0 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007fc01c06df27 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#6 0x00007fc01bf9f31f in clone () from /lib/x86_64-linux-gnu/libc.so.6
Thread 6 (Thread 0x7fc00bfff700 (LWP 8375)):
#0 0x00007fc01c0745e5 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x00007fc01c16f7dc in std::condition_variable::wait(std::unique_lock<std::mutex>&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#2 0x00007fc01c5ac47f in std::condition_variable::wait<medialibrary::parser::Worker::mainloop()::<lambda()> > (__p=..., __lock=..., this=0x55f096d0b418) at /usr/include/c++/9/bits/stl_deque.h:1384
#3 medialibrary::parser::Worker::mainloop (this=0x55f096d0b3f0) at ../src/parser/ParserWorker.cpp:198
#4 0x00007fc01c174be0 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007fc01c06df27 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#6 0x00007fc01bf9f31f in clone () from /lib/x86_64-linux-gnu/libc.so.6
Thread 5 (Thread 0x7fc01b96f700 (LWP 8369)):
#0 0x00007fc01c0745e5 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x00007fc01c16f7dc in std::condition_variable::wait(std::unique_lock<std::mutex>&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#2 0x00007fc01c5c2b3c in std::condition_variable::wait<medialibrary::ModificationNotifier::run()::<lambda()> > (__p=..., __lock=..., this=0x55f096c19510) at /usr/include/c++/9/bits/atomic_base.h:413
#3 medialibrary::ModificationNotifier::run (this=0x55f096c19120) at ../src/utils/ModificationsNotifier.cpp:215
#4 0x00007fc01c174be0 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007fc01c06df27 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#6 0x00007fc01bf9f31f in clone () from /lib/x86_64-linux-gnu/libc.so.6
Thread 4 (Thread 0x7fc0186fb700 (LWP 8380)):
#0 0x00007fc01bf8faf6 in __xstat64 () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007fc01ba6e480 in stat64 (__statbuf=<optimized out>, __path=<optimized out>) at /usr/include/x86_64-linux-gnu/sys/stat.h:455
#2 vlc_stat (filename=<optimized out>, buf=<optimized out>) at ../../src/posix/filesystem.c:170
#3 0x00007fc0040015b0 in ?? ()
#4 0x00007fbffc0029a0 in ?? ()
#5 0x00007fbffc001e70 in ?? ()
#6 0x00007fbffc0017a0 in ?? ()
#7 0x0000000000000001 in ?? ()
#8 0x00007fc01ba8ba6f in ?? () from /prefix/lib/libvlccore.so.9
#9 0x0000000000000001 in ?? ()
#10 0x00007fbffc0029a0 in ?? ()
#11 0x00007fc01ba81484 in ?? () from /prefix/lib/libvlccore.so.9
#12 0x00007fc01ba64fdb in vlc_Log (obj=<optimized out>, type=<optimized out>, module=<optimized out>, file=<optimized out>, line=<optimized out>, func=<optimized out>, format=0x55f096c120d0 "P \301\226\360U") at ../../src/misc/messages.c:161
#13 0x0000000000000003 in ?? ()
#14 0x000055f096c120d0 in ?? ()
#15 0x0000000000000000 in ?? ()
Thread 3 (Thread 0x7fc01b9b1780 (LWP 8355)):
#0 0x00007fc01c07490a in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x000055f094f09b1e in __gthread_cond_timedwait (__abs_timeout=0x7fff1ca79170, __mutex=<optimized out>, __cond=0x55f096bb3ca8) at /usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:872
#2 std::condition_variable::__wait_until_impl<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (__atime=<synthetic pointer>..., __lock=..., this=0x55f096bb3ca8) at /usr/include/c++/9/condition_variable:188
#3 std::condition_variable::wait_until<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (__atime=..., __lock=..., this=0x55f096bb3ca8) at /usr/include/c++/9/condition_variable:121
#4 std::condition_variable::wait_until<std::chrono::_V2::steady_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> >, MockResumeCallback::waitForParsingComplete(std::unique_lock<std::mutex>&)::<lambda()> > (__p=..., __atime=..., __lock=..., this=0x55f096bb3ca8) at /usr/include/c++/9/condition_variable:138
#5 std::condition_variable::wait_for<long int, std::ratio<1>, MockResumeCallback::waitForParsingComplete(std::unique_lock<std::mutex>&)::<lambda()> > (__p=..., __rtime=..., __lock=..., this=0x55f096bb3ca8) at /usr/include/c++/9/condition_variable:166
#6 MockResumeCallback::waitForParsingComplete (this=0x55f096bb3ca0, lock=...) at ../test/samples/Tester.cpp:155
#7 0x000055f094ef5543 in ResumeTests_Parse_Test::TestBody (this=0x55f096bb34c0) at /usr/include/c++/9/bits/unique_ptr.h:360
#8 0x000055f094f4bb4d in testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void> (location=0x55f094f5445e "the test body", method=<optimized out>, object=0x55f096bb34c0) at ../googletest/googletest/src/gtest.cc:2414
#9 testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void> (object=object@entry=0x55f096bb34c0, method=<optimized out>, location=location@entry=0x55f094f5445e "the test body") at ../googletest/googletest/src/gtest.cc:2469
#10 0x000055f094f40f5e in testing::Test::Run (this=0x55f096bb34c0) at ../googletest/googletest/src/gtest.cc:2508
#11 testing::Test::Run (this=0x55f096bb34c0) at ../googletest/googletest/src/gtest.cc:2498
#12 0x000055f094f410b5 in testing::TestInfo::Run (this=0x55f096b9dd50) at ../googletest/googletest/src/gtest.cc:2684
#13 testing::TestInfo::Run (this=0x55f096b9dd50) at ../googletest/googletest/src/gtest.cc:2657
#14 0x000055f094f4119d in testing::TestSuite::Run (this=0x55f096b911e0) at ../googletest/googletest/src/gtest.cc:2816
#15 testing::TestSuite::Run (this=0x55f096b911e0) at ../googletest/googletest/src/gtest.cc:2795
#16 0x000055f094f41673 in testing::internal::UnitTestImpl::RunAllTests (this=0x55f096b8f160) at /usr/include/c++/9/bits/stl_vector.h:1040
#17 0x000055f094f4c00d in testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> (location=0x55f094f557f8 "auxiliary test code (environments or event listeners)", method=<optimized out>, object=0x55f096b8f160) at ../googletest/googletest/src/gtest.cc:2414
#18 testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> (object=0x55f096b8f160, method=<optimized out>, location=location@entry=0x55f094f557f8 "auxiliary test code (environments or event listeners)") at ../googletest/googletest/src/gtest.cc:2469
#19 0x000055f094f41888 in testing::UnitTest::Run (this=0x55f094f75580 <testing::UnitTest::GetInstance()::instance>) at ../googletest/googletest/include/gtest/gtest.h:1412
#20 0x000055f094ef19df in RUN_ALL_TESTS () at ../googletest/googletest/include/gtest/gtest.h:2472
#21 main (ac=<optimized out>, av=0x7fff1ca89738) at ../test/samples/main.cpp:321
Thread 2 (Thread 0x7fc01a86c700 (LWP 8373)):
#0 0x00007fc01c07490a in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x00007fc01ba6fe68 in vlc_cond_timedwait (p_condvar=p_condvar@entry=0x55f096c28b38, p_mutex=p_mutex@entry=0x55f096c28ad8, deadline=<optimized out>) at ../../src/posix/thread.c:280
#2 0x00007fc01ba59011 in Thread (data=0x55f096c28aa0) at ../../src/misc/background_worker.c:144
#3 0x00007fc01c06df27 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#4 0x00007fc01bf9f31f in clone () from /lib/x86_64-linux-gnu/libc.so.6
Thread 1 (Thread 0x7fc00a7fc700 (LWP 8379)):
#0 0x00007fc01bedd781 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007fc01bec755b in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007fc01c14080c in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3 0x00007fc01c14b8f6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007fc01c14b961 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007fc01c14bc49 in __cxa_rethrow () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6 0x00007fc01c54aaa5 in medialibrary::sqlite::Tools::executeDelete<long&> (dbConnection=0x55f096c1e430, req="UPDATE Task SET attempts_left = attempts_left - 1 WHERE id_task = ?") at ../src/database/SqliteErrors.h:599
#7 0x00007fc01c5b21c0 in medialibrary::sqlite::Tools::executeUpdate<long&> (req="UPDATE Task SET attempts_left = attempts_left - 1 WHERE id_task = ?", dbConnection=<optimized out>) at ../src/database/SqliteTools.h:348
#8 medialibrary::parser::Task::startParserStep (this=0x55f096d2fb10) at ../src/parser/Task.cpp:220
#9 0x00007fc01c5ac72e in medialibrary::parser::Worker::mainloop (this=0x55f096c522e0) at ../src/parser/ParserWorker.cpp:246
#10 0x00007fc01c174be0 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#11 0x00007fc01c06df27 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#12 0x00007fc01bf9f31f in clone () from /lib/x86_64-linux-gnu/libc.so.6