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

[QA] segfault when sync folder was removed #9533

Closed
jnweiger opened this issue Mar 22, 2022 · 2 comments
Closed

[QA] segfault when sync folder was removed #9533

jnweiger opened this issue Mar 22, 2022 · 2 comments
Assignees
Milestone

Comments

@jnweiger
Copy link
Contributor

jnweiger commented Mar 22, 2022

Seen with 2.10.1 rc1 testpilotcloud

  • connect to demo.owncloud.org
  • wait until sync completes
  • quit the client, remove the sync folder
  • restart the client. It complains about missing sync folder. OK.
  • click 'account -> remove' -> segfault. BAD
$ gdb /usr/bin/testpilotcloud /tmp/core 
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2
Copyright (C) 2020 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-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
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 /usr/bin/testpilotcloud...
Reading symbols from /usr/lib/debug/.build-id/32/d7f61bb06b8e42670e809559e5d92abe7d0d40.debug...
[New LWP 946453]
[New LWP 946465]
[New LWP 946457]
[New LWP 946469]
[New LWP 946471]
[New LWP 946473]
[New LWP 946468]
[New LWP 946455]
[New LWP 946483]
[New LWP 946454]
[New LWP 946470]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
--Type <RET> for more, q to quit, c to continue without paging--
Core was generated by `testpilotcloud'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000560f2dc2697a in OCC::Folder::wipeForRemoval (this=0x560f2f388490) at ./src/libsync/syncengine.h:89
89	./src/libsync/syncengine.h: No such file or directory.
[Current thread is 1 (Thread 0x7f7795389800 (LWP 946453))]
(gdb) where
#0  0x0000560f2dc2697a in OCC::Folder::wipeForRemoval() (this=0x560f2f388490) at ./src/libsync/syncengine.h:89
#1  0x0000560f2dc2d14c in OCC::FolderMan::removeFolder(OCC::Folder*) (this=0x560f2f1011f0, f=<optimized out>)
    at ./src/gui/folderman.cpp:1210
#2  0x0000560f2dc2d4ff in OCC::FolderMan::slotRemoveFoldersForAccount(QExplicitlySharedDataPointer<OCC::AccountState> const&)
    (this=0x560f2f1011f0, accountState=...) at ./src/gui/folderman.cpp:929
#3  0x00007f7798719fb8 in QMetaObject::activate(QObject*, int, int, void**) ()
    at /opt/ownCloud/qt-5.12.10/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x0000560f2dca03a9 in OCC::AccountManager::accountRemoved(QExplicitlySharedDataPointer<OCC::AccountState> const&)
    (this=this@entry=0x560f2dee7560 <OCC::AccountManager::instance()::instance>, _t1=...)
    at ./obj-x86_64-linux-gnu/src/gui/owncloudCore_autogen/EWIEGA46WW/moc_accountmanager.cpp:194
#5  0x0000560f2dcb9489 in OCC::AccountManager::deleteAccount(OCC::AccountState*)
    (this=this@entry=0x560f2dee7560 <OCC::AccountManager::instance()::instance>, account=0x560f2f1becc0)
    at ./src/gui/accountmanager.cpp:394
#6  0x0000560f2dcbc2c7 in OCC::AccountSettings::<lambda()>::operator() (__closure=0x560f302d8200)
    at ./src/gui/accountsettings.cpp:1058
#7  QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, OCC::AccountSettings::slotDeleteAccount()::<lambda()> >::call (arg=<optimized out>, f=...) at /opt/ownCloud/qt-5.12.10/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:146
#8  QtPrivate::Functor<OCC::AccountSettings::slotDeleteAccount()::<lambda()>, 0>::call<QtPrivate::List<>, void>
    (arg=<optimized out>, f=...) at /opt/ownCloud/qt-5.12.10/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:256
#9  QtPrivate::QFunctorSlotObject<OCC::AccountSettings::slotDeleteAccount()::<lambda()>, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *)
    (which=<optimized out>, this_=0x560f302d81f0, r=<optimized out>, a=<optimized out>, ret=<optimized out>)
--Type <RET> for more, q to quit, c to continue without paging--
   10/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:439
#10 0x00007f7798719fb8 in QMetaObject::activate(QObject*, int, int, void**) ()
    at /opt/ownCloud/qt-5.12.10/lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007f77996ba312 in QDialog::finished(int) () at /opt/ownCloud/qt-5.12.10/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#12 0x00007f77996f326d in  () at /opt/ownCloud/qt-5.12.10/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007f77996f4e50 in  () at /opt/ownCloud/qt-5.12.10/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007f7798719e60 in QMetaObject::activate(QObject*, int, int, void**) ()
    at /opt/ownCloud/qt-5.12.10/lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00007f7799652f73 in QDialogButtonBox::clicked(QAbstractButton*) ()
    at /opt/ownCloud/qt-5.12.10/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007f7799653739 in  () at /opt/ownCloud/qt-5.12.10/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007f7798719e60 in QMetaObject::activate(QObject*, int, int, void**) ()
    at /opt/ownCloud/qt-5.12.10/lib/x86_64-linux-gnu/libQt5Core.so.5
#18 0x00007f77995ac306 in QAbstractButton::clicked(bool) () at /opt/ownCloud/qt-5.12.10/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x00007f77995ac52e in  () at /opt/ownCloud/qt-5.12.10/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#20 0x00007f77995ad973 in  () at /opt/ownCloud/qt-5.12.10/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#21 0x00007f77995adb35 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) ()
    at /opt/ownCloud/qt-5.12.10/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x00007f77994fc366 in QWidget::event(QEvent*) () at /opt/ownCloud/qt-5.12.10/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#23 0x00007f77994bbe06 in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
    at /opt/ownCloud/qt-5.12.10/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#24 0x00007f77994c55c7 in QApplication::notify(QObject*, QEvent*) ()
    at /opt/ownCloud/qt-5.12.10/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#25 0x00007f77986ee46a in QCoreApplication::notifyInternal2(QObject*, QEvent*) ()
    at /opt/ownCloud/qt-5.12.10/lib/x86_64-linux-gnu/libQt5Core.so.5
#26 0x00007f77994c47f7 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () at /opt/ownCloud/qt-5.12.10/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#27 0x00007f77995182fd in  () at /opt/ownCloud/qt-5.12.10/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#28 0x00007f779951b194 in  () at /opt/ownCloud/qt-5.12.10/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#29 0x00007f77994bbe06 in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
    at /opt/ownCloud/qt-5.12.10/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#30 0x00007f77994c5300 in QApplication::notify(QObject*, QEvent*) ()
    at /opt/ownCloud/qt-5.12.10/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#31 0x00007f77986ee46a in QCoreApplication::notifyInternal2(QObject*, QEvent*) ()
    at /opt/ownCloud/qt-5.12.10/lib/x86_64-linux-gnu/libQt5Core.so.5
#32 0x00007f7798f1bb63 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) ()
    at /opt/ownCloud/qt-5.12.10/lib/x86_64-linux-gnu/libQt5Gui.so.5
#33 0x00007f7798f1d49b in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) ()
    at /opt/ownCloud/qt-5.12.10/lib/x86_64-linux-gnu/libQt5Gui.so.5
#34 0x00007f7798ef76dc in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /opt/ownCloud/qt-5.12.10/lib/x86_64-linux-gnu/libQt5Gui.so.5
#35 0x00007f7794c91d2e in  () at /home/opt/ownCloud/qt-5.12.10/lib/x86_64-linux-gnu/qt5/plugins/platforms/../../../libQt5XcbQpa.so.5
#36 0x00007f779780517d in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#37 0x00007f7797805400 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#38 0x00007f77978054a3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#39 0x00007f7798746135 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /opt/ownCloud/qt-5.12.10/lib/x86_64-linux-gnu/libQt5Core.so.5
#40 0x00007f77986ed00b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /opt/ownCloud/qt-5.12.10/lib/x86_64-linux-gnu/libQt5Core.so.5
#41 0x00007f77986f4d76 in QCoreApplication::exec() () at /opt/ownCloud/qt-5.12.10/lib/x86_64-linux-gnu/libQt5Core.so.5
#42 0x0000560f2dc0ed0c in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at ./src/gui/main.cpp:157
(gdb)  
(gdb) quit
@jnweiger
Copy link
Contributor Author

jnweiger commented Mar 22, 2022

Restart after first crash:

  • the account was still there, same complaint about missing folder. OK
  • click account -> remove, a popup appears
    "this will not erase any files"
  • click OK , segfault again in OCC:WipeForRemoval()

Restarting: now the sync folder connection is removed.

(Nothing related in the client log.)

@jnweiger
Copy link
Contributor Author

Confirmed fixed in testpilotcloud-client-2.10.1~daily20220323+oc-7071
🦾

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants