owncloud / client

🖥️ Desktop Syncing Client for ownCloud
GNU General Public License v2.0
1.39k stars 667 forks source link

client 1.2.0beta1 crashes under ubuntu 12.04 #237

Closed bertbrutzel closed 11 years ago

bertbrutzel commented 11 years ago

Good day,

my owncloud sync client started crashing right after start-up. The 1.2.0beta1 used to work just fine. A removal and reinstall does not help.

$uname -a Linux PC-Biotech99 3.2.0-35-generic #55-Ubuntu SMP Wed Dec 5 17:42:16 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

$dmesg . . . Jan 9 18:20:46 PC-Biotech99 kernel: [33425.650458] owncloud[15865]: segfault at 0 ip 00007f498a4c9fc7 sp 00007f495cfb0308 error 4 in libocsync.so.0.2.0[7f498a4b9000+1c000]

Logfile: 01-08 18:35:24:823 Logging into logfile: "owncloud-crash.log" with flush false 01-08 18:35:24:823 "################## ownCloud de_DE 1.2.0beta1 " . . . . 01-08 18:35:26:598 * csync thread started 01-08 18:35:26:598 * event notification disabled 01-08 18:35:26:598 >===================================== sync started for "ownCloud" 01-08 18:35:26:598 ==> returning exclude file path: "/etc/ownCloud/sync-exclude.lst" 01-08 18:35:26:598 ==== added CSync exclude List: "/etc/ownCloud/sync-exclude.lst"

dragotin commented 11 years ago

What does "1.2.0beta1 used to work just fine" mean? Did you an update and it worked fine before?

smessmer commented 11 years ago

I got the same issue on Ubuntu 12.10. I'm compiling the client by myself, using the most current csync (dav branch) and mirall from git.

The gdb stacktrace tells me that csync crashes:

(gdb) run
Starting program: /home/[user]/owncloudclient/buildmirall/bin/mirall 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffeb368700 (LWP 5031)]
[New Thread 0x7fffe0cec700 (LWP 5032)]
[New Thread 0x7fffdbda3700 (LWP 5033)]
[New Thread 0x7fffdb5a2700 (LWP 5036)]
[New Thread 0x7fffdada1700 (LWP 5037)]
[New Thread 0x7fffd9f79700 (LWP 5038)]
[New Thread 0x7fffd9778700 (LWP 5039)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd9778700 (LWP 5039)]
0x00007ffff32711c9 in csync_vio_get_error_string (ctx=0x7fffc8002aa0) at /home/[user]/owncloudclient/csync/src/vio/csync_vio.c:664
664         if(VIO_METHOD_HAS_FUNC(ctx->module.method, get_error_string)) {
(gdb) 

Here the logfile:

$ ./bin/owncloud  --logfile logfile --logflush
Speicherzugriffsfehler (Speicherabzug geschrieben)
$ cat logfile
01-14 00:57:30:729 Logging into logfile:  "logfile"  with flush  true 
01-14 00:57:30:729 "################## ownCloud de_DE 1.2.0beta1 " 
01-14 00:57:30:766 Trying to read config ini file at  "/etc/ownCloud/custom.ini" 
01-14 00:57:30:766 Trying to read config ini file at  "/etc/ownCloud/custom.ini" 
01-14 00:57:30:766 Trying to read config ini file at  "/etc/ownCloud/custom.ini" 
01-14 00:57:30:766 Trying to read config ini file at  "/etc/ownCloud/custom.ini" 
01-14 00:57:30:772 Trying to read config ini file at  "/etc/ownCloud/custom.ini" 
01-14 00:57:30:806 Network Location:  "" 
01-14 00:57:30:808 Get Request to  "status.php" 
01-14 00:57:30:808 Returning configured owncloud url:  "https://[server]/owncloud/" 
01-14 00:57:30:808 Returning configured owncloud url:  "https://[server]/owncloud/" 
01-14 00:57:30:808 Setting up host header:  "[server]" 
01-14 00:57:30:929 status.php returns:  "{"installed":"true","version":"4.90.6","versionstring":"4.5.5","edition":""}"   0  Reply:  QNetworkReplyImpl(0x1820c60) 
01-14 00:57:30:929 Unknown info from ownCloud status.php:  "installed" = "true" 
01-14 00:57:30:929 ** Application: ownCloud found:  "https://[server]/owncloud"  with version  "4.5.5" ( "4.90.6" ) 
01-14 00:57:30:929 ** Setting ownCloud Server version to  "4.90.6" 
01-14 00:57:30:929 Credentials successfully fetched:  true 
01-14 00:57:30:929 # checking for authentication settings. 
01-14 00:57:30:929 Get Request to  "/" 
01-14 00:57:30:929 Returning configured owncloud url:  "https://[server]/owncloud/remote.php/webdav/" 
01-14 00:57:30:930 Returning configured owncloud url:  "https://[server]/owncloud/" 
01-14 00:57:30:930 Setting up host header:  "[server]" 
01-14 00:57:31:096 ######## Credentials are ok! 
01-14 00:57:31:096 * Setup folders from  "/home/[user]/.local/share/data//folders" 
01-14 00:57:31:097   ` -> setting up: "ownCloud" 
01-14 00:57:31:097     -> file path:  "/home/[user]/.local/share/data/folders/ownCloud" 
01-14 00:57:31:097 Returning configured owncloud url:  "https://[server]/owncloud/remote.php/webdav/" 
01-14 00:57:31:097 setting remote poll timer interval to 30070 msec for folder  "ownCloud" 
01-14 00:57:31:097 (+) Watcher: "/home/[user]/ownCloud" 
01-14 00:57:31:098 * Pending events for "/home/[user]/ownCloud" will be processed after events stop for 1000 milliseconds ( "01:14:11" ). 0 events until now ) 
01-14 00:57:31:098   ==> returning exclude file path:  "/etc/ownCloud/sync-exclude.lst" 
01-14 00:57:31:098 Checked local path ok 
01-14 00:57:31:098 ****** ownCloud folder using watcher ******* 
01-14 00:57:31:098 Adding folder to Folder Map  Mirall::ownCloudFolder(0x18546d0) 
01-14 00:57:31:099 Folder in overallStatus Message:  Mirall::ownCloudFolder(0x18546d0)  with name  "ownCloud" 
01-14 00:57:31:099 Sync state changed for folder  "ownCloud" :  "Not yet Started" 
01-14 00:57:31:120 Folder:  Mirall::ownCloudFolder(0x18546d0) 
01-14 00:57:31:120 ==> load folder icon  "owncloud-framed" 
01-14 00:57:31:130 Returning configured owncloud url:  "https://[server]/owncloud/remote.php/webdav/" 
01-14 00:57:31:133 Folder in overallStatus Message:  Mirall::ownCloudFolder(0x18546d0)  with name  "ownCloud" 
01-14 00:57:32:099 * Processing of event queue for "/home/[user]/ownCloud" 
01-14 00:57:32:099   * Notify 0 change items for "/home/[user]/ownCloud" 
01-14 00:57:32:099 ** Changed was notified on  () 
01-14 00:57:32:099 *  "ownCloud" Poll timer disabled 
01-14 00:57:32:099 Schedule folder  "ownCloud"  to sync! 
01-14 00:57:32:099 XX slotScheduleFolderSync: folderQueue size:  1 
01-14 00:57:32:099 ==> load folder icon  "owncloud-framed" 
01-14 00:57:32:100 Returning configured owncloud url:  "https://[server]/owncloud/remote.php/webdav/" 
01-14 00:57:32:114 Folder in overallStatus Message:  Mirall::ownCloudFolder(0x18546d0)  with name  "ownCloud" 
01-14 00:57:32:115 Sync state changed for folder  "ownCloud" :  "Sync Running" 
01-14 00:57:32:115 *** Start syncing url to ownCloud:  "ownclouds://[server]/owncloud/remote.php/webdav/clientsync" 
01-14 00:57:32:115 Returning configured owncloud url:  "https://[server]/owncloud/" 
01-14 00:57:32:116 starting to sync  QThread(0x14278d0) QThread(0x1888530) 
01-14 00:57:32:116   ==> returning exclude file path:  "/etc/ownCloud/sync-exclude.lst" 
01-14 00:57:32:116 ==== added CSync exclude List:  "/etc/ownCloud/sync-exclude.lst" 
01-14 00:57:32:117     * csync thread started 
01-14 00:57:32:117     * event notification  disabled 
01-14 00:57:32:117 >===================================== sync started for  "ownCloud" 
bertbrutzel commented 11 years ago

It works again for me.... It might have to do with the "lock" file(/home/username/.local/share/data/ownCloud). Stop your ownCloud client and remove the file.

smessmer commented 11 years ago

I deleted the whole folder /home/username/.local/share/data/ownCloud but get the same error. When booting up the client, everything seems to work fine. I can configure the server, it says "sucessfully connected", until it tries to sync the first data. Then it crashes with a segfault in csync.

dragotin commented 11 years ago

@smessmer the crash line shows that it might be that your client loads the wrong owncloud plugin for csync which is loaded using dlopen. If there is an older ocsync_owncloud.so wandering around on your system, ie. from previously installed packages, which is prefered to the recently built one in your csync built dir, this can happen.

Can you please verify that?

bertbrutzel commented 11 years ago

Here are my complete steps it took to get it working again:

$sudo apt-get remove owncloud-client $wget http://download.opensuse.org/repositories/isv:/ownCloud:/devel/xUbuntu_12.04/amd64/owncloud-client_1.1.4-3_amd64.deb

-->adjust to your distro $sudo dpkg -i owncloud-client_1.1.4-3_amd64.deb $rm /home/username/.local/share/data/ownCloud/lock -->start up 1.14 client wait until it starts syncing, stop it and shut it down $sudo apt-get remove owncloud-client --> removes 1.1.4 client $sudo apt-get install owncloud-client --> install 1.2 beta from repo

Am 15.01.2013 13:34, schrieb Sebastian Meßmer:

I deleted the whole folder /home/username/.local/share/data/ownCloud but get the same error. When booting up the client, everything seems to work fine. I can configure the server, it says "sucessfully connected", until it tries to sync the first data. Then it crashes with a segfault in csync.

— Reply to this email directly or view it on GitHub https://github.com/owncloud/mirall/issues/237#issuecomment-12264571.

smessmer commented 11 years ago

There is no other ocsync_owncloud.so (at least not anymore), but it still doesn't work. Here my steps:

I ran

sudo apt-get remove owncloud owncloud-client
sudo apt-get autoremove

(the second line removed libcsync-plugin-owncloud)

$ sudo find / -name "*csync.so*"
  [no results]

Then I followed the guide at http://doc.owncloud.org/desktop/1.1/building.html I had to download and compile iniparser manually for I didn't find an ubuntu iniparser package. Using this, the CMake calls looked like:

/ocsync-build$ cmake -DCMAKE_BUILD_TYPE="Debug" -DWITH_LOG4C=OFF -DINIPARSER_LIBRARIES=../../iniparser/libiniparser.a -DINIPARSER_INCLUDE_DIRS=../../iniparser/src ../ocsync
/ocsync-build$ make
/mirall-build$ cmake -DCMAKE_BUILD_TYPE="Debug" ../mirall -DCSYNC_LIBRARY_PATH=../ocsync-build -DCSYNC_INCLUDE_PATH=../ocsync/src
/mirall-build$ make

The csync cmake call complains about missing CMocka and Neon libraries but seems to work nevertheless. The mirall cmake call complains about missing Sphinx and QtKeyChain but also seems to work.

When running make in the mirall-build directory now, I get an error message

Linking CXX shared library libmirallsync.so
/usr/bin/ld: cannot find -l../ocsync-build/src/libocsync.so
collect2: Fehler: ld gab 1 als Ende-Status zurück

The file ../ocsync-build/src/libocsync.so is there, so I wondered why it complained and changed the -DCSYNC_LIBRARY_PATH and -DCSYNC_INCLUDE_PATH attributes to absolute instead of relative paths.

Then it compiles again and I could run it. But I still get the same error. Here a gdb backtrace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd93a1700 (LWP 15254)]
0x00007ffff3064225 in csync_vio_get_error_string (ctx=0x7fffc8002aa0) at /home/[user]/owncloudclient/ocsync/src/vio/csync_vio.c:664
664         if(VIO_METHOD_HAS_FUNC(ctx->module.method, get_error_string)) {
(gdb) backtrace
#0  0x00007ffff3064225 in csync_vio_get_error_string (ctx=0x7fffc8002aa0) at /home/[user]/owncloudclient/ocsync/src/vio/csync_vio.c:664
#1  0x00007ffff3057b77 in csync_get_error_string (ctx=0x7fffc8002aa0) at /home/[user]/owncloudclient/ocsync/src/csync.c:1025
#2  0x00007ffff62a65a3 in Mirall::CSyncThread::startSync (this=0xb3e720) at /home/[user]/owncloudclient/mirall/src/mirall/csyncthread.cpp:326
#3  0x00007ffff62b3cb9 in Mirall::CSyncThread::qt_static_metacall (_o=0xb3e720, _c=QMetaObject::InvokeMetaMethod, _id=10, _a=0xb439d0) at /home/[user]/owncloudclient/mirall-build/src/mirall/moc_csyncthread.cxx:76
#4  0x00007ffff665a43e in QObject::event (this=0xb3e720, e=<optimized out>) at kernel/qobject.cpp:1195
#5  0x00007ffff70eae9c in QApplicationPrivate::notify_helper (this=this@entry=0x6b6370, receiver=receiver@entry=0xb3e720, e=e@entry=0xb46480) at kernel/qapplication.cpp:4562
#6  0x00007ffff70ef30a in QApplication::notify (this=0x7fffffffdd90, receiver=0xb3e720, e=0xb46480) at kernel/qapplication.cpp:4423
#7  0x00007ffff664556e in QCoreApplication::notifyInternal (this=0x7fffffffdd90, receiver=receiver@entry=0xb3e720, event=event@entry=0xb46480) at kernel/qcoreapplication.cpp:915
#8  0x00007ffff66493f1 in sendEvent (event=0xb46480, receiver=0xb3e720) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#9  QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0xb45a80) at kernel/qcoreapplication.cpp:1539
#10 0x00007ffff6673a63 in sendPostedEvents () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:236
#11 postEventSourceDispatch (s=0x7fffc80012d0) at kernel/qeventdispatcher_glib.cpp:279
#12 0x00007ffff4c67ab5 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#13 0x00007ffff4c67de8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#14 0x00007ffff4c67ea4 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#15 0x00007ffff6673bf6 in QEventDispatcherGlib::processEvents (this=0x7fffc80008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#16 0x00007ffff66442bf in QEventLoop::processEvents (this=this@entry=0x7fffd93a0e00, flags=...) at kernel/qeventloop.cpp:149
#17 0x00007ffff6644548 in QEventLoop::exec (this=0x7fffd93a0e00, flags=...) at kernel/qeventloop.cpp:204
#18 0x00007ffff6545b10 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#19 0x00007ffff6548aec in QThreadPrivate::start (arg=0xa47e70) at thread/qthread_unix.cpp:338
#20 0x00007ffff5370e9a in start_thread (arg=0x7fffd93a1700) at pthread_create.c:308
#21 0x00007ffff5a85cbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#22 0x0000000000000000 in ?? ()
dragotin commented 11 years ago

@smessmer please check if your csync build directory contains modules/ocsync_owncloud.so. That is loaded dynamically by csync once you try to access ownCloud. If you say you the cmake run did not find NEON its likely that the ownCloud plugin was not built. Make sure to have the neon devel packages installed, remove the csync build dir and rerun cmake.

smessmer commented 11 years ago

There was a libocsync.so and make reported it built everything successfully, so I thought it finished successfully. Nevertheless, there was no ocsync_owncloud.so.

Installing libneon27-dev and rebuilding everything solved the problem. Thank you very much.

dragotin commented 11 years ago

You're welcome, have fun!