Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.0.2] [Qt4] [Linux SLE 12] Crashes on startup if configured URL is wrong #4106

Closed
jgleissner opened this issue Nov 10, 2015 · 10 comments
Closed

Comments

@jgleissner
Copy link

owncloud throws a segmentation fault on startup if the configured URL is incorrect (in my case, I forgot the trailing /owncloud), at least on SLE 12 and openSUSE Leap 42.1. It works fine if the URL is correct but it shouldn't crash otherwise, obviously. Let me know if you want a backtrace and/or a coredump.

@guruz
Copy link
Contributor

guruz commented Nov 10, 2015

Why would the URL end up being configured wrong?

We'd want a backtrace including the last log lines, e.g.:

gdb owncloud
r --logfile -

@guruz guruz added this to the 2.1-current milestone Nov 10, 2015
@guruz guruz changed the title owncloud-client 2.0.2 (SLE 12) crashes on startup if configured URL is wrong [2.0.2] [Linux SLE 12] Crashes on startup if configured URL is wrong Nov 10, 2015
@jgleissner
Copy link
Author

It was a manually created config file, which was used to create an image to be deployed on multiple machines. This way it ended up with the typo. Admittedly not owncloud's fault, but I figured I report the segfault anyway. Here's the backtrace:
GNU gdb (GDB; %maintenance_distribution) 7.9.1
Copyright (C) 2015 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-suse-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://bugs.opensuse.org/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from owncloud...Reading symbols from /usr/lib/debug/usr/bin/owncloud.debug...done.
done.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
11-10 16:28:25:434 0x7b8360 "################## ownCloud en_US () 2.0.2"
11-10 16:28:25:437 0x7b8360 void OCC::Application::setupTranslations() Using "en_US" translation
11-10 16:28:25:438 0x7b8360 SocketApi: server started, listening at "/run/user/0/ownCloud/socket"
11-10 16:28:25:439 0x7b8360 ==== added system ignore list to socketapi: "/etc/ownCloud/sync-exclude.lst"
11-10 16:28:25:440 0x7b8360 ==== added user defined ignore list to csync: "/root/.local/share/data/ownCloud/sync-exclude.lst"
11-10 16:28:25:441 0x7b8360 setting remote poll timer interval to 30000 msec
11-10 16:28:25:500 0x7b8360 * Setup folders from settings file
11-10 16:28:25:502 0x7b8360 Set proxy configuration to use system configuration
Detaching after fork from child process 2099.
11-10 16:28:25:582 0x7b8360 Sys Info size: 113
Detaching after fork from child process 2108.
11-10 16:28:25:897 0x7b8360 Checking server and authentication
11-10 16:28:25:904 0x7b8360 Trying to look up system proxy
11-10 16:28:25:907 0xa72d80 virtual void OCC::SystemProxyRunnable::run() Starting system proxy lookup
11-10 16:28:25:919 0x7b8360 void OCC::ConnectionValidator::systemProxyLookupDone(const QNetworkProxy&) Setting QNAM proxy to be system proxy "2://:0"
11-10 16:28:25:986 0x7b8360 Object::connect: No such signal QNetworkReplyImpl::encrypted()
11-10 16:28:25:989 0x7b8360 !!! OCC::CheckServerJob created for "https://publiccloud-owncloud.provo.novell.com" + "status.php"
11-10 16:28:26:537 0x7b8360 Saving account "https://publiccloud-owncloud.provo.novell.com"
11-10 16:28:26:541 0x7b8360 Saving 1 unknown certs.
11-10 16:28:26:542 0x7b8360 Saving cookies.
11-10 16:28:26:543 0x7b8360 "/root/.local/share/data//ownCloud//cookies.db"
11-10 16:28:26:544 0x7b8360 Saved account settings, status: 0
11-10 16:28:26:875 0x7b8360 void OCC::AbstractNetworkJob::slotFinished() 203 "Error downloading https://publiccloud-owncloud.provo.novell.com/status.php - server replied: Not Found" QVariant(int, 404)
11-10 16:28:26:878 0x7b8360 void OCC::ConnectionValidator::slotNoStatusFound(QNetworkReply*) 203 "Error downloading https://publiccloud-owncloud.provo.novell.com/status.php - server replied: Not Found"
11-10 16:28:26:879 0x7b8360 AccountState connection status change: "Undefined" -> "Status not found"
11-10 16:28:26:879 0x7b8360 AccountState state change: "Disconnected" -> "Network error"
11-10 16:28:26:880 0x7b8360 "No connection to ownCloud at https://publiccloud-owncloud.provo.novell.com.
Error downloading https://publiccloud-owncloud.provo.novell.com/status.php - server replied: Not Found"
11-10 16:28:26:881 0x7b8360 Account "jgleissner@publiccloud-owncloud.provo.novell.com" disconnected, terminating or descheduling sync folders
11-10 16:28:26:883 0x7b8360 Object::connect: No such signal QNetworkReplyImpl::encrypted()
11-10 16:28:26:884 0x7b8360 !!! OCC::CheckServerJob created for "https://publiccloud-owncloud.provo.novell.com" + "owncloud/status.php"
11-10 16:28:26:884 0x7b8360 Retrying with QUrl( "https://publiccloud-owncloud.provo.novell.com/owncloud/status.php" )
[New Thread 0x7fffd37fe700 (LWP 2112)]
[New Thread 0x7fffd3fff700 (LWP 2111)]
[New Thread 0x7fffe0f01700 (LWP 2110)]
[New Thread 0x7fffe1702700 (LWP 2109)]
[New Thread 0x7fffe1f03700 (LWP 2098)]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff4887ab8 in ?? () from /usr/lib64/libQtNetwork.so.4
#0 0x00007ffff4887ab8 in ?? () from /usr/lib64/libQtNetwork.so.4
#1 0x00007ffff488b663 in ?? () from /usr/lib64/libQtNetwork.so.4
#2 0x00007ffff48f78cd in ?? () from /usr/lib64/libQtNetwork.so.4
#3 0x00007ffff44b649e in QObject::event(QEvent_) () from /usr/lib64/libQtCore.so.4
#4 0x00007ffff4fa579c in QApplicationPrivate::notify_helper(QObject_, QEvent_) ()
from /usr/lib64/libQtGui.so.4
#5 0x00007ffff4fabcdd in QApplication::notify(QObject_, QEvent_) ()
from /usr/lib64/libQtGui.so.4
#6 0x00007ffff449e18d in QCoreApplication::notifyInternal(QObject_, QEvent_) ()
from /usr/lib64/libQtCore.so.4
#7 0x00007ffff44a145d in QCoreApplicationPrivate::sendPostedEvents(QObject_, int, QThreadData*) () from /usr/lib64/libQtCore.so.4
#8 0x00007ffff44cb7fe in ?? () from /usr/lib64/libQtCore.so.4
#9 0x00007ffff0551c84 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#10 0x00007ffff0551ed8 in ?? () from /usr/lib64/libglib-2.0.so.0
#11 0x00007ffff0551f7c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#12 0x00007ffff44cafbe in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib64/libQtCore.so.4
#13 0x00007ffff50426a6 in ?? () from /usr/lib64/libQtGui.so.4
#14 0x00007ffff449cd4f in QEventLoop::processEvents(QFlagsQEventLoop::ProcessEventsFlag) ()
from /usr/lib64/libQtCore.so.4
#15 0x00007ffff449d045 in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) ()
from /usr/lib64/libQtCore.so.4
#16 0x00007ffff44a2499 in QCoreApplication::exec() () from /usr/lib64/libQtCore.so.4
#17 0x00000000004577f3 in main (argc=3, argv=)
at /usr/src/debug/owncloudclient-2.0.2/src/gui/main.cpp:132

I'm not sure how useful the backtrace is, as the crash seems to be in libQtNetwork. Interestingly, according to the log it even tries to reconnect with the amended URL but then segfaults.

@ckamm
Copy link
Contributor

ckamm commented Nov 11, 2015

I could not reproduce the crash with master. The automatic test for owncloud/status.php doesn't work either though.

Personally, I believe that this can be closed. It's a crash inside Qt, that only happens when you provide a config file manually, that we can't reproduce. We're very unlikely to be able to track this one down.

@jgleissner
Copy link
Author

I can actually reproduce it with master on Leap 42.1. The Qt version used is 4.8.6. Here's a trace:

Program received signal SIGSEGV, Segmentation fault.
QNetworkReplyImplPrivate::resumeNotificationHandling (this=this@entry=0xb31070) at access/qnetworkreplyimpl.cpp:444
444         if (pendingNotifications.size() >= 1)
(gdb) bt
#0  0x00007ffff4400ab8 in QNetworkReplyImplPrivate::resumeNotificationHandling() (this=this@entry=0xb31070) at access/qnetworkreplyimpl.cpp:444
#1  0x00007ffff4404663 in QNetworkReplyImplPrivate::finished() (this=0xb31070) at access/qnetworkreplyimpl.cpp:796
#2  0x00007ffff43e9469 in QNetworkAccessBackend::finished() (this=<optimized out>) at access/qnetworkaccessbackend.cpp:324
#3  0x00007ffff43ef665 in QNetworkAccessHttpBackend::replyFinished() (this=<optimized out>) at access/qnetworkaccesshttpbackend.cpp:754
#4  0x00007ffff44708cd in QNetworkAccessHttpBackend::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0xb2a1c0, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at .moc/release-shared/moc_qnetworkaccesshttpbackend_p.cpp:95
#5  0x00007ffff402f49e in QObject::event(QEvent*) (this=0xb2a1c0, e=<optimized out>) at kernel/qobject.cpp:1231
#6  0x00007ffff4fa579c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib64/libQtGui.so.4
#7  0x00007ffff4fabcdd in QApplication::notify(QObject*, QEvent*) () at /usr/lib64/libQtGui.so.4
#8  0x00007ffff401718d in QCoreApplication::notifyInternal(QObject*, QEvent*) (this=0x7fffffffe170, receiver=receiver@entry=0xb2a1c0, event=event@entry=
    0x7fffcc048200) at kernel/qcoreapplication.cpp:953
#9  0x00007ffff401a45d in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (event=0x7fffcc048200, receiver=0xb2a1c0)
    at kernel/qcoreapplication.h:231
#10 0x00007ffff401a45d in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x81f320) at kernel/qcoreapplication.cpp:1577
#11 0x00007ffff401a903 in QCoreApplication::sendPostedEvents(QObject*, int) (receiver=receiver@entry=0x0, event_type=event_type@entry=0)
    at kernel/qcoreapplication.cpp:1470
#12 0x00007ffff40447fe in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) () at kernel/qcoreapplication.h:236
#13 0x00007ffff40447fe in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x822ed0) at kernel/qeventdispatcher_glib.cpp:300
#14 0x00007fffef9a1c84 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
#15 0x00007fffef9a1ed8 in  () at /usr/lib64/libglib-2.0.so.0
#16 0x00007fffef9a1f7c in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#17 0x00007ffff4043fbe in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x822c40, flags=...)
    at kernel/qeventdispatcher_glib.cpp:450
#18 0x00007ffff50426a6 in  () at /usr/lib64/libQtGui.so.4
#19 0x00007ffff4015d4f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffffffe120, flags=...) at kernel/qeventloop.cpp:149
#20 0x00007ffff4016045 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffffffe120, flags=...) at kernel/qeventloop.cpp:204
#21 0x00007ffff401b499 in QCoreApplication::exec() () at kernel/qcoreapplication.cpp:1225
#22 0x00000000004974b2 in main ()
(gdb) list 444
439     // Resume notification handling
440     void QNetworkReplyImplPrivate::resumeNotificationHandling()
441     {
442         Q_Q(QNetworkReplyImpl);
443         notificationHandlingPaused = false;
444         if (pendingNotifications.size() >= 1)
445             QCoreApplication::postEvent(q, new QEvent(QEvent::NetworkReplyUpdated));
446     }
447
448     QAbstractNetworkCache *QNetworkReplyImplPrivate::networkCache() const
(gdb) p pendingNotifications 
warning: can't find linker symbol for virtual table for `QNetworkReplyImplPrivate' value
$5 = {<QList<QNetworkReplyImplPrivate::InternalNotifications>> = {{p = {static shared_null = {ref = {_q_value = 1}, alloc = 0, begin = 0, end = 0, sharable = 1, 
          array = {0x0}}, d = 0x0}, d = 0x0}}, <No data fields>}

I don't see an obvious reason why it should crash here. The gdb warning looks a bit odd though. It smells a bit like a bug in libqt.

@guruz guruz changed the title [2.0.2] [Linux SLE 12] Crashes on startup if configured URL is wrong [2.0.2] [Qt4] [Linux SLE 12] Crashes on startup if configured URL is wrong Nov 17, 2015
@guruz guruz modified the milestones: 2.1.1-nextpatch, 2.1-current Nov 17, 2015
@ckamm
Copy link
Contributor

ckamm commented Dec 9, 2015

@jgleissner That last backtrace reminds me of #3960

@ogoffart
Copy link
Contributor

Perhaps try valgrind so we can get a more detailed backtrace where the problem actually happen.

Can it be reproduced with a Qt5 build?

@guruz
Copy link
Contributor

guruz commented Jan 7, 2016

@jgleissner ? :)

@dragotin
Copy link
Contributor

dragotin commented Jan 7, 2016

hmm, Leap should not build against Qt4, but Qt5. I'll check the package.

@dragotin dragotin self-assigned this Jan 7, 2016
@dragotin dragotin modified the milestones: 2.1.2-next, 2.1.1-current Jan 7, 2016
@jgleissner
Copy link
Author

Sorry about the delay. @ogoffart I can get a valgrind backtrace. I'm not too familiar with it, any instructions on how to invoke it?

@dragotin I was deliberately using Qt4, as I was really trying to debug the crash on SLE 12. I doubt this particular crash will happen with Qt5, at least I can't even reproduce it on my Tumbleweed box.

@guruz
Copy link
Contributor

guruz commented Jan 7, 2016

@jgleissner No worries then :) We want to get rid of the Qt4-based builds soon.

@guruz guruz closed this as completed Jan 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants