* nilfs_cleanerd Function not implemented
@ 2012-03-16 12:05 svengbergh-nilfs-/E1597aS9LQAvxtiuMwx3w
[not found] ` <1331899533.77663.YahooMailNeo-/W4/QBBOCLIR8UyDmTZ/NZEhsgyP+Z75VpNB7YpNyf8@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: svengbergh-nilfs-/E1597aS9LQAvxtiuMwx3w @ 2012-03-16 12:05 UTC (permalink / raw)
To: linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Hi list,
I am in the process of migrating an embedded project from
ext2 to nilfs2 and have a problem with nilfs_cleanerd. It
does not start on mount and I cannot start it manually.
The below sequence is reproduced on the build system,
a QEMU i586, with a similar kernel as the target
(also i586, AMD Geode LX):
# mkfs.nilfs2 /dev/sdb1
mkfs.nilfs2 (nilfs-utils 2.1.1)
Start writing file system initial data to the device
Blocksize:4096 Device:/dev/sdb1 Device Size:2146765824
File system initialization succeeded !!
# mount.nilfs2 /dev/sdb1 /mnt/cf
# echo $?
0
# mount | grep nilfs
/dev/sdb1 on /mnt/cf type nilfs2 (rw,gcpid=489)
# nilfs-clean -l
No cleaner found on /dev/sdb1.
# dmesg | tail
...
segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds
# tail /var/log/syslog
...
Mar 14 16:48:50 monit kernel: segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds
Mar 14 16:48:51 monit nilfs_cleanerd[489]: start
Mar 14 16:48:51 monit nilfs_cleanerd[489]: cannot open nilfs on /dev/sdb1: Function not implemented
Mar 14 16:48:51 monit nilfs_cleanerd[489]: cannot create cleanerd on /dev/sdb1: Function not implemented
Mar 14 16:48:51 monit nilfs_cleanerd[489]: shutdown
Trying to start it manually with nilfs_cleanerd /dev/sdb1
gives the same result.
Kernel is a lean vanilla 3.2.11, but I have tried most
3.2.x kernels.
To a novice, like me, the lengthy strace below seems to
suggest a socket error of some sort (sendto(-1218631408,...).
Are there any specific kernel CONFIGs needed to get it
going?
/S-G
# strace -f /sbin/nilfs_cleanerd /dev/sdb1
execve("/sbin/nilfs_cleanerd", ["/sbin/nilfs_cleanerd", "/dev/sdb1"], [/* 13 vars */]) = 0
brk(0) = 0x8dfd000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7742000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=17637, ...}) = 0
mmap2(NULL, 17637, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb773d000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libnilfs.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260\22"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=24842, ...}) = 0
mmap2(NULL, 17896, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7738000
mmap2(0xb773c000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4) = 0xb773c000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libnilfsgc.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200\16"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=19922, ...}) = 0
mmap2(NULL, 17340, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7733000
mmap2(0xb7737000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3) = 0xb7737000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/librt.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240\30"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=30624, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7732000
mmap2(NULL, 33336, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7729000
mmap2(0xb7730000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6) = 0xb7730000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260e\1"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1294572, ...}) = 0
mmap2(NULL, 1300080, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb75eb000
mmap2(0xb7723000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x138) = 0xb7723000
mmap2(0xb7726000, 9840, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7726000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/libpthread.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\220G\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=112012, ...}) = 0
mmap2(NULL, 94688, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb75d3000
mmap2(0xb75e7000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13) = 0xb75e7000
mmap2(0xb75e9000, 4576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb75e9000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb75d2000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb75d28c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb7723000, 4096, PROT_READ) = 0
munmap(0xb773d000, 17637) = 0
set_tid_address(0xb75d2908) = 1224
sendto(-1218631408, umovestr: Input/output error
0xc, 3076423668, MSG_EOR|MSG_ERRQUEUE|MSG_DONTWAIT|MSG_CONFIRM|0xb75d0000, {sa_family=0xed31 /* AF_??? */, sa_data="^\211\341\203\344\360PTRh\300\334\4\10"}, 3220150176) = 0
futex(0xbfef9790, 0x81 /* FUTEX_??? */, 1) = 0
rt_sigaction(SIGRTMIN, {0xb75d7280, [], SA_SIGINFO}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0xb75d7680, [], SA_RESTART|SA_SIGINFO}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
uname({sys="Linux", node="monit.site.tpm", ...}) = 0
readlink("/dev", 0xbfef771f, 4096) = -1 EINVAL (Invalid argument)
readlink("/dev/sdb1", 0xbfef771f, 4096) = -1 EINVAL (Invalid argument)
brk(0) = 0x8dfd000
brk(0x8e1e000) = 0x8e1e000
clone(Process 1225 attached
child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb75d2908) = 1225
[pid 1224] exit_group(0) = ?
Process 1224 detached
setsid() = 1225
chdir("/") = 0
close(0) = 0
close(1) = 0
close(2) = 0
open("/dev/null", O_RDONLY) = 0
open("/dev/null", O_WRONLY) = 1
open("/dev/null", O_WRONLY) = 2
time(NULL) = 1331898633
open("/etc/localtime", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7741000
read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\4\0\0"..., 4096) = 1892
_llseek(3, -28, [1864], SEEK_CUR) = 0
read(3, "\nCET-1CEST,M3.5.0,M10.5.0/3\n", 4096) = 28
close(3) = 0
munmap(0xb7741000, 4096) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0
socket(PF_FILE, SOCK_DGRAM, 0) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
connect(3, {sa_family=AF_FILE, path="/dev/log"}, 110) = 0
send(3, "<30>Mar 16 12:50:33 nilfs_cleane"..., 47, MSG_NOSIGNAL) = 47
open("/dev/sdb1", O_RDONLY) = 4
ioctl(4, BLKGETSIZE64, 0xbfef8658) = 0
lseek(4, 1024, SEEK_SET) = 1024
read(4, "\2\0\0\0\0\00044\30\1\0\0KH.\227\17t\213\r\2\0\0\0\377"..., 1024) = 1024
lseek(4, 2146758656, SEEK_SET) = 2146758656
read(4, "\2\0\0\0\0\00044\30\1\0\0KH.\227\17t\213\r\2\0\0\0\377"..., 1024) = 1024
readlink("/dev", 0xbfef5e4f, 4096) = -1 EINVAL (Invalid argument)
readlink("/dev/sdb1", 0xbfef5e4f, 4096) = -1 EINVAL (Invalid argument)
open("/proc/mounts", O_RDONLY) = 5
fstat64(5, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7741000
read(5, "rootfs / rootfs rw 0 0\nprocfs /p"..., 1024) = 765
readlink("/dev", 0xbfef5e4f, 4096) = -1 EINVAL (Invalid argument)
readlink("/dev/sdb1", 0xbfef5e4f, 4096) = -1 EINVAL (Invalid argument)
close(5) = 0
munmap(0xb7741000, 4096) = 0
open("/mnt/cf", O_RDONLY) = 5
stat64("/dev/sdb1", {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 17), ...}) = 0
statfs("/dev/shm", {f_type=0x858458f6, f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0
open("/proc/mounts", O_RDONLY) = 6
fstat64(6, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7741000
read(6, "rootfs / rootfs rw 0 0\nprocfs /p"..., 1024) = 765
statfs("/lib/init/rw", {f_type=0x858458f6, f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0
statfs("/dev", {f_type=0x858458f6, f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0
statfs("/dev/shm", {f_type=0x858458f6, f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0
read(6, "", 1024) = 0
close(6) = 0
munmap(0xb7741000, 4096) = 0
futex(0xb75ea184, 0x81 /* FUTEX_??? */, 2147483647) = 0
close(4) = 0
close(5) = 0
time(NULL) = 1331898633
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0
send(3, "<27>Mar 16 12:50:33 nilfs_cleane"..., 98, MSG_NOSIGNAL) = 98
time(NULL) = 1331898633
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0
send(3, "<27>Mar 16 12:50:33 nilfs_cleane"..., 103, MSG_NOSIGNAL) = 103
time(NULL) = 1331898633
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0
send(3, "<30>Mar 16 12:50:33 nilfs_cleane"..., 50, MSG_NOSIGNAL) = 50
close(3) = 0
exit_group(1) = ?
Process 1225 detached
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: nilfs_cleanerd Function not implemented
[not found] ` <1331899533.77663.YahooMailNeo-/W4/QBBOCLIR8UyDmTZ/NZEhsgyP+Z75VpNB7YpNyf8@public.gmane.org>
@ 2012-03-16 12:37 ` dexen deVries
2012-03-16 14:21 ` Sven-Göran Bergh
0 siblings, 1 reply; 8+ messages in thread
From: dexen deVries @ 2012-03-16 12:37 UTC (permalink / raw)
To: linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Hi Sven,
On Friday 16 of March 2012 05:05:33 you wrote:
> Hi list,
>
> I am in the process of migrating an embedded project from
> ext2 to nilfs2 and have a problem with nilfs_cleanerd. It
> does not start on mount and I cannot start it manually.
> (...)
I'd suspect futex() or open(..., O_RDWR|O_NOFOLLOW). Do you have
`CONFIG_FUTEX' enabled in your embedded kernel?
Relevant snippet from strace of my nilfs_cleanerd (version nilfs-
utils-2.0.23):
864 open("/proc/mounts", O_RDONLY) = 5
864 fstat(5, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
864 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7f551032d000
864 read(5, "rootfs / rootfs rw 0 0\n/dev/root"..., 1024) = 480
864 readlink("/dev", 0x7fffff54d630, 4096) = -1 EINVAL (Invalid argument)
864 readlink("/dev/root", "sda3", 4096) = 4
864 readlink("/dev/sda3", 0x7fffff54d630, 4096) = -1 EINVAL (Invalid argument)
864 readlink("/dev", 0x7fffff54d630, 4096) = -1 EINVAL (Invalid argument)
864 readlink("/dev/sdb3", 0x7fffff54d630, 4096) = -1 EINVAL (Invalid argument)
864 close(5) = 0
864 munmap(0x7f551032d000, 4096) = 0
864 open("/home", O_RDONLY) = 5
864 stat("/dev/sdb3", {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 19), ...}) =
0
864 statfs("/dev/shm", {f_type=0x1021994, f_bsize=4096, f_blocks=86016,
f_bfree=86010, f_bavail=86010, f_files=754077, f_ffree=754075, f_fsid={0, 0},
f_namelen=255, f_frsize=4096}
) = 0
864 futex(0x7f551010d31c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
864 open("/dev/shm/sem.nilfs-cleaner-2067", O_RDWR|O_NOFOLLOW) = -1 ENOENT
(No such file or directory)
864 lstat("/dev/shm/sem.qLTneb", 0x7fffff54fb70) = -1 ENOENT (No such file or
directory)
864 open("/dev/shm/sem.qLTneb", O_RDWR|O_CREAT|O_EXCL, 0700) = 6
Btw., you may not be seeing the failed (with `Function not implemented')
syscall in strace, if the libc itself signals the `Function not implemented'
error instead of issuing the syscall. Consider using ``ltrace'' instead, to
intercept all lib calls.
Cheers,
--
dexen deVries
[[[↓][→]]]
Already many of the mutants disguised as human beings are walking the streets
of Earth's cities.
-- Music Instructor, ``Electro City''
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: nilfs_cleanerd Function not implemented
2012-03-16 12:37 ` dexen deVries
@ 2012-03-16 14:21 ` Sven-Göran Bergh
[not found] ` <1331907699.90830.YahooMailNeo-/W4/QBBOCLJal3a5i+KC+JEhsgyP+Z75VpNB7YpNyf8@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Sven-Göran Bergh @ 2012-03-16 14:21 UTC (permalink / raw)
To: dexen deVries; +Cc: linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Hi dexen,
thank you for a prompt reply.
>> I am in the process of migrating an embedded project from
>> ext2 to nilfs2 and have a problem with nilfs_cleanerd. It
>> does not start on mount and I cannot start it manually.
>> (...)
>
> I'd suspect futex() or open(..., O_RDWR|O_NOFOLLOW). Do you have
> `CONFIG_FUTEX' enabled in your embedded kernel?
Yes, futex is enabled.
# zcat /proc/config.gz | grep CONFIG_FUTEX
CONFIG_FUTEX=y
> Relevant snippet from strace of my nilfs_cleanerd (version nilfs-
> utils-2.0.23):
...
> 864 statfs("/dev/shm", {f_type=0x1021994, f_bsize=4096,
> f_blocks=86016,
> f_bfree=86010, f_bavail=86010, f_files=754077, f_ffree=754075, f_fsid={0, 0},
> f_namelen=255, f_frsize=4096}
> ) = 0
> 864 futex(0x7f551010d31c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
> 864 open("/dev/shm/sem.nilfs-cleaner-2067", O_RDWR|O_NOFOLLOW) = -1
> ENOENT
> (No such file or directory)
> 864 lstat("/dev/shm/sem.qLTneb", 0x7fffff54fb70) = -1 ENOENT (No
> such file or
> directory)
> 864 open("/dev/shm/sem.qLTneb", O_RDWR|O_CREAT|O_EXCL, 0700) = 6
Hmmm, quite different.
> Btw., you may not be seeing the failed (with `Function not implemented')
> syscall in strace, if the libc itself signals the `Function not implemented'
> error instead of issuing the syscall. Consider using ``ltrace'' instead,
> to intercept all lib calls.
I cannot get any clues from ltrace either:
# ltrace -f /sbin/nilfs_cleanerd /dev/sdb1
__libc_start_main(0x804c20b, 2, 0xbfc16354, 0x804dcd0, 0x804dcc0 <unfinished ...>
strrchr("/sbin/nilfs_cleanerd", '/') = "/nilfs_cleanerd"
strrchr("/sbin/nilfs_cleanerd", '/') = "/nilfs_cleanerd"
getopt_long(2, 0xbfc16354, "c:hnp:V", 0x804de20, 0xbfc1528c) = -1
myrealpath(0xbfc16c5c, 0xbfc15296, 4098, 0x804de20, 0xbfc1528c) = 0xbfc15296
strdup("/dev/sdb1") = 0x9268008
fork( <unfinished ...>
[pid 3534] --- SIGSTOP (Stopped (signal)) ---
[pid 3534] --- SIGSTOP (Stopped (signal)) ---
[pid 3533] <... fork resumed> ) = 3534
[pid 3533] --- SIGCHLD (Child exited) ---
[pid 3533] _exit(0 <unfinished ...>
[pid 3533] +++ exited (status 0) +++
+++ exited (status 1) +++
BTW: CONFIG_SHMEM is not enabled:
# zcat /proc/config.gz | grep CONFIG_SHMEM
# CONFIG_SHMEM is not set
Is it needed? I am a bit confused by the kernel help text:
"...Disabling this
option replaces shmem and tmpfs with the much
simpler ramfs code,
which may be appropriate on small systems
without swap."
...wait a moment...
I just recompiled the kernel with CONFIG_SHMEM enabled,
but no success. Same result as before :-(
What caught my attention in the first strace was:
sendto(-1218631408, umovestr: Input/output error
It happens before the futex call and to me the socketfd
(-1218631408) seems invalid. Just a wild shot...
/S-G
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: nilfs_cleanerd Function not implemented
[not found] ` <1331907699.90830.YahooMailNeo-/W4/QBBOCLJal3a5i+KC+JEhsgyP+Z75VpNB7YpNyf8@public.gmane.org>
@ 2012-03-17 11:43 ` Ryusuke Konishi
[not found] ` <20120317.204343.93460664.ryusuke-sG5X7nlA6pw@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Ryusuke Konishi @ 2012-03-17 11:43 UTC (permalink / raw)
To: svengbergh-nilfs-/E1597aS9LQAvxtiuMwx3w
Cc: dexen.devries-Re5JQEeQqe8AvxtiuMwx3w,
linux-nilfs-u79uwXL29TY76Z2rM5mHXA
On Fri, 16 Mar 2012 07:21:39 -0700 (PDT), Sven-Göran_Bergh wrote:
> Hi dexen,
>
> thank you for a prompt reply.
>
>
>
> >> I am in the process of migrating an embedded project from
> >> ext2 to nilfs2 and have a problem with nilfs_cleanerd. It
> >> does not start on mount and I cannot start it manually.
> >> (...)
> >
> > Relevant snippet from strace of my nilfs_cleanerd (version nilfs-
> > utils-2.0.23):
> ...
> > 864 statfs("/dev/shm", {f_type=0x1021994, f_bsize=4096,
> > f_blocks=86016,
> > f_bfree=86010, f_bavail=86010, f_files=754077, f_ffree=754075, f_fsid={0, 0},
> > f_namelen=255, f_frsize=4096}
> > ) = 0
> > 864 futex(0x7f551010d31c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
> > 864 open("/dev/shm/sem.nilfs-cleaner-2067", O_RDWR|O_NOFOLLOW) = -1
> > ENOENT
> > (No such file or directory)
> > 864 lstat("/dev/shm/sem.qLTneb", 0x7fffff54fb70) = -1 ENOENT (No
> > such file or
> > directory)
> > 864 open("/dev/shm/sem.qLTneb", O_RDWR|O_CREAT|O_EXCL, 0700) = 6
>
> Hmmm, quite different.
Could you confirm whether /dev/shm is mounted on /run/shm (or
/var/run/shm) ?
Some systems don't mount /dev/shm, and posix semaphores do not work in
such systems.
Regards,
Ryusuke Konishi
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: nilfs_cleanerd Function not implemented
[not found] ` <20120317.204343.93460664.ryusuke-sG5X7nlA6pw@public.gmane.org>
@ 2012-03-17 13:53 ` Ryusuke Konishi
[not found] ` <20120317.225320.67906283.ryusuke-sG5X7nlA6pw@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Ryusuke Konishi @ 2012-03-17 13:53 UTC (permalink / raw)
To: svengbergh-nilfs-/E1597aS9LQAvxtiuMwx3w
Cc: dexen.devries-Re5JQEeQqe8AvxtiuMwx3w,
linux-nilfs-u79uwXL29TY76Z2rM5mHXA
On Sat, 17 Mar 2012 20:43:43 +0900 (JST), Ryusuke Konishi wrote:
> On Fri, 16 Mar 2012 07:21:39 -0700 (PDT), Sven-Göran_Bergh wrote:
> > Hi dexen,
> >
> > thank you for a prompt reply.
> >
> >
> >
> > >> I am in the process of migrating an embedded project from
> > >> ext2 to nilfs2 and have a problem with nilfs_cleanerd. It
> > >> does not start on mount and I cannot start it manually.
> > >> (...)
> > >
> > > Relevant snippet from strace of my nilfs_cleanerd (version nilfs-
> > > utils-2.0.23):
> > ...
> > > 864 statfs("/dev/shm", {f_type=0x1021994, f_bsize=4096,
> > > f_blocks=86016,
> > > f_bfree=86010, f_bavail=86010, f_files=754077, f_ffree=754075, f_fsid={0, 0},
> > > f_namelen=255, f_frsize=4096}
> > > ) = 0
> > > 864 futex(0x7f551010d31c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
> > > 864 open("/dev/shm/sem.nilfs-cleaner-2067", O_RDWR|O_NOFOLLOW) = -1
> > > ENOENT
> > > (No such file or directory)
> > > 864 lstat("/dev/shm/sem.qLTneb", 0x7fffff54fb70) = -1 ENOENT (No
> > > such file or
> > > directory)
> > > 864 open("/dev/shm/sem.qLTneb", O_RDWR|O_CREAT|O_EXCL, 0700) = 6
> >
> > Hmmm, quite different.
>
> Could you confirm whether /dev/shm is mounted on /run/shm (or
> /var/run/shm) ?
>
> Some systems don't mount /dev/shm, and posix semaphores do not work in
> such systems.
Oops, /dev/shm is just a directory (not a device), and /run/shm was
irrelevant. Sorry.
The cause of this problem seems that posix semaphores are not
available in your system. I'll dig into it.
Ryusuke Konishi
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: nilfs_cleanerd Function not implemented
[not found] ` <20120317.225320.67906283.ryusuke-sG5X7nlA6pw@public.gmane.org>
@ 2012-03-17 17:17 ` Ryusuke Konishi
[not found] ` <20120318.021740.212402053.ryusuke-sG5X7nlA6pw@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Ryusuke Konishi @ 2012-03-17 17:17 UTC (permalink / raw)
To: svengbergh-nilfs-/E1597aS9LQAvxtiuMwx3w
Cc: dexen.devries-Re5JQEeQqe8AvxtiuMwx3w,
linux-nilfs-u79uwXL29TY76Z2rM5mHXA
On Sat, 17 Mar 2012 22:53:20 +0900 (JST), Ryusuke Konishi wrote:
> On Sat, 17 Mar 2012 20:43:43 +0900 (JST), Ryusuke Konishi wrote:
> > On Fri, 16 Mar 2012 07:21:39 -0700 (PDT), Sven-Göran_Bergh wrote:
> > > Hi dexen,
> > >
> > > thank you for a prompt reply.
> > >
> > >
> > >
> > > >> I am in the process of migrating an embedded project from
> > > >> ext2 to nilfs2 and have a problem with nilfs_cleanerd. It
> > > >> does not start on mount and I cannot start it manually.
> > > >> (...)
> > > >
> > > > Relevant snippet from strace of my nilfs_cleanerd (version nilfs-
> > > > utils-2.0.23):
> > > ...
> > > > 864 statfs("/dev/shm", {f_type=0x1021994, f_bsize=4096,
> > > > f_blocks=86016,
> > > > f_bfree=86010, f_bavail=86010, f_files=754077, f_ffree=754075, f_fsid={0, 0},
> > > > f_namelen=255, f_frsize=4096}
> > > > ) = 0
> > > > 864 futex(0x7f551010d31c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
> > > > 864 open("/dev/shm/sem.nilfs-cleaner-2067", O_RDWR|O_NOFOLLOW) = -1
> > > > ENOENT
> > > > (No such file or directory)
> > > > 864 lstat("/dev/shm/sem.qLTneb", 0x7fffff54fb70) = -1 ENOENT (No
> > > > such file or
> > > > directory)
> > > > 864 open("/dev/shm/sem.qLTneb", O_RDWR|O_CREAT|O_EXCL, 0700) = 6
> > >
> > > Hmmm, quite different.
> >
> > Could you confirm whether /dev/shm is mounted on /run/shm (or
> > /var/run/shm) ?
> >
> > Some systems don't mount /dev/shm, and posix semaphores do not work in
> > such systems.
>
> Oops, /dev/shm is just a directory (not a device), and /run/shm was
> irrelevant. Sorry.
>
> The cause of this problem seems that posix semaphores are not
> available in your system. I'll dig into it.
>
> Ryusuke Konishi
I read the source code of sem_open() in glibc and found that
sem_open() fails if there is no tmpfs (former shm fs) mount in the
system.
According to your strace log, your /dev/shm is mounted with "ramfs"
whose magic number is 0x858458f6. This looks the cause of the error.
> statfs("/dev/shm", {f_type=0x858458f6, f_bsize=4096, f_blocks=0,
> f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0},
> f_namelen=255, f_frsize=4096}) = 0
Try following kernel configs to enable tmpfs and mount it to
/dev/shm instead of using ramfs.
- CONFIG_SHMEM
Generic setup ->
Configure standard kernel features (expert users) ->
Use full shmem filesystem
- CONFIG_TMPFS
File systems ->
Pseudo filesystems ->
Tmpfs virtual memory file system support (former shm fs)
Regards,
Ryusuke Konishi
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: nilfs_cleanerd Function not implemented
[not found] ` <20120318.021740.212402053.ryusuke-sG5X7nlA6pw@public.gmane.org>
@ 2012-03-19 8:19 ` Sven-Göran Bergh
[not found] ` <1332145146.39316.YahooMailNeo-/W4/QBBOCLLK0anN2EpufZEhsgyP+Z75VpNB7YpNyf8@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Sven-Göran Bergh @ 2012-03-19 8:19 UTC (permalink / raw)
To: Ryusuke Konishi; +Cc: linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Hi Ryusuke,
thank you for your investigations.
> On Sat, 17 Mar 2012 22:53:20 +0900 (JST), Ryusuke Konishi wrote:
>> On Sat, 17 Mar 2012 20:43:43 +0900 (JST), Ryusuke Konishi wrote:
>> > On Fri, 16 Mar 2012 07:21:39 -0700 (PDT), Sven-Göran_Bergh wrote:
>> > > Hi dexen,
>> > >
>> > > thank you for a prompt reply.
>> > >
>> > >
>> > >
>> > > >> I am in the process of migrating an embedded project
> from
>> > > >> ext2 to nilfs2 and have a problem with nilfs_cleanerd.
> It
>> > > >> does not start on mount and I cannot start it manually.
>> > > >> (...)
>> > > >
>> > > > Relevant snippet from strace of my nilfs_cleanerd (version
> nilfs-
>> > > > utils-2.0.23):
>> > > ...
>> > > > 864 statfs("/dev/shm", {f_type=0x1021994,
> f_bsize=4096,
>> > > > f_blocks=86016,
>> > > > f_bfree=86010, f_bavail=86010, f_files=754077,
> f_ffree=754075, f_fsid={0, 0},
>> > > > f_namelen=255, f_frsize=4096}
>> > > > ) = 0
>> > > > 864 futex(0x7f551010d31c, FUTEX_WAKE_PRIVATE, 2147483647)
> = 0
>> > > > 864 open("/dev/shm/sem.nilfs-cleaner-2067",
> O_RDWR|O_NOFOLLOW) = -1
>> > > > ENOENT
>> > > > (No such file or directory)
>> > > > 864 lstat("/dev/shm/sem.qLTneb", 0x7fffff54fb70)
> = -1 ENOENT (No
>> > > > such file or
>> > > > directory)
>> > > > 864 open("/dev/shm/sem.qLTneb",
> O_RDWR|O_CREAT|O_EXCL, 0700) = 6
>> > >
>> > > Hmmm, quite different.
>> >
>> > Could you confirm whether /dev/shm is mounted on /run/shm (or
>> > /var/run/shm) ?
>> >
>> > Some systems don't mount /dev/shm, and posix semaphores do not
> work in
>> > such systems.
>>
>> Oops, /dev/shm is just a directory (not a device), and /run/shm was
>> irrelevant. Sorry.
>>
>> The cause of this problem seems that posix semaphores are not
>> available in your system. I'll dig into it.
>>
>> Ryusuke Konishi
>
> I read the source code of sem_open() in glibc and found that
> sem_open() fails if there is no tmpfs (former shm fs) mount in the
> system.
>
> According to your strace log, your /dev/shm is mounted with "ramfs"
> whose magic number is 0x858458f6. This looks the cause of the error.
>
>> statfs("/dev/shm", {f_type=0x858458f6, f_bsize=4096, f_blocks=0,
>> f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0},
>> f_namelen=255, f_frsize=4096}) = 0
>
> Try following kernel configs to enable tmpfs and mount it to
> /dev/shm instead of using ramfs.
>
> - CONFIG_SHMEM
> Generic setup ->
> Configure standard kernel features (expert users) ->
> Use full shmem filesystem
>
> - CONFIG_TMPFS
> File systems ->
> Pseudo filesystems ->
> Tmpfs virtual memory file system support (former shm fs)
You are right. I was using ramfs and when I tried with CONFIG_SHMEM
I still used ramfs, so right now I am compiling a new kernel with
both CONFIG_SHMEM and CONFIG_TMPFS. I will report my results when
I have tried the new kernel.
Thanks again
/S-G
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: nilfs_cleanerd Function not implemented
[not found] ` <1332145146.39316.YahooMailNeo-/W4/QBBOCLLK0anN2EpufZEhsgyP+Z75VpNB7YpNyf8@public.gmane.org>
@ 2012-03-19 17:53 ` Sven-Göran Bergh
0 siblings, 0 replies; 8+ messages in thread
From: Sven-Göran Bergh @ 2012-03-19 17:53 UTC (permalink / raw)
To: Ryusuke Konishi; +Cc: linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Hi again,
Just reporting back my results...
>> I read the source code of sem_open() in glibc and found that
>> sem_open() fails if there is no tmpfs (former shm fs) mount in the
>> system.
>>
>> According to your strace log, your /dev/shm is mounted with "ramfs"
>> whose magic number is 0x858458f6. This looks the cause of the error.
>>
>>> statfs("/dev/shm", {f_type=0x858458f6, f_bsize=4096, f_blocks=0,
>>> f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0},
>>> f_namelen=255, f_frsize=4096}) = 0
>>
>> Try following kernel configs to enable tmpfs and mount it to
>> /dev/shm instead of using ramfs.
>>
>> - CONFIG_SHMEM
>> Generic setup ->
>> Configure standard kernel features (expert users) ->
>> Use full shmem filesystem
>>
>> - CONFIG_TMPFS
>> File systems ->
>> Pseudo filesystems ->
>> Tmpfs virtual memory file system support (former shm fs)
>
> You are right. I was using ramfs and when I tried with CONFIG_SHMEM
> I still used ramfs, so right now I am compiling a new kernel with
> both CONFIG_SHMEM and CONFIG_TMPFS. I will report my results when
> I have tried the new kernel.
That did it! Both CONFIG_SHMEM _and_ CONFIG_TMPFS are needed.
I now have a new firmware image for my project and nilfs is
working as expected.
Due to the nature of the project, nilfs_cleanerd is not started when
the FS is mounted (in the initramfs). Instead it is supervised with
runsv(dir), so I start nilfs_cleanerd with -n to keep it from forking.
I hope this is the proper way of running nilfs_cleanerd under a
supervisor?!?
Thanks again!
/S-G
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-03-19 17:53 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-16 12:05 nilfs_cleanerd Function not implemented svengbergh-nilfs-/E1597aS9LQAvxtiuMwx3w
[not found] ` <1331899533.77663.YahooMailNeo-/W4/QBBOCLIR8UyDmTZ/NZEhsgyP+Z75VpNB7YpNyf8@public.gmane.org>
2012-03-16 12:37 ` dexen deVries
2012-03-16 14:21 ` Sven-Göran Bergh
[not found] ` <1331907699.90830.YahooMailNeo-/W4/QBBOCLJal3a5i+KC+JEhsgyP+Z75VpNB7YpNyf8@public.gmane.org>
2012-03-17 11:43 ` Ryusuke Konishi
[not found] ` <20120317.204343.93460664.ryusuke-sG5X7nlA6pw@public.gmane.org>
2012-03-17 13:53 ` Ryusuke Konishi
[not found] ` <20120317.225320.67906283.ryusuke-sG5X7nlA6pw@public.gmane.org>
2012-03-17 17:17 ` Ryusuke Konishi
[not found] ` <20120318.021740.212402053.ryusuke-sG5X7nlA6pw@public.gmane.org>
2012-03-19 8:19 ` Sven-Göran Bergh
[not found] ` <1332145146.39316.YahooMailNeo-/W4/QBBOCLLK0anN2EpufZEhsgyP+Z75VpNB7YpNyf8@public.gmane.org>
2012-03-19 17:53 ` Sven-Göran Bergh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox