Bug 487937 - Amarok crashes on startup in Debian
Summary: Amarok crashes on startup in Debian
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian unstable Linux
: NOR crash
Target Milestone: kf5
Assignee: Amarok Developers
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2024-06-02 21:17 UTC by Josep Febrer
Modified: 2024-10-21 15:03 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Josep Febrer 2024-06-02 21:17:02 UTC
Application: amarok (3.0.0-git)

Qt Version: 6.6.2
Frameworks Version: 6.3.0
Operating System: Linux 6.9.3-josep1 x86_64
Windowing System: X11
Distribution: Debian GNU/Linux trixie/sid
DrKonqi: 6.0.80 [KCrashBackend]

-- Information about the crash:
I builded Amarok 3.0 and also from current git master but it always crashes on startup.
However if I move or remove /usr/lib/x86_64-linux-gnu/qt5/plugins/amarok_collection-mysqlcollection.so then Amarok starts but it's unable to build a local music collection.

I'm using Debian unstable with Qt 5.15.13, KDE Plasma 5.27.11, KDE Framework 5.115.0 and MariaDB 10.11.8 same version for the embedded version.

Starting Amarok with the --debug from the terminal I get this output:

amarok --debug
Qt: Session management error: None of the authentication protocols specified are supported
amarok: BEGIN: void App::continueInit()
amarok:   BEGIN: virtual int App::newInstance()
amarok:     BEGIN: void App::handleCliArgs(const QString&)
amarok:     END__: void App::handleCliArgs(const QString&) [Took: 0s]
amarok:   END__: virtual int App::newInstance() [Took: 0s]
amarok:   BEGIN: EngineController::EngineController()
amarok:   END__: EngineController::EngineController() [Took: 0s]
amarok:   BEGIN: void EngineController::initializePhonon()
QObject::connect: No such signal Phonon::VLC::MediaObject::angleChanged(int)
QObject::connect: No such signal Phonon::VLC::MediaObject::availableAnglesChanged(int)
amarok:     BEGIN: void EqualizerController::initialize(const Phonon::Path&)
amarok:       [EqualizerController] Established Phonon equalizer effect with 11 parameters.
amarok:       BEGIN: void EqualizerController::eqUpdate()
amarok:       END__: void EqualizerController::eqUpdate() [Took: 0s]
amarok:     END__: void EqualizerController::initialize(const Phonon::Path&) [Took: 0s]
WARNING: Phonon::createPath: Cannot connect  Phonon::MediaObject ( no objectName ) to  Phonon::AudioDataOutput ( no objectName ).
amarok:     [EngineController] Tick Interval (actual):  100
amarok:   END__: void EngineController::initializePhonon() [Took: 0.016s]
amarok:   BEGIN: CollectionManager::CollectionManager()
amarok:   END__: CollectionManager::CollectionManager() [Took: 0s]
amarok:   BEGIN: MainWindow::MainWindow()
amarok:     BEGIN: Plugins::PluginManager::PluginManager(QObject*)
amarok:       BEGIN: void Plugins::PluginManager::checkPluginEnabledStates()
amarok:         [PluginManager] found plugin: "amarok_collection-ipodcollection" enabled: true
amarok:         [PluginManager] found plugin: "amarok_service_lastfm" enabled: true
amarok:         [PluginManager] Plugin "amarok_storage-mysqlserverstorage" is vital
amarok:         [PluginManager] found plugin: "amarok_storage-mysqlserverstorage" enabled: true
amarok:         [PluginManager] found plugin: "amarok_service_ampache" enabled: false
amarok:         [PluginManager] found plugin: "amarok_importer-itunes" enabled: true
amarok:         [PluginManager] Plugin "amarok_collection-mysqlcollection" is vital
amarok:         [PluginManager] found plugin: "amarok_collection-mysqlcollection" enabled: true
amarok:         [PluginManager] found plugin: "amarok_collection-daapcollection" enabled: false
amarok:         [PluginManager] found plugin: "amarok_collection-umscollection" enabled: true
amarok:         [PluginManager] Plugin "amarok_storage-mysqlestorage" is vital
amarok:         [PluginManager] found plugin: "amarok_storage-mysqlestorage" enabled: true
amarok:         [PluginManager] found plugin: "amarok_importer-clementine" enabled: true
amarok:         [PluginManager] found plugin: "amarok_importer-banshee" enabled: true
amarok:         [PluginManager] found plugin: "amarok_service_magnatunestore" enabled: true
amarok:         [PluginManager] found plugin: "amarok_collection-playdarcollection" enabled: false
amarok:         [PluginManager] found plugin: "amarok_collection-audiocdcollection" enabled: true
amarok:         [PluginManager] found plugin: "amarok_collection-mtpcollection" enabled: true
amarok:         [PluginManager] found plugin: "amarok_service_gpodder" enabled: false
amarok:         [PluginManager] found plugin: "amarok_importer-rhythmbox" enabled: true
amarok:         [PluginManager] found plugin: "amarok_importer-fastforward" enabled: true
amarok:         [PluginManager] found plugin: "amarok_service_opmldirectory" enabled: true
amarok:         [PluginManager] found plugin: "amarok_importer-amarok" enabled: true
amarok:         [PluginManager] 20 plugins in total
amarok:         [PluginManager] Creating factory for plugin: "amarok_collection-ipodcollection"
amarok:         [PluginManager] Creating factory for plugin: "amarok_service_lastfm"
amarok:         [PluginManager] Creating factory for plugin: "amarok_storage-mysqlserverstorage"
amarok:         [PluginManager] Plugin "amarok_storage-mysqlserverstorage" is vital
amarok:         [PluginManager] Creating factory for plugin: "amarok_service_ampache"
amarok:         [PluginManager] Creating factory for plugin: "amarok_importer-itunes"
amarok:         [PluginManager] Creating factory for plugin: "amarok_collection-mysqlcollection"
amarok:         [PluginManager] Plugin "amarok_collection-mysqlcollection" is vital
amarok:         [PluginManager] Creating factory for plugin: "amarok_collection-daapcollection"
amarok:         [PluginManager] Creating factory for plugin: "amarok_collection-umscollection"
amarok:         [PluginManager] Creating factory for plugin: "amarok_storage-mysqlestorage"
amarok:         [PluginManager] Plugin "amarok_storage-mysqlestorage" is vital
amarok:         [PluginManager] Creating factory for plugin: "amarok_importer-clementine"
amarok:         [PluginManager] Creating factory for plugin: "amarok_importer-banshee"
amarok:         [PluginManager] Creating factory for plugin: "amarok_service_magnatunestore"
amarok:         [PluginManager] Creating factory for plugin: "amarok_collection-playdarcollection"
amarok:         BEGIN: Collections::PlaydarCollectionFactory::PlaydarCollectionFactory()
amarok:         END__: Collections::PlaydarCollectionFactory::PlaydarCollectionFactory() [Took: 0s]
amarok:         [PluginManager] Creating factory for plugin: "amarok_collection-audiocdcollection"
amarok:         [PluginManager] Creating factory for plugin: "amarok_collection-mtpcollection"
amarok:         [PluginManager] Creating factory for plugin: "amarok_service_gpodder"
amarok:         [PluginManager] Creating factory for plugin: "amarok_importer-rhythmbox"
amarok:         [PluginManager] Creating factory for plugin: "amarok_importer-fastforward"
amarok:         [PluginManager] Creating factory for plugin: "amarok_service_opmldirectory"
amarok:         [PluginManager] Creating factory for plugin: "amarok_importer-amarok"
amarok:         BEGIN: StorageManager::StorageManager()
amarok:         END__: StorageManager::StorageManager() [Took: 0s]
amarok:         BEGIN: ServicePluginManager::ServicePluginManager()
amarok:         END__: ServicePluginManager::ServicePluginManager() [Took: 0s]
Got ERROR: "Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist" errno: 2000
amarok:         [MySqlStorage] Connected to MySQL server 10.11.8-MariaDB-1-embedded
amarok:         [MySqlStorage] Initialized thread, count == 1
amarok:         BEGIN: void StorageManager::slotNewStorage(QSharedPointer<SqlStorage>)
amarok:         END__: void StorageManager::slotNewStorage(QSharedPointer<SqlStorage>) [Took: 0s]
amarok:         BEGIN: bool IpodCollectionFactory::identifySolidDevice(const QString&) const
amarok:           Device supported PMP protocols: ("mtp")
amarok:           Device "/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:08.1/0000:07:00.3/usb3/3-3" doesn't have PortableMediaPlayer ipod interface or StorageAccess interface -> cannot be and iPod
amarok:         END__: bool IpodCollectionFactory::identifySolidDevice(const QString&) const [Took: 0s]
amarok:         BEGIN: bool IpodCollectionFactory::identifySolidDevice(const QString&) const
amarok:           Device "/org/freedesktop/UDisks2/block_devices/sdc1" not identified iPod-like, trying parent device
amarok:           Device "/org/freedesktop/UDisks2/drives/SanDisk_SDSSDA120G_151657403493" not identified iPod-like, trying parent device
amarok:           Device "/org/freedesktop/UDisks2" not identified iPod-like, trying parent device
amarok:           Device "" is invalid, returning false. (i.e. was not iPod-like)
amarok:         END__: bool IpodCollectionFactory::identifySolidDevice(const QString&) const [Took: 0s]
amarok:         BEGIN: bool IpodCollectionFactory::identifySolidDevice(const QString&) const
amarok:           Device "/org/freedesktop/UDisks2/block_devices/nvme0n1p2" not identified iPod-like, trying parent device
amarok:           Device "/org/freedesktop/UDisks2/drives/SK_hynix_BC501_HFM256GDJTNG_8310A_NN92N267910802P1Z" not identified iPod-like, trying parent device
amarok:           Device "/org/freedesktop/UDisks2" not identified iPod-like, trying parent device
amarok:           Device "" is invalid, returning false. (i.e. was not iPod-like)
amarok:         END__: bool IpodCollectionFactory::identifySolidDevice(const QString&) const [Took: 0s]
amarok:         BEGIN: bool IpodCollectionFactory::identifySolidDevice(const QString&) const
amarok:           Device "/org/freedesktop/UDisks2/block_devices/sdb1" not identified iPod-like, trying parent device
amarok:           Device "/org/freedesktop/UDisks2/drives/WDC_WD40EZRZ_75GXCB0_WD_WCC7K2DN90LT" not identified iPod-like, trying parent device
amarok:           Device "/org/freedesktop/UDisks2" not identified iPod-like, trying parent device
amarok:           Device "" is invalid, returning false. (i.e. was not iPod-like)
amarok:         END__: bool IpodCollectionFactory::identifySolidDevice(const QString&) const [Took: 0s]
amarok:         BEGIN: bool IpodCollectionFactory::identifySolidDevice(const QString&) const
amarok:           Device "/org/freedesktop/UDisks2/block_devices/nvme0n1p3" not identified iPod-like, trying parent device
amarok:           Device "/org/freedesktop/UDisks2/drives/SK_hynix_BC501_HFM256GDJTNG_8310A_NN92N267910802P1Z" not identified iPod-like, trying parent device
amarok:           Device "/org/freedesktop/UDisks2" not identified iPod-like, trying parent device
amarok:           Device "" is invalid, returning false. (i.e. was not iPod-like)
amarok:         END__: bool IpodCollectionFactory::identifySolidDevice(const QString&) const [Took: 0s]
amarok:         BEGIN: bool IpodCollectionFactory::identifySolidDevice(const QString&) const
amarok:           Device "/org/freedesktop/UDisks2/block_devices/sda1" not identified iPod-like, trying parent device
amarok:           Device "/org/freedesktop/UDisks2/drives/WDC_WD10EZEX_08WN4A0_WD_WCC6Y5KHSS4P" not identified iPod-like, trying parent device
amarok:           Device "/org/freedesktop/UDisks2" not identified iPod-like, trying parent device
amarok:           Device "" is invalid, returning false. (i.e. was not iPod-like)
amarok:         END__: bool IpodCollectionFactory::identifySolidDevice(const QString&) const [Took: 0s]
amarok:         BEGIN: bool IpodCollectionFactory::identifySolidDevice(const QString&) const
amarok:           Device "/org/freedesktop/UDisks2/block_devices/nvme0n1p1" not identified iPod-like, trying parent device
amarok:           Device "/org/freedesktop/UDisks2/drives/SK_hynix_BC501_HFM256GDJTNG_8310A_NN92N267910802P1Z" not identified iPod-like, trying parent device
amarok:           Device "/org/freedesktop/UDisks2" not identified iPod-like, trying parent device
amarok:           Device "" is invalid, returning false. (i.e. was not iPod-like)
amarok:         END__: bool IpodCollectionFactory::identifySolidDevice(const QString&) const [Took: 0s]
amarok:         BEGIN: SqlRegistry::SqlRegistry(Collections::SqlCollection*)
20 -- exe=/usr/bin/amarok
13 -- platform=xcb
11 -- display=:0
15 -- appname=amarok
17 -- apppath=/usr/bin
10 -- signal=11
11 -- pid=127371
21 -- appversion=3.0.0-git
19 -- programname=Amarok
31 -- bugaddress=submit@bugs.kde.org
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = amarok path = /usr/bin pid = 127371
KCrash: Arguments: /usr/bin/amarok --debug 
KCrash: Attempting to start /usr/lib/x86_64-linux-gnu/libexec/drkonqi
qt.gui.icc: fromIccProfile: failed size sanity 2
Qt: Session management error: None of the authentication protocols specified are supported
fish: Job 1, 'amarok --debug' has stopped

I also removed all Amarok configurations from .config and .local/share with the same results.
Maybe it's something specific with the mariadb Debian's packages.

The crash can be reproduced every time.

-- Backtrace:
Application: Amarok (amarok), signal: Segmentation fault

[KCrash Handler]
#4  __memcpy_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:523
#5  0x00007f592ff46625 in bitmap_copy () at /lib/x86_64-linux-gnu/libsamba-util.so.0
#6  0x00007f58ea7cd842 in SQL_SELECT::test_quick_select(THD*, Bitmap<64u>, unsigned long long, unsigned long long, bool, bool, bool, bool, Item_func::Bitmap) () at /lib/x86_64-linux-gnu/libmariadbd.so.19
#7  0x00007f58ea76aa9a in mysql_delete(THD*, TABLE_LIST*, Item*, SQL_I_List<st_order>*, unsigned long long, unsigned long long, select_result*) () at /lib/x86_64-linux-gnu/libmariadbd.so.19
#8  0x00007f58ea72b096 in mysql_execute_command(THD*, bool) () at /lib/x86_64-linux-gnu/libmariadbd.so.19
#9  0x00007f58ea72ce29 in mysql_parse(THD*, char*, unsigned int, Parser_state*) () at /lib/x86_64-linux-gnu/libmariadbd.so.19
#10 0x00007f58ea72e301 in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) () at /lib/x86_64-linux-gnu/libmariadbd.so.19
#11 0x00007f58ea514bfe in  () at /lib/x86_64-linux-gnu/libmariadbd.so.19
#12 0x00007f58ea505ed2 in mysql_send_query () at /lib/x86_64-linux-gnu/libmariadbd.so.19
#13 0x00007f58ea505f35 in mysql_real_query () at /lib/x86_64-linux-gnu/libmariadbd.so.19
#14 0x00007f59266309ae in MySqlStorage::query(QString const&) (this=this@entry=0x5591a961d620, statement=...) at ./src/core-impl/storage/sql/mysql-shared/MySqlStorage.cpp:116
#15 0x00007f5916370452 in DatabaseUpdater::deleteOrphanedByDirectory(QString const&) (this=this@entry=0x7ffed06eeaf0, table=...) at ./src/core-impl/collections/db/sql/DatabaseUpdater.cpp:1008
#16 0x00007f59163a313f in SqlRegistry::SqlRegistry(Collections::SqlCollection*) (this=this@entry=0x5591a98619d0, collection=collection@entry=0x5591a9878540) at ./src/core-impl/collections/db/sql/SqlRegistry.cpp:48
#17 0x00007f5916387df0 in Collections::SqlCollection::SqlCollection(QSharedPointer<SqlStorage> const&) (this=this@entry=0x5591a9878540, storage=...) at ./src/core-impl/collections/db/sql/SqlCollection.cpp:265
#18 0x00007f591638b787 in Collections::SqlCollectionFactory::createSqlCollection(QSharedPointer<SqlStorage>) const (this=this@entry=0x7ffed06eecaf, storage=...) at ./src/core-impl/collections/db/sql/SqlCollectionFactory.cpp:29
#19 0x00007f592663bce2 in Collections::MySqlCollectionFactory::init() (this=0x5591a95e7d20) at ./src/core-impl/collections/db/sql/mysqlcollection/MySqlCollectionFactory.cpp:37
#20 0x00007f5940592958 in Plugins::PluginManager::checkPluginEnabledStates() (this=this@entry=0x5591a95e6130) at ./src/PluginManager.cpp:219
#21 0x00007f5940593da9 in Plugins::PluginManager::init() (this=this@entry=0x5591a95e6130) at ./src/PluginManager.cpp:90
#22 0x00007f5940593f0d in Plugins::PluginManager::PluginManager(QObject*) (this=0x5591a95e6130, parent=<optimized out>) at ./src/PluginManager.cpp:70
#23 0x00007f5940594065 in Plugins::PluginManager::instance() () at ./src/PluginManager.cpp:49
#24 0x00007f59405830b3 in The::pluginManager() () at ./src/PluginManager.h:118
#25 MainWindow::MainWindow() (this=this@entry=0x5591a95c8400) at ./src/MainWindow.cpp:146
#26 0x00007f594056a7c8 in App::continueInit() (this=this@entry=0x7ffed06ef180) at ./src/App.cpp:463
#27 0x00005591693affb3 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at ./src/main.cpp:382
[Inferior 1 (process 124943) detached]

Reported using DrKonqi
Comment 1 Tuomas Nurmi 2024-06-06 05:03:19 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)
Comment 2 Josep Febrer 2024-06-06 10:48:22 UTC
(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.
Comment 3 Tuomas Nurmi 2024-06-08 08:16:35 UTC
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
Comment 4 Josep Febrer 2024-06-10 11:43:21 UTC
(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!
Comment 5 Tuomas Nurmi 2024-06-10 11:47:03 UTC
Great to hear you managed to solve the issue! Happy listening!
Comment 6 marillat 2024-10-21 09:01:14 UTC
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.
Comment 7 marillat 2024-10-21 09:35:06 UTC
(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
Comment 8 Tuomas Nurmi 2024-10-21 10:01:56 UTC
(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
Comment 9 marillat 2024-10-21 11:24:39 UTC
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 ?? ()
Comment 10 marillat 2024-10-21 11:35:36 UTC
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
Comment 11 Tuomas Nurmi 2024-10-21 13:07:21 UTC
(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.
Comment 12 marillat 2024-10-21 13:30:32 UTC
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.
Comment 13 marillat 2024-10-21 13:52:16 UTC
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
Comment 14 Tuomas Nurmi 2024-10-21 13:55:01 UTC
(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)
Comment 15 marillat 2024-10-21 14:36:04 UTC
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 ?
Comment 16 Tuomas Nurmi 2024-10-21 14:43:16 UTC
(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.
Comment 17 marillat 2024-10-21 14:59:17 UTC
(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.
Comment 18 Tuomas Nurmi 2024-10-21 15:03:29 UTC
(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.