Eu usei sshfs
para montar um diretório de algum servidor ssh e minha conexão de rede foi perdida. Parece que df
estava tentando listar essa montagem e, em vez de falhar graciosamente, ficou preso: (
Recentemente, tive problemas ao executar df
, onde apenas trava . Aqui está strace
output, e nele, você verá que eu matei desde que estava ali:
$ strace /bin/df
execve("/bin/df", ["/bin/df"], [/* 35 vars */]) = 0
brk(0) = 0x8d03000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7840000
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=90781, ...}) = 0
mmap2(NULL, 90781, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7829000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/i686/cmov/libc.so.6", O_RDONLY) = 3
read(3, "7ELF$ strace /bin/df
execve("/bin/df", ["/bin/df"], [/* 35 vars */]) = 0
brk(0) = 0x8d03000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7840000
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=90781, ...}) = 0
mmap2(NULL, 90781, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7829000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/i686/cmov/libc.so.6", O_RDONLY) = 3
read(3, "7ELF%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%0o%pre%04%pre%%pre%%pre%"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1401000, ...}) = 0
mmap2(NULL, 1415544, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb76cf000
mprotect(0xb7822000, 4096, PROT_NONE) = 0
mmap2(0xb7823000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x153) = 0xb7823000
mmap2(0xb7826000, 10616, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7826000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb76ce000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb76ce8d0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb7823000, 8192, PROT_READ) = 0
mprotect(0xb785e000, 4096, PROT_READ) = 0
munmap(0xb7829000, 90781) = 0
brk(0) = 0x8d03000
brk(0x8d24000) = 0x8d24000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=1534656, ...}) = 0
mmap2(NULL, 1534656, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7557000
close(3) = 0
open("/etc/mtab", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=708, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb783f000
read(3, "/dev/sda6 / ext4 rw,errors=remou"..., 4096) = 708
read(3, "", 4096) = 0
close(3) = 0
munmap(0xb783f000, 4096) = 0
statfs64("/", 84, {f_type="EXT2_SUPER_MAGIC", f_bsize=4096, f_blocks=4805813, f_bfree=3325193, f_bavail=3081072, f_files=1220608, f_ffree=1007617, f_fsid={-1624337824, -871214780}, f_namelen=255, f_frsize=4096}) = 0
open("/usr/share/locale/locale.alias", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=2570, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb783f000
read(3, "# Locale name alias data base.\n#"..., 4096) = 2570
read(3, "", 4096) = 0
close(3) = 0
munmap(0xb783f000, 4096) = 0
open("/usr/share/locale/en_ZA.utf8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_ZA/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
statfs64("/lib/init/rw", 84, {f_type=0x1021994, f_bsize=4096, f_blocks=1280, f_bfree=1280, f_bavail=1280, f_files=215959, f_ffree=215956, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0
statfs64("/run", 84, {f_type=0x1021994, f_bsize=4096, f_blocks=102000, f_bfree=101823, f_bavail=101823, f_files=215959, f_ffree=215559, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0
statfs64("/sys", 84, {f_type="SYSFS_MAGIC", 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
statfs64("/dev", 84, {f_type=0x1021994, f_bsize=4096, f_blocks=508762, f_bfree=508762, f_bavail=508762, f_files=213490, f_ffree=213031, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0
statfs64("/run/shm", 84, {f_type=0x1021994, f_bsize=4096, f_blocks=203999, f_bfree=203816, f_bavail=203816, f_files=215959, f_ffree=215955, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0
statfs64("/dev/pts", 84, {f_type="DEVPTS_SUPER_MAGIC", 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
statfs64("/boot", 84, {f_type="EXT2_SUPER_MAGIC", f_bsize=1024, f_blocks=188403, f_bfree=150550, f_bavail=140822, f_files=48768, f_ffree=48525, f_fsid={-655942775, 1382872797}, f_namelen=255, f_frsize=1024}) = 0
statfs64("/home", 84, {f_type="EXT2_SUPER_MAGIC", f_bsize=4096, f_blocks=66535124, f_bfree=6683145, f_bavail=3303357, f_files=16900096, f_ffree=16633097, f_fsid={-515912651, 307591087}, f_namelen=255, f_frsize=4096}) = 0
statfs64("/sys/fs/fuse/connections", 84, {f_type=0x65735543, 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
statfs64("/home/wena/temp/mount", 84, ^C <unfinished ...>
%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%0o%pre%04%pre%%pre%%pre%"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1401000, ...}) = 0
mmap2(NULL, 1415544, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb76cf000
mprotect(0xb7822000, 4096, PROT_NONE) = 0
mmap2(0xb7823000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x153) = 0xb7823000
mmap2(0xb7826000, 10616, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7826000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb76ce000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb76ce8d0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb7823000, 8192, PROT_READ) = 0
mprotect(0xb785e000, 4096, PROT_READ) = 0
munmap(0xb7829000, 90781) = 0
brk(0) = 0x8d03000
brk(0x8d24000) = 0x8d24000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=1534656, ...}) = 0
mmap2(NULL, 1534656, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7557000
close(3) = 0
open("/etc/mtab", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=708, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb783f000
read(3, "/dev/sda6 / ext4 rw,errors=remou"..., 4096) = 708
read(3, "", 4096) = 0
close(3) = 0
munmap(0xb783f000, 4096) = 0
statfs64("/", 84, {f_type="EXT2_SUPER_MAGIC", f_bsize=4096, f_blocks=4805813, f_bfree=3325193, f_bavail=3081072, f_files=1220608, f_ffree=1007617, f_fsid={-1624337824, -871214780}, f_namelen=255, f_frsize=4096}) = 0
open("/usr/share/locale/locale.alias", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=2570, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb783f000
read(3, "# Locale name alias data base.\n#"..., 4096) = 2570
read(3, "", 4096) = 0
close(3) = 0
munmap(0xb783f000, 4096) = 0
open("/usr/share/locale/en_ZA.utf8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_ZA/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
statfs64("/lib/init/rw", 84, {f_type=0x1021994, f_bsize=4096, f_blocks=1280, f_bfree=1280, f_bavail=1280, f_files=215959, f_ffree=215956, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0
statfs64("/run", 84, {f_type=0x1021994, f_bsize=4096, f_blocks=102000, f_bfree=101823, f_bavail=101823, f_files=215959, f_ffree=215559, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0
statfs64("/sys", 84, {f_type="SYSFS_MAGIC", 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
statfs64("/dev", 84, {f_type=0x1021994, f_bsize=4096, f_blocks=508762, f_bfree=508762, f_bavail=508762, f_files=213490, f_ffree=213031, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0
statfs64("/run/shm", 84, {f_type=0x1021994, f_bsize=4096, f_blocks=203999, f_bfree=203816, f_bavail=203816, f_files=215959, f_ffree=215955, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0
statfs64("/dev/pts", 84, {f_type="DEVPTS_SUPER_MAGIC", 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
statfs64("/boot", 84, {f_type="EXT2_SUPER_MAGIC", f_bsize=1024, f_blocks=188403, f_bfree=150550, f_bavail=140822, f_files=48768, f_ffree=48525, f_fsid={-655942775, 1382872797}, f_namelen=255, f_frsize=1024}) = 0
statfs64("/home", 84, {f_type="EXT2_SUPER_MAGIC", f_bsize=4096, f_blocks=66535124, f_bfree=6683145, f_bavail=3303357, f_files=16900096, f_ffree=16633097, f_fsid={-515912651, 307591087}, f_namelen=255, f_frsize=4096}) = 0
statfs64("/sys/fs/fuse/connections", 84, {f_type=0x65735543, 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
statfs64("/home/wena/temp/mount", 84, ^C <unfinished ...>
Outra ferramenta que falha é gnome-system-monitor
, que também parece ser interrompida imediatamente após o lançamento.
A causa mais comum de software como df
enforcamento é quando eles estão tentando ler de um disco que não está respondendo adequadamente.
Verifique a saída de dmesg
para ver se este é o caso - uma unidade esquisita irá lançar uma grande quantidade de erros.
Infelizmente, isso tende a ser um problema de hardware e você pode estar olhando para ter que substituir a unidade inteira. Eu recomendo que você faça backups de tudo que puder.
Não é o caso aqui, mas para o registro, note que algumas versões da implementação GNU de df
(desde a versão 7.3, fixada em 8.29 (com este commit )) pendurar arquivos fifo legíveis / named pipe que não possuam gravador, pois eles tentam abri-los, como visto no link
$ mkfifo fifo
$ strace df fifo
[...]
open("fifo", O_RDONLY|O_NOCTTY # hanging there
Minha causa principal foi incomum, mas vou mencioná-la de qualquer maneira, caso alguém cometa o mesmo erro. Eu estava usando cifs
em /etc/auto.direct
no Ubuntu 16.04.4 (recentemente atualizado para 16.04). Eu não adicionei vers=1.0
.
Compatibilidade retroativa - um dos maiores mitos do software.
Eu enfrentei o mesmo problema: reiniciar abaixo do serviço funcionou para mim.
$ systemctl restart proc-sys-fs-binfmt_misc.mount
Ele realmente funciona no df 8.25 corrigido o problema após a atualização no xenial
Tags mount disk-usage utilities