Mousetick

Sync 2.5.x QPKG for QNAP x86_64 doesn't support fs change notification?

Recommended Posts

It looks like the Sync package for QNAP NAS, at least the x86_64 version, such as ResilioSync_2.5.12_x86_64.qpkg that can be downloaded from https://help.resilio.com/hc/en-us/articles/206178964, does not support 'realtime' filesystem change notification (Linux inotify) and only detects changes with its periodic folder scan (i.e. every 10 minutes by default), as can be seen by monitoring its process with strace. It is the same behavior as the Sync package for Linux with glibc-2.3.

Is this working as intented or is this a bug?

I don't know the full history of QNAP QTS versions but QTS 4.x has been shipping with Linux and glibc versions that support the inotify API for quite a while. And especially models with x86_64 archictecture that requires more recent versions of QTS 4.x. So I don't understand why Sync omits support for inotify when it could be easily made available.

In fact, the standard Sync package for Linux, resilio-sync_x64.tar.gz, that can be downloaded from https://www.resilio.com/individuals/ runs completely fine on QTS x86_64 and it does use inotify filesystem change notification!

Tested on QNAP TS-251+ with QTS 4.3.4.0569 (2018/05/01)

$ uname -a
Linux nasty 4.2.8 #1 SMP Tue May 1 01:22:47 CST 2018 x86_64 GNU/Linux
$ /lib/libc.so.6
GNU C Library (GNU libc) stable release version 2.21, by Roland McGrath et al.
Copyright (C) 2015 Free Software Foundation, Inc.

Tested with ResilioSync_2.5.12_x86_64.qpkg:

$ file rslsync
rslsync: ELF 64-bit LSB pie executable x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=9e1ddc7bca6edb94722f75e9cbf23f74b54248c9, stripped
$ head -2 storage/sync.log
platform: Linux 4.2.8 #1 SMP Tue May 1 01:22:47 CST 2018 x86_64
version: 2.5.12.1191

$ strace -f -t -y -P /share/CACHEDEV2_DATA/Test -s 64 ./rslsync --config resilio-sync.conf
(no calls to inotify whatsoever)

Tested with resilio-sync_x64.tar.gz on the same machine:

$ file rslsync
rslsync: ELF 64-bit LSB pie executable x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=e3f45ef85c818a724a4d95c024a8fe87db8243dd, stripped
$ head -2 .sync/sync.log
platform: Linux 4.2.8 #1 SMP Tue May 1 01:22:47 CST 2018 x86_64
version: 2.5.13.1301

$ strace -f -t -y -P /share/CACHEDEV2_DATA/Test -s 64 ./rslsync --webui.listen 0.0.0.0:8888
...
[pid 16053] 18:44:24 inotify_add_watch(27<anon_inode:inotify>, "/share/CACHEDEV2_DATA/Test", IN_MODIFY|IN_ATTRIB|IN_CLOSE_WRITE|IN_MOVED_FROM|IN_MOVED_TO|IN_CREATE|IN_DELETE|IN_DELETE_SELF|IN_MOVE_SELF) = 10
...

For the time being I'm just going to set up Sync manually on the NAS using the standard Linux binary package, but it would be nice to get some clarification from Resilio on whether the package for QNAP is supposed to support filesystem change notification on x86_64 architecture for glibc > 2.3, and if not, the reason why, and perhaps put a note somewhere (like on this page https://help.resilio.com/hc/en-us/articles/206178964) so we don't waste so much time figuring out why it's not "working" as expected.

Thanks.

Share this post


Link to post
Share on other sites

The only solution for you now is to instll the binary as you did already as we have to added some improvements and recompile the package (as the truncated version of the application published). But the only thing that I do not know ETA. In general our dev team will think how to troubleshoot that problem. Thank you. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.