我在Android上为Raspberry Pi 3工作。我尝试使用以下命令执行fio测试:
$ fio --bs=4k --scramble_buffers=1 --direct=1 --loops=3 --numjobs=4 --filename=/dev/block/ram0 --name=rand-readwrite --rw=randrw --stonewall
我尝试测试的确切设备目前不是那么重要(当前是RAM),因为在任何设备上使用"总线错误" fio测试失败。我发现问题是内存对齐。如何解决?
这是strace日志:
execve("/system/xbin/fio", ["fio", "--bs=4k", "--scramble_buffers=1", "--direct=1", "--loops=3", "--numjobs=4", "--filename=/dev/block/ram0", "--name=rand-readwrite", "--rw=randrw", "--stonewall"], [/* 20 vars */]) = 0
set_tls(0xb082d584, 0xbeb6bad4, 0xb07ca438, 0xb082a580, 0xbeb6ba24) = 0
set_tid_address(0xb082d53c) = 1806
mmap2(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb07c5000
madvise(0xb07c5000, 12288, MADV_MERGEABLE) = 0
mprotect(0xb07c5000, 4096, PROT_NONE) = 0
sigaltstack({ss_sp=0xb07c6000, ss_flags=0, ss_size=8192}, NULL) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb07c6000, 8192, "thread signal stack") = -1 EINVAL (Invalid argument)
prctl(0x53564d41 /* PR_??? */, 0, 0xb07c5000, 4096, "thread signal stack guard page") = -1 EINVAL (Invalid argument)
mprotect(0xb0827000, 8192, PROT_READ) = 0
mprotect(0xb082c000, 4096, PROT_READ) = 0
mprotect(0xb082c000, 4096, PROT_READ|PROT_WRITE) = 0
mprotect(0xb082c000, 4096, PROT_READ) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb0826000
madvise(0xb0826000, 4096, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb0826000, 4096, "atexit handlers") = -1 EINVAL (Invalid argument)
mprotect(0xb0826000, 4096, PROT_READ) = 0
mprotect(0xb0826000, 4096, PROT_READ|PROT_WRITE) = 0
/* ... the same here ... */
mprotect(0xb0826000, 4096, PROT_READ) = 0
mprotect(0xb0826000, 4096, PROT_READ|PROT_WRITE) = 0
mprotect(0xb0826000, 4096, PROT_READ) = 0
openat(AT_FDCWD, "/dev/urandom", O_RDONLY|O_LARGEFILE|O_NOFOLLOW|O_CLOEXEC) = 3
fstat64(3, {st_mode=0, st_size=1, ...}) = 0
ioctl(3, RNDGETENTCNT, 0xbeb6b73c) = 0
read(3, "\347\275r\257\220C\3\375\276\303\275^u\360\333\334QGX\321\351\231\210\r\353H`\201\v7\347j"..., 40) = 40
close(3) = 0
mmap2(NULL, 8, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb07c4000
madvise(0xb07c4000, 8, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb07c4000, 8, "arc4random _rs structure") = -1 EINVAL (Invalid argument)
mmap2(NULL, 1088, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb07c3000
madvise(0xb07c3000, 1088, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb07c3000, 1088, "arc4random _rsx structure") = -1 EINVAL (Invalid argument)
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb07c2000
madvise(0xb07c2000, 4096, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb07c2000, 4096, "linker_alloc_small_objects") = -1 EINVAL (Invalid argument)
mmap2(NULL, 12, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb07c1000
madvise(0xb07c1000, 12, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb07c1000, 12, "linker_alloc_vector") = -1 EINVAL (Invalid argument)
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb07c0000
madvise(0xb07c0000, 4096, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb07c0000, 4096, "linker_alloc_small_objects") = -1 EINVAL (Invalid argument)
mmap2(NULL, 12, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb07bf000
madvise(0xb07bf000, 12, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb07bf000, 12, "linker_alloc_vector") = -1 EINVAL (Invalid argument)
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb07be000
madvise(0xb07be000, 4096, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb07be000, 4096, "linker_alloc") = -1 EINVAL (Invalid argument)
personality(0xffffffff) = 0x800000 (PER_LINUX|ADDR_LIMIT_32BIT)
personality(PER_LINUX32|ADDR_LIMIT_32BIT) = 0x800000 (PER_LINUX|ADDR_LIMIT_32BIT)
fstatat64(AT_FDCWD, "/dev/__properties__", {st_mode=0, st_size=2, ...}, 0) = 0
openat(AT_FDCWD, "/property_contexts", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb07bd000
madvise(0xb07bd000, 4096, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb07bd000, 4096, "linker_alloc_lob") = -1 EINVAL (Invalid argument)
fstat64(3, {st_mode=0, st_size=1, ...}) = 0
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb07bb000
madvise(0xb07bb000, 8192, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb07bb000, 8192, "linker_alloc_lob") = -1 EINVAL (Invalid argument)
read(3, "#line 1 \"system/sepolicy/propert"..., 4096) = 4096
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb07ba000
madvise(0xb07ba000, 4096, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb07ba000, 4096, "linker_alloc_small_objects") = -1 EINVAL (Invalid argument)
mmap2(NULL, 12, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb07b9000
madvise(0xb07b9000, 12, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb07b9000, 12, "linker_alloc_vector") = -1 EINVAL (Invalid argument)
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb07b8000
madvise(0xb07b8000, 4096, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb07b8000, 4096, "linker_alloc_small_objects") = -1 EINVAL (Invalid argument)
mmap2(NULL, 12, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb07b7000
madvise(0xb07b7000, 12, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb07b7000, 12, "linker_alloc_vector") = -1 EINVAL (Invalid argument)
read(3, ":config_prop:s0\nro.config. "..., 4096) = 249
read(3, "", 4096) = 0
munmap(0xb07ba000, 4096) = 0
close(3) = 0
munmap(0xb07bb000, 8192) = 0
openat(AT_FDCWD, "/dev/__properties__/properties_serial", O_RDONLY|O_LARGEFILE|O_NOFOLLOW|O_CLOEXEC) = 3
fstat64(3, {st_mode=0, st_size=1, ...}) = 0
mmap2(NULL, 131072, PROT_READ, MAP_SHARED, 3, 0) = 0xb0797000
close(3) = 0
sigaction(SIGABRT, {0xb07ca805, [], SA_RESTORER|SA_RESTART|SA_SIGINFO|SA_ONSTACK, 0xb080fa54}, NULL) = 0
sigaction(SIGBUS, {0xb07ca805, [], SA_RESTORER|SA_RESTART|SA_SIGINFO|SA_ONSTACK, 0xb080fa54}, NULL) = 0
sigaction(SIGFPE, {0xb07ca805, [], SA_RESTORER|SA_RESTART|SA_SIGINFO|SA_ONSTACK, 0xb080fa54}, NULL) = 0
sigaction(SIGILL, {0xb07ca805, [], SA_RESTORER|SA_RESTART|SA_SIGINFO|SA_ONSTACK, 0xb080fa54}, NULL) = 0
sigaction(SIGSEGV, {0xb07ca805, [], SA_RESTORER|SA_RESTART|SA_SIGINFO|SA_ONSTACK, 0xb080fa54}, NULL) = 0
sigaction(SIGSTKFLT, {0xb07ca805, [], SA_RESTORER|SA_RESTART|SA_SIGINFO|SA_ONSTACK, 0xb080fa54}, NULL) = 0
sigaction(SIGTRAP, {0xb07ca805, [], SA_RESTORER|SA_RESTART|SA_SIGINFO|SA_ONSTACK, 0xb080fa54}, NULL) = 0
fstatat64(AT_FDCWD, "/proc/self/exe", {st_mode=0, st_size=1, ...}, 0) = 0
mprotect(0xb0826000, 4096, PROT_READ|PROT_WRITE) = 0
mprotect(0xb0826000, 4096, PROT_READ) = 0
futex(0xb082a778, FUTEX_WAKE_PRIVATE, 2147483647) = 0
readlinkat(AT_FDCWD, "/proc/self/exe", "/system/xbin/fio", 4096) = 16
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb07bc000
madvise(0xb07bc000, 4096, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb07bc000, 4096, "linker_alloc") = -1 EINVAL (Invalid argument)
fstatat64(AT_FDCWD, "/system", {st_mode=0, st_size=16, ...}, AT_SYMLINK_NOFOLLOW) = 0
fstatat64(AT_FDCWD, "/system/lib", {st_mode=0, st_size=7, ...}, AT_SYMLINK_NOFOLLOW) = 0
fstatat64(AT_FDCWD, "/vendor", {st_mode=0, st_size=1, ...}, AT_SYMLINK_NOFOLLOW) = 0
readlinkat(AT_FDCWD, "/vendor", "/system/vendor", 4095) = 14
fstatat64(AT_FDCWD, "/system", {st_mode=0, st_size=16, ...}, AT_SYMLINK_NOFOLLOW) = 0
fstatat64(AT_FDCWD, "/system/vendor", {st_mode=0, st_size=4, ...}, AT_SYMLINK_NOFOLLOW) = 0
fstatat64(AT_FDCWD, "/system/vendor/lib", {st_mode=0, st_size=3, ...}, AT_SYMLINK_NOFOLLOW) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb07bb000
madvise(0xb07bb000, 4096, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb07bb000, 4096, "linker_alloc") = -1 EINVAL (Invalid argument)
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb07ba000
madvise(0xb07ba000, 4096, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb07ba000, 4096, "linker_alloc") = -1 EINVAL (Invalid argument)
openat(AT_FDCWD, "/system/lib/libc++.so", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb0795000
madvise(0xb0795000, 8192, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb0795000, 8192, "linker_alloc_lob") = -1 EINVAL (Invalid argument)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb0793000
madvise(0xb0793000, 8192, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb0793000, 8192, "linker_alloc_lob") = -1 EINVAL (Invalid argument)
readlinkat(AT_FDCWD, "/proc/self/fd/3", "/system/lib/libc++.so", 4096) = 21
munmap(0xb0793000, 8192) = 0
munmap(0xb0795000, 8192) = 0
fstat64(3, {st_mode=0, st_size=1, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb0796000
madvise(0xb0796000, 4096, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb0796000, 4096, "linker_alloc_small_objects") = -1 EINVAL (Invalid argument)
mmap2(NULL, 12, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb0795000
madvise(0xb0795000, 12, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb0795000, 12, "linker_alloc_vector") = -1 EINVAL (Invalid argument)
pread64(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\0\0\0\0004\0\0\0"..., 52, 0) = 52
mmap2(NULL, 392, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb0794000
mmap2(NULL, 2232, PROT_READ, MAP_PRIVATE, 3, 0x8c000) = 0xb0793000
mmap2(NULL, 6432, PROT_READ, MAP_PRIVATE, 3, 0x8a000) = 0xb0791000
mmap2(NULL, 110556, PROT_READ, MAP_PRIVATE, 3, 0x9000) = 0xb0776000
openat(AT_FDCWD, "/system/lib/libc.so", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 4
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb0774000
madvise(0xb0774000, 8192, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb0774000, 8192, "linker_alloc_lob") = -1 EINVAL (Invalid argument)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb0772000
madvise(0xb0772000, 8192, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb0772000, 8192, "linker_alloc_lob") = -1 EINVAL (Invalid argument)
readlinkat(AT_FDCWD, "/proc/self/fd/4", "/system/lib/libc.so", 4096) = 19
munmap(0xb0772000, 8192) = 0
munmap(0xb0774000, 8192) = 0
fstat64(4, {st_mode=0, st_size=1, ...}) = 0
pread64(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\0\0\0\0004\0\0\0"..., 52, 0) = 52
mmap2(NULL, 424, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb0775000
mmap2(NULL, 1768, PROT_READ, MAP_PRIVATE, 4, 0xbd000) = 0xb0774000
mmap2(NULL, 1920, PROT_READ, MAP_PRIVATE, 4, 0x86000) = 0xb0773000
mmap2(NULL, 25140, PROT_READ, MAP_PRIVATE, 4, 0x5000) = 0xb076c000
openat(AT_FDCWD, "/system/lib/libm.so", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 5
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb076a000
madvise(0xb076a000, 8192, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb076a000, 8192, "linker_alloc_lob") = -1 EINVAL (Invalid argument)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb0768000
madvise(0xb0768000, 8192, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb0768000, 8192, "linker_alloc_lob") = -1 EINVAL (Invalid argument)
readlinkat(AT_FDCWD, "/proc/self/fd/5", "/system/lib/libm.so", 4096) = 19
munmap(0xb0768000, 8192) = 0
munmap(0xb076a000, 8192) = 0
fstat64(5, {st_mode=0, st_size=1, ...}) = 0
pread64(5, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\0\0\0\0004\0\0\0"..., 52, 0) = 52
mmap2(NULL, 424, PROT_READ, MAP_PRIVATE, 5, 0) = 0xb076b000
mmap2(NULL, 2432, PROT_READ, MAP_PRIVATE, 5, 0x20000) = 0xb076a000
mmap2(NULL, 6600, PROT_READ, MAP_PRIVATE, 5, 0x1f000) = 0xb0768000
mmap2(NULL, 8839, PROT_READ, MAP_PRIVATE, 5, 0x1000) = 0xb0765000
mmap2(NULL, 139264, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb0743000
madvise(0xb0743000, 139264, MADV_MERGEABLE) = 0
mmap2(0xb0743000, 127684, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 5, 0) = 0xb0743000
mmap2(0xb0763000, 4204, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 5, 0x1f000) = 0xb0763000
mmap2(NULL, 598016, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb06b1000
madvise(0xb06b1000, 598016, MADV_MERGEABLE) = 0
mmap2(0xb06b1000, 538276, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0xb06b1000
mmap2(0xb0735000, 22960, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x83000) = 0xb0735000
mmap2(0xb073b000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb073b000
madvise(0xb073b000, 32768, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb073b000, 32768, ".bss") = -1 EINVAL (Invalid argument)
mmap2(NULL, 585728, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb0622000
madvise(0xb0622000, 585728, MADV_MERGEABLE) = 0
mmap2(0xb0622000, 557088, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xb0622000
mmap2(0xb06ab000, 16409, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x88000) = 0xb06ab000
mmap2(0xb06b0000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb06b0000
madvise(0xb06b0000, 4096, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb06b0000, 4096, ".bss") = -1 EINVAL (Invalid argument)
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb0621000
madvise(0xb0621000, 4096, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb0621000, 4096, "linker_alloc_small_objects") = -1 EINVAL (Invalid argument)
mprotect(0x80b24000, 4096, PROT_READ) = 0
munmap(0xb0621000, 4096) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb0621000
madvise(0xb0621000, 4096, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb0621000, 4096, "linker_alloc_small_objects") = -1 EINVAL (Invalid argument)
mprotect(0xb06ab000, 16384, PROT_READ) = 0
munmap(0xb0621000, 4096) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb0621000
madvise(0xb0621000, 4096, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb0621000, 4096, "linker_alloc_small_objects") = -1 EINVAL (Invalid argument)
munmap(0xb0621000, 4096) = 0
mprotect(0xb0735000, 16384, PROT_READ) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb0621000
madvise(0xb0621000, 4096, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb0621000, 4096, "linker_alloc_small_objects") = -1 EINVAL (Invalid argument)
mprotect(0xb0763000, 4096, PROT_READ) = 0
munmap(0xb0621000, 4096) = 0
close(3) = 0
close(4) = 0
close(5) = 0
munmap(0xb0765000, 8839) = 0
munmap(0xb0768000, 6600) = 0
munmap(0xb076a000, 2432) = 0
munmap(0xb076b000, 424) = 0
munmap(0xb076c000, 25140) = 0
munmap(0xb0773000, 1920) = 0
munmap(0xb0774000, 1768) = 0
munmap(0xb0775000, 424) = 0
munmap(0xb0776000, 110556) = 0
munmap(0xb0791000, 6432) = 0
munmap(0xb0793000, 2232) = 0
munmap(0xb0794000, 392) = 0
munmap(0xb0796000, 4096) = 0
mprotect(0xb07bc000, 4096, PROT_READ|PROT_WRITE) = 0
mprotect(0xb07be000, 4096, PROT_READ|PROT_WRITE) = 0
mprotect(0xb073c000, 4096, PROT_READ) = 0
mprotect(0xb073c000, 4096, PROT_READ|PROT_WRITE) = 0
mprotect(0xb073c000, 4096, PROT_READ) = 0
fstatat64(AT_FDCWD, "/dev/__properties__", {st_mode=0, st_size=2, ...}, 0) = 0
openat(AT_FDCWD, "/property_contexts", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
brk(NULL) = 0x80fca000
mmap2(NULL, 524288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb05a2000
madvise(0xb05a2000, 524288, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb05a2000, 524288, "libc_malloc") = -1 EINVAL (Invalid argument)
munmap(0xb05a2000, 524288) = 0
mmap2(NULL, 1044480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb0523000
madvise(0xb0523000, 1044480, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb0523000, 1044480, "libc_malloc") = -1 EINVAL (Invalid argument)
munmap(0xb0523000, 380928) = 0
munmap(0xb0600000, 139264) = 0
clock_gettime(CLOCK_MONOTONIC, {5185, 247164635}) = 0
openat(AT_FDCWD, "/sys/devices/system/cpu/online", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 4
mmap2(NULL, 524288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb0500000
madvise(0xb0500000, 524288, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb0500000, 524288, "libc_malloc") = -1 EINVAL (Invalid argument)
fstat64(4, {st_mode=0, st_size=1, ...}) = 0
read(4, "0-3\n", 4096) = 4
close(4) = 0
fstat64(3, {st_mode=0, st_size=1, ...}) = 0
read(3, "#line 1 \"system/sepolicy/propert"..., 4096) = 4096
read(3, ":config_prop:s0\nro.config. "..., 4096) = 249
read(3, "", 4096) = 0
close(3) = 0
openat(AT_FDCWD, "/dev/__properties__/properties_serial", O_RDONLY|O_LARGEFILE|O_NOFOLLOW|O_CLOEXEC) = 3
fstat64(3, {st_mode=0, st_size=1, ...}) = 0
mmap2(NULL, 131072, PROT_READ, MAP_SHARED, 3, 0) = 0xb0775000
close(3) = 0
mprotect(0xb073c000, 4096, PROT_READ|PROT_WRITE) = 0
openat(AT_FDCWD, "/dev/__properties__/u:object_r:default_prop:s0", O_RDONLY|O_LARGEFILE|O_NOFOLLOW|O_CLOEXEC) = 3
fstat64(3, {st_mode=0, st_size=1, ...}) = 0
mmap2(NULL, 131072, PROT_READ, MAP_SHARED, 3, 0) = 0xb0602000
close(3) = 0
mprotect(0xb073c000, 4096, PROT_READ) = 0
openat(AT_FDCWD, "/system/lib/libnetd_client.so", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb0773000
madvise(0xb0773000, 8192, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb0773000, 8192, "linker_alloc_lob") = -1 EINVAL (Invalid argument)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb0771000
madvise(0xb0771000, 8192, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb0771000, 8192, "linker_alloc_lob") = -1 EINVAL (Invalid argument)
readlinkat(AT_FDCWD, "/proc/self/fd/3", "/system/lib/libnetd_client.so", 4096) = 29
munmap(0xb0771000, 8192) = 0
munmap(0xb0773000, 8192) = 0
fstat64(3, {st_mode=0, st_size=1, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb0796000
madvise(0xb0796000, 4096, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb0796000, 4096, "linker_alloc_small_objects") = -1 EINVAL (Invalid argument)
pread64(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\0\0\0\0004\0\0\0"..., 52, 0) = 52
mmap2(NULL, 392, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb0774000
mmap2(NULL, 2144, PROT_READ, MAP_PRIVATE, 3, 0x4000) = 0xb0773000
mmap2(NULL, 7624, PROT_READ, MAP_PRIVATE, 3, 0x3000) = 0xb0771000
mmap2(NULL, 3829, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb0770000
mmap2(NULL, 24576, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb076a000
madvise(0xb076a000, 24576, MADV_MERGEABLE) = 0
mmap2(0xb076a000, 14616, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xb076a000
mmap2(0xb076e000, 4100, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x3000) = 0xb076e000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb0769000
madvise(0xb0769000, 4096, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb0769000, 4096, "linker_alloc_small_objects") = -1 EINVAL (Invalid argument)
mprotect(0xb076e000, 4096, PROT_READ) = 0
munmap(0xb0769000, 4096) = 0
close(3) = 0
munmap(0xb0770000, 3829) = 0
munmap(0xb0771000, 7624) = 0
munmap(0xb0773000, 2144) = 0
munmap(0xb0774000, 392) = 0
munmap(0xb0796000, 4096) = 0
futex(0xb073b018, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0xb06b0a48, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0xb06b0a48, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0xb06b0a48, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0xb06b0a48, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0xb06b0a48, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0xb06af234, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0xb06b0a48, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0xb06b0a48, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0xb06b0a48, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0xb06b0a48, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0xb06b0a48, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0xb06b0a48, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0xb06b0a48, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0xb06b0a48, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0xb06b0a48, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0xb06b0a48, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0xb06b0a48, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0xb06b0a48, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0xb06b0a48, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0xb06b0a48, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0xb06b0a48, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0xb06b0a48, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0xb06b0a48, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0xb06b0a48, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0xb06b0a48, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0xb06b0a48, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0xb06b0a48, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0xb06b0a48, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0xb06b0a48, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0xb06af234, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0xb06af234, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0xb073d078, FUTEX_WAKE_PRIVATE, 2147483647) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb0796000
madvise(0xb0796000, 4096, MADV_MERGEABLE) = 0
prctl(0x53564d41 /* PR_??? */, 0, 0xb0796000, 4096, "atexit handlers") = -1 EINVAL (Invalid argument)
mprotect(0xb0796000, 4096, PROT_READ) = 0
mmap2(NULL, 20, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0xb0774000
mmap2(NULL, 20, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0xb0773000
mprotect(0xb07bc000, 4096, PROT_READ) = 0
mprotect(0xb07be000, 4096, PROT_READ) = 0
mprotect(0xb0796000, 4096, PROT_READ|PROT_WRITE) = 0
mprotect(0xb0796000, 4096, PROT_READ) = 0
mmap2(NULL, 44, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0xb0772000
mmap2(NULL, 16843780, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0xaf4ef000
mmap2(NULL, 20, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0xb0771000
mmap2(NULL, 16843780, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0xae4de000
mmap2(NULL, 20, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0xb0770000
mmap2(NULL, 16843780, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0xad4cd000
mmap2(NULL, 20, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0xb0769000
mmap2(NULL, 16843780, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0xac4bc000
mmap2(NULL, 20, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0xb0768000
mmap2(NULL, 16843780, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0xab4ab000
mmap2(NULL, 20, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0xb0767000
mmap2(NULL, 16843780, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0xaa49a000
mmap2(NULL, 20, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0xb0766000
mmap2(NULL, 16843780, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0xa9489000
mmap2(NULL, 20, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0xb0765000
mmap2(NULL, 16843780, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0xa8478000
mmap2(NULL, 20, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0xb0601000
openat(AT_FDCWD, "/proc/meminfo", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=0, st_size=1, ...}) = 0
read(3, "MemTotal: 763068 kB\nMemF"..., 1024) = 1008
close(3) = 0
openat(AT_FDCWD, "/sys/devices/system/cpu/online", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=0, st_size=1, ...}) = 0
read(3, "0-3\n", 4096) = 4
close(3) = 0
mprotect(0xb0796000, 4096, PROT_READ|PROT_WRITE) = 0
mprotect(0xb0796000, 4096, PROT_READ) = 0
fstatat64(AT_FDCWD, "/dev/block/ram0", {st_mode=0, st_size=1, ...}, 0) = 0
openat(AT_FDCWD, "/dev/ashmem", O_RDWR|O_LARGEFILE) = 3
ioctl(3, ASHMEM_SET_NAME, 0xbeb6b935) = 0
ioctl(3, _IOC(_IOC_WRITE, 0x77, 0x03, 0x04), 0x27e9004) = 0
ioctl(3, ASHMEM_GET_SIZE, 0) = 41848836
mmap2(NULL, 41848840, PROT_READ|PROT_WRITE, MAP_SHARED, 3, 0) = 0xa5c8e000
mmap2(NULL, 20, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0xb0600000
mmap2(NULL, 20, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0xa5c8d000
mmap2(NULL, 20, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0xa5c8c000
--- SIGBUS {si_signo=SIGBUS, si_code=BUS_ADRALN, si_addr=0xa5c8e75c} ---
sigaction(SIGBUS, {SIG_DFL, [], SA_RESTORER|SA_RESTART, 0xb080fa48}, {0xb07ca805, [], SA_RESTORER|SA_RESTART|SA_SIGINFO|SA_ONSTACK, 0xb080fa54}) = 0
sigaction(SIGBUS, {0xb07ca805, [], SA_RESTORER|SA_RESTART|SA_SIGINFO|SA_ONSTACK, 0xb080fa54}, NULL) = 0
prctl(PR_GET_NAME, "fio") = 0
socket(PF_LOCAL, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 4
fcntl64(4, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
connect(4, {sa_family=AF_LOCAL, sun_path="/dev/socket/logdw"}, 110) = 0
openat(AT_FDCWD, "/dev/__properties__/u:object_r:default_prop:s0", O_RDONLY|O_LARGEFILE|O_NOFOLLOW|O_CLOEXEC) = 5
fstat64(5, {st_mode=0, st_size=1, ...}) = 0
mmap2(NULL, 131072, PROT_READ, MAP_SHARED, 5, 0) = 0xa5c6c000
close(5) = 0
openat(AT_FDCWD, "/dev/__properties__/u:object_r:logd_prop:s0", O_RDONLY|O_LARGEFILE|O_NOFOLLOW|O_CLOEXEC) = 5
fstat64(5, {st_mode=0, st_size=1, ...}) = 0
mmap2(NULL, 131072, PROT_READ, MAP_SHARED, 5, 0) = 0xa5c4c000
close(5) = 0
clock_gettime(CLOCK_REALTIME, {1502715827, 874523743}) = 0
writev(4, [{"\4", 1}, {"\16\7", 2}, {"\263\237\221Y_, 4", 8}, {"\7", 1}, {"libc\0", 5}, {"Fatal signal 7 (SIGBUS), code 1,"..., 73}], 6) = 90
close(4) = 0
socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC, 0) = 4
connect(4, {sa_family=AF_LOCAL, sun_path=@"android:debuggerd"}, 20) = 0
write(4, "\0\0\0\0\16\7\0\0\0\0\0\0\0\0\0\0\1\0\0\0", 20) = 20
read(4, 0xb07c7c38, 1) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
--- SIGCONT {si_signo=SIGCONT, si_code=SI_USER, si_pid=122, si_uid=0} ---
read(4, "", 1) = 0
close(4) = 0
sigaction(SIGBUS, {SIG_DFL, [], SA_RESTORER|SA_RESTART, 0xb080fa48}, {0xb07ca805, [], SA_RESTORER|SA_RESTART|SA_SIGINFO|SA_ONSTACK, 0xb080fa54}) = 0
rt_tgsigqueueinfo(1806, 1806, SIGBUS, {si_signo=SIGBUS, si_code=BUS_ADRALN, si_addr=0xa5c8e75c}) = 0
rt_sigreturn() = -1513560228
--- SIGBUS {si_signo=SIGBUS, si_code=BUS_ADRALN, si_addr=0xa5c8e75c} ---
+++ killed by SIGBUS +++
答案 0 :(得分:0)
你需要一个更新的fio(参见https://github.com/axboe/fio/commit/d87674757a6afddc059e5bbfae3fcf267236a44e哪个有修复并且在fio-2.21中,但还有其他修复意味着你应该使用fio-2.99或更高版本)或者fio有脏黑客(见https://android.googlesource.com/platform/external/fio/+/365a153cfe8a3601af5d7c6c87679c20e84314e5)。
(PS:直接在fio邮件列表上提问这个问题可能会更快)