[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I/O error copying file to jffs, no obvous problem in jffs log?



Ok, here it is. It seems (from the log) that only intergral number of 4096
bytes get written. Any data write less than this number (which would be the
last write) fails.

Vipin


David Woodhouse wrote:

> vmalik@xxxxxxx.com said:
> >  The copy fails with an Input/Ouput error, but I cannot see anything
> > go wrong in the (verbose level 3) jffs log. A *portion* of the file
> > does get written.
>
> Nothing looks immediately wrong in that output, apart from the fact that it
> was horribly mangled by Netscape.
>
> Can you repeat this? Can you provide a strace of the copy at the same time,
> so we can find out exactly where it's failing, and match it with the JFFS
> logs?
>
> --
> dwmw2
>
> To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
> the body of a message to majordomo@xxxxxxx.com


************** strace log for "strace cp /bin/umount . (/mnt/jffs)" *******************
execve("/bin/cp", ["cp", "/bin/umount", "."], [/* 23 vars */]) = 0
brk(0)                                  = 0x804f605
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=16556, ...}) = 0
mmap(0, 16556, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40013000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=4118299, ...}) = 0
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\250\202"..., 4096) = 4096
mmap(0, 993500, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40018000
mprotect(0x40103000, 30940, PROT_NONE)  = 0
mmap(0x40103000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xea000) = 0x40103000
mmap(0x40107000, 14556, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40107000
close(3)                                = 0
mprotect(0x40018000, 962560, PROT_READ|PROT_WRITE) = 0
mprotect(0x40018000, 962560, PROT_READ|PROT_EXEC) = 0
munmap(0x40013000, 16556)               = 0
personality(0 /* PER_??? */)            = 0
getpid()                                = 1014
brk(0)                                  = 0x804f605
brk(0x804f7a5)                          = 0x804f7a5
brk(0x8050000)                          = 0x8050000
open("/usr/share/locale/locale.alias", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2174, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40013000
read(3, "# Locale name alias data base.\n#"..., 4096) = 2174
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x40013000, 4096)                = 0
open("/usr/share/i18n/locale.alias", O_RDONLY) = -1 ENOENT (No such file or directory)
brk(0x8051000)                          = 0x8051000
open("/usr/share/locale/en_US/LC_MESSAGES", O_RDONLY) = 3
fstat(3, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
close(3)                                = 0
open("/usr/share/locale/en_US/LC_MESSAGES/SYS_LC_MESSAGES", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=44, ...}) = 0
mmap(0, 44, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40013000
close(3)                                = 0
open("/usr/share/locale/en_US/LC_MONETARY", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=93, ...}) = 0
mmap(0, 93, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40014000
close(3)                                = 0
open("/usr/share/locale/en_US/LC_COLLATE", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=29970, ...}) = 0
mmap(0, 29970, PROT_READ, MAP_PRIVATE, 3, 0) = 0x4010b000
close(3)                                = 0
open("/usr/share/locale/en_US/LC_TIME", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=508, ...}) = 0
mmap(0, 508, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40015000
close(3)                                = 0
open("/usr/share/locale/en_US/LC_NUMERIC", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=27, ...}) = 0
mmap(0, 27, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40016000
close(3)                                = 0
open("/usr/share/locale/en_US/LC_CTYPE", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=10428, ...}) = 0
mmap(0, 10428, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40113000
close(3)                                = 0
geteuid()                               = 0
umask(0)                                = 022
brk(0x8052000)                          = 0x8052000
lstat(".", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
stat(".", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
stat("/bin/umount", {st_mode=S_IFREG|S_ISUID|0755, st_size=26700, ...}) = 0
stat("./umount", 0xbffff860)            = -1 ENOENT (No such file or directory)
open("/bin/umount", O_RDONLY|O_LARGEFILE) = 3
open("./umount", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0600) = 4
fstat(4, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
fstat(3, {st_mode=S_IFREG|S_ISUID|0755, st_size=26700, ...}) = 0
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\2\0\3\0\1\0\0\0@xxxxxxx., 4096) = 4096
write(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\2\0\3\0\1\0\0\0@xxxxxxx., 4096) = 4096
read(3, "\4\10h(\0\0\0\351\220\377\377\377\377%\360\354\4\10h0\0"..., 4096) = 4096
write(4, "\4\10h(\0\0\0\351\220\377\377\377\377%\360\354\4\10h0\0"..., 4096) = 4096
read(3, "\211E\344\203=\304\353\4\10\1~\21\213E\344Ph\327\321\4"..., 4096) = 4096
write(4, "\211E\344\203=\304\353\4\10\1~\21\213E\344Ph\327\321\4"..., 4096) = 4096
read(3, "\213E\374\213\20R\350a\340\377\377\203\304\10\211\300\205"..., 4096) = 4096
write(4, "\213E\374\213\20R\350a\340\377\377\203\304\10\211\300\205"..., 4096) = 4096
read(3, "\370P\350%\323\377\377\203\304\4\213E\364P\350\31\323\377"..., 4096) = 4096
write(4, "\370P\350%\323\377\377\203\304\4\213E\364P\350\31\323\377"..., 4096) = 4096
read(3, "umount: %s busy - remounted read"..., 4096) = 4096
write(4, "umount: %s busy - remounted read"..., 4096) = 4096
read(3, ".1.2 release)\0\0GCC: (GNU) egcs-2"..., 4096) = 2124
write(4, ".1.2 release)\0\0GCC: (GNU) egcs-2"..., 2124) = -1 EIO (Input/output error)
write(2, "cp: ", 4cp: )                     = 4
write(2, "./umount", 8./umount)                 = 8
open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, ": Input/output error", 20: Input/output error)    = 20
write(2, "\n", 1
)                       = 1
close(4)                                = 0
close(3)                                = 0
_exit(1)                                = ?









********************** Verbose level 2 JFFS debug messages for the above *****************************

Apr 15 15:09:57 localhost kernel: jffs_create(): dir: 0xc3977bd0, name: "umount" 
Apr 15 15:09:57 localhost kernel: jffs_write_node(): filename = "umount", ino = 211, total_size = 68 
Apr 15 15:09:57 localhost kernel: jffs_fmalloc(): fmc = 0xc15ad110, size = 68, node = 0xc0e15150 
Apr 15 15:09:57 localhost kernel: jffs_insert_node(): ino = 211, version = 1, name = "umount", deleted = 0 
Apr 15 15:09:57 localhost kernel: thread_should_wake(): free=1532612, dirty=25216, blocksize=262144. 
Apr 15 15:09:57 localhost kernel: thread_should_wake(): Not waking. Insufficient dirty space 
Apr 15 15:09:57 localhost kernel: ***jffs_file_write(): inode: 0xc3977830 (ino: 211), filp: 0xc301e3f0, buf: 0xc0302000, count: 4096 
Apr 15 15:09:57 localhost kernel: jffs_write_node(): filename = "umount", ino = 211, total_size = 4164 
Apr 15 15:09:57 localhost kernel: jffs_fmalloc(): fmc = 0xc15ad110, size = 4164, node = 0xc0e5bb70 
Apr 15 15:09:57 localhost kernel: jffs_write_node(): setting version of umount to 2 
Apr 15 15:09:57 localhost kernel: jffs_insert_node(): ino = 211, version = 2, name = "", deleted = 0 
Apr 15 15:09:57 localhost kernel: jffs_remove_redundant_nodes(): Removing node: ino: 211, version: 1, mod_type: 3 
Apr 15 15:09:57 localhost kernel: jffs_fmfree(): node->ino = 211, node->version = 1 
Apr 15 15:09:57 localhost kernel: thread_should_wake(): free=1528448, dirty=25284, blocksize=262144. 
Apr 15 15:09:57 localhost kernel: thread_should_wake(): Not waking. Insufficient dirty space 
Apr 15 15:09:57 localhost kernel: ***jffs_file_write(): inode: 0xc3977830 (ino: 211), filp: 0xc301e3f0, buf: 0xc0304000, count: 4096 
Apr 15 15:09:57 localhost kernel: jffs_write_node(): filename = "umount", ino = 211, total_size = 4164 
Apr 15 15:09:57 localhost kernel: jffs_fmalloc(): fmc = 0xc15ad110, size = 4164, node = 0xc0e15150 
Apr 15 15:09:57 localhost kernel: jffs_write_node(): setting version of umount to 3 
Apr 15 15:09:57 localhost kernel: jffs_insert_node(): ino = 211, version = 3, name = "", deleted = 0 
Apr 15 15:09:57 localhost kernel: thread_should_wake(): free=1524284, dirty=25284, blocksize=262144. 
Apr 15 15:09:57 localhost kernel: thread_should_wake(): Not waking. Insufficient dirty space 
Apr 15 15:09:57 localhost kernel: ***jffs_file_write(): inode: 0xc3977830 (ino: 211), filp: 0xc301e3f0, buf: 0xc0302000, count: 4096 
Apr 15 15:09:57 localhost kernel: jffs_write_node(): filename = "umount", ino = 211, total_size = 4164 
Apr 15 15:09:57 localhost kernel: jffs_fmalloc(): fmc = 0xc15ad110, size = 4164, node = 0xc0e5bb40 
Apr 15 15:09:57 localhost kernel: jffs_write_node(): setting version of umount to 4 
Apr 15 15:09:57 localhost kernel: jffs_insert_node(): ino = 211, version = 4, name = "", deleted = 0 
Apr 15 15:09:57 localhost kernel: thread_should_wake(): free=1520120, dirty=25284, blocksize=262144. 
Apr 15 15:09:57 localhost kernel: thread_should_wake(): Not waking. Insufficient dirty space 
Apr 15 15:09:57 localhost kernel: ***jffs_file_write(): inode: 0xc3977830 (ino: 211), filp: 0xc301e3f0, buf: 0xc0304000, count: 4096 
Apr 15 15:09:57 localhost kernel: jffs_write_node(): filename = "umount", ino = 211, total_size = 4164 
Apr 15 15:09:57 localhost kernel: jffs_fmalloc(): fmc = 0xc15ad110, size = 4164, node = 0xc0e5bb10 
Apr 15 15:09:57 localhost kernel: jffs_write_node(): setting version of umount to 5 
Apr 15 15:09:57 localhost kernel: jffs_insert_node(): ino = 211, version = 5, name = "", deleted = 0 
Apr 15 15:09:57 localhost kernel: thread_should_wake(): free=1515956, dirty=25284, blocksize=262144. 
Apr 15 15:09:57 localhost kernel: thread_should_wake(): Not waking. Insufficient dirty space 
Apr 15 15:09:57 localhost kernel: ***jffs_file_write(): inode: 0xc3977830 (ino: 211), filp: 0xc301e3f0, buf: 0xc0302000, count: 4096 
Apr 15 15:09:57 localhost kernel: jffs_write_node(): filename = "umount", ino = 211, total_size = 4164 
Apr 15 15:09:57 localhost kernel: jffs_fmalloc(): fmc = 0xc15ad110, size = 4164, node = 0xc0e5bae0 
Apr 15 15:09:57 localhost kernel: jffs_write_node(): setting version of umount to 6 
Apr 15 15:09:57 localhost kernel: jffs_insert_node(): ino = 211, version = 6, name = "", deleted = 0 
Apr 15 15:09:57 localhost kernel: thread_should_wake(): free=1511792, dirty=25284, blocksize=262144. 
Apr 15 15:09:57 localhost kernel: thread_should_wake(): Not waking. Insufficient dirty space 
Apr 15 15:09:57 localhost kernel: ***jffs_file_write(): inode: 0xc3977830 (ino: 211), filp: 0xc301e3f0, buf: 0xc030f000, count: 4096 
Apr 15 15:09:57 localhost kernel: jffs_write_node(): filename = "umount", ino = 211, total_size = 4164 
Apr 15 15:09:57 localhost kernel: jffs_fmalloc(): fmc = 0xc15ad110, size = 4164, node = 0xc0e5bab0 
Apr 15 15:09:57 localhost kernel: jffs_write_node(): setting version of umount to 7 
Apr 15 15:09:57 localhost kernel: thread_should_wake(): free=1507628, dirty=25284, blocksize=262144. 
Apr 15 15:09:57 localhost kernel: thread_should_wake(): Not waking. Insufficient dirty space 
Apr 15 15:09:57 localhost kernel: jffs_insert_node(): ino = 211, version = 7, name = "", deleted = 0 
Apr 15 15:09:57 localhost kernel: thread_should_wake(): free=1507628, dirty=25284, blocksize=262144. 
Apr 15 15:09:57 localhost kernel: thread_should_wake(): Not waking. Insufficient dirty space 
Apr 15 15:09:57 localhost kernel: ***jffs_readpage(): file = "umount", page->index = 6 
Apr 15 15:10:02 localhost kernel: thread_should_wake(): free=1507628, dirty=25284, blocksize=262144. 
Apr 15 15:10:02 localhost kernel: thread_should_wake(): Not waking. Insufficient dirty space 
Apr 15 15:10:07 localhost kernel: thread_should_wake(): free=1507628, dirty=25284, blocksize=262144. 
Apr 15 15:10:07 localhost kernel: thread_should_wake(): Not waking. Insufficient dirty space 
Apr 15 15:10:09 localhost kernel: jffs_readdir(): inode: 0xc3977bd0, filp: 0xc2eba480 
Apr 15 15:10:11 localhost last message repeated 3 times
Apr 15 15:10:12 localhost kernel: thread_should_wake(): free=1507628, dirty=25284, blocksize=262144. 
Apr 15 15:10:12 localhost kernel: thread_should_wake(): Not waking. Insufficient dirty space 
Apr 15 15:10:17 localhost kernel: thread_should_wake(): free=1507628, dirty=25284, blocksize=262144. 
Apr 15 15:10:17 localhost kernel: thread_should_wake(): Not waking. Insufficient dirty space 
Apr 15 15:10:22 localhost kernel: thread_should_wake(): free=1507628, dirty=25284, blocksize=262144. 
Apr 15 15:10:22 localhost kernel: thread_should_wake(): Not waking. Insufficient dirty space 
Apr 15 15:10:26 localhost kernel: jffs_readdir(): inode: 0xc3977bd0, filp: 0xc301e750 
Apr 15 15:10:26 localhost kernel: jffs_readdir(): inode: 0xc3977bd0, filp: 0xc301e750 
Apr 15 15:10:27 localhost kernel: thread_should_wake(): free=1507628, dirty=25284, blocksize=262144. 
Apr 15 15:10:27 localhost kernel: thread_should_wake(): Not waking. Insufficient dirty space 
Apr 15 15:10:30 localhost kernel: ***jffs_readpage(): file = "umount", page->index = 0 
Apr 15 15:10:30 localhost kernel: jffs_read_data(): file = "umount", read_offset = 0, size = 4096 
Apr 15 15:10:30 localhost kernel:   jffs_get_node_data(): file: "umount", ino: 211, version: 2, node_offset: 0 
Apr 15 15:10:32 localhost kernel: thread_should_wake(): free=1507628, dirty=25284, blocksize=262144. 
Apr 15 15:10:32 localhost kernel: thread_should_wake(): Not waking. Insufficient dirty space 
Apr 15 15:10:37 localhost kernel: thread_should_wake(): free=1507628, dirty=25284, blocksize=262144. 
Apr 15 15:10:37 localhost kernel: thread_should_wake(): Not waking. Insufficient dirty space 
Apr 15 15:10:42 localhost kernel: thread_should_wake(): free=1507628, dirty=25284, blocksize=262144.