TurboGit/hubicfuse

*** stack smashing detected ***: hubicfuse terminated

bronco0 opened this issue · 7 comments

Hello,

I can not copy files either with the cp or rsync, I get at the end the following error "Software Caused connection abort".

I tried to compile with different hubicfuse -O but still the same problem.

So I turned on DEBUG mode with the -d option of hubicfuse.
At the end you get the error "*** stack smashing detected ***: hubicfuse terminated".

Single: 7, opcode: FLUSH (25) nodeid: 3 insize: 64, pid: 21407
flush [3021052136]
== 0 DBG [2016-01-14 3:30:52 p.m..] == 21398 cfs_flush (/ default / sent2)
== 0 DBG [2016-01-14 3:30:52 p.m..] == 21398 file_md5: 0 queue buffer size, using default
== 0 DBG [2016-01-14 3:30:52 p.m..] == 21398 cfs_flush (/ default / sent2) perform full upload changed as happy (or no file found in cache)
== 0 DBG [2016-01-14 3:30:53 p.m..]: 21398 == exit 0: send_request_size (/ default / sent2) speed = 0.2 sec (PUT) [HTTP OK]
== 0 DBG [2016-01-14 3:30:53 p.m..]: 21398 == exit 1: cfs_flush (/ default / sent2) result = 0: Success
*** Stack smashing detected ***: hubicfuse terminated
Aborted

So I recompiled with gcc option -fno-stack-protector ...
Error: Segmentation fault

flush [3002176592]
== 0 DBG [2016-01-14 3:57:53 p.m..] == 27953 cfs_flush (/ default / sent7)
== 0 DBG [2016-01-14 3:57:53 p.m..] == 27953 file_md5: 0 queue buffer size, using default
Segmentation fault

The problem seems to be the function file_md5 of commonfs.c file.
I disabled his call in the function cfs_flush of cloudfuse.c file line 428.

Recompilation, no problem ....

May be a memory allocation problem in file_md5 function?
Where in the test with the md5_file_hash_str value?

With current ARM v7, 4.1.6 kernel.
4.1.6-249 # 1 SMP Mon Aug 31 12:34:47 UTC 2015 armv7l armv7l armv7l GNU / Linux
gcc Version 4.9.2

Thank you

Interesting findings. I don't have time right now to look at this, but will do!

I'll fix this, I think I know what the issue is.

------ Original Message ------
From: "Pascal Obry" notifications@github.com
To: "TurboGit/hubicfuse" hubicfuse@noreply.github.com
Sent: 14-Jan-16 6:51:19 PM
Subject: Re: [hubicfuse] *** stack smashing detected ***: hubicfuse
terminated (#107)

Interesting findings. I don't have time right now to look at this, but
will do!


Reply to this email directly or view it on GitHub.

Great thanks!

Thanks guys :)
According to a first test this fixes #98 on the raspi2.

Hi,

I have just tested this patch and it worked !

Thanks

Hi, this also fixed #98 for me on Ubuntu 14.04. Works great. Thank you @dan-cristian

Fixed! Thanks @dan-cristian!