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

OpenPandora ARM: sync client crashes with memory/stack corruption #400

Closed
eyecreate opened this issue Mar 5, 2013 · 8 comments
Closed

Comments

@eyecreate
Copy link

Compiling the sync client(1.2.1) for OpenPandora ARM linux system seems to have issue with stack corruption.

backtrace:
Program received signal SIGSEGV, Segmentation fault.
[Switching to LWP 10490]
csync_get_user_home_dir ()
at /home/eyecreate/Pandora/owncloudsync/ocsync-0.70.4/src/csync_misc.c:89
89 /home/eyecreate/Pandora/owncloudsync/ocsync-0.70.4/src/csync_misc.c: No such file or directory.
in /home/eyecreate/Pandora/owncloudsync/ocsync-0.70.4/src/csync_misc.c
(gdb) bt
#0 csync_get_user_home_dir ()

at /home/eyecreate/Pandora/owncloudsync/ocsync-0.70.4/src/csync_misc.c:89

#1 0x40d6cf04 in csync_create (csync=0x438a0824,

local=0x26fce8 "/mnt/utmp/owncloudsync/ownCloud/", 
remote=0x285c18 "owncloud://cloud.eyecreate.org/remote.php/webdav/clientsync") at /home/eyecreate/Pandora/owncloudsync/ocsync-0.70.4/src/csync.c:135

#2 0x40d3ca38 in Mirall::CSyncThread::startSync() ()

from /mnt/utmp/owncloudsync/lib/libowncloudsync.so.0
#3 0x40d504b0 in Mirall::CSyncThread::qt_metacall(QMetaObject::Call, int, void**) () from /mnt/utmp/owncloudsync/lib/libowncloudsync.so.0
#4 0x40c18524 in QMetaObject::metacall(QObject_, QMetaObject::Call, int, void_) () from /usr/lib/libQtCore.so.4
#5 0x40c25620 in QObject::event(QEvent
) () from /usr/lib/libQtCore.so.4
#6 0x401408a8 in QApplicationPrivate::notify_helper(QObject_, QEvent_) ()

from /usr/lib/libQtGui.so.4
#7 0x4014ab94 in QApplication::notify(QObject_, QEvent_) ()

from /usr/lib/libQtGui.so.4
#8 0xbefff604 in ?? ()
#9 0xbefff604 in ?? ()

Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Link should be the Valkryrie Valgrind XML output from the x86_64 version showing where issues were detected:
http://boards.openpandora.org/index.php?app=core&module=attach&section=attach&attach_id=5620

@cryptomilk
Copy link
Contributor

I can only guess here, but it think it is a getenv issue. A 'bt full' would be better than just a 'bt'. However I pushed a fix for getenv to csync.

@dragotin
Copy link
Contributor

dragotin commented Mar 5, 2013

@eyecreate could check what the value of the environment variable HOME is? You could try to set it correctly.

@dragotin
Copy link
Contributor

dragotin commented Mar 5, 2013

pulled @gladiac s patches to ocsync branch.

@eyecreate
Copy link
Author

The patch did not fix the issue. If I comment out any of the code using the stack, no SIGSEGV appears there, but another similar SIGSEGV shows up elsewhere in the csync code where stack is being used further along(like csync_init's errbuf). I've now attached a full backtrace and related info.

Backtrace:
Program received signal SIGSEGV, Segmentation fault.
[Switching to LWP 12297]
csync_get_user_home_dir ()
at /home/eyecreate/Pandora/owncloudsync/ocsync-0.70.4/src/csync_misc.c:90
90 /home/eyecreate/Pandora/owncloudsync/ocsync-0.70.4/src/csync_misc.c: No such file or directory.
in /home/eyecreate/Pandora/owncloudsync/ocsync-0.70.4/src/csync_misc.c
(gdb) bt full
#0 csync_get_user_home_dir ()
at /home/eyecreate/Pandora/owncloudsync/ocsync-0.70.4/src/csync_misc.c:90
home = '\000' <repeats 3896 times>"\310, >\n\000\f\a\nD\000\000\000\000\310>\n\000\f\a\nD\001\000\000\000\244/\301@", '\000' <repeats 148 times>, "h\213\375@(\302\376@0", '\000' <repeats 11 times>, "\004\000\000"
envp =
pwd = {pw_name = 0x0, pw_passwd = 0x0, pw_uid = 0, pw_gid = 0,
pw_gecos = 0x0, pw_dir = 0x0, pw_shell = 0x0}
pwdbuf = 0x0
buf = "\000\300\376@\030\000\000\000\004\000\000\000\000\000\000\000\000\020\000\000\000\240\000\000P\325\353@\000\000\000\020\000\000\000\000\000\300\376@<\004\nD,\320\376@\030\000\000\000\000\000\000\000\023\000\000\000\000\000\000\000X/\363@\000\000\000\000\002\000\000\000\210\004\nD<\004\nD\210\004\nD"\222'\000\002\000\000\000T\374\265@\000\000\000\000\000\000\000\000<\004\nDh\243\263@", '\000' <repeats 92 times>, "h\213\375@(\302\376@8", '\000' <repeats 11 times>, "\005\000\000\000\000\300\376@ \000\000\000\005\000\000\000\000\000\000\000\061\000\071\000\000\000\000\000\310>\n\000\310>\n\000\000\000\000\000\000\300\376@\006\000\000\000,\320\376@ \000\000\000\060\000\000---Type to continue, or q to quit---
000\003\000\000\000\001\000\000\000X/\363@\001\000\000\000\020\000\000\000\002\000\000\000\006"...
rc =
#1 0x40d6cf3c in csync_create (csync=0x440a0824,
local=0x25f710 "/mnt/utmp/owncloudsync/ownCloud/",
remote=0x279110 "owncloud://cloud.eyecreate.org/remote.php/webdav/clientsync") at /home/eyecreate/Pandora/owncloudsync/ocsync-0.70.4/src/csync.c:135
ctx = 0x2793d8
len =
home =
rc =
#2 0x40d3ca38 in Mirall::CSyncThread::startSync() ()
from /mnt/utmp/owncloudsync/lib/libowncloudsync.so.0
No locals.
#3 0x40d504b0 in Mirall::CSyncThread::qt_metacall(QMetaObject::Call, int, void**) () from /mnt/utmp/owncloudsync/lib/libowncloudsync.so.0
No locals.
#4 0x40c18524 in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib/libQtCore.so.4
---Type to continue, or q to quit---
No symbol table info available.
#5 0x40c25620 in QObject::event(QEvent_) () from /usr/lib/libQtCore.so.4
No symbol table info available.
#6 0x401408a8 in QApplicationPrivate::notify_helper(QObject_, QEvent_) ()
from /usr/lib/libQtGui.so.4
No symbol table info available.
#7 0x4014ab94 in QApplication::notify(QObject_, QEvent*) ()
from /usr/lib/libQtGui.so.4
No symbol table info available.
#8 0xbefff604 in ?? ()
No symbol table info available.
#9 0xbefff604 in ?? ()
No symbol table info available.
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Script line that sets HOME var for this program:
export HOME="/mnt/utmp/owncloudsync"

Also, some discussion about this problem on the board for this device in case it gives better context:
http://boards.openpandora.org/index.php/topic/12148-char-sigsegv/

@dragotin
Copy link
Contributor

dragotin commented Mar 6, 2013

@eyecreate sorry, but I think that is a platform problem, not related to csync in the first place.

@eyecreate
Copy link
Author

Okay, will look in that direction. Thanks for your time.

@dragotin
Copy link
Contributor

dragotin commented Mar 6, 2013

Ok, I'll close here, please reopen if you think we can help somehow. Good luck :-)

@dragotin dragotin closed this as completed Mar 6, 2013
@eyecreate
Copy link
Author

Using a newer set of libs/gcc seems to have made this issue disappear.

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

3 participants