Summary: | Amarok crashes on startup in Debian | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | Josep Febrer <jfebrer> |
Component: | general | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | marillat, tuomas |
Priority: | NOR | Keywords: | drkonqi |
Version: | unspecified | ||
Target Milestone: | kf5 | ||
Platform: | Debian unstable | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Josep Febrer
2024-06-02 21:17:02 UTC
Thank you for your report; looks interesting. The fact that bitmap_copy in libsamba-util.so.0 is called from libmariadbd.so.19 seems a little suspicious (I could be wrong, though); at least on my openSUSE system, libmariadbd.so.19 doesn't seem to link against anything samba related. I'll try to figure out if there's something that could be easily tested (or possibly I'll try installing a Debian sid system myself later and see if I can reproduce) (In reply to Tuomas Nurmi from comment #1) > Thank you for your report; looks interesting. The fact that bitmap_copy in > libsamba-util.so.0 is called from libmariadbd.so.19 seems a little > suspicious (I could be wrong, though); at least on my openSUSE system, > libmariadbd.so.19 doesn't seem to link against anything samba related. > I'll try to figure out if there's something that could be easily tested (or > possibly I'll try installing a Debian sid system myself later and see if I > can reproduce) Thank you for your response. Also, there are now official amarok packages on Debian experimental, but I've got the same crash on startup in two machines with these packages. If I start amarok from a terminal without --debug I got this output: amarok ********************************************************************************************** ** AMAROK WAS STARTED IN NORMAL MODE. IF YOU WANT TO SEE DEBUGGING INFORMATION, PLEASE USE: ** ** amarok --debug ** ********************************************************************************************** mysql_embedded: Warning: Charset id '33' csname 'utf8' trying to replace existing csname 'utf8mb3' mysql_embedded: Warning: Charset id '83' csname 'utf8' trying to replace existing csname 'utf8mb3' Got ERROR: "Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist" errno: 2000 20 -- exe=/usr/bin/amarok 17 -- platform=wayland 15 -- appname=amarok 17 -- apppath=/usr/bin 10 -- signal=11 9 -- pid=9397 17 -- appversion=3.0.1 19 -- programname=Amarok 31 -- bugaddress=submit@bugs.kde.org KCrash: crashing... crashRecursionCounter = 2 KCrash: Application Name = amarok path = /usr/bin pid = 9397 KCrash: Arguments: /usr/bin/amarok The Wayland connection experienced a fatal error: El descriptor de fitxer no és vàlid Also, I tried to run amarok under Wayland or X11, but with the same crash. It seems that libsamba-util.so.0 it's not directly linked to libmariadbd.so.19: ldd /usr/lib/x86_64-linux-gnu/libmariadbd.so.19 linux-vdso.so.1 (0x00007ffe7ce7c000) libpcre2-8.so.0 => /lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x00007f811f29c000) libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f811f260000) libnuma.so.1 => /lib/x86_64-linux-gnu/libnuma.so.1 (0x00007f811f251000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f811f232000) libssl.so.3 => /lib/x86_64-linux-gnu/libssl.so.3 (0x00007f811d10a000) libcrypto.so.3 => /lib/x86_64-linux-gnu/libcrypto.so.3 (0x00007f811ca00000) liburing.so.2 => /lib/x86_64-linux-gnu/liburing.so.2 (0x00007f811f228000) libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f811c600000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f811d028000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f811c41b000) /lib64/ld-linux-x86-64.so.2 (0x00007f811f366000) libzstd.so.1 => /lib/x86_64-linux-gnu/libzstd.so.1 (0x00007f811c93f000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f811cffb000) One more strange thing is that I've got amarok running, but only once executed with: strace amarok. Later crashed while scanning the music folder. But I never got running again, even after I delete all configuration files under .config and .local/share. Thank you for the additional information! Sounds somewhat odd. However, the fact that you encounter the crash on multiple machines, but people using the official Debian packages don't seem to have the problem in general, would suggest there might be some common denominator in your environment. I guess one possibility could be something related to your systems' locale (the "mysql_embedded: Warning: Charset id '83' csname 'utf8' trying to replace existing csname 'utf8mb3'" doesn't sound like something I recall seeing in output myself, but I'm not sure); or, seeing the samba libs in backtrace, something related to your network environment. I wonder what would happen if you tried temporarily removing/hiding libsamba-util.so.0 (In reply to Tuomas Nurmi from comment #3) > Thank you for the additional information! > > Sounds somewhat odd. However, the fact that you encounter the crash on > multiple machines, but people using the official Debian packages don't seem > to have the problem in general, would suggest there might be some common > denominator in your environment. > I guess one possibility could be something related to your systems' locale > (the "mysql_embedded: Warning: Charset id '83' csname 'utf8' trying to > replace existing csname 'utf8mb3'" doesn't sound like something I recall > seeing in output myself, but I'm not sure); or, seeing the samba libs in > backtrace, something related to your network environment. > I wonder what would happen if you tried temporarily removing/hiding > libsamba-util.so.0 I finally tracked out the real issue. Your suggestions put me on the right track. However, if I moved libsamba-util.so.0 then amarok didn't start due to a missing library. I did a ldd to /usr/bin/amarok and it showed some samba libraries linked, which seemed odd. Later I tried to build amarok without ffmpeg, but in order to compile it I had to disable also libofa. Then amarok started and it ran flawless! Reviewing my ffmpeg libs packages then I remembered that I'm using deb-multimedia, an external repository, and it's package libavformat60 has a dependency on libsmbclient0 while the official Debian package hasn't. So when I replaced libavformat60 and other ffmpeg library packages to the Debian's ones, then amarok worked and it didn't link to any samba library. Also with the official Debian packages from experimental builded with ffmpeg but not using the external package that linked to samba libraries amarok worked really great. Sorry for all the inconveniences. It feel so great having amarok running up again. I missed it so much! Great to hear you managed to solve the issue! Happy listening! Nothing specially related to deb-multimedia packages. If the libavformat-extra60 is installed amarok fail to start. The problem come from amarok whom generate a broken ~/.local/share/amarok/ If you delete ~/.local/share/amarok/ amarok will start correctly. This issue must be fixed in amarok. (In reply to marillat from comment #6) > If you delete ~/.local/share/amarok/ amarok will start correctly. Deleting this directory does nothing Bug also reported here: https://aur.archlinux.org/packages/amarok-git?all_deps=1&O=20 amarok must not try to connect to a mysql server without any valid configuration (In reply to marillat from comment #7) > (In reply to marillat from comment #6) > > If you delete ~/.local/share/amarok/ amarok will start correctly. > Deleting this directory does nothing > > Bug also reported here: > https://aur.archlinux.org/packages/amarok-git?all_deps=1&O=20 > > amarok must not try to connect to a mysql server without any valid > configuration Well, as is observable from https://invent.kde.org/multimedia/amarok/-/blob/master/src/core-impl/storage/sql/mysqlserverstorage/MySqlServerStorageFactory.cpp?ref_type=heads#L40 - it doesn't try to connect to a mysql server without any valid configuration. The unrelated mysql error message on the 3-and-a-half-years old AUR comment comes from mysql embedded initialization. The note there doesn't include a backtrace, but the crash is likely nothing database related. Also, nothing related reported on up-to-date AUR: https://aur.archlinux.org/packages/amarok Here is the backtrace amarok 3.3.1 amd64 unstable Program terminated with signal SIGSEGV, Segmentation fault. #0 __memcpy_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:765 warning: 765 ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S: Aucun fichier ou dossier de ce nom [Current thread is 1 (Thread 0x7fb70f54d180 (LWP 56506))] (gdb) bt #0 __memcpy_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:765 #1 0x00007fb7119aee15 in bitmap_copy () from /lib/x86_64-linux-gnu/libsamba-util.so.0 #2 0x00007fb700e1c95f in SQL_SELECT::test_quick_select(THD*, Bitmap<64u>, unsigned long long, unsigned long long, bool, bool, bool, bool, Item_func::Bitmap) () from /lib/x86_64-linux-gnu/libmariadbd.so.19 #3 0x0000000000000000 in ?? () gdb doesn't return always the same backtrace (gdb) bt #0 __memcpy_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:540 #1 0x00007f1f37faee15 in bitmap_copy () from /lib/x86_64-linux-gnu/libsamba-util.so.0 #2 0x00007f1f0a81c95f in fill_used_fields_bitmap (param=0x7fffd31f5400) at ./sql/opt_range.cc:2626 #3 SQL_SELECT::test_quick_select (this=this@entry=0x561dfabec918, thd=thd@entry=0x561dfab35108, keys_to_use=..., keys_to_use@entry=..., prev_tables=prev_tables@entry=0, limit=limit@entry=18446744073709551615, force_quick_range=force_quick_range@entry=false, ordered_output=false, remove_false_parts_of_where=false, only_single_index_range_scan=false, note_unusable_keys=<optimized out>) at ./sql/opt_range.cc:2829 #4 0x00007f1f0aab5416 in SQL_SELECT::check_quick (this=0x561dfabec918, thd=0x561dfab35108, force_quick_range=false, limit=18446744073709551615, note_unusable_keys=Item_func::BITMAP_ALL) at ./sql/opt_range.h:1913 #5 Sql_cmd_delete::delete_from_single_table (this=this@entry=0x561dfab63560, thd=thd@entry=0x561dfab35108) at ./sql/sql_delete.cc:517 #6 0x00007f1f0aab745e in Sql_cmd_delete::execute_inner (this=0x561dfab63560, thd=0x561dfab35108) at ./sql/sql_delete.cc:1819 #7 0x00007f1f0a703c06 in Sql_cmd_dml::execute (this=0x561dfab63560, thd=0x561dfab35108) at ./sql/sql_select.cc:33779 #8 0x00007f1f0a778bd6 in mysql_execute_command (thd=thd@entry=0x561dfab35108, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at ./sql/sql_parse.cc:4400 #9 0x00007f1f0a77b2ed in mysql_parse (thd=thd@entry=0x561dfab35108, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7fffd31f7d70) at ./sql/sql_parse.cc:7864 #10 0x00007f1f0a77c24a in dispatch_command (command=command@entry=COM_QUERY, thd=0x561dfab35108, packet=packet@entry=0x561dfab701d8 "DELETE FROM urls WHERE directory NOT IN ( SELECT id FROM directories )", packet_length=packet_length@entry=70, blocking=blocking@entry=true) at ./sql/sql_class.h:254 #11 0x00007f1f0a542f9e in emb_advanced_command (mysql=0x561dfa496f78, command=COM_QUERY, header=<optimized out>, header_length=<optimized out>, arg=0x561dfab701d8 "DELETE FROM urls WHERE directory NOT IN ( SELECT id FROM directories )", arg_length=70, skip_check=1 '\001', stmt=0x0) at ./libmysqld/lib_sql.cc:173 #12 0x00007f1f0a533b22 in mysql_send_query (mysql=mysql@entry=0x561dfa496f78, query=<optimized out>, length=<optimized out>) at ./sql-common/client.c:3579 #13 0x00007f1f0a533b85 in mysql_real_query (mysql=0x561dfa496f78, query=<optimized out>, length=<optimized out>) at ./sql-common/client.c:3589 #14 0x00007f1f2fe446bc in MySqlStorage::query (this=this@entry=0x561df9f7a400, statement=...) at ./src/core-impl/storage/sql/mysql-shared/MySqlStorage.cpp:116 #15 0x00007f1f29b5c4e6 in DatabaseUpdater::deleteOrphanedByDirectory (this=this@entry=0x7fffd31f8800, table=...) at ./src/core-impl/collections/db/sql/DatabaseUpdater.cpp:1012 #16 0x00007f1f29b91419 in SqlRegistry::SqlRegistry (this=this@entry=0x561dfab8bda0, collection=collection@entry=0x561dfabc2e70) at ./src/core-impl/collections/db/sql/SqlRegistry.cpp:48 #17 0x00007f1f29b75164 in Collections::SqlCollection::SqlCollection (this=this@entry=0x561dfabc2e70, storage=...) at ./src/core-impl/collections/db/sql/SqlCollection.cpp:263 #18 0x00007f1f29b78cc5 in Collections::SqlCollectionFactory::createSqlCollection (this=this@entry=0x7fffd31f89bf, storage=...) at ./src/core-impl/collections/db/sql/SqlCollectionFactory.cpp:29 #19 0x00007f1f2fe5ecd5 in Collections::MySqlCollectionFactory::init (this=0x561df9f092c0) at ./src/core-impl/collections/db/sql/mysqlcollection/MySqlCollectionFactory.cpp:37 #20 0x00007f1f48590d20 in Plugins::PluginManager::checkPluginEnabledStates (this=this@entry=0x561df9e984f0) at ./src/PluginManager.cpp:218 #21 0x00007f1f48592599 in Plugins::PluginManager::init (this=this@entry=0x561df9e984f0) at ./src/PluginManager.cpp:91 #22 0x00007f1f485926d8 in Plugins::PluginManager::PluginManager (this=0x561df9e984f0, parent=<optimized out>) at ./src/PluginManager.cpp:71 #23 0x00007f1f48592845 in Plugins::PluginManager::instance () at ./src/PluginManager.cpp:50 #24 0x00007f1f485811e6 in The::pluginManager () at ./src/PluginManager.h:117 #25 MainWindow::MainWindow (this=this@entry=0x561df9dbd1f0) at ./src/MainWindow.cpp:146 #26 0x00007f1f48568522 in App::continueInit (this=this@entry=0x7fffd31f8e50) at ./src/App.cpp:461 #27 0x0000561decfd2df6 in main (argc=<optimized out>, argv=<optimized out>) at ./src/main.cpp:381 (In reply to marillat from comment #10) > gdb doesn't return always the same backtrace > > (gdb) bt > #0 __memcpy_avx_unaligned_erms () at > ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:540 > #1 0x00007f1f37faee15 in bitmap_copy () from > /lib/x86_64-linux-gnu/libsamba-util.so.0 > #2 0x00007f1f0a81c95f in fill_used_fields_bitmap (param=0x7fffd31f5400) at > ./sql/opt_range.cc:2626 > #3 SQL_SELECT::test_quick_select (this=this@entry=0x561dfabec918, > thd=thd@entry=0x561dfab35108, keys_to_use=..., keys_to_use@entry=..., > prev_tables=prev_tables@entry=0, > limit=limit@entry=18446744073709551615, > force_quick_range=force_quick_range@entry=false, ordered_output=false, > remove_false_parts_of_where=false, only_single_index_range_scan=false, > note_unusable_keys=<optimized out>) at ./sql/opt_range.cc:2829 > #4 0x00007f1f0aab5416 in SQL_SELECT::check_quick (this=0x561dfabec918, > thd=0x561dfab35108, force_quick_range=false, limit=18446744073709551615, > note_unusable_keys=Item_func::BITMAP_ALL) > at ./sql/opt_range.h:1913 > #5 Sql_cmd_delete::delete_from_single_table > (this=this@entry=0x561dfab63560, thd=thd@entry=0x561dfab35108) at > ./sql/sql_delete.cc:517 > #6 0x00007f1f0aab745e in Sql_cmd_delete::execute_inner > (this=0x561dfab63560, thd=0x561dfab35108) at ./sql/sql_delete.cc:1819 > #7 0x00007f1f0a703c06 in Sql_cmd_dml::execute (this=0x561dfab63560, > thd=0x561dfab35108) at ./sql/sql_select.cc:33779 > #8 0x00007f1f0a778bd6 in mysql_execute_command > (thd=thd@entry=0x561dfab35108, > is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at > ./sql/sql_parse.cc:4400 > #9 0x00007f1f0a77b2ed in mysql_parse (thd=thd@entry=0x561dfab35108, > rawbuf=<optimized out>, length=<optimized out>, > parser_state=parser_state@entry=0x7fffd31f7d70) at ./sql/sql_parse.cc:7864 > #10 0x00007f1f0a77c24a in dispatch_command (command=command@entry=COM_QUERY, > thd=0x561dfab35108, > packet=packet@entry=0x561dfab701d8 "DELETE FROM urls WHERE directory NOT > IN ( SELECT id FROM directories )", packet_length=packet_length@entry=70, > blocking=blocking@entry=true) > at ./sql/sql_class.h:254 > #11 0x00007f1f0a542f9e in emb_advanced_command (mysql=0x561dfa496f78, > command=COM_QUERY, header=<optimized out>, header_length=<optimized out>, > arg=0x561dfab701d8 "DELETE FROM urls WHERE directory NOT IN ( SELECT id > FROM directories )", arg_length=70, skip_check=1 '\001', stmt=0x0) at > ./libmysqld/lib_sql.cc:173 > #12 0x00007f1f0a533b22 in mysql_send_query > (mysql=mysql@entry=0x561dfa496f78, query=<optimized out>, length=<optimized > out>) at ./sql-common/client.c:3579 > #13 0x00007f1f0a533b85 in mysql_real_query (mysql=0x561dfa496f78, > query=<optimized out>, length=<optimized out>) at ./sql-common/client.c:3589 > #14 0x00007f1f2fe446bc in MySqlStorage::query > (this=this@entry=0x561df9f7a400, statement=...) at > ./src/core-impl/storage/sql/mysql-shared/MySqlStorage.cpp:116 > #15 0x00007f1f29b5c4e6 in DatabaseUpdater::deleteOrphanedByDirectory > (this=this@entry=0x7fffd31f8800, table=...) at > ./src/core-impl/collections/db/sql/DatabaseUpdater.cpp:1012 > #16 0x00007f1f29b91419 in SqlRegistry::SqlRegistry > (this=this@entry=0x561dfab8bda0, collection=collection@entry=0x561dfabc2e70) > at ./src/core-impl/collections/db/sql/SqlRegistry.cpp:48 > #17 0x00007f1f29b75164 in Collections::SqlCollection::SqlCollection > (this=this@entry=0x561dfabc2e70, storage=...) at > ./src/core-impl/collections/db/sql/SqlCollection.cpp:263 > #18 0x00007f1f29b78cc5 in > Collections::SqlCollectionFactory::createSqlCollection > (this=this@entry=0x7fffd31f89bf, storage=...) at > ./src/core-impl/collections/db/sql/SqlCollectionFactory.cpp:29 > #19 0x00007f1f2fe5ecd5 in Collections::MySqlCollectionFactory::init > (this=0x561df9f092c0) at > ./src/core-impl/collections/db/sql/mysqlcollection/MySqlCollectionFactory. > cpp:37 > #20 0x00007f1f48590d20 in Plugins::PluginManager::checkPluginEnabledStates > (this=this@entry=0x561df9e984f0) at ./src/PluginManager.cpp:218 > #21 0x00007f1f48592599 in Plugins::PluginManager::init > (this=this@entry=0x561df9e984f0) at ./src/PluginManager.cpp:91 > #22 0x00007f1f485926d8 in Plugins::PluginManager::PluginManager > (this=0x561df9e984f0, parent=<optimized out>) at ./src/PluginManager.cpp:71 > #23 0x00007f1f48592845 in Plugins::PluginManager::instance () at > ./src/PluginManager.cpp:50 > #24 0x00007f1f485811e6 in The::pluginManager () at ./src/PluginManager.h:117 > #25 MainWindow::MainWindow (this=this@entry=0x561df9dbd1f0) at > ./src/MainWindow.cpp:146 > #26 0x00007f1f48568522 in App::continueInit (this=this@entry=0x7fffd31f8e50) > at ./src/App.cpp:461 > #27 0x0000561decfd2df6 in main (argc=<optimized out>, argv=<optimized out>) > at ./src/main.cpp:381 Okay, thank you. I'd be interested to hear if that is Amarok specific or if that happens with any software that tries to use the embedded mariadb (libmariadbd19t64), but it seems that Amarok might be the only software that uses it (at least no rdepends matches on bullseye, didn't check trixie), so there's maybe no way to test. Maybe with mysqltest_embedded (https://manpages.debian.org/testing/mariadb-test/mariadb-test.1.en.html), but I'm not familiar with the tool. In unstable only amarok depends on libmariadbd19t64 In my case I can't test mariadb with mariadb-test as mariadb-server isn't installed by amarok. I see these two errors after a second amaroklaunch Got ERROR: "Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist" errno: 2000 Got ERROR: "unknown: Table '/home/marillat/.local/share/amarok/mysqle/amarok/admin' is marked as crashed and should be repaired" errno: 2000 (In reply to marillat from comment #13) > I see these two errors after a second amaroklaunch > > Got ERROR: "Can't open and lock privilege tables: Table 'mysql.servers' > doesn't exist" errno: 2000 > Got ERROR: "unknown: Table > '/home/marillat/.local/share/amarok/mysqle/amarok/admin' is marked as > crashed and should be repaired" errno: 2000 Yes, but they do not cause crashes. (I've encountered them on various systems, too, without any user-facing problems) I removed /usr/lib/x86_64-linux-gnu/libmariadbd.so.19 and amarok start. But I don't understand why we can configure only a mysql server and not to the embeded mysql server ? https://www.deb-multimedia.org/tests/amarok.png Why amarok suggests libqt5sql5-sqlite, libqt5sql5-mysql and libqt5sql5-psql but once installed and amarok restarted I don't see any modules to enable sqlite or postgresql ? (In reply to marillat from comment #15) > I removed /usr/lib/x86_64-linux-gnu/libmariadbd.so.19 and amarok start. > > But I don't understand why we can configure only a mysql server and not to > the embeded mysql server ? > https://www.deb-multimedia.org/tests/amarok.png embedded mysql/mariadb doesn't need any configuration (that's why it is default) > > Why amarok suggests libqt5sql5-sqlite, libqt5sql5-mysql and libqt5sql5-psql > but once installed and amarok restarted > I don't see any modules to enable sqlite or postgresql ? Maybe leftovers from old packaging files? There was sqlite and psql support in Amarok 1.x some 20 years ago. Shouldn't have any function nowadays. (In reply to Tuomas Nurmi from comment #16) > (In reply to marillat from comment #15) > > > > Why amarok suggests libqt5sql5-sqlite, libqt5sql5-mysql and libqt5sql5-psql > > but once installed and amarok restarted > > I don't see any modules to enable sqlite or postgresql ? > > Maybe leftovers from old packaging files? There was sqlite and psql support No, it's the package that suggests them. (In reply to marillat from comment #17) > (In reply to Tuomas Nurmi from comment #16) > > (In reply to marillat from comment #15) > > > > > > > Why amarok suggests libqt5sql5-sqlite, libqt5sql5-mysql and libqt5sql5-psql > > > but once installed and amarok restarted > > > I don't see any modules to enable sqlite or postgresql ? > > > > Maybe leftovers from old packaging files? There was sqlite and psql support > > No, it's the package that suggests them. Yes, and Debian packagers have probably based the package on the previous packaging files originating from 1.4 times, and that's why http://deb.debian.org/debian/pool/main/a/amarok/amarok_3.1.1-1.debian.tar.xz 's control file still contains Suggests: amarok-doc (>= ${source:Version}), libqt5sql5-sqlite, libqt5sql5-mysql, libqt5sql5-psql, moodbar Something to ask Debian packagers about, sure, but as far as I can tell, nothing in current Amarok source code has anything to do with anything SQLite or PostgreSQL. |