아래에는 명령의 트러스가 포함되어 있으며 다양한 rm 방법을 시도했지만 각 방법에서 동일한 출력을 얻었습니다. 참고: 이것은 isilon NAS 클러스터에서 실행되었습니다(그들의 기술 지원도 문제가 있었습니다.)
Cluster-1# rm -f "478.ts"
rm: 478.ts: Invalid argument
Cluster-1# truss -a rm 478.ts
mmap(0x0,32768,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34366148608 (0x80061d000)
issetugid(0x80081da80,0x7fffffffefd8,0x40,0x0,0xffff80080081eaa8,0x0) = 0 (0x0)
lstat("/etc",{ mode=drwxr-xr-x ,inode=93955,size=3072,blksize=16384 }) = 0 (0x0)
lstat("/etc/libmap.conf",{ mode=-rw-r--r-- ,inode=102839,size=47,blksize=16384 }) = 0 (0x0)
open("/etc/libmap.conf",O_CLOEXEC,01760) = 3 (0x3)
fstat(3,{ mode=-rw-r--r-- ,inode=102839,size=47,blksize=16384 }) = 0 (0x0)
mmap(0x0,47,PROT_READ,MAP_PRIVATE,3,0x0) = 34366181376 (0x800625000)
close(3) = 0 (0x0)
lstat("/usr",{ mode=drwxr-xr-x ,inode=23492,size=512,blksize=16384 }) = 0 (0x0)
lstat("/usr/local",{ mode=drwxr-xr-x ,inode=23507,size=512,blksize=16384 }) = 0 (0x0)
lstat("/usr/local/etc",{ mode=drwxr-xr-x ,inode=23846,size=1024,blksize=16384 }) = 0 (0x0)
lstat("/usr/local/etc/libmap.d",{ mode=drwxr-xr-x ,inode=24971,size=512,blksize=16384 }) = 0 (0x0)
open("/usr/local/etc/libmap.d",O_NONBLOCK|O_DIRECTORY|O_CLOEXEC,0165) = 3 (0x3)
__sysctl(0x7fffffffc0d8,0x2,0x80081e6bc,0x7fffffffc0d0,0x0,0x0) = 0 (0x0)
fstatfs(0x3,0x7fffffffc118,0x80081e6bc,0x7fffffffc0d0,0x0,0x0) = 0 (0x0)
mmap(0x0,36864,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34366185472 (0x800626000)
getdirentries(0x3,0x800623000,0x1000,0x800622028,0x0,0x0) = 80 (0x50)
lstat("/usr",{ mode=drwxr-xr-x ,inode=23492,size=512,blksize=16384 }) = 0 (0x0)
lstat("/usr/local",{ mode=drwxr-xr-x ,inode=23507,size=512,blksize=16384 }) = 0 (0x0)
lstat("/usr/local/etc",{ mode=drwxr-xr-x ,inode=23846,size=1024,blksize=16384 }) = 0 (0x0)
lstat("/usr/local/etc/libmap.d",{ mode=drwxr-xr-x ,inode=24971,size=512,blksize=16384 }) = 0 (0x0)
lstat("/usr/local/etc/libmap.d/mft.conf",{ mode=-rw-r--r-- ,inode=25013,size=50,blksize=16384 }) = 0 (0x0)
open("/usr/local/etc/libmap.d/mft.conf",O_CLOEXEC,0165) = 4 (0x4)
fstat(4,{ mode=-rw-r--r-- ,inode=25013,size=50,blksize=16384 }) = 0 (0x0)
mmap(0x0,50,PROT_READ,MAP_PRIVATE,4,0x0) = 34366222336 (0x80062f000)
close(4) = 0 (0x0)
munmap(0x80062f000,50) = 0 (0x0)
getdirentries(0x3,0x800623000,0x1000,0x800622028,0x50,0x8080808080808080) = 0 (0x0)
close(3) = 0 (0x0)
munmap(0x800625000,47) = 0 (0x0)
open("/var/run/ld-elf.so.hints",O_CLOEXEC,0162) = 3 (0x3)
read(3,"Ehnt\^A\0\0\0\M^@\0\0\0m\0\0\0\0"...,128) = 128 (0x80)
lseek(3,0x80,SEEK_SET) = 128 (0x80)
read(3,"/lib:/usr/lib:/usr/lib/compat:/u"...,109) = 109 (0x6d)
close(3) = 0 (0x0)
access("/lib/libc.so.7",0) = 0 (0x0)
open("/lib/libc.so.7",O_CLOEXEC,030503770) = 3 (0x3)
fstat(3,{ mode=-r--r--r-- ,inode=103356,size=1721078,blksize=16384 }) = 0 (0x0)
mmap(0x0,4096,PROT_READ,MAP_PRIVATE|MAP_PREFAULT_READ,3,0x0) = 34366181376 (0x800625000)
mmap(0x0,3821568,PROT_NONE,MAP_PRIVATE|MAP_ANON|MAP_NOCORE,-1,0x0) = 34368253952 (0x80081f000)
mmap(0x80081f000,1507328,PROT_READ|PROT_EXEC,MAP_PRIVATE|MAP_FIXED|MAP_NOCORE|MAP_PREFAULT_READ,3,0x0) = 34368253952 (0x80081f000)
mmap(0x800b8e000,49152,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_PREFAULT_READ,3,0x16f000) = 34371854336 (0x800b8e000)
mmap(0x800b9a000,172032,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_ANON,-1,0x0) = 34371903488 (0x800b9a000)
munmap(0x800625000,4096) = 0 (0x0)
close(3) = 0 (0x0)
munmap(0x800629000,24576) = 0 (0x0)
mmap(0x0,102400,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34366197760 (0x800629000)
sysarch(0x81,0x7fffffffd0a8,0x4,0x0,0xffffffffffaac5e0,0xf0000000) = 0 (0x0)
sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0)
sigprocmask(SIG_SETMASK,0x0,0x0) = 0 (0x0)
readlink("/etc/malloc.conf",0x7fffffffc7d0,1024) ERR#2 'No such file or directory'
issetugid(0x80096477e,0x7fffffffc7d0,0xffffffffffffff00,0x2,0x40,0xffffffff0fffffff) = 0 (0x0)
mmap(0x0,262144,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34366300160 (0x800642000)
munmap(0x800642000,262144) = 0 (0x0)
mmap(0x0,520192,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34366300160 (0x800642000)
munmap(0x800642000,253952) = 0 (0x0)
munmap(0x8006c0000,4096) = 0 (0x0)
sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0)
sigprocmask(SIG_SETMASK,0x0,0x0) = 0 (0x0)
sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0)
sigprocmask(SIG_SETMASK,0x0,0x0) = 0 (0x0)
geteuid() = 0 (0x0)
sigaction(SIGINFO,{ 0x402280 SA_RESTART ss_t },{ SIG_DFL SA_RESTART ss_t }) = 0 (0x0)
ioctl(0,TIOCGETA,0xffffd970) = 0 (0x0)
lstat("478.ts",{ mode=-rwxrwxrwx ,inode=57420697287,size=0,blksize=8192 }) = 0 (0x0)
access("478.ts",2) = 0 (0x0)
unlink("478.ts") ERR#22 'Invalid argument'
rm: write(2,"rm: ",4) = 4 (0x4)
478.tswrite(2,"478.ts",6) = 6 (0x6)
: write(2,": ",2) = 2 (0x2)
mmap(0x0,262144,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34366816256 (0x8006c0000)
stat("/usr/share/nls/C/libc.cat",0x7fffffffd290) ERR#2 'No such file or directory'
stat("/usr/share/nls/libc/C",0x7fffffffd290) ERR#2 'No such file or directory'
stat("/usr/local/share/nls/C/libc.cat",0x7fffffffd290) ERR#2 'No such file or directory'
stat("/usr/local/share/nls/libc/C",0x7fffffffd290) ERR#2 'No such file or directory'
madvise(0x8006c1000,0x1000,0x5,0xaaaaaaaaaaaaaaab,0x8006c0030,0x800bc2c40) = 0 (0x0)
madvise(0x8006c2000,0x1000,0x5,0xaaaaaaaaaaaaaaab,0x7fffffffc790,0x800bc2c40) = 0 (0x0)
Invalid argument
write(2,"Invalid argument\n",17) = 17 (0x11)
sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0)
sigprocmask(SIG_SETMASK,0x0,0x0) = 0 (0x0)
sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0)
sigprocmask(SIG_SETMASK,0x0,0x0) = 0 (0x0)
sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0)
sigprocmask(SIG_SETMASK,0x0,0x0) = 0 (0x0)
process exit, rval = 1
Cluster-1#```
답변1
"잘못된 인수"는 다음에서 올 수 있습니다 perror
.오류 번호 EINVAL 보고설정을 통해 unlink
.
~에 따르면매뉴얼 페이지unlinkat
, EINVAL 은 가 아닌 로만 나타날 수 있으며 unlink
truss 출력에는 unlink
호출이 표시되므로 이 시나리오는 불가능해 보입니다. 그러나 우리는 여기 있습니다.
내가 좀 찾았어기타 보고서기본 파일 시스템이 파일 이름의 인코딩을 처리할 수 없는 경우 유틸리티는 "잘못된 인수"를 보고합니다.
파일 이름이 일반 ASCII 문자로 나타나므로 이는 문제가 되지 않을 수 있지만 여기서는 EINVAL이 파일 시스템 특정 코드에 의해 호출되는 것으로 의심되므로 unlink
사용 중인 파일 시스템에 따라 다릅니다. Isilon NAS 클러스터에서는 다음과 같을 수 있습니다.통합 파일 시스템, 이상한 위치(예: tmpfs 또는 FUSE 마운트)에 있거나 이동식 미디어에 있는 경우는 제외됩니다.
이 경우 실제 Isilon 엔지니어에게 코드를 조사하여 연결 해제 시 EINVAL이 발생하는 원인이 무엇인지 알아내도록 할 수 있습니다.