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

[Linux] Client crashes on sync at startup #6403

Closed
MorganUbeda opened this issue Mar 24, 2018 · 9 comments
Closed

[Linux] Client crashes on sync at startup #6403

MorganUbeda opened this issue Mar 24, 2018 · 9 comments
Assignees
Milestone

Comments

@MorganUbeda
Copy link

When starting up the client it scans the folders, starts syncing, then segfaults and dies. It is on a fresh Fedora 27 install on my home laptop, syncing on a workplace server that is terribly outdated. The first sync did work and download the contents of the server, but after restarting the machine I cannot get it to work again. I don't know much about the servers config where I work. But I do know that the server is outdated.

Expected behaviour

The client should not segfault

Actual behaviour

It does

Steps to reproduce

  1. Start the client

Server configuration

ownCloud version: 5.0.25

Client configuration

Client version: 2.4.1-9083

Operating system: Fedora 27

OS language: French

Qt version used by client package (Linux only, see also Settings dialog): Qt 5.6.2, built against Qt 5.6.2

Client package (From ownCloud or distro) (Linux only): From owncloud (https://download.opensuse.org/repositories/isv:ownCloud:desktop/Fedora_27/isv:ownCloud:desktop.repo)

Installation path of client: /usr/bin; /usr/lib64

Logs

Client logfile:
https://gist.github.com/Goodaan/d7916277d483048b7e448881573efa48

gdb:

Starting program: /usr/bin/owncloud 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffdf9e9700 (LWP 5254)]
[New Thread 0x7fffdebcd700 (LWP 5255)]
[New Thread 0x7fffde2a0700 (LWP 5256)]
Detaching after fork from child process 5257.
Detaching after fork from child process 5258.
[New Thread 0x7fffdcfbc700 (LWP 5261)]
[New Thread 0x7fffcffff700 (LWP 5262)]
[New Thread 0x7fffcf7fe700 (LWP 5263)]
Detaching after fork from child process 5264.
[New Thread 0x7fffceffd700 (LWP 5267)]
[Thread 0x7fffcffff700 (LWP 5262) exited]
[New Thread 0x7fffcffff700 (LWP 5278)]
[New Thread 0x7fffce7fc700 (LWP 5301)]

Thread 1 "owncloud" received signal SIGSEGV, Segmentation fault.
0x00007ffff5a186c1 in OCC::PropagatorCompositeJob::scheduleSelfOrChild() ()
   from /opt/ownCloud/ownCloud/lib64/libowncloudsync.so.0

(gdb) info threads 
  Id   Target Id         Frame                                                                                     
* 1    Thread 0x7ffff7e52900 (LWP 5250) "owncloud" 0x00007ffff5a186c1 in OCC::PropagatorCompositeJob::scheduleSelfOrChild() ()
   from /opt/ownCloud/ownCloud/lib64/libowncloudsync.so.0                                                                                       
  2    Thread 0x7fffdf9e9700 (LWP 5254) "QXcbEventReader" 0x00007ffff2ea7c6b in poll () from /lib64/libc.so.6                                        
  3    Thread 0x7fffdebcd700 (LWP 5255) "Qt bearer threa" 0x00007ffff2ea7c6b in poll () from /lib64/libc.so.6                                              
  4    Thread 0x7fffde2a0700 (LWP 5256) "QDBusConnection" 0x00007ffff2ea7c6b in poll () from /lib64/libc.so.6                                                 
  5    Thread 0x7fffdcfbc700 (LWP 5261) "Qt HTTP thread" 0x00007ffff2ea7c6b in poll () from /lib64/libc.so.6
  7    Thread 0x7fffcf7fe700 (LWP 5263) "SyncEngine_Thre" 0x00007ffff2ea7c6b in poll () from /lib64/libc.so.6
  8    Thread 0x7fffceffd700 (LWP 5267) "Qt HTTP thread" 0x00007ffff2ea7c6b in poll () from /lib64/libc.so.6
  9    Thread 0x7fffcffff700 (LWP 5278) "Thread (pooled)" 0x00007ffff2bacb5b in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
  10   Thread 0x7fffce7fc700 (LWP 5301) "Thread (pooled)" 0x00007ffff2bacb5b in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0


@MorganUbeda MorganUbeda changed the title [Linux] Client crashes on first sync [Linux] Client crashes on sync at startup Mar 24, 2018
@guruz
Copy link
Contributor

guruz commented Mar 26, 2018

@Goodaan Could you also run:
thread apply all bt
and paste the result?
thank you

@guruz guruz added this to the 2.4.2-maybe milestone Mar 26, 2018
@MorganUbeda
Copy link
Author

@guruz Thanks for the answer,
here it is:

(gdb)  thread apply all bt

Thread 8 (Thread 0x7fffceffd700 (LWP 12533)):
#0  0x00007ffff2ea7c6b in poll () at /lib64/libc.so.6
#1  0x00007ffff162be99 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#2  0x00007ffff162bfac in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007ffff3f64e4f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /opt/ownCloud/qt-5.6.2+2.4.0/lib64/libQt5Core.so.5
#4  0x00007ffff3f097ba in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /opt/ownCloud/qt-5.6.2+2.4.0/lib64/libQt5Core.so.5
#5  0x00007ffff3d25f9a in QThread::exec() () at /opt/ownCloud/qt-5.6.2+2.4.0/lib64/libQt5Core.so.5
#6  0x00007ffff3d2ab9c in QThreadPrivate::start(void*) () at /opt/ownCloud/qt-5.6.2+2.4.0/lib64/libQt5Core.so.5
#7  0x00007ffff2ba650b in start_thread () at /lib64/libpthread.so.0
#8  0x00007ffff2eb216f in clone () at /lib64/libc.so.6

Thread 7 (Thread 0x7fffcf7fe700 (LWP 12529)):
#0  0x00007ffff2ea7c6b in poll () at /lib64/libc.so.6
#1  0x00007ffff162be99 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#2  0x00007ffff162bfac in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007ffff3f64e4f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /opt/ownCloud/qt-5.6.2+2.4.0/lib64/libQt5Core.so.5
#4  0x00007ffff3f097ba in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /opt/ownCloud/qt-5.6.2+2.4.0/lib64/libQt5Core.so.5
#5  0x00007ffff3d25f9a in QThread::exec() () at /opt/ownCloud/qt-5.6.2+2.4.0/lib64/libQt5Core.so.5
#6  0x00007ffff3d2ab9c in QThreadPrivate::start(void*) () at /opt/ownCloud/qt-5.6.2+2.4.0/lib64/libQt5Core.so.5
#7  0x00007ffff2ba650b in start_thread () at /lib64/libpthread.so.0
#8  0x00007ffff2eb216f in clone () at /lib64/libc.so.6

Thread 5 (Thread 0x7fffdcfbc700 (LWP 12527)):
#0  0x00007ffff2ea7c6b in poll () at /lib64/libc.so.6
#1  0x00007ffff162be99 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#2  0x00007ffff162bfac in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007ffff3f64e4f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /opt/ownCloud/qt-5.6.2+2.4.0/lib64/libQt5Core.so.5
#4  0x00007ffff3f097ba in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /opt/ownCloud/qt-5.6.2+2.4.0/lib64/libQt5Core.so.5
#5  0x00007ffff3d25f9a in QThread::exec() () at /opt/ownCloud/qt-5.6.2+2.4.0/lib64/libQt5Core.so.5
#6  0x00007ffff3d2ab9c in QThreadPrivate::start(void*) () at /opt/ownCloud/qt-5.6.2+2.4.0/lib64/libQt5Core.so.5
#7  0x00007ffff2ba650b in start_thread () at /lib64/libpthread.so.0
#8  0x00007ffff2eb216f in clone () at /lib64/libc.so.6
---Type <return> to continue, or q <return> to quit---

Thread 4 (Thread 0x7fffde2a0700 (LWP 12521)):
#0  0x00007ffff2ea7c6b in poll () at /lib64/libc.so.6
#1  0x00007ffff162be99 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#2  0x00007ffff162bfac in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007ffff3f64e4f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /opt/ownCloud/qt-5.6.2+2.4.0/lib64/libQt5Core.so.5
#4  0x00007ffff3f097ba in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /opt/ownCloud/qt-5.6.2+2.4.0/lib64/libQt5Core.so.5
#5  0x00007ffff3d25f9a in QThread::exec() () at /opt/ownCloud/qt-5.6.2+2.4.0/lib64/libQt5Core.so.5
#6  0x00007ffff7f34055 in QDBusConnectionManager::run() () at /opt/ownCloud/qt-5.6.2+2.4.0/lib64/libQt5DBus.so.5
#7  0x00007ffff3d2ab9c in QThreadPrivate::start(void*) () at /opt/ownCloud/qt-5.6.2+2.4.0/lib64/libQt5Core.so.5
#8  0x00007ffff2ba650b in start_thread () at /lib64/libpthread.so.0
#9  0x00007ffff2eb216f in clone () at /lib64/libc.so.6

Thread 3 (Thread 0x7fffdebcd700 (LWP 12520)):
#0  0x00007ffff2ea7c6b in poll () at /lib64/libc.so.6
#1  0x00007ffff162be99 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#2  0x00007ffff162bfac in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007ffff3f64e4f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /opt/ownCloud/qt-5.6.2+2.4.0/lib64/libQt5Core.so.5
#4  0x00007ffff3f097ba in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /opt/ownCloud/qt-5.6.2+2.4.0/lib64/libQt5Core.so.5
#5  0x00007ffff3d25f9a in QThread::exec() () at /opt/ownCloud/qt-5.6.2+2.4.0/lib64/libQt5Core.so.5
#6  0x00007ffff3d2ab9c in QThreadPrivate::start(void*) () at /opt/ownCloud/qt-5.6.2+2.4.0/lib64/libQt5Core.so.5
#7  0x00007ffff2ba650b in start_thread () at /lib64/libpthread.so.0
#8  0x00007ffff2eb216f in clone () at /lib64/libc.so.6

Thread 2 (Thread 0x7fffdf9e9700 (LWP 12519)):
#0  0x00007ffff2ea7c6b in poll () at /lib64/libc.so.6
#1  0x00007fffed02afe7 in _xcb_conn_wait () at /lib64/libxcb.so.1
#2  0x00007fffed02cdda in xcb_wait_for_event () at /lib64/libxcb.so.1
#3  0x00007fffe483b769 in QXcbEventReader::run() () at /opt/ownCloud/qt-5.6.2+2.4.0/lib64/qt5/plugins/platforms/../../../libQt5XcbQpa.so.5
#4  0x00007ffff3d2ab9c in QThreadPrivate::start(void*) () at /opt/ownCloud/qt-5.6.2+2.4.0/lib64/libQt5Core.so.5
#5  0x00007ffff2ba650b in start_thread () at /lib64/libpthread.so.0
#6  0x00007ffff2eb216f in clone () at /lib64/libc.so.6

Thread 1 (Thread 0x7ffff7e52900 (LWP 12514)):
---Type <return> to continue, or q <return> to quit---
#0  0x00007ffff5a186c1 in OCC::PropagatorCompositeJob::scheduleSelfOrChild() () at /opt/ownCloud/ownCloud/lib64/libowncloudsync.so.0
#1  0x00007ffff5a18f5d in OCC::PropagateDirectory::scheduleSelfOrChild() () at /opt/ownCloud/ownCloud/lib64/libowncloudsync.so.0
#2  0x00007ffff5a187de in OCC::PropagatorCompositeJob::scheduleSelfOrChild() () at /opt/ownCloud/ownCloud/lib64/libowncloudsync.so.0
#3  0x00007ffff5a18f5d in OCC::PropagateDirectory::scheduleSelfOrChild() () at /opt/ownCloud/ownCloud/lib64/libowncloudsync.so.0
#4  0x00007ffff5a187de in OCC::PropagatorCompositeJob::scheduleSelfOrChild() () at /opt/ownCloud/ownCloud/lib64/libowncloudsync.so.0
#5  0x00007ffff5a18f5d in OCC::PropagateDirectory::scheduleSelfOrChild() () at /opt/ownCloud/ownCloud/lib64/libowncloudsync.so.0
#6  0x00007ffff5a187de in OCC::PropagatorCompositeJob::scheduleSelfOrChild() () at /opt/ownCloud/ownCloud/lib64/libowncloudsync.so.0
#7  0x00007ffff5a18f5d in OCC::PropagateDirectory::scheduleSelfOrChild() () at /opt/ownCloud/ownCloud/lib64/libowncloudsync.so.0
#8  0x00007ffff5a14b33 in OCC::OwncloudPropagator::scheduleNextJobImpl() () at /opt/ownCloud/ownCloud/lib64/libowncloudsync.so.0
#9  0x00007ffff3f47124 in QSingleShotTimer::timerEvent(QTimerEvent*) () at /opt/ownCloud/qt-5.6.2+2.4.0/lib64/libQt5Core.so.5
#10 0x00007ffff3f3b5ab in QObject::event(QEvent*) () at /opt/ownCloud/qt-5.6.2+2.4.0/lib64/libQt5Core.so.5
#11 0x00007ffff546c90c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /opt/ownCloud/qt-5.6.2+2.4.0/lib64/libQt5Widgets.so.5
#12 0x00007ffff5471d14 in QApplication::notify(QObject*, QEvent*) () at /opt/ownCloud/qt-5.6.2+2.4.0/lib64/libQt5Widgets.so.5
#13 0x00007ffff3f0b878 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /opt/ownCloud/qt-5.6.2+2.4.0/lib64/libQt5Core.so.5
#14 0x00007ffff3f63d7e in QTimerInfoList::activateTimers() () at /opt/ownCloud/qt-5.6.2+2.4.0/lib64/libQt5Core.so.5
#15 0x00007ffff3f641f1 in timerSourceDispatch(_GSource*, int (*)(void*), void*) () at /opt/ownCloud/qt-5.6.2+2.4.0/lib64/libQt5Core.so.5
#16 0x00007ffff162bb77 in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#17 0x00007ffff162bf20 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#18 0x00007ffff162bfac in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#19 0x00007ffff3f64e4f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /opt/ownCloud/qt-5.6.2+2.4.0/lib64/libQt5Core.so.5
#20 0x00007ffff3f097ba in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /opt/ownCloud/qt-5.6.2+2.4.0/lib64/libQt5Core.so.5
#21 0x00007ffff3f11e4c in QCoreApplication::exec() () at /opt/ownCloud/qt-5.6.2+2.4.0/lib64/libQt5Core.so.5
#22 0x00005555555e9d3f in main(int, char**) (argc=<optimized out>, argv=<optimized out>)
    at /usr/src/debug/owncloud-client-2.4.1-9083.1.x86_64/src/gui/main.cpp:164

@ckamm
Copy link
Contributor

ckamm commented Mar 27, 2018

@Goodaan That's extremely useful, thank you for the data! It's a crash we'd seen on the crash reporter but that we've been unable to reproduce or debug so far. While you can reproduce: Could you also produce a logfile with --logdebug? It'll be huge but that way we'll be certain we have all the information we could possibly need.

@ckamm
Copy link
Contributor

ckamm commented Mar 27, 2018

This may already be solvable with the baseline log:

03-24 19:31:23:357 [ warning sync.propagator.upload ]:	Server does not support X-OC-MTime ""
03-24 19:31:23:357 [ info sync.database ]:	Setting blacklist entry for  "<snip>" 1 "Server does not support X-OC-MTime" 1521916283 0 1453512321 "5ab6b01908de9" "" 0
03-24 19:31:23:357 [ warning sync.propagator ]:	Could not complete propagation of "<snip>" by OCC::PropagateUploadFileV1(0x564d5fd85720) with status 3 and error: "Server does not support X-OC-MTime"
03-24 19:31:23:359 [ info sync.database ]:	Updating file record for path: "<snip>" inode: 2250993 modtime: 1453512321 type: 0 etag: "5ab6b01908de9" fileId: "" remotePerm: "" fileSize: 35053806 checksum: "SHA1:c0504a68bc703a0517293f1b750e3ce624ec8bc9"
03-24 19:31:23:359 [ warning sync.propagator ]:	Could not complete propagation of "<snip>" by OCC::PropagateUploadFileV1(0x564d5fd85720) with status 4 and error: "Server does not support X-OC-MTime"
03-24 19:31:23:360 [ critical default ]:	ASSERT: "i >= 0" in file /home/abuild/rpmbuild/BUILD/owncloudclient-2.4.1/src/libsync/owncloudpropagator.cpp, line 821

This shows that the same job calls done with SoftError and Success leading the the assert in the propagator.

@ckamm ckamm removed the Needs info label Mar 27, 2018
@ogoffart
Copy link
Contributor

"Server does not support X-OC-MTime"

I don't think this is something that has been tested recently.

Server configuration: ownCloud version: 5.0.25

Yeah, that explains. The server is stone age old, and no longer supported in 2.5 anyway.

ogoffart added a commit that referenced this issue Mar 27, 2018
Should fix an assert when "Server does not support X-OC-MTime"
(Which only happens with owncloud 5)

Issue #6403
ckamm added a commit that referenced this issue Mar 27, 2018
I'll adjust how _finished is used further in master.

This patch should be picked into 2.4.
ogoffart added a commit that referenced this issue Mar 27, 2018
Should fix an assert when "Server does not support X-OC-MTime"
(Which only happens with owncloud 5)

Issue #6403

(cherry picked from commit 3f4d504)
@MorganUbeda
Copy link
Author

If it is still of any use here is the --logdebug output. It is huge and I did not manage to gist it, so I uploaded it on filebin. Sorry for the inconvenience.

https://filebin.ca/3wIhicLNnkeb/owncloud_debug.log

@ogoffart
Copy link
Contributor

Now, we've made some commit so the crash should be fixed in the next release. Thanks for the bug report.
However, I strongly suggest you upgrade your ownCloud server.

@MorganUbeda
Copy link
Author

Ok thanks. If I could I would, unfortunately this is not in my power.

@jnweiger
Copy link
Contributor

jnweiger commented Jul 13, 2018

tested 242~rc1 against an 10.0.8 server, that returns the status.php info of a 5.0.25 server as seen above. status message flow.response.content=b'{"edition":"","installed":"true","version":"5.0.25","versionstring":"5.0.13"}' swapped in with mitmproxy.

grafik
grafik

Test success. syncs fine.
A real 5.0.25 server may behave different, the test may thus be invalid.

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