Bug 7748 - MGA 3 - Amarok crashes via a seg-fault each time it's launched - /lib64/libthread_db.so.1
Summary: MGA 3 - Amarok crashes via a seg-fault each time it's launched - /lib64/libth...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: release_blocker major
Target Milestone: ---
Assignee: Juan Luis Baptiste
QA Contact:
URL:
Whiteboard: 3alpha2 3alpha3 3beta1
Keywords:
: 7463 7478 7740 7816 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-10-09 17:07 CEST by Tim Dickerson
Modified: 2013-01-23 21:58 CET (History)
13 users (show)

See Also:
Source RPM: amarok
CVE:
Status comment:


Attachments
rpm -qa's output (99.90 KB, text/plain)
2012-10-23 12:27 CEST, Shlomi Fish
Details
mariadb log aria_log.00000001 (8.00 KB, application/octet-stream)
2012-12-16 16:43 CET, Jim Beard
Details
Output from strace amarok (127.80 KB, application/octet-stream)
2012-12-17 01:45 CET, Jim Beard
Details
Output from strace amarok --debug (132.88 KB, text/plain)
2012-12-17 01:47 CET, Jim Beard
Details
Output of gdb amarok r (21.72 KB, text/plain)
2012-12-20 05:33 CET, Jim Beard
Details
Output of another gdb run (20.43 KB, application/octet-stream)
2012-12-20 06:14 CET, Jim Beard
Details
Output of another gdb run -- May Be Useful (26.65 KB, text/plain)
2012-12-20 16:43 CET, Jim Beard
Details
strace -e trace=open /usr/bin/amarok --nofork (730.65 KB, text/plain)
2012-12-21 22:10 CET, Luc Menut
Details
Latest backtrace. Crash during media scan (12.32 KB, text/plain)
2013-01-04 21:29 CET, Curtis Hildebrand
Details

Description Tim Dickerson 2012-10-09 17:07:07 CEST
Upon launching Amarok via the desktop or CLI, it rudely returns with a 'seg fault' post splash screen...each and every time. 

There appears to be an issue with the following files/modules using the host: libthread_db library

/lib64/libthread_db.so.1
/lib64/libamaroklib.so.1


This can be reproduced each time just by trying to open Amarok via the desktop (KDE) and the CLI

-------------------------
Kcrash information below:
-------------------------

Application: Amarok (amarok), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f0c669597c0 (LWP 1469))]

Thread 5 (Thread 0x7f0c59dc0700 (LWP 1472)):
#0  0x00007f0c810f831d in poll () from /lib64/libc.so.6
#1  0x00007f0c7702348f in poll_func () from /lib64/libpulse.so.0
#2  0x00007f0c770149ec in pa_mainloop_poll () from /lib64/libpulse.so.0
#3  0x00007f0c77015049 in pa_mainloop_iterate () from /lib64/libpulse.so.0
#4  0x00007f0c77015100 in pa_mainloop_run () from /lib64/libpulse.so.0
#5  0x00007f0c7702343f in thread () from /lib64/libpulse.so.0
#6  0x00007f0c6dfc0323 in internal_thread_func () from /usr/lib64/pulseaudio/libpulsecommon-2.1.so
#7  0x00007f0c6b53a764 in ?? () from /usr/lib64/libGL.so.1
#8  0x00007f0c7f263d18 in start_thread () from /lib64/libpthread.so.0
#9  0x00007f0c81100fad in clone () from /lib64/libc.so.6
#10 0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7f0c43e80700 (LWP 1473)):
#0  0x00007f0c7f267931 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f0c4e4a9a6e in my_service_thread_sleep () from /lib64/libmysqld.so.18
#2  0x00007f0c4e6f695f in ma_checkpoint_background () from /lib64/libmysqld.so.18
#3  0x00007f0c7f263d18 in start_thread () from /lib64/libpthread.so.0
#4  0x00007f0c81100fad in clone () from /lib64/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7f0c4367f700 (LWP 1474)):
#0  0x00007f0c810f831d in poll () from /lib64/libc.so.6
#1  0x00007f0c7a4a7b34 in g_main_context_iterate.isra.24 () from /lib64/libglib-2.0.so.0
#2  0x00007f0c7a4a7c54 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007f0c81a803d6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtCore.so.4
#4  0x00007f0c81a5109f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtCore.so.4
#5  0x00007f0c81a51328 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtCore.so.4
#6  0x00007f0c81952750 in QThread::exec() () from /lib64/libQtCore.so.4
#7  0x00007f0c81a318ef in QInotifyFileSystemWatcherEngine::run() () from /lib64/libQtCore.so.4
#8  0x00007f0c8195572c in QThreadPrivate::start(void*) () from /lib64/libQtCore.so.4
#9  0x00007f0c6b53a764 in ?? () from /usr/lib64/libGL.so.1
#10 0x00007f0c7f263d18 in start_thread () from /lib64/libpthread.so.0
#11 0x00007f0c81100fad in clone () from /lib64/libc.so.6
#12 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f0c425b4700 (LWP 1475)):
#0  0x00007f0c7f2675c4 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f0c81955c8b in QWaitCondition::wait(QMutex*, unsigned long) () from /lib64/libQtCore.so.4
#2  0x00007f0c7e612161 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned(ThreadWeaver::Thread*) () from /lib64/libthreadweaver.so.4
#3  0x00007f0c7e61606d in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /lib64/libthreadweaver.so.4
#4  0x00007f0c7e6125ff in ThreadWeaver::ThreadRunHelper::run(ThreadWeaver::WeaverImpl*, ThreadWeaver::Thread*) () from /lib64/libthreadweaver.so.4
#5  0x00007f0c7e61268b in ThreadWeaver::Thread::run() () from /lib64/libthreadweaver.so.4
#6  0x00007f0c8195572c in QThreadPrivate::start(void*) () from /lib64/libQtCore.so.4
#7  0x00007f0c6b53a764 in ?? () from /usr/lib64/libGL.so.1
#8  0x00007f0c7f263d18 in start_thread () from /lib64/libpthread.so.0
#9  0x00007f0c81100fad in clone () from /lib64/libc.so.6
#10 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f0c669597c0 (LWP 1469)):
[KCrash Handler]
#5  0x00007f0c81a69b99 in QObject::~QObject() () from /lib64/libQtCore.so.4
#6  0x00007f0c819520d9 in QThread::~QThread() () from /lib64/libQtCore.so.4
#7  0x00007f0c819522b9 in QAdoptedThread::~QAdoptedThread() () from /lib64/libQtCore.so.4
#8  0x00007f0c81952e80 in QThreadData::~QThreadData() () from /lib64/libQtCore.so.4
#9  0x00007f0c81952fd8 in QThreadData::deref() () from /lib64/libQtCore.so.4
#10 0x00007f0c81a65e9b in QObjectPrivate::~QObjectPrivate() () from /lib64/libQtCore.so.4
#11 0x00007f0c81a66029 in QObjectPrivate::~QObjectPrivate() () from /lib64/libQtCore.so.4
#12 0x00007f0c81a69b9c in QObject::~QObject() () from /lib64/libQtCore.so.4
#13 0x00007f0c819f8d4c in QTextStream::~QTextStream() () from /lib64/libQtCore.so.4
#14 0x00007f0c41baf9fb in MassStorageDeviceHandlerFactory::createHandler(Solid::Device const&, QString const&, SqlStorage*) const () from /usr/lib64/kde4/amarok_device_massstorage.so
#15 0x00007f0c8383ef52 in MountPointManager::createHandlerFromDevice(Solid::Device const&, QString const&) () from /lib64/libamaroklib.so.1
#16 0x00007f0c83841ae8 in MountPointManager::loadDevicePlugins(QList<Plugins::PluginFactory*> const&) () from /lib64/libamaroklib.so.1
#17 0x00007f0c83847b84 in Plugins::PluginManager::init() () from /lib64/libamaroklib.so.1
#18 0x00007f0c83848904 in Plugins::PluginManager::PluginManager(QObject*) () from /lib64/libamaroklib.so.1
#19 0x00007f0c83848ab7 in Plugins::PluginManager::instance() () from /lib64/libamaroklib.so.1
#20 0x00007f0c83828d8e in MainWindow::MainWindow() () from /lib64/libamaroklib.so.1
#21 0x00007f0c83803db8 in App::continueInit() () from /lib64/libamaroklib.so.1
#22 0x00007f0c83805527 in App::App() () from /lib64/libamaroklib.so.1
#23 0x0000000000408c30 in main ()

<< EOF >>


This error initially occurred directly after two (2) fresh installs of Mageia 3 Alpha 2 64 Bit via DVD ISO and is an 'everytime' issue. 

This Amarok seg-fault is also present when running from the Cauldron repositories via urpmi --auto-select updates. I have different hardware on the Cauldron machine, however, it is still a 64bit version. 

Tim Dickerson
IRC User: N9NU
Comment 1 Tim Dickerson 2012-10-09 18:32:15 CEST
### REPORT SUBMITTED TO KDE.ORG AS WELL ###
Comment 2 Manuel Hiebel 2012-10-10 16:46:10 CEST
can you post the url to the kde bug ?
thanks

Source RPM: (none) => amarok

Comment 3 Arnaud Vacquier 2012-10-10 17:03:16 CEST
I have this bug too,
i report : https://bugs.kde.org/show_bug.cgi?id=308182

but on the first report : https://bugs.kde.org/show_bug.cgi?id=306520

"All three people that can reproduce this use Mageia. Distibution / packaging problem most probably. Please report this to Mageia instead. You may want to try to build Amarok 2.6.0 from sources (uninstall all distro packages first) to test whether this is a distribution or packaging problem."

CC: (none) => inster.css

Comment 4 Manuel Hiebel 2012-10-10 17:06:44 CEST
ok

CC: (none) => nicolas.lecureuil
Assignee: bugsquad => juan.baptiste

Comment 5 luca pedrielli 2012-10-16 16:31:32 CEST
still present in alpha2

CC: (none) => luca.pedrielli

Comment 6 Shlomi Fish 2012-10-22 17:45:46 CEST
Can reproduce here (Mageia Linux 3/Cauldron x86-64 ) in a new UNIX user account. I was told this is a problem with MariaDB/MySQL. Very annoying.

Regards,

-- Shlomi Fish

CC: (none) => shlomif

Comment 7 AL13N 2012-10-22 20:34:05 CEST
it doesn't look anything like mariadb/mysql issue at all. to me it seems more likely something with partitions. it seems to be checking over dbus the partitions and doing stuff and crashing there, while freeing something

CC: (none) => alien

Comment 8 Shlomi Fish 2012-10-22 20:47:59 CEST
This happens in a new UNIX user account in LXDE and IceWM. According to AL13N on #mageia-dev:

<AL13N> so, amarok clearly has a problem with partitions
<AL13N> i wonder why it's trying to do stuff with /dev/sda5
<AL13N> but yeah, i'm not amarok, nor KDE maintainer
<AL13N> maybe there's a problem with udisks not properly storing the dbus session for the disks
<rindolf> AL13N: well, I can try it with a different desktop.
<rindolf> Wait a sec.
<AL13N> well, if i knew more about dbus/udisks and stuff, i'd check if i could see the mounted partitions
<AL13N> rindolf: well, i'm sort of at a loss when seeing this
<AL13N> rindolf: i hate to send you everywhere, but i'd go check with mikala or neoclust or whoever does udisks, (or whatever uses dbus and partitions)
<rindolf> AL13N: OK, it happens in a new user in IceWM and LXDE.
<AL13N> rindolf: same thing? like that massstorage thingie?
<AL13N> i saw this mention of udisks or something
<rindolf> AL13N: I didn't get a trace.
<rindolf> I just know it crashes.
<AL13N> no idea what it does, maybe you can kill that and only later start it?
Comment 9 Shlomi Fish 2012-10-22 20:50:11 CEST
Thanks to Alien, I made some progress in diagnosing this bug. After I do:
«systemctl stop udisksd.service» and «systemctl stop udisks2.service», and move away ~/.kde4/share/apps/amarok, I can start Amarok fine and play a file. However, after a while, udisks-daemon starts again and Amarok crashes again. This seems to be a udisks problem.
Comment 10 Shlomi Fish 2012-10-22 20:54:23 CEST
Funda Wang: do you know anything about why udisks is misbehaving?

CC: (none) => fundawang

Comment 11 Funda Wang 2012-10-23 06:16:20 CEST
*** Bug 7463 has been marked as a duplicate of this bug. ***

CC: (none) => krnekit

Comment 12 Funda Wang 2012-10-23 06:17:01 CEST
*** Bug 7478 has been marked as a duplicate of this bug. ***
Comment 13 Funda Wang 2012-10-23 06:32:28 CEST
please attach all the packages you have installed via 'rpm -qa'.
Comment 14 Shlomi Fish 2012-10-23 12:27:23 CEST
Created attachment 2982 [details]
rpm -qa's output

This is the output of rpm -qa on my system (where Amarok crashes, including as compiled from source).
Comment 15 AL13N 2012-10-23 12:29:05 CEST
huh? this bug is a duplicate of itself?
Comment 16 Shlomi Fish 2012-10-23 13:12:25 CEST
(In reply to comment #15)
> huh? this bug is a duplicate of itself?

No, this is 7748 and the other bug is 7478.

Regards,

-- Shlomi Fish
Sébastien GUERIN 2012-10-23 20:22:50 CEST

CC: (none) => sebastien.guerin.news

Comment 17 Jim Beard 2012-10-25 23:44:44 CEST
I ran 
strace amarok >file 2>&1
and the output resulting:

QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
kbuildsycoca4 running...
kbuildsycoca4(2233) KConfigGroup::readXdgListEntry: List entry MimeType in "plasma-wallpaper-image.desktop" is not compliant with XDG standard (missing trailing semicolon). 
unnamed app(2219): Communication problem with  "amarok" , it probably crashed. 
Error message was:  "org.freedesktop.DBus.Error.NoReply" : " "Message did not receive a reply (timeout by message bus)" " 

KCrash: Application 'amarok' crashing...
KCrash: Attempting to start /usr/lib64/kde4/libexec/drkonqi from kdeinit
QSocketNotifier: Invalid socket 46 and type 'Read', disabling...

amarok-2.6.0-1.mga3
OS: Magaeia 3a2 64-bit, Gnome desktop, Linux gw.home.invalid 3.6.3-desktop-1.mga3 #1 SMP Sun Oct 21 18:03:16 UTC 2012 x86_64 x86_64 x86_64 GNU/Linu
cpu AMD Athlon dual-core

CC: (none) => jdbeard

Curtis Hildebrand 2012-10-26 08:56:53 CEST

CC: (none) => curtis_mageia

Manuel Hiebel 2012-10-26 22:15:28 CEST

Priority: Normal => release_blocker

Comment 18 Manuel Hiebel 2012-11-11 00:29:57 CET
*** Bug 7740 has been marked as a duplicate of this bug. ***

CC: (none) => eeeemail

Comment 19 Manuel Hiebel 2012-11-11 00:30:36 CET
(In reply to comment #18)
> *** Bug 7740 has been marked as a duplicate of this bug. ***

https://bugs.kde.org/show_bug.cgi?id=308080 said it's a downstream bug

Whiteboard: (none) => 3alpha2 3alpha3

Comment 20 Manuel Hiebel 2012-11-11 00:31:08 CET
*** Bug 7816 has been marked as a duplicate of this bug. ***

CC: (none) => pierre-malo.denielou

Manuel Hiebel 2012-11-11 00:31:38 CET

Summary: MGA 3 Alpha 2 64 Bit ISO/DVD - Amarok crashes via a seg-fault each time it's launched - /lib64/libthread_db.so.1 => MGA 3 - Amarok crashes via a seg-fault each time it's launched - /lib64/libthread_db.so.1

Comment 21 Marek Laane 2012-11-16 16:05:35 CET
Still happens in alpha3
Comment 22 claire robinson 2012-12-10 14:52:32 CET
valid 3beta1

Whiteboard: 3alpha2 3alpha3 => 3alpha2 3alpha3 3beta1

Comment 23 Jim Beard 2012-12-16 04:00:54 CET
[jim@gw ~]$ rpm -qa >> amarokcrash
lib64amarokpud1-2.6.90-1.mga3
lib64amarokcore1-2.6.90-1.mga3
amarok-handbook-2.6.90-1.mga3
amarok-2.6.90-1.mga3
lib64amarok-sqlcollection1-2.6.90-1.mga3
amarok-utils-2.6.90-1.mga3
lib64amarok-transcoding1-2.6.90-1.mga3
lib64amarokocsclient4-2.6.90-1.mga3
lib64amaroklib1-2.6.90-1.mga3

#############

[jim@gw ~]$ amarok --debug
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 9: reading configurations from ~/.fonts.conf is deprecated.
amarok: BEGIN: App::App()
amarok:   BEGIN: void App::continueInit()
amarok:     BEGIN: EngineController::EngineController()
amarok:     END__: EngineController::EngineController() [Took: 0s]
amarok:     BEGIN: void EngineController::initializePhonon()
amarok:       [EngineController] Tick Interval (actual):  100
amarok:     END__: void EngineController::initializePhonon() [Took: 0.15s]
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::findAllPlugins()
amarok:           [PluginManager] found plugin: "amarok_collection-audiocdcollection" enabled: true
amarok:           [PluginManager] found plugin: "amarok_collection-daapcollection" enabled: false
amarok:           [PluginManager] found plugin: "amarok_collection-mtpcollection" enabled: true
amarok:           [PluginManager] found plugin: "amarok_collection-mysqlservercollection" enabled: true
amarok:           [PluginManager] found plugin: "amarok_collection-mysqlecollection" enabled: true
amarok:           [PluginManager] found plugin: "amarok_collection-nepomukcollection" enabled: false
amarok:           [PluginManager] found plugin: "amarok_collection-upnpcollection" enabled: false
amarok:           [PluginManager] found plugin: "amarok_collection-umscollection" enabled: true
amarok:           [PluginManager] found plugin: "amarok_collection-ipodcollection" enabled: true
amarok:           [PluginManager] found plugin: "amarok_service_ampache" enabled: false
amarok:           [PluginManager] found plugin: "amarok_service_jamendo" enabled: false
amarok:           [PluginManager] found plugin: "amarok_service_lastfm" enabled: false
amarok:           [PluginManager] found plugin: "amarok_service_amazonstore" enabled: true
amarok:           [PluginManager] found plugin: "amarok_service_mp3tunes" enabled: false
amarok:           [PluginManager] found plugin: "amarok_service_magnatunestore" enabled: false
amarok:           [PluginManager] found plugin: "amarok_service_opmldirectory" enabled: true
amarok:           [PluginManager] found plugin: "amarok_service_gpodder" enabled: true
amarok:           [PluginManager] 17 plugins in total
amarok:         END__: void Plugins::PluginManager::findAllPlugins() [Took: 0.003s]
amarok:         [PluginManager] created factory for plugin "amarok_collection-audiocdcollection" type: "Collection"
amarok:         [PluginManager] created factory for plugin "amarok_collection-mtpcollection" type: "Collection"
amarok:         [PluginManager] created factory for plugin "amarok_collection-mysqlecollection" type: "Collection"
amarok:         [PluginManager] created factory for plugin "amarok_collection-umscollection" type: "Collection"
amarok:         [PluginManager] created factory for plugin "amarok_collection-ipodcollection" type: "Collection"
amarok:         BEGIN: void CollectionManager::init(const QList<Plugins::PluginFactory*>&)
amarok:           BEGIN: void CollectionManager::loadPlugins(const QList<Collections::CollectionFactory*>&)
amarok:             [CollectionManager] initializing "amarok_collection-mysqlecollection"
amarok:             [MySqlStorage] Connected to MySQL server 5.5.28-MariaDB-embedded
amarok:             Connected to MySQL server 5.5.28-MariaDB-embedded
amarok:             [MySqlStorage] Initialized thread, count== 1
amarok:             BEGIN: virtual int App::newInstance()
amarok:               BEGIN: static void App::handleCliArgs()
amarok:               END__: static void App::handleCliArgs() [Took: 0s]
amarok:             END__: virtual int App::newInstance() [Took: 0s]
[jim@gw ~]$ amarok:             BEGIN: bool DatabaseUpdater::update()
amarok:               Database version:  14
amarok:               Database out of date: database version is 14 , current version is 15
amarok:               BEGIN: void DatabaseUpdater::upgradeVersion14to15()
amarok:                 dropping obsolete INDEX uniqueid on table urls
KCrash: Application 'amarok' crashing...
KCrash: Attempting to start /usr/lib64/kde4/libexec/drkonqi from kdeinit
sock_file=/home/jim/.kde4/socket-gw.home.invalid/kdeinit4__0

And that is that.  Crashed.
Comment 24 AL13N 2012-12-16 09:19:50 CET
@Jim:

can you also post the logfile of mariadb? it is not the normal mariadb, cause it's embedded, so try to look in the amarok directory, perhaps in ~/.local somewhere
Comment 25 Jim Beard 2012-12-16 15:12:08 CET
AL13N,

One problem found between chair and keyboard.  I copied over .kde4 settings from Mandriva 2011, which uses mysqle database.

Deleted .kde4/share/apps/amarok, and started up amarok, which came up and played one song.  That created ./.kde4/share/apps/amarok/mysqle/amarok.  An attempt to play another song crashed amarok.

No mariadb anywhere that I can find, either with find or with ls -laR |grep maria.

I am using the gnome class-version desktop (startx startgnomeclassic), and that could be complicating things, but if amarok should be using a mariadb and is creating .kde4/share/apps/amarok/mysqle/amarok, either something is amiss in amarok or I need to do a clean install of mageia3a3 and try again.
Comment 26 Jim Beard 2012-12-16 16:43:20 CET
Created attachment 3251 [details]
mariadb log  aria_log.00000001

I am learning more.  Mandriva also uses the maria data base, but directory name there and in Mageia is mysqle and the logfile name is aria_log.00000001.  That is data, binary, so I am attaching it.

How Mageia's amarok was finding the location for my music after removal of /home/jim/.kde4/share/apps/amarok/ puzzles me.  At the moment, it appears that any attempt to access the database creates a crash, but I could be wrong on that.
Comment 27 AL13N 2012-12-16 17:01:42 CET
i think it's fairly simple...

you had amarok before set up with mysql access (mariadb has the same filenames as mysql), so the config would be using the mysql database from before.

but this is embedded!, so that means that the database directory is somewhere in amarok directories.

about finding the location: it may try anyway, due to the .kde4/share/config/amarok* or similar?

(personally, i would not have deleted the .kde4 directory at this point)

also, the aria_log.*** is actually not a log file... likely it's a transaction log file (much like innodb log files).

the mysql log file should be somewhere else. (well, i hope, because -embedded is really an internal mysqld server... i hope it does log by default or however amarok is configuring mysqld).

after looking myself, it seems that there is no log file by default.

i was hoping to use the logfile to find out if the db conversion was started or if amarok crashed before it actually could send the commands...

at this point, i think the best way for this is to file a bug upstream in amarok for this.

hopefully, they would be able to help find out where exactly the bug is located and if it really is mariadb's fault.

(i've been using mga2 amarok without such issues, which does use mariadb as well)
Comment 28 Jim Beard 2012-12-16 18:04:35 CET
A bug report upstream was filed log ago, and repeated, most recently by Shlomi Fish.

Upstream says no distribution other than Mageia is reporting the problem, and that means it is a Mageia problem, not an Amarok problem.

It will take someone with more knowledge of debuggery than I have to sort it out.  Clementine works for me, so I will simply use that as my "work-around."
Comment 29 AL13N 2012-12-16 19:54:37 CET
can these upstreamed reports be linked here? it would be best if on those bug reports some assistance is asked on how to get more debugging info, so we can be more sure... as i said, perhaps it is mariadb, (allthough i seriously doubt it) so it'd be interesting if some way to find out where the error is happening would be interesting...

perhaps jim, can you run it debugging, iinm on amarok website, there's an indication on how to attach it to gdb to see where the segfault happens... (and installing relevant debug packages)

the backtrace could be definitive in finding out where exactly the problem is.
Nikita Krupenko 2012-12-16 22:00:14 CET

See Also: (none) => https://bugs.kde.org/show_bug.cgi?id=306520

Comment 30 AL13N 2012-12-16 23:49:25 CET
i looked at the thread, it seems that most backtraces, are (when you start from low to high) always in the form:

Class::~Class

which means they are destructors (or when something ends...)

walking back, the last one seems to always be: QDebug::~QDebug which would seem to me that when you're closing the debug stream (because you just done some debug info) it crashes then...

it may be stupid idea, but if amarok is compiled to not write debug streams? will this be working around the problem? perhaps we need to find out which compiler flag will disable this and test if it still happens... perhaps it really is something inside Qt debug...

@slomi: please reopen that bug anyway, because indeed you do have exactly what they want. also ask if there is something that we can do to find out what the problem is, since we are from the mageia distro and we would like to get it fixed.
Comment 31 John Balcaen 2012-12-16 23:57:10 CET
I guess the bug is in mariadb since switching mariadb by mysql ( 5.5.28) allows me to have a working amarok here. (not even need to recompile it)

From the crash i noticed also that :
Thread 9 (Thread 0x7f47f61fe700 (LWP 4119)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:217
#1  0x00007f47f1b339ae in inline_mysql_cond_timedwait (abstime=0x7f47f61fdcf0, mutex=0x7f47f24a4600 <LOCK_checkpoint>, that=0x7f47f24a4640 <COND_checkpoint>, src_file=<optimized out>, src_line=<optimized out>) at /usr/src/debug/mariadb-5.5.28/include/mysql/psi/mysql_thread.h:1012
#2  my_service_thread_sleep (control=control@entry=0x7f47f2478470 <checkpoint_control>, sleep_time=<optimized out>) at /usr/src/debug/mariadb-5.5.28/storage/maria/ma_servicethread.c:118
#3  0x00007f47f1b3063f in ma_checkpoint_background (arg=0x1e) at /usr/src/debug/mariadb-5.5.28/storage/maria/ma_checkpoint.c:705
#4  0x00007f4816411d18 in start_thread (arg=0x7f47f61fe700) at pthread_create.c:308
#5  0x00007f48182aefad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
#6  0x0000000000000000 in ?? ()


I guess there's some issues in the mysqlembedded solution provided by mariadb triggered eventually by amarok.

CC: (none) => balcaen.john
Source RPM: amarok => mariadb

Comment 32 Jim Beard 2012-12-17 01:45:47 CET
Created attachment 3253 [details]
Output from strace amarok

Output from strace amarok
Comment 33 Jim Beard 2012-12-17 01:47:33 CET
Created attachment 3254 [details]
Output from strace amarok --debug

Output from strace amarok --debug
Comment 34 Jim Beard 2012-12-17 02:48:44 CET
I have found that if I remove ~/.kde4/share/apps/amarok/mysqle/amarok and start amarok, it will start up.  It finds my music collection location somewhere in system settings, and will start playing a song.

The local music collection will be inventoried and presented.

If I go to local music, open an artist/cd directory, and double-click on an individual song, amarok will add that to the play list.  I can do that multiple times, changing to different artists or different cds.

If I double click on an artist or cd, amarok crashes.

Attempts to restart amarok will immediately crash, until I remove ~/.kde4/share/apps/amarok/mysqle/amarok.  Then amarok will start up again...

hth
Comment 35 AL13N 2012-12-17 09:42:03 CET
(In reply to comment #31)
> I guess the bug is in mariadb since switching mariadb by mysql ( 5.5.28) allows
> me to have a working amarok here. (not even need to recompile it)
> 
> From the crash i noticed also that :
> Thread 9 (Thread 0x7f47f61fe700 (LWP 4119)):
> #0  pthread_cond_timedwait@@GLIBC_2.3.2 () at
> ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:217
> #1  0x00007f47f1b339ae in inline_mysql_cond_timedwait (abstime=0x7f47f61fdcf0,
> mutex=0x7f47f24a4600 <LOCK_checkpoint>, that=0x7f47f24a4640 <COND_checkpoint>,
> src_file=<optimized out>, src_line=<optimized out>) at
> /usr/src/debug/mariadb-5.5.28/include/mysql/psi/mysql_thread.h:1012
> #2  my_service_thread_sleep (control=control@entry=0x7f47f2478470
> <checkpoint_control>, sleep_time=<optimized out>) at
> /usr/src/debug/mariadb-5.5.28/storage/maria/ma_servicethread.c:118
> #3  0x00007f47f1b3063f in ma_checkpoint_background (arg=0x1e) at
> /usr/src/debug/mariadb-5.5.28/storage/maria/ma_checkpoint.c:705
> #4  0x00007f4816411d18 in start_thread (arg=0x7f47f61fe700) at
> pthread_create.c:308
> #5  0x00007f48182aefad in clone () at
> ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
> #6  0x0000000000000000 in ?? ()
> 
> 
> I guess there's some issues in the mysqlembedded solution provided by mariadb
> triggered eventually by amarok.

well, the thread you should is actually a locked thread... this is not the thread that segfaults. it's just waiting on something.

I was thinking that with mariadb, it clearly uses aria storage engine, which is not available in mysql.

which storage engine is used when using mysql? myIsam or innodb? i think myisam.

thinking about it, myisam doesn't support locking, so perhaps this means that amarok isn't handling locks well?

Can anyone ask the amarok developers what storage engine is supposed to be used? and if a XA capable storage engine can be used?

perhaps it can be as simple as forcing a certain storage engine in the amarok code...
Comment 36 AL13N 2012-12-17 09:53:41 CET
(In reply to comment #31)
> I guess the bug is in mariadb since switching mariadb by mysql ( 5.5.28) allows
> me to have a working amarok here. (not even need to recompile it)

that would be weird actually, since it's embedded... allthough, i guess it links against the .so and the since the API's are the same, i guess that works too...
Comment 37 AL13N 2012-12-17 13:50:25 CET
someone mentions:

~/.kde/share/apps/amarok/my.cnf says "default-storage-engine = MyISAM"

ok, so maybe myISAM is used after all...

can someone doublecheck if *.MYD files are present and recently dated?
Comment 38 AL13N 2012-12-17 14:18:46 CET
someone from mariadb tells me that amarok devs had requested to link dynamic against the embedded library...

however... the strace doesn't show it loading libmysqld.so ... so, it must be compiled in...

@John: i can't understand that it would give a difference when installing mysql or not, when it's compiled static...

perhaps amarok maintainer/kde persons could take a peek and see if compiling with libmysqld (embedded) dynamically would solve the problem?
Comment 39 Shlomi Fish 2012-12-17 14:32:11 CET
(In reply to comment #37)
> someone mentions:
> 
> ~/.kde/share/apps/amarok/my.cnf says "default-storage-engine = MyISAM"
> 
> ok, so maybe myISAM is used after all...
> 
> can someone doublecheck if *.MYD files are present and recently dated?

shlomif@telaviv1:~/.xchat2/xchatlogs$ ls -l ~/.kde4/share/apps/amarok/mysqle/amarok

total 456
-rw-rw-r-- 1 shlomif shlomif  8606 Nov 24 15:56 admin.frm
-rw-rw-r-- 1 shlomif shlomif   128 Nov 24 15:56 admin.MYD
-rw-rw-r-- 1 shlomif shlomif  1024 Nov 24 15:56 admin.MYI
-rw-rw-r-- 1 shlomif shlomif  8652 Nov 24 15:56 albums.frm
-rw-rw-r-- 1 shlomif shlomif     0 Nov 24 15:56 albums.MYD
-rw-rw-r-- 1 shlomif shlomif  4096 Nov 24 15:56 albums.MYI
-rw-rw-r-- 1 shlomif shlomif  8676 Nov 24 15:56 amazon.frm
-rw-rw-r-- 1 shlomif shlomif     0 Nov 24 15:56 amazon.MYD
-rw-rw-r-- 1 shlomif shlomif  1024 Nov 24 15:56 amazon.MYI
-rw-rw-r-- 1 shlomif shlomif  8586 Nov 24 15:56 artists.frm
-rw-rw-r-- 1 shlomif shlomif     0 Nov 24 15:56 artists.MYD
-rw-rw-r-- 1 shlomif shlomif  4096 Nov 24 15:56 artists.MYI
-rw-rw-r-- 1 shlomif shlomif  8704 Nov 24 15:56 bookmark_groups.frm
-rw-rw-r-- 1 shlomif shlomif     0 Nov 24 15:56 bookmark_groups.MYD
-rw-rw-r-- 1 shlomif shlomif  1024 Nov 24 15:56 bookmark_groups.MYI
-rw-rw-r-- 1 shlomif shlomif 12828 Nov 24 15:56 bookmarks.frm
-rw-rw-r-- 1 shlomif shlomif     0 Nov 24 15:56 bookmarks.MYD
-rw-rw-r-- 1 shlomif shlomif  1024 Nov 24 15:56 bookmarks.MYI
-rw-rw-r-- 1 shlomif shlomif  8586 Nov 24 15:56 composers.frm
-rw-rw-r-- 1 shlomif shlomif     0 Nov 24 15:56 composers.MYD
-rw-rw-r-- 1 shlomif shlomif  4096 Nov 24 15:56 composers.MYI
-rw-rw-r-- 1 shlomif shlomif    54 Nov 24 23:43 db.opt
-rw-rw-r-- 1 shlomif shlomif 12876 Nov 24 15:56 devices.frm
-rw-rw-r-- 1 shlomif shlomif   296 Nov 24 15:56 devices.MYD
-rw-rw-r-- 1 shlomif shlomif 17408 Nov 24 15:56 devices.MYI
-rw-rw-r-- 1 shlomif shlomif  8664 Nov 24 15:56 directories.frm
-rw-rw-r-- 1 shlomif shlomif     0 Nov 24 15:56 directories.MYD
-rw-rw-r-- 1 shlomif shlomif  1024 Nov 24 15:56 directories.MYI
-rw-rw-r-- 1 shlomif shlomif  8586 Nov 24 15:56 genres.frm
-rw-rw-r-- 1 shlomif shlomif     0 Nov 24 15:56 genres.MYD
-rw-rw-r-- 1 shlomif shlomif  4096 Nov 24 15:56 genres.MYI
-rw-rw-r-- 1 shlomif shlomif  8586 Nov 24 15:56 images.frm
-rw-rw-r-- 1 shlomif shlomif     0 Nov 24 15:56 images.MYD
-rw-rw-r-- 1 shlomif shlomif  4096 Nov 24 15:56 images.MYI
-rw-rw-r-- 1 shlomif shlomif  8588 Nov 24 15:56 labels.frm
-rw-rw-r-- 1 shlomif shlomif     0 Nov 24 15:56 labels.MYD
-rw-rw-r-- 1 shlomif shlomif  4096 Nov 24 15:56 labels.MYI
-rw-rw-r-- 1 shlomif shlomif  8592 Nov 24 15:56 lyrics.frm
-rw-rw-r-- 1 shlomif shlomif     0 Nov 24 15:56 lyrics.MYD
-rw-rw-r-- 1 shlomif shlomif  1024 Nov 24 15:56 lyrics.MYI
-rw-rw-r-- 1 shlomif shlomif  8670 Nov 24 15:56 playlist_groups.frm
-rw-rw-r-- 1 shlomif shlomif     0 Nov 24 15:56 playlist_groups.MYD
-rw-rw-r-- 1 shlomif shlomif  1024 Nov 24 15:56 playlist_groups.MYI
-rw-rw-r-- 1 shlomif shlomif 12798 Nov 24 15:56 playlists.frm
-rw-rw-r-- 1 shlomif shlomif     0 Nov 24 15:56 playlists.MYD
-rw-rw-r-- 1 shlomif shlomif  1024 Nov 24 15:56 playlists.MYI
-rw-rw-r-- 1 shlomif shlomif 12934 Nov 24 15:56 playlist_tracks.frm
-rw-rw-r-- 1 shlomif shlomif     0 Nov 24 15:56 playlist_tracks.MYD
-rw-rw-r-- 1 shlomif shlomif  2048 Nov 24 15:56 playlist_tracks.MYI
-rw-rw-r-- 1 shlomif shlomif 13234 Nov 24 15:56 podcastchannels.frm
-rw-rw-r-- 1 shlomif shlomif     0 Nov 24 15:56 podcastchannels.MYD
-rw-rw-r-- 1 shlomif shlomif  1024 Nov 24 15:56 podcastchannels.MYI
-rw-rw-r-- 1 shlomif shlomif 13164 Nov 24 15:56 podcastepisodes.frm
-rw-rw-r-- 1 shlomif shlomif     0 Nov 24 15:56 podcastepisodes.MYD
-rw-rw-r-- 1 shlomif shlomif  1024 Nov 24 15:56 podcastepisodes.MYI
-rw-rw-r-- 1 shlomif shlomif  8810 Nov 24 15:56 statistics.frm
-rw-rw-r-- 1 shlomif shlomif     0 Nov 24 15:56 statistics.MYD
-rw-rw-r-- 1 shlomif shlomif  1024 Nov 24 15:56 statistics.MYI
-rw-rw-r-- 1 shlomif shlomif  8750 Nov 24 15:56 statistics_permanent.frm
-rw-rw-r-- 1 shlomif shlomif     0 Nov 24 15:56 statistics_permanent.MYD
-rw-rw-r-- 1 shlomif shlomif  4096 Nov 24 15:56 statistics_permanent.MYI
-rw-rw-r-- 1 shlomif shlomif  8818 Nov 24 15:56 statistics_tag.frm
-rw-rw-r-- 1 shlomif shlomif     0 Nov 24 15:56 statistics_tag.MYD
-rw-rw-r-- 1 shlomif shlomif  4096 Nov 24 15:56 statistics_tag.MYI
-rw-rw-r-- 1 shlomif shlomif 13524 Nov 24 15:56 tracks.frm
-rw-rw-r-- 1 shlomif shlomif     0 Nov 24 15:56 tracks.MYD
-rw-rw-r-- 1 shlomif shlomif  4096 Nov 24 15:56 tracks.MYI
-rw-rw-r-- 1 shlomif shlomif  8704 Nov 24 15:56 urls.frm
-rw-rw-r-- 1 shlomif shlomif  8590 Nov 24 15:56 urls_labels.frm
-rw-rw-r-- 1 shlomif shlomif     0 Nov 24 15:56 urls_labels.MYD
-rw-rw-r-- 1 shlomif shlomif  1024 Nov 24 15:56 urls_labels.MYI
-rw-rw-r-- 1 shlomif shlomif     0 Nov 24 15:56 urls.MYD
-rw-rw-r-- 1 shlomif shlomif  4096 Nov 24 15:56 urls.MYI
-rw-rw-r-- 1 shlomif shlomif  8586 Nov 24 15:56 years.frm
-rw-rw-r-- 1 shlomif shlomif     0 Nov 24 15:56 years.MYD
-rw-rw-r-- 1 shlomif shlomif  4096 Nov 24 15:56 years.MYI
shlomif@telaviv1:~/.xchat2/xchatlogs$
Comment 40 AL13N 2012-12-17 15:25:31 CET
thanks, i guess it might make a difference if it's linked dynamically instead of statically, so perhaps the amarok maintainer or KDE maintainers can try to link it dynamically?
Comment 41 Jim Beard 2012-12-20 05:33:32 CET
Created attachment 3259 [details]
Output of gdb amarok r

I installed Mageia3b1, with the full software development set.  Amarok was among the updates that were available immediately after install.

Amarok problem basically the same as with Mageia3a3.  Removing .kde4/share/apps/amarok/mysqle/amarok would usually allow amarok to start up, though in some cases I had to rm -rf  .kde4/share/apps/amarok/ before the problem blocking startup cleared.

I copied over .kde/share/apps/amarok from Mandriva 2011 PWP to get setup/config files.  Amarok came up, recognized it was dealing with an earlier version, and spent a little time bringing that up to date.  Amarok then started.

The result was as earlier, limited functionality and when amarok crashed it would be impossible to start it up again until the database (and maybe some of the stuff in the directory tree above that) had been removed.

I then tried running gdb amarok, r, and amarok works.  I exited Amarok via the Amarok menu quit (gdb did not get to close down a bunch of stuff), and then r again, and amarok is running again.

Gotta love it. Perhaps a race condition?  And with gdb feeding and monitoring the commands, everything works in the proper order?

cp/paste of the gdb output to the terminal window attached, just in case some of that stuff may be of interest, but it is not the cause of the crashes because amarok has not crashed......
Comment 42 Jim Beard 2012-12-20 05:53:27 CET
Gdb output posted a few minutes ago was from KDE4 desktop.  Shifted to 
startx startgnomeclassic and tried again.  Note that when I had quit Amarok in KDE4, I got the window saying amarok had crashed (this seems to be a constant fixture, even if the quit was deliberate and from a menu).

[jim@localhost ~]$ gdb amarok
GNU gdb (GDB) 7.5.1-2.mga3 (Mageia release 3)
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-mageia-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/amarok...Reading symbols from /usr/lib/debug/usr/bin/amarok.debug...done.
done.
(gdb) r
Starting program: /usr/bin/amarok 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Detaching after fork from child process 318.
KCrash: Application 'amarok' crashing...
KCrash: Attempting to start /usr/lib64/kde4/libexec/drkonqi from kdeinit
sock_file=/home/jim/.kde4/socket-localhost/kdeinit4__0
unnamed app(32766): Communication problem with  "amarok" , it probably crashed. 
Error message was:  "org.freedesktop.DBus.Error.NoReply" : " "Message did not receive a reply (timeout by message bus)" " 

[Inferior 1 (process 32766) exited with code 0377]
Missing separate debuginfos, use: debuginfo-install amarok-2.6.90-1.mga3.x86_64
(gdb) QSocketNotifier: Invalid socket 49 and type 'Read', disabling...
bt
No stack.
(gdb) 

debuginfo-install?  What is this?  Where do I find it?
Comment 43 Jim Beard 2012-12-20 06:14:24 CET
Created attachment 3260 [details]
Output of another gdb run

gdb --args amarok --debug --nofork
run
/*after crash*/
thread apply all bt

This was under startx startgnomeclassic, and it was a startup without deleting the amarok database or otherwise cleaning up after the earlier crash.
Comment 44 Jim Beard 2012-12-20 16:43:33 CET
Created attachment 3262 [details]
Output of another gdb run -- May Be Useful

Creating a handler for a mass storage device and finding an existing uuid config for ID "1" is followed by a segfault crash.  

0x00007ffff51d08e9 in QObject::~QObject() () from /lib64/libQtCore.so.4

Telling gdb "thread apply all bt" resulted in the backtraces below the above.

This is all under GNOME started as startx startgnomeclassic.

I tried the KDE4 desktop earlier this morning, and amarok is working under KDE4.
Perhaps amarok is not playing nicely with gnome?
Comment 45 Jim Beard 2012-12-20 19:58:28 CET
Seg-fault is occurring with amarok running under KDE4.  

Select collection, and an album or song, go to properties, make a change to the Tags (e.g. delete title and artist for the song and re-enter).  When you click save, amarok seg-faults.

Included under this bug as all seem to be database related.
Comment 46 AL13N 2012-12-20 23:04:06 CET
just wanted to note that editing title and artist and stuff is not something that goes in a database, but it is edited in the file itself as ID3 tags...

just to ask, did the amarok maintainer already recompile this with libmysqld as dynamic and not static?
Comment 47 Jim Beard 2012-12-21 02:51:17 CET
The rpm package installed on my machine is amarok-2.6.90-1.mga3.  An ls -l /usr/bin/amarok shows a creation date of 14 December, which I take to be the date amarok was compiled.
Comment 48 AL13N 2012-12-21 07:26:02 CET
can you do an ldd of /usr/bin/amarok ? libmysqld.so should be in there. failing that, do an strace /usr/bin/amarok and start playing. there should be a libmysqld.so in there too...
Comment 49 AL13N 2012-12-21 07:29:29 CET
CC'ing Funda Wang, the last packager of amarok:

Can you tell us if libmysqld is linked dynamically? apparently, according to #mariadb people, they told me that amarok had specifically requested to have a shared library for libmysqld.

so, perhaps that needs to be done.
Comment 50 Jim Beard 2012-12-21 16:24:58 CET
(In reply to comment #48)
> can you do an ldd of /usr/bin/amarok ? libmysqld.so should be in there. failing
> that, do an strace /usr/bin/amarok and start playing. there should be a
> libmysqld.so in there too...

Neither showed a libmysqld.so.  The strace terminates after output of 1826 lines (under Gnome, Amarok crashing) or 1509 lines (under KDE4, Amarok continues on for a good while with a blank main window but eventually displays aproper window and starts playing -- long after strace terminated).

There is a libmysqld.so in /usr/lib64:

[root@jdb lib64]# ls -l libmysqld.so*
lrwxrwxrwx 1 root root       18 Dec 19 07:01 libmysqld.so.0 -> libmysqld.so.0.0.1*
-rwxr-xr-x 2 root root 14258968 Nov 29 16:52 libmysqld.so.0.0.1*
-rwxr-xr-x 2 root root 14258968 Nov 29 16:52 libmysqld.so.18*
Comment 51 AL13N 2012-12-21 20:14:44 CET
as i thought, it's not fixed yet... i guess we wait...
Comment 52 Luc Menut 2012-12-21 22:10:44 CET
Created attachment 3274 [details]
strace -e trace=open /usr/bin/amarok --nofork

humm... AFAIK, amarok already uses the shared library.
strace -e trace=open /usr/bin/amarok --nofork 2>&1 |grep libmysqld.so
open("/lib64/libmysqld.so.18", O_RDONLY|O_CLOEXEC) = 17
Comment 53 AL13N 2012-12-21 23:05:47 CET
so you have a different build?
Comment 54 Luc Menut 2012-12-21 23:12:19 CET
(In reply to comment #53)
> so you have a different build?

nope, but you need to use --nofork in order to see all the call.

rpm -qi amarok-2.6.90-1.mga3
Name        : amarok
Epoch       : 3
Version     : 2.6.90
Release     : 1.mga3
Architecture: x86_64
Install Date: ven. 14 déc. 2012 20:53:07 CET
Group       : Sound/Players
Size        : 21458152
License     : GPLv2 and LGPLv2 and GFDL
Signature   : RSA/SHA1, ven. 14 déc. 2012 18:28:17 CET, Key ID b742fa8b80420f66
Source RPM  : amarok-2.6.90-1.mga3.src.rpm
Build Date  : ven. 14 déc. 2012 18:23:09 CET
Build Host  : ecosse.mageia.org
Relocations : (not relocatable)
Packager    : fwang <fwang>
Vendor      : Mageia.Org
URL         : http://amarok.kde.org/
Summary     : A powerful media player for KDE4

Hardware: x86_64 => All

Comment 55 AL13N 2012-12-22 00:40:05 CET
doesn't strace -f show you the children too?

does it even have a problem if you're using it with --no-fork ?
Comment 56 Luc Menut 2012-12-22 00:50:43 CET
(In reply to comment #55)
> doesn't strace -f show you the children too?

Yes
strace -f -e trace=open /usr/bin/amarok 2>&1 |grep libmysqld.so
[pid 25474] open("/lib64/libmysqld.so.18", O_RDONLY|O_CLOEXEC) = 17

> 
> does it even have a problem if you're using it with --no-fork ?

Yes, same crash.
Comment 57 Curtis Hildebrand 2013-01-04 21:29:06 CET
Created attachment 3315 [details]
Latest backtrace.  Crash during media scan

Hey.  It worked!
Something changed with the latest Cauldron updates.  After not trying to start Amarok for a long time, it started from the cmd line! This was without clearing the .kde/share Amarok folders where it always previously crashed.  

But... it crashed 10sec later when the Media Scanner automatically started. I had not touched anything.

The debug output ended with:
amarok: BEGIN: void ScanManager::checkForDirectoryChanges() 
amarok:   BEGIN: virtual void ScanManager::requestIncrementalScan(const QString&) 
amarok:     [ScanManager] addDirToList for "" 
amarok:   END__: virtual void ScanManager::requestIncrementalScan(const QString&) [Took: 0s] 
amarok:   BEGIN: virtual void ScannerJob::run() 
amarok:     BEGIN: DirWatchJob::DirWatchJob(QObject*, Collections::DatabaseCollection*) 
amarok:     END__: DirWatchJob::DirWatchJob(QObject*, Collections::DatabaseCollection*) [Took: 0s] 
amarok:   END__: void ScanManager::checkForDirectoryChanges() [Took: 0s] 
amarok:   BEGIN: virtual void DirWatchJob::run() 
amarok:   END__: virtual void DirWatchJob::run() [Took: 1.2s] 
amarok:   [ScanManager] ScannerJob: got count: 1353 
amarok:   BEGIN: virtual void SqlScanResultProcessor::commit() 
amarok:     BEGIN: void SqlScanResultProcessor::urlsCacheInit() 
amarok:     END__: void SqlScanResultProcessor::urlsCacheInit() [Took: 0.088s] 
amarok:     [SqlRegistry] SqlRegistry::getDirectory new Directory "/home/curtis/Music/...
[BIG SNIP..]
amarok:     BEGIN: virtual void SqlScanResultProcessor::deleteDeletedDirectories() 
QThread: Destroyed while thread is still running
KCrash: Application 'amarok' crashing...
KCrash: Attempting to start /usr/lib64/kde4/libexec/drkonqi from kdeinit
sock_file=/home/curtis/.kde4/socket-Parkes/kdeinit4__0
QSocketNotifier: Invalid socket 43 and type 'Read', disabling...
QSocketNotifier: Invalid socket 8 and type 'Read', disabling...
QSocketNotifier: Invalid socket 42 and type 'Read', disabling...
QSocketNotifier: Invalid socket 45 and type 'Read', disabling...
QSocketNotifier: Invalid socket 61 and type 'Read', disabling...
QSocketNotifier: Invalid socket 71 and type 'Read', disabling...
QSocketNotifier: Invalid socket 74 and type 'Read', disabling...
QSocketNotifier: Invalid socket 82 and type 'Read', disabling...
amarok: Fatal IO error: client killed
Assertion 'pa_close(fds[0]) == 0' failed at pulsecore/core-util.c:2459, function pa_close_pipe(). Aborting.
Unable to start Dr. Konqi
Comment 58 Curtis Hildebrand 2013-01-05 00:46:39 CET
Back to crashing regularly at MassStorageDeviceHandler.

Last output of --debug --nofork:
amarok:         [PluginManager] created factory for plugin "amarok_collection-umscollection" type: "Collection" 
amarok:         [PluginManager] created factory for plugin "amarok_collection-ipodcollection" type: "Collection" 
amarok:         BEGIN: void CollectionManager::init(const QList<Plugins::PluginFactory*>&) 
amarok:           BEGIN: void CollectionManager::loadPlugins(const QList<Collections::CollectionFactory*>&) 
amarok:             [CollectionManager] initializing "amarok_collection-mysqlecollection" 
amarok:             [MySqlStorage] Connected to MySQL server 5.5.28-MariaDB-embedded 
amarok:             Connected to MySQL server 5.5.28-MariaDB-embedded 
amarok:             [MySqlStorage] Initialized thread, count== 1 
amarok:             BEGIN: SqlRegistry::SqlRegistry(Collections::SqlCollection*) 
amarok:             END__: SqlRegistry::SqlRegistry(Collections::SqlCollection*) [Took: 0.064s] 
amarok:             BEGIN: MountPointManager::MountPointManager(QObject*, SqlStorage*) 
amarok:               BEGIN: MediaDeviceCache::MediaDeviceCache() 
amarok:               END__: MediaDeviceCache::MediaDeviceCache() [Took: 0.003s] 
amarok:               BEGIN: void MountPointManager::createDeviceFactories() 
amarok:                 [MountPointManager] Initializing DeviceHandlerFactory of type: "uuid" 
Creating backend for device "/org/freedesktop/UDisks2/block_devices/loop6" 
"/org/freedesktop/UDisks2/block_devices/loop6" has interfaces: ("org.freedesktop.UDisks2.Loop", "org.freedesktop.UDisks2.Block") 
Creating backend for device "/org/freedesktop/UDisks2/block_devices/loop4" 
"/org/freedesktop/UDisks2/block_devices/loop4" has interfaces: ("org.freedesktop.UDisks2.Loop", "org.freedesktop.UDisks2.Block")
<SNIP>
amarok:                 BEGIN: void MountPointManager::createHandlerFromDevice(const Solid::Device&, const QString&) 
amarok:                   [MountPointManager] Device added and mounted, checking handlers 
amarok:                   BEGIN: virtual bool MassStorageDeviceHandlerFactory::canHandle(const Solid::Device&) const 
amarok:                   END__: virtual bool MassStorageDeviceHandlerFactory::canHandle(const Solid::Device&) const [Took: 0s] 
amarok:                   [MountPointManager] found handler for  "/org/freedesktop/UDisks2/block_devices/sda5" 
amarok:                   BEGIN: virtual DeviceHandler* MassStorageDeviceHandlerFactory::createHandler(const Solid::Device&, const QString&, SqlStorage*) const 
amarok:                     [MassStorageDeviceHandler] Found existing UUID config for ID  "9"  , uuid  "a7dfe261-a294-48e2-b34e-6884d2da446c" 
KCrash: Application 'amarok' crashing...
Comment 59 AL13N 2013-01-05 01:46:18 CET
it seems my ideas had lead to a dead end... so, backtracking

what do we know:
 - there is a segfault in amarok in one of the threads
 - it seems it doesn't segfault when using Oracle libmysqld
 - looking at the segfault, it seems to happen in a thread related to destroying an internal structure inside Qt
 - moreover, other threads are sleeping, but one of those threads is a thread that seems to be with regards to mysql and it's being in a wait for a LOCK. (unsure here)
 - there are no segfaults in mariadb itself and no logs or anything that could tell something
 - it seems to be related to media scanning
 - amarok devs tell us some people use mariadb without issues
 - amarok devs are not willing to help due to this being distro related only (to this distro).



1. Can anyone try reproducing this with an older mariadb version? (like a rebuild of the mga2 version)? (or even perhaps a mga2 amarok with a rebuild of the new mariadb version) perhaps we can narrow it down like this.

2. what we really need is in-depth help of amarok devs, even if it would be mariadb's fault, it's embedded and we don't really know what is going on with these threads. why is the internal structure being destroyed? is this normal or not? what would the exact cause be of this segfault or internal structure?

we just have too many questions on this issue...
Comment 60 Curtis Hildebrand 2013-01-09 08:26:05 CET
Now it works all the time for me. Seriously.

I cleared out my .kde4 amarok folders and configs.  Scanned a smaller collection.  Played a song.  Quit and restarted.  Edited some more settings.  Quit and restarted.  Scanned my whole collection.  Played some more songs. Quit and restarted.  Anyone else?
Comment 61 Jim Beard 2013-01-09 15:25:30 CET
Update amarok-2.6.90-2.mga3 installed late last night.
This morning, rm -rf $HOME/.kde4/share/apps/amarok, then configured, replaced playlist with my entire collection (3,558 songs).

All is working well.

Cheers!

jim beard
Comment 62 Nikita Krupenko 2013-01-18 23:17:30 CET
While installed from repo 2.6.90 crashing, built from sources Amarok 2.7 works! Without removing $HOME/.kde4.
Comment 63 AL13N 2013-01-18 23:38:22 CET
your 100% certain?

how did you build it? (what options?)
Comment 64 AL13N 2013-01-18 23:39:38 CET
well, i'm not sure, but it sounds like all the problems have disappeared... perhaps updates did the trick.
Comment 65 Nikita Krupenko 2013-01-19 11:03:29 CET
(In reply to comment #63)
> your 100% certain?
> 
> how did you build it? (what options?)

I'm sure, I removed 2.7, installed from repo 2.6.90 - it crashes. Then removed, installed again 2.7 - all works fine. My collection with ~30k songs available with all history.

Options are the following:
-DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` -DKDE4_BUILD_TESTS=NO

Test need to be disabled because of absence in Mageia gmock.
Comment 66 Nikita Krupenko 2013-01-19 11:30:34 CET
Just checked compiled from source 2.6.90 - it is also crashing.
Comment 67 AL13N 2013-01-19 15:36:07 CET
i heard 2.7 was coming soon-ish on mga3, so that might solve the problem
Comment 68 Manuel Hiebel 2013-01-23 20:10:57 CET
(In reply to comment #67)
> i heard 2.7 was coming soon-ish on mga3, so that might solve the problem

which was pushed, so is this issue resolved for everyone ?

Source RPM: mariadb => amarok

Comment 69 claire robinson 2013-01-23 21:02:29 CET
amarok seems fine in 3beta2
Comment 70 Shlomi Fish 2013-01-23 21:53:28 CET
amarok-2.7.0-1.mga3 seems fine on Cauldron. I restarted it and it played every file I threw at it without crashing, and everything seems fine. I say close as RESOLVED / FIXED .

Regards,

-- Shlomi Fish
Comment 71 Manuel Hiebel 2013-01-23 21:58:12 CET
ok, thanks all

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.