Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005284OCamlOCaml generalpublic2011-06-08 00:322011-06-12 12:08
Reportertiancaicai 
Assigned To 
PrioritynormalSeverityblockReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version3.12.0 
Target VersionFixed in Version 
Summary0005284: cp -p in ocamlrun doesn't work on ZFS
DescriptionWhen I was trying to install ocaml, make world gave me the following errors:

boot/ocamlrun boot/ocamldep -modules ocamlbuild/options.ml > ocamlbuild/options.ml.depends
cp -p myocamlbuild_config.mli ocamlbuild/ocamlbuild_Myocamlbuild_config.mli
cp: preserving permissions for `ocamlbuild/ocamlbuild_Myocamlbuild_config.mli': Operation not supported
cp: preserving ACL for `ocamlbuild/ocamlbuild_Myocamlbuild_config.mli': Operation not supported
Exit code 1 while executing this command:
  cp -p myocamlbuild_config.mli ocamlbuild/ocamlbuild_Myocamlbuild_config.mli
make[1]: *** [ocamlbuild-mixed-boot] Error 1
make[1]: Leaving directory `/cs/guests/jias/software/ocaml-3.12.0'
make: *** [world] Error 2

I think it's a ZFS issue, which -p is not allowed for cp.

Can you help me to find how to disable this -p options in ocamlrun? I greped the source code and cannot find a clue. Thanks!
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0005992)
ygrek (reporter)
2011-06-08 13:38

update cp to the latest version, show cp --version, describe your OS and filesystem, show syscall trace (with strace/truss/etc)
(0005993)
tiancaicai (reporter)
2011-06-08 19:19

This machine is maintained by school so I cannot update it myself. But I'll try to contact the IT service people to update if it is really necessary.

$ cp --version
cp (GNU coreutils) 5.97

$ cat /etc/*release*
CentOS release 5.6 (Final)
$ uname -r
2.6.18-238.9.1.el5
$ uname -i
x86_64

Filesystem is using ZFS.

$ strace -o output make world
$ cat output
execve("/usr/bin/make", ["make", "world"], [/* 61 vars */]) = 0
brk(0) = 0x1ff89000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ad94536d000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ad94536e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/x86_64/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/tls/x86_64", 0x7fff4f857940) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/tls", 0x7fff4f857940) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64", 0x7fff4f857940) = -1 ENOENT (No such file or directory)
open("/usr/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib", {st_mode=S_IFDIR|0755, st_size=69632, ...}) = 0
open("/lib/tls/x86_64/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib/tls/x86_64", 0x7fff4f857940) = -1 ENOENT (No such file or directory)
open("/lib/tls/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib/tls", 0x7fff4f857940) = -1 ENOENT (No such file or directory)
open("/lib/x86_64/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64", 0x7fff4f857940) = -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\340\237n\0004\0\0\0"..., 832) = 832
close(3) = 0
stat("/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/X11R6/lib/tls/x86_64/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/X11R6/lib/tls/x86_64", 0x7fff4f857940) = -1 ENOENT (No such file or directory)
open("/usr/X11R6/lib/tls/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/X11R6/lib/tls", 0x7fff4f857940) = -1 ENOENT (No such file or directory)
open("/usr/X11R6/lib/x86_64/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/X11R6/lib/x86_64", 0x7fff4f857940) = -1 ENOENT (No such file or directory)
open("/usr/X11R6/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/X11R6/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/local/lib/tls/x86_64/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/tls/x86_64", 0x7fff4f857940) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/tls/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/tls", 0x7fff4f857940) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/x86_64/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/x86_64", 0x7fff4f857940) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/local-linux/lib/tls/x86_64/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/local-linux/lib/tls/x86_64", 0x7fff4f857940) = -1 ENOENT (No such file or directory)
open("/usr/local-linux/lib/tls/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/local-linux/lib/tls", 0x7fff4f857940) = -1 ENOENT (No such file or directory)
open("/usr/local-linux/lib/x86_64/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/local-linux/lib/x86_64", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/local-linux/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/local-linux/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=190277, ...}) = 0
mmap(NULL, 190277, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2ad94536f000
close(3) = 0
open("/lib64/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\332\241X0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1722304, ...}) = 0
mmap(0x3058a00000, 3502424, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x3058a00000
mprotect(0x3058b4e000, 2097152, PROT_NONE) = 0
mmap(0x3058d4e000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14e000) = 0x3058d4e000
mmap(0x3058d53000, 16728, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x3058d53000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ad94539e000
arch_prctl(ARCH_SET_FS, 0x2ad94539e6e0) = 0
mprotect(0x3058d4e000, 16384, PROT_READ) = 0
mprotect(0x305881b000, 4096, PROT_READ) = 0
munmap(0x2ad94536f000, 190277) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=10240*1024, rlim_max=RLIM_INFINITY}) = 0
setrlimit(RLIMIT_STACK, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
brk(0) = 0x1ff89000
brk(0x1ffaa000) = 0x1ffaa000
open("/usr/lib/locale/locale-archive", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=56454848, ...}) = 0
mmap(NULL, 56454848, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2ad94539f000
close(3) = 0
rt_sigaction(SIGHUP, {0x403430, [HUP], SA_RESTORER|SA_RESTART, 0x3058a302d0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {0x403430, [QUIT], SA_RESTORER|SA_RESTART, 0x3058a302d0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x403430, [INT], SA_RESTORER|SA_RESTART, 0x3058a302d0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {0x403430, [TERM], SA_RESTORER|SA_RESTART, 0x3058a302d0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGXCPU, {0x403430, [XCPU], SA_RESTORER|SA_RESTART, 0x3058a302d0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGXFSZ, {0x403430, [XFSZ], SA_RESTORER|SA_RESTART, 0x3058a302d0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGCHLD, {SIG_DFL, [CHLD], SA_RESTORER|SA_RESTART, 0x3058a302d0}, {SIG_DFL, [], 0}, 8) = 0
getcwd("/cs/guests/jias/software/ocaml-3.12.0"..., 4096) = 38
stat("/usr/include", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat("/usr/gnu/include", 0x7fff4f856b00) = -1 ENOENT (No such file or directory)
stat("/usr/local/include", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/usr/include", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
rt_sigaction(SIGCHLD, {0x40be10, [CHLD], SA_RESTORER|SA_RESTART, 0x3058a302d0}, {SIG_DFL, [CHLD], SA_RESTORER|SA_RESTART, 0x3058a302d0}, 8) = 0
rt_sigaction(SIGUSR1, {0x40df50, [USR1], SA_RESTORER|SA_RESTART, 0x3058a302d0}, {SIG_DFL, [], 0}, 8) = 0
stat(".", {st_mode=S_IFDIR|0755, st_size=50, ...}) = 0
open(".", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 3
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
getdents(3, /* 50 entries */, 32768) = 1584
getdents(3, /* 0 entries */, 32768) = 0
close(3) = 0
open("Makefile", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=22302, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ad948976000
read(3, "################################"..., 4096) = 4096
open("config/Makefile", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=1637, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ad948977000
read(4, "# generated by ./configure -pref"..., 4096) = 1637
read(4, "", 4096) = 0
close(4) = 0
munmap(0x2ad948977000, 4096) = 0
open("stdlib/StdlibModules", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=712, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ad948977000
read(4, "# This file lists all standard l"..., 4096) = 712
read(4, "", 4096) = 0
close(4) = 0
munmap(0x2ad948977000, 4096) = 0
read(3, "(COMP) $(BYTECOMP) $(DRIVER)\n\nTO"..., 4096) = 4096
read(3, "piled system to the rank of cros"..., 4096) = 4096
read(3, "lcompopt.sh\n\npartialclean::\n\trm "..., 4096) = 4096
brk(0x1ffcb000) = 0x1ffcb000
read(3, "ln -s $(ARCH)/arch.ml asmcomp/ar"..., 4096) = 4096
read(3, "d-native-only.sh\nocamlbuildlib.n"..., 4096) = 1822
open(".depend", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=55463, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ad948977000
read(4, "utils/ccomp.cmi:\nutils/clflags.c"..., 4096) = 4096
read(4, "f.cmi: typing/types.cmi typing/p"..., 4096) = 4096
read(4, "mx: typing/types.cmx typing/type"..., 4096) = 4096
read(4, "ype.cmx utils/clflags.cmx \\\n "..., 4096) = 4096
read(4, "ypetexp.cmx: utils/warnings.cmx "..., 4096) = 4096
read(4, "elink.cmi \\\n bytecomp/bytegen"..., 4096) = 4096
read(4, "ch.cmx: bytecomp/switch.cmi\nbyte"..., 4096) = 4096
read(4, "ibrarian.cmi:\nasmcomp/asmlink.cm"..., 4096) = 4096
read(4, "comp/asmlink.cmi\nasmcomp/asmpack"..., 4096) = 4096
brk(0x1ffec000) = 0x1ffec000
read(4, "itaux.cmi \\\n asmcomp/debuginf"..., 4096) = 4096
read(4, "i asmcomp/debuginfo.cmi \\\n as"..., 4096) = 4096
read(4, "pes.cmi bytecomp/simplif.cmi typ"..., 4096) = 4096
read(4, "isc.cmx \\\n parsing/longident."..., 4096) = 4096
read(4, "g/path.cmi parsing/parsetree.cmi"..., 4096) = 2215
read(4, "", 4096) = 0
close(4) = 0
munmap(0x2ad948977000, 4096) = 0
read(3, "", 4096) = 0
close(3) = 0
munmap(0x2ad948976000, 4096) = 0
stat("RCS", 0x7fff4f856a30) = -1 ENOENT (No such file or directory)
stat("SCCS", 0x7fff4f856a30) = -1 ENOENT (No such file or directory)
stat(".depend", {st_mode=S_IFREG|0644, st_size=55463, ...}) = 0
stat("stdlib/StdlibModules", {st_mode=S_IFREG|0644, st_size=712, ...}) = 0
stat("config/Makefile", {st_mode=S_IFREG|0644, st_size=1637, ...}) = 0
stat("Makefile", {st_mode=S_IFREG|0644, st_size=22302, ...}) = 0
stat("stdlib", {st_mode=S_IFDIR|0755, st_size=198, ...}) = 0
open("stdlib", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 3
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
brk(0x20014000) = 0x20014000
getdents(3, /* 198 entries */, 32768) = 6640
getdents(3, /* 0 entries */, 32768) = 0
close(3) = 0
stat("stdlib/RCS", 0x7fff4f855560) = -1 ENOENT (No such file or directory)
stat("stdlib/SCCS", 0x7fff4f855560) = -1 ENOENT (No such file or directory)
stat("config", {st_mode=S_IFDIR|0755, st_size=17, ...}) = 0
open("config", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 3
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
getdents(3, /* 17 entries */, 32768) = 536
getdents(3, /* 0 entries */, 32768) = 0
close(3) = 0
stat("config/RCS", 0x7fff4f855560) = -1 ENOENT (No such file or directory)
stat("config/SCCS", 0x7fff4f855560) = -1 ENOENT (No such file or directory)
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 4), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ad948976000
write(1, "make coldstart\n", 15) = 15
pipe([3, 4]) = 0
close(4) = 0
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT TERM XCPU XFSZ], NULL, 8) = 0
vfork() = 27130
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 27130
--- SIGCHLD (Child exited) @ 0 (0) ---
rt_sigreturn(0xffffffff) = 27130
write(1, "make all\n", 9) = 9
rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT TERM XCPU XFSZ], NULL, 8) = 0
vfork() = 27632
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 2}], 0, NULL) = 27632
--- SIGCHLD (Child exited) @ 0 (0) ---
rt_sigreturn(0xffffffff) = 27632
open("/usr/share/locale/locale.alias", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=2528, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ad948977000
read(4, "# Locale name alias data base.\n#"..., 4096) = 2528
read(4, "", 4096) = 0
close(4) = 0
munmap(0x2ad948977000, 4096) = 0
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/make.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/make.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/make.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/make.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/make.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/make.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "make: ", 6) = 6
write(2, "*** [world] Error 2", 19) = 19
write(2, "\n", 1) = 1
rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT TERM XCPU XFSZ], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
chdir("/cs/guests/jias/software/ocaml-3.12.0") = 0
close(1) = 0
munmap(0x2ad948976000, 4096) = 0
exit_group(2) = ?
(0005994)
ygrek (reporter)
2011-06-08 20:58

ZFS is mounted via NFS? IIRC NFSv3 doesn't care about ACL.
BTW without '-f' strace output doesn't show what happened.
'cp -p' most probably comes from ocamlbuild, see cp_p in ocamlbuild/rule.ml
(0005995)
tiancaicai (reporter)
2011-06-08 23:01

I think so. And we are using NFSv3.
I've already commented out the cp_p related lines in ocamlbuild/rule.ml but still have this problem here.

And I found a local-scratch with ext3 and successfully compiled ocaml. Thanks a lot!
(0006006)
xleroy (administrator)
2011-06-12 12:08

Looks like an OS/filesystem issue. No changes required on OCaml's code.

- Issue History
Date Modified Username Field Change
2011-06-08 00:32 tiancaicai New Issue
2011-06-08 13:38 ygrek Note Added: 0005992
2011-06-08 19:19 tiancaicai Note Added: 0005993
2011-06-08 20:58 ygrek Note Added: 0005994
2011-06-08 23:01 tiancaicai Note Added: 0005995
2011-06-12 12:08 xleroy Note Added: 0006006
2011-06-12 12:08 xleroy Status new => closed
2011-06-12 12:08 xleroy Resolution open => no change required


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker