Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 671826 - net-im/swift-4.0.2 - swift: MNG error 11: Function is invalid at this point; chunk IHDR; subcode 0:0
Summary: net-im/swift-4.0.2 - swift: MNG error 11: Function is invalid at this point; ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Conrad Kostecki
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2018-11-24 23:02 UTC by Martin Samek
Modified: 2018-11-27 19:20 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Output of the strace (log.out.gz,55.11 KB, application/gzip)
2018-11-25 15:24 UTC, Martin Samek
Details
cdd33515142958017563d83b756df0ca31b023a7.patch (cdd33515142958017563d83b756df0ca31b023a7.patch,874 bytes, patch)
2018-11-25 21:10 UTC, Conrad Kostecki
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Samek 2018-11-24 23:02:50 UTC
Sadly application crashes instantly after start with:

[warning] Swiften/TLS/OpenSSL/OpenSSLContextFactory.cpp:31 setDisconnectOnCardRemoval: Smart cards not supported for OpenSSL
QLayout: Attempting to add QLayout "" to Swift::QtDynamicGridLayout "", which already has a layout
[warning] Swift/Controllers/Highlighting/HighlightManager.cpp:88 highlightConfigurationFromString: Failed to load highlight configuration. Will use default configuration instead.
MNG error 11: Function is invalid at this point; chunk IHDR; subcode 0:0
terminate called without an active exception
KCrash: Application 'swift-im' crashing...
KCrash: Attempting to start /usr/lib64/libexec/drkonqi from kdeinit
sock_file=/run/user/1009/kdeinit5__0
QSocketNotifier: Invalid socket 8 and type 'Read', disabling...
QSocketNotifier: Invalid socket 16 and type 'Read', disabling...
QSocketNotifier: Invalid socket 15 and type 'Read', disabling...


build with: USE="client icu idn spell -expat -gconf -lua -test -zeroconf"
Comment 1 Conrad Kostecki gentoo-dev 2018-11-25 14:57:48 UTC
Could you run it with strace for additional information?
I can't reproduce here.

If I have to guess, there is some png file, which causes the crash.
Comment 2 Martin Samek 2018-11-25 15:24:43 UTC
Created attachment 556240 [details]
Output of the strace
Comment 3 Martin Samek 2018-11-25 15:27:48 UTC
To be more specific. Application crashes when I hit the login button. There is no difference if correct or incorrect password provided.
Comment 4 Conrad Kostecki gentoo-dev 2018-11-25 19:21:25 UTC
(In reply to Martin Samek from comment #3)
> To be more specific. Application crashes when I hit the login button. There
> is no difference if correct or incorrect password provided.

Does it crash with a different server/login?
Could you try a test with "LC_ALL=C swift-im"?

Looking through old bug reports, it could be something in this direction:
https://github.com/swift/swift/issues/14
It's not the same problem, but the mng error could be meaning something different here.

(In reply to Martin Samek from comment #2)
> Created attachment 556240 [details]
> Output of the strace

I am not an expert here, but for the first look, I don't anything special.
At least, some "<response xmlns=" seems to come in before it crashes.

@Andrey: Any further ideas? Can you reproduce?
Comment 5 Martin Samek 2018-11-25 19:58:06 UTC
LC_ALL doesn't help. Different server or login doesn't help either.
Comment 6 Conrad Kostecki gentoo-dev 2018-11-25 21:10:04 UTC
Thanks for the tests.

I've spoken to upstream, they asked, to try the attached patch. It applies cleanly to 4.0.2, so put it into /etc/portage/patches/net-im/swift and you should see it being applied during emerge.

They have the suspicion, this could be related, when having no bookmarks aka empty list of muc rooms.

Could you test?
Comment 7 Conrad Kostecki gentoo-dev 2018-11-25 21:10:17 UTC
Created attachment 556264 [details, diff]
cdd33515142958017563d83b756df0ca31b023a7.patch
Comment 8 Martin Samek 2018-11-26 07:56:39 UTC
Patch applied, but still crashing.

QSocketNotifier: Invalid socket 8 and type 'Read', disabling...
QSocketNotifier: Invalid socket 16 and type 'Read', disabling...
QSocketNotifier: Invalid socket 15 and type 'Read', disabling...
Comment 9 Conrad Kostecki gentoo-dev 2018-11-26 09:04:44 UTC
(In reply to Martin Samek from comment #8)
> Patch applied, but still crashing.
> 
> QSocketNotifier: Invalid socket 8 and type 'Read', disabling...
> QSocketNotifier: Invalid socket 16 and type 'Read', disabling...
> QSocketNotifier: Invalid socket 15 and type 'Read', disabling...

Thanks for testing. Is this the only output? Because looking at your first output, this seems to be more from the KDE crash daemon than swift-im?

I've talked further to upstream. The would like to have a backtrace for further investigation.

For that, you need to emerge gdb. I think, you need at least the client use flag for gdb.

First, run "gdb /path/to/swift-im".
You should be now in an interactive prompt, so type "run", to start swift-im.
When the crash ouccurs, you should be back at the interactive prompt. Now type "bt", to get the backtrace.
Comment 10 Martin Samek 2018-11-26 20:21:53 UTC
hope it will help. May be my build is missing debug symbols.

#0  0x00007ffff538576b in raise () from /lib64/libc.so.6
#1  0x00007ffff5386fb1 in abort () from /lib64/libc.so.6
#2  0x00007ffff5a3d0a5 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/libstdc++.so.6
#3  0x00007ffff5a3ac76 in ?? () from /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/libstdc++.so.6
#4  0x00007ffff5a3acc1 in std::terminate() () from /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/libstdc++.so.6
#5  0x00007ffff7496187 in Swift::SQLiteHistoryStorage::~SQLiteHistoryStorage() () from /usr/lib64/libSwiften.so.4
#6  0x00007ffff7496199 in Swift::SQLiteHistoryStorage::~SQLiteHistoryStorage() () from /usr/lib64/libSwiften.so.4
#7  0x00005555558f916d in ?? ()
#8  0x00005555558f9189 in ?? ()
#9  0x000055555588ba98 in ?? ()
#10 0x0000555555893408 in ?? ()
#11 0x00007ffff708c1ff in boost::signals2::detail::signal_impl<void (boost::optional<Swift::ClientError> const&), boost::signals2::optional_last_value<void>, int, std::less<int>, boost::function<void (boost::optional<Swift::ClientError> const&)>, boost::function<void (boost::signals2::connection const&, boost::optional<Swift::ClientError> const&)>, boost::signals2::mutex>::operator()(boost::optional<Swift::ClientError> const&) () from /usr/lib64/libSwiften.so.4
#12 0x00007ffff707e6b7 in Swift::CoreClient::handleSessionFinished(std::shared_ptr<Swift::Error>) () from /usr/lib64/libSwiften.so.4
#13 0x00007ffff7081ce8 in boost::detail::function::void_function_obj_invoker1<boost::_bi::bind_t<void, boost::_mfi::mf1<void, Swift::CoreClient, std::shared_ptr<Swift::Error> >, boost::_bi::list2<boost::_bi::value<Swift::CoreClient*>, boost::arg<1> > >, void, std::shared_ptr<Swift::Error> >::invoke(boost::detail::function::function_buffer&, std::shared_ptr<Swift::Error>) () from /usr/lib64/libSwiften.so.4
#14 0x00007ffff70a6df4 in boost::signals2::detail::signal_impl<void (std::shared_ptr<Swift::Error>), boost::signals2::optional_last_value<void>, int, std::less<int>, boost::function<void (std::shared_ptr<Swift::Error>)>, boost::function<void (boost::signals2::connection const&, std::shared_ptr<Swift::Error>)>, boost::signals2::mutex>::operator()(std::shared_ptr<Swift::Error>) () from /usr/lib64/libSwiften.so.4
#15 0x00007ffff7097df2 in Swift::ClientSession::handleStreamClosed(std::shared_ptr<Swift::Error>) () from /usr/lib64/libSwiften.so.4
#16 0x00007ffff709d197 in boost::detail::function::void_function_obj_invoker1<boost::_bi::bind_t<void, boost::_mfi::mf1<void, Swift::ClientSession, std::shared_ptr<Swift::Error> >, boost::_bi::list2<boost::_bi::value<std::shared_ptr<Swift::ClientSession> >, boost::arg<1> > >, void, std::shared_ptr<Swift::Error> >::invoke(boost::detail::function::function_buffer&, std::shared_ptr<Swift::Error>) ()
   from /usr/lib64/libSwiften.so.4
#17 0x00007ffff70a6df4 in boost::signals2::detail::signal_impl<void (std::shared_ptr<Swift::Error>), boost::signals2::optional_last_value<void>, int, std::less<int>, boost::function<void (std::shared_ptr<Swift::Error>)>, boost::function<void (boost::signals2::connection const&, std::shared_ptr<Swift::Error>)>, boost::signals2::mutex>::operator()(std::shared_ptr<Swift::Error>) () from /usr/lib64/libSwiften.so.4
#18 0x00007ffff71d68a4 in boost::signals2::signal<void (std::shared_ptr<Swift::Error>), boost::signals2::optional_last_value<void>, int, std::less<int>, boost::function<void (std::shared_ptr<Swift::Error>)>, boost::function<void (boost::signals2::connection const&, std::shared_ptr<Swift::Error>)>, boost::signals2::mutex>::operator()(std::shared_ptr<Swift::Error>) () from /usr/lib64/libSwiften.so.4
#19 0x00007ffff71d083f in Swift::BasicSessionStream::handleConnectionFinished(boost::optional<Swift::Connection::Error> const&) () from /usr/lib64/libSwiften.so.4
#20 0x00007ffff738940f in boost::signals2::detail::signal_impl<void (boost::optional<Swift::Connection::Error> const&), boost::signals2::optional_last_value<void>, int, std::less<int>, boost::function<void (boost::optional<Swift::Connection::Error> const&)>, boost::function<void (boost::signals2::connection const&, boost::optional<Swift::Connection::Error> const&)>, boost::signals2::mutex>::operator()(boost::optional<Swift::Connection::Error> const&) () from /usr/lib64/libSwiften.so.4
#21 0x00007ffff739910e in boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<boost::_bi::unspecified, boost::reference_wrapper<boost::signals2::signal<void (boost::optional<Swift::Connection::Error> const&), boost::signals2::optional_last_value<void>, int, std::less<int>, boost::function<void (boost::optional<Swift::Connection::Error> const&)>, boost::function<void (boost::signals2::connection const&, boost::optional<Swift::Connection::Error> const&)>, boost::signals2::mutex> >, boost::_bi::list1<boost::_bi::value<Swift::Connection::Error> > >, void>::invoke(boost::detail::function::function_buffer&) ()
---Type <return> to continue, or q <return> to quit---
   from /usr/lib64/libSwiften.so.4
#22 0x00007ffff729a538 in Swift::invokeCallback(Swift::Event const&) () from /usr/lib64/libSwiften.so.4
#23 0x00007ffff7299ef8 in Swift::EventLoop::handleNextEvents() () from /usr/lib64/libSwiften.so.4
#24 0x0000555555722690 in ?? ()
#25 0x00007ffff0fb7d8c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#26 0x00007ffff0fbf34f in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#27 0x00007ffff4ed9817 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#28 0x00007ffff4edc671 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib64/libQt5Core.so.5
#29 0x00007ffff4f2c813 in ?? () from /usr/lib64/libQt5Core.so.5
#30 0x00007fffec987517 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#31 0x00007fffec987780 in ?? () from /usr/lib64/libglib-2.0.so.0
#32 0x00007fffec98782c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#33 0x00007ffff4f2c5ff in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#34 0x00007fffdfc95731 in ?? () from /usr/lib64/libQt5XcbQpa.so.5
#35 0x00007ffff4ed860a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#36 0x00007ffff4ee0ff0 in QCoreApplication::exec() () from /usr/lib64/libQt5Core.so.5
#37 0x00005555556b440a in main ()
Comment 11 Conrad Kostecki gentoo-dev 2018-11-26 21:30:55 UTC
I've talked with upstream. Next suggestion is to disable experimental support.

Since this is always enabled, I would like to ask you, to disable it, test and if it crashed, capture again a new back trace.

You can change it this way for a quick test:

cd /usr/portage/net-im/swift
nano swift-4.0.2.ebuild

Locate experimental="yes" and experimental_ft="yes" and change both to "no".

Run "ebuild swift-4.0.2.ebuild digest" and re-emerge swift for a new test.
Comment 12 Martin Samek 2018-11-26 22:24:33 UTC
yes, this did the trick.
Comment 13 Conrad Kostecki gentoo-dev 2018-11-26 22:32:40 UTC
Nice.
Could you also run a test with experimental="no" and experimental_ft="yes"?
Comment 14 Martin Samek 2018-11-27 08:53:17 UTC
Runs stable also.
Comment 15 Conrad Kostecki gentoo-dev 2018-11-27 18:57:04 UTC
Thank you very much for testing. Will fill a PR for fix.
Comment 16 Larry the Git Cow gentoo-dev 2018-11-27 19:20:16 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6deb11e4f07463dd58a521697b395e5ad5ce2e54

commit 6deb11e4f07463dd58a521697b395e5ad5ce2e54
Author:     Conrad Kostecki <conrad@kostecki.com>
AuthorDate: 2018-11-27 19:03:12 +0000
Commit:     Andrey Utkin <andrey_utkin@gentoo.org>
CommitDate: 2018-11-27 19:17:30 +0000

    net-im/swift: disable experimental option
    
    For some users, net-im/swift crashes directly, when experimental is
    active. According to upstream, this should be anyway disabled.
    But experimental_ft stays enabled, since according to upstream, it is
    considered stable, they have only forgotten to remove experimental from
    it's name. Besides, it's needed for net-im/spectrum2.
    
    Many thanks for testing goes to Martin Samek <mr@vmsc.eu>
    
    Closes: https://bugs.gentoo.org/671826
    Package-Manager: Portage-2.3.52, Repoman-2.3.12
    Signed-off-by: Conrad Kostecki <conrad@kostecki.com>
    Signed-off-by: Andrey Utkin <andrey_utkin@gentoo.org>

 net-im/swift/swift-4.0.2-r1.ebuild | 207 +++++++++++++++++++++++++++++++++++++
 1 file changed, 207 insertions(+)