Version: SVN trunk (KDE 4) (using Devel) OS: Linux Invoking kmail, the kmail-migrator starts and tells me "Migration successfully completed" but I get the following on the console - and no kmail running at all: $ kmail kmail2(5232): Akonadi migration failed! kmail2(5232): command was: ("/usr/bin/kmail-migrator", "--interactive-on-change") kmail2(5232): exit code: 3 kmail2(5232): stdout: "" kmail2(5232): stderr: "" kde(5231): Communication problem with "kmail2" , it probably crashed. Error message was: "org.freedesktop.DBus.Error.ServiceUnknown" : " "The name org.kde.kmail2 was not provided by any .service files" " Reproducible: Always Steps to Reproduce: Just start kmail Contenst of ~/.kde4/share/config/kmail-migratorrc: [Bridged] LocalFoldersResources= imapResources= [MessageTags] MigratedTags=MessageTag #0,MessageTag #1,MessageTag #2 [Resource 1643684851] MigrationState=Complete ResourceIdentifier=akonadi_imap_resource_1 [Resource LocalFolders] MigrationState=Complete ResourceIdentifier=akonadi_mixedmaildir_resource_0
~/.kde4/share/config/kmail2rc contains: [$Version] update_info=kmail.upd:1,kmail.upd:4,kmail.upd:5,kmail.upd:6,kmail.upd:7,kmail.upd:8,kmail.upd:9,kmail.upd:3.1-update-identities,kmail.upd:3.1-use-identity-uoids,kmail.upd:3.2-update-loop-on-goto-unread-settings,kmail.upd:3.1.4-dont-use-UOID-0-for-any-identity,kmail.upd:3.2-misc,kmail.upd:3.2-moves,kmail.upd:3.3-use-ID-for-accounts,kmail.upd:3.3-update-filter-rules,kmail.upd:3.3-misc,kmail.upd:3.3b1-misc,kmail.upd:3.4,kmail.upd:3.4a,kmail.upd:3.4b,kmail.upd:3.4.1,kmail.upd:3.5.4,kmail.upd:3.5.7-imap-flag-migration,kmail.upd:4.0-misc,kmail.upd:4.2
Created attachment 53731 [details] Patch that adds some debug statements for further debugging
I started kmail-migrator remotely and get the following output with the patch from Tobias. The return code is still 3 - but there no error shown. $ /usr/bin/kmail-migrator --interactive-on-change kmail-migrator(18351)/libakonadi Akonadi::AgentManagerPrivate::createDBusInterface: AgentManager failed to get a valid AgentManager DBus interface. Error is: 1 "org.freedesktop.DBus.Error.NameHasNoOwner" "Could not get owner of name 'org.freedesktop.Akonadi.Control': no such name" Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString) search paths: ("/suse/aj/bin", "/suse/aj/bin", "/suse/aj/bin", "/usr/local/bin", "/usr/bin", "/bin", "/usr/bin/X11", "/usr/X11R6/bin", "/usr/games", "/opt/kde3/bin", "/usr/lib64/jvm/jre/bin", "/usr/sbin", "/usr/local/sbin", "/usr/local/libexec", "/usr/libexec", "/opt/mysql/libexec", "/opt/local/lib/mysql5/bin", "/opt/mysql/sbin") Found mysql_install_db: "/usr/bin/mysql_install_db" Found mysqlcheck: "/usr/bin/mysqlcheck" QSqlDatabasePrivate::removeDatabase: connection 'initConnection' is still in use, all queries will cease to work. Database "akonadi" opened using driver "QMYSQL" DbInitializer::run() checking table "SchemaVersionTable" checking table "ResourceTable" checking table "CollectionTable" checking table "MimeTypeTable" checking table "PimItemTable" checking table "FlagTable" checking table "PartTable" checking table "CollectionAttributeTable" checking relation "PimItemFlagRelation" checking relation "CollectionMimeTypeRelation" checking relation "CollectionPimItemRelation" DbInitializer::run() done skipping update 2 skipping update 3 skipping update 4 skipping update 8 skipping update 10 skipping update 12 skipping update 13 skipping update 14 skipping update 15 skipping update 16 skipping update 17 skipping update 18 skipping update 19 Nepomuk Query Server not available DataStore::unhideAllPimItems() Database "akonadi" opened using driver "QMYSQL" Database "akonadi" opened using driver "QMYSQL" PLUGINS: "/usr/share/akonadi/agents" PLUGINS: ("akonotesresource.desktop", "birthdaysresource.desktop", "calendarsearchagent.desktop", "contactsresource.desktop", "davgroupwareresource.desktop", "icalresource.desktop", "imapresource.desktop", "invitationsagent.desktop", "kabcresource.desktop", "kcalresource.desktop", "kdeaccountsresource.desktop", "kolabproxyresource.desktop", "localbookmarksresource.desktop", "maildirresource.desktop", "maildispatcheragent.desktop", "mboxresource.desktop", "microblog.desktop", "mixedmaildirresource.desktop", "mtdummyresource.desktop", "nepomukcalendarfeeder.desktop", "nepomukcontactfeeder.desktop", "nepomukemailfeeder.desktop", "nepomuktagresource.desktop", "nntpresource.desktop", "notesresource.desktop", "openxchangeresource.desktop", "pop3resource.desktop", "strigifeeder.desktop", "vcarddirresource.desktop", "vcardresource.desktop") search paths: ("/suse/aj/bin", "/suse/aj/bin", "/suse/aj/bin", "/usr/local/bin", "/usr/bin", "/bin", "/usr/bin/X11", "/usr/X11R6/bin", "/usr/games", "/opt/kde3/bin", "/usr/lib64/jvm/jre/bin") PLUGINS inserting: "akonadi_akonotes_resource" 2 ("Resource", "Notes") PLUGINS inserting: "akonadi_birthdays_resource" 0 ("Resource", "Unique") PLUGINS inserting: "akonadi_calendarsearch_agent" 0 ("Unique", "NoConfig") PLUGINS inserting: "akonadi_contacts_resource" 1 ("Resource") PLUGINS inserting: "akonadi_davgroupware_resource" 0 ("Resource") PLUGINS inserting: "akonadi_ical_resource" 0 ("Resource") PLUGINS inserting: "akonadi_imap_resource" 2 ("Resource") PLUGINS inserting: "akonadi_invitations_agent" 0 ("NoConfig") PLUGINS inserting: "akonadi_kabc_resource" 6 ("Resource") PLUGINS inserting: "akonadi_kcal_resource" 1 ("Resource") PLUGINS inserting: "akonadi_kdeaccounts_resource" 0 ("Resource") PLUGINS inserting: "akonadi_kolabproxy_resource" 0 ("Resource", "Unique") PLUGINS inserting: "akonadi_localbookmarks_resource" 0 ("Resource") PLUGINS inserting: "akonadi_maildir_resource" 3 ("Resource") PLUGINS inserting: "akonadi_maildispatcher_agent" 0 ("Unique", "Autostart", "NoConfig") PLUGINS inserting: "akonadi_mbox_resource" 0 ("Resource") PLUGINS inserting: "akonadi_microblog_resource" 0 ("Resource") PLUGINS inserting: "akonadi_mixedmaildir_resource" 1 ("Resource") PLUGINS inserting: "akonadi_mailtransport_dummy_resource" 0 ("Resource", "MailTransport") PLUGINS inserting: "akonadi_nepomuk_calendar_feeder" 0 ("Unique", "Autostart", "NoConfig") PLUGINS inserting: "akonadi_nepomuk_contact_feeder" 0 ("Unique", "Autostart", "NoConfig") PLUGINS inserting: "akonadi_nepomuk_email_feeder" 0 ("Unique", "Search", "Autostart") PLUGINS inserting: "akonadi_nepomuktag_resource" 0 ("Resource", "Virtual", "Unique", "NoConfig") PLUGINS inserting: "akonadi_nntp_resource" 0 ("Resource") PLUGINS inserting: "akonadi_notes_resource" 0 ("Resource") PLUGINS inserting: "akonadi_openxchange_resource" 0 ("Resource") PLUGINS inserting: "akonadi_pop3_resource" 0 ("Resource") PLUGINS inserting: "akonadi_strigi_feeder" 0 ("Unique") PLUGINS inserting: "akonadi_vcarddir_resource" 0 ("Resource") PLUGINS inserting: "akonadi_vcard_resource" 0 ("Resource") AgentServer not up (yet?) AgentServer not up (yet?) AgentServer not up (yet?) Akonadi server is now operational. Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString) tokoe: InfoDialog::message(2) tokoe: InfoDialog::message: mError=0 tokoe: InfoDialog::message(1) tokoe: InfoDialog::message: mError=0 tokoe: InfoDialog::message(1) tokoe: InfoDialog::message: mError=0 tokoe: InfoDialog::message(0) tokoe: InfoDialog::message: mError=0 Database "akonadi" opened using driver "QMYSQL" Database "akonadi" opened using driver "QMYSQL" Database "akonadi" opened using driver "QMYSQL" Database "akonadi" opened using driver "QMYSQL" Database "akonadi" opened using driver "QMYSQL" Known subscriber "akonadi_maildispatcher_agent" subscribes again Known subscriber "akonadi_maildispatcher_agent" subscribes again Database "akonadi" opened using driver "QMYSQL" Known subscriber "akonadi_birthdays_resource" subscribes again Database "akonadi" opened using driver "QMYSQL" "/usr/bin/akonadi_nepomuk_contact_feeder(18389)" Soprano: "org.freedesktop.DBus.Error.ServiceUnknown - The name org.kde.nepomuk.services.nepomukstorage was not provided by any .service files" "/usr/bin/akonadi_nepomuk_calendar_feeder(18388)" Soprano: "org.freedesktop.DBus.Error.ServiceUnknown - The name org.kde.nepomuk.services.nepomukstorage was not provided by any .service files" "/usr/bin/akonadi_nepomuk_calendar_feeder(18388)" Soprano: "org.freedesktop.DBus.Error.ServiceUnknown - The name org.kde.nepomuk.services.nepomukstorage was not provided by any .service files" "/usr/bin/akonadi_nepomuk_contact_feeder(18389)" Soprano: "org.freedesktop.DBus.Error.ServiceUnknown - The name org.kde.nepomuk.services.nepomukstorage was not provided by any .service files" "/usr/bin/akonadi_nepomuk_calendar_feeder(18388)" Soprano: "org.freedesktop.DBus.Error.ServiceUnknown - The name org.kde.nepomuk.services.nepomukstorage was not provided by any .service files" "/usr/bin/akonadi_nepomuk_contact_feeder(18389)" Soprano: "org.freedesktop.DBus.Error.ServiceUnknown - The name org.kde.nepomuk.services.nepomukstorage was not provided by any .service files" Database "akonadi" opened using driver "QMYSQL" "/usr/bin/akonadi_nepomuk_email_feeder(18390)" Soprano: "org.freedesktop.DBus.Error.ServiceUnknown - The name org.kde.nepomuk.services.nepomukstorage was not provided by any .service files" "/usr/bin/akonadi_nepomuk_email_feeder(18390)" Soprano: "org.freedesktop.DBus.Error.ServiceUnknown - The name org.kde.nepomuk.services.nepomukstorage was not provided by any .service files" "/usr/bin/akonadi_nepomuk_email_feeder(18390)" Soprano: "org.freedesktop.DBus.Error.ServiceUnknown - The name org.kde.nepomuk.services.nepomukstorage was not provided by any .service files" Database "akonadi" opened using driver "QMYSQL" Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString) Database "akonadi" opened using driver "QMYSQL" kbuildsycoca4 running... Database "akonadi" opened using driver "QMYSQL" akonadi_kabc_resource_5(18384)/kio (KDirWatch) KDirWatchPrivate::removeEntry: doesn't know "/suse/aj/.kde4/share/apps/kabc" Database "akonadi" opened using driver "QMYSQL" Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString) QDBusConnection: name 'org.kde.kwalletd' had owner '' but we thought it was ':1.23' Database "akonadi" opened using driver "QMYSQL" kwalletd(18454) KWalletD::setupDialog: Application ' "Akonadi Resource" ' using kwallet without parent window! QSystemTrayIcon::setVisible: No Icon set Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString) tokoe: InfoDialog->hasError()=1
Second invocation: $ /usr/bin/kmail-migrator --interactive-on-change tokoe: InfoDialog::message(2) tokoe: InfoDialog::message: mError=0 tokoe: InfoDialog::message(1) tokoe: InfoDialog::message: mError=0 tokoe: InfoDialog::message(1) tokoe: InfoDialog::message: mError=0 tokoe: InfoDialog::message(0) tokoe: InfoDialog::message: mError=0 tokoe: InfoDialog->hasError()=1 $ echo $? 3 Debugging I see: (gdb) r Starting program: /usr/bin/kmail-migrator --interactive-on-change [Thread debugging using libthread_db enabled] Detaching after fork from child process 18789. Breakpoint 1, InfoDialog::message (this=0x7c07d0, type=KMigratorBase::Info, msg=...) at /usr/src/debug/kdepim-runtime-4.5.80/migration/infodialog.cpp:75 75 in /usr/src/debug/kdepim-runtime-4.5.80/migration/infodialog.cpp (gdb) p mError $3 = false (gdb) c Continuing. tokoe: InfoDialog::message(2) tokoe: InfoDialog::message: mError=0 Breakpoint 1, InfoDialog::message (this=0x7c07d0, type=KMigratorBase::Skip, msg=...) at /usr/src/debug/kdepim-runtime-4.5.80/migration/infodialog.cpp:75 75 in /usr/src/debug/kdepim-runtime-4.5.80/migration/infodialog.cpp (gdb) p mError $4 = false (gdb) c Continuing. tokoe: InfoDialog::message(1) tokoe: InfoDialog::message: mError=0 Breakpoint 1, InfoDialog::message (this=0x7c07d0, type=KMigratorBase::Skip, msg=...) at /usr/src/debug/kdepim-runtime-4.5.80/migration/infodialog.cpp:75 75 in /usr/src/debug/kdepim-runtime-4.5.80/migration/infodialog.cpp (gdb) p mError $5 = false (gdb) c Continuing. tokoe: InfoDialog::message(1) tokoe: InfoDialog::message: mError=0 Breakpoint 1, InfoDialog::message (this=0x7c07d0, type=KMigratorBase::Success, msg=...) at /usr/src/debug/kdepim-runtime-4.5.80/migration/infodialog.cpp:75 75 in /usr/src/debug/kdepim-runtime-4.5.80/migration/infodialog.cpp (gdb) p mError $6 = false (gdb) c Continuing. tokoe: InfoDialog::message(0) tokoe: InfoDialog::message: mError=0 ^C Program received signal SIGINT, Interrupt. 0x00007ffff41ce358 in poll () from /lib64/libc.so.6 (gdb) b InfoDialog::~InfoDialog Breakpoint 2 at 0x448dc0: file /usr/src/debug/kdepim-runtime-4.5.80/migration/infodialog.cpp, line 69. (2 locations) (gdb) c Continuing. Breakpoint 2, InfoDialog::~InfoDialog (this=0x7c07d0, __in_chrg=<value optimized out>) at /usr/src/debug/kdepim-runtime-4.5.80/migration/infodialog.cpp:69 69 in /usr/src/debug/kdepim-runtime-4.5.80/migration/infodialog.cpp (gdb) c Continuing. Breakpoint 2, InfoDialog::~InfoDialog (this=0x7c07d0, __in_chrg=<value optimized out>) at /usr/src/debug/kdepim-runtime-4.5.80/migration/infodialog.cpp:69 69 in /usr/src/debug/kdepim-runtime-4.5.80/migration/infodialog.cpp (gdb) c Continuing. tokoe: InfoDialog->hasError()=1 Do we call InfoDialog after calling the destructor?
I guess I found it: Breakpoint 4, main (argc=2, argv=0x7fffffffdfc8) at /usr/src/debug/kdepim-runtime-4.5.80/migration/kmail/main.cpp:83 83 in /usr/src/debug/kdepim-runtime-4.5.80/migration/kmail/main.cpp (gdb) p infoDialog $8 = (InfoDialog *) 0x7c07d0 (gdb) p *infoDialog $9 = {<KDialog> = {<No data fields>}, static staticMetaObject = {d = {superdata = 0x690840, stringdata = 0x475280 "InfoDialog", data = 0x4753c0, extradata = 0x0}}, mList = 0x7b9c30, mStatusLabel = 0x7bba20, mProgressBar = 0x7b65a0, mMigratorCount = 1, mError = false, mChange = false, mCloseWhenDone = true, mAutoScrollList = true} (gdb) n tokoe: InfoDialog::message(2) tokoe: InfoDialog::message: mError=0 tokoe: InfoDialog::message(1) tokoe: InfoDialog::message: mError=0 tokoe: InfoDialog::message(1) tokoe: InfoDialog::message: mError=0 tokoe: InfoDialog::message(0) tokoe: InfoDialog::message: mError=0 84 in /usr/src/debug/kdepim-runtime-4.5.80/migration/kmail/main.cpp (gdb) p *infoDialog $10 = {<KDialog> = {<No data fields>}, static staticMetaObject = {d = {superdata = 0x690840, stringdata = 0x475280 "InfoDialog", data = 0x4753c0, extradata = 0x0}}, mList = 0x4545454545454545, mStatusLabel = 0x4545454545454545, mProgressBar = 0x4545454545454545, mMigratorCount = 1162167621, mError = 69, mChange = 69, mCloseWhenDone = 69, mAutoScrollList = 69} so, we access in line 84: 82 args->clear(); 83 const int result = app->exec(); 84 if ( infoDialog && infoDialog->hasError() ) 85 return 3; 86 return result; infoDialog but the destructor has been called already
Hej Andreas, thanks for the deeper investigation of this issue. The problem was a deleteLater() call on the dialog when the 'Close' button is clicked. I have removed this call in commit r1200805, so the dialog object should be valid until hasError() is called. Ciao, Tobias
Thanks Tobias, this fixes it indeed!