關於strace 工具處理問題技巧

shawnloong發表於2016-12-21
mysql 5.7超級蛋疼,沒有任何提示:
[root@MysqlTest-200-15 ~]# /application/mysql/bin/mysqld --initialize-insecure --user=mysql --basedir=/usr/local/mysql --datadir=/data/mysql

沒辦法只能用 strace
[root@MysqlTest-200-15 ~]# strace /application/mysql/bin/mysqld  --initialize-insecure --user=mysql --basedir=/application/mysql --datadir=/data/mysql3306/data/
execve("/application/mysql/bin/mysqld", ["/application/mysql/bin/mysqld", "--initialize-insecure", "--user=mysql", "--basedir=/application/mysql", "--datadir=/data/mysql3306/data/"], [/* 26 vars */]) = 0
brk(0)                                  = 0x3c63000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0c93205000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("tls/x86_64/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("tls/libpthread.so.0", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("x86_64/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libpthread.so.0", O_RDONLY)       = -1 ENOENT (No such file or directory)
open("/usr/local/java/jdk1.7/bin/tls/x86_64/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/local/java/jdk1.7/bin/tls/x86_64", 0x7fff753015f0) = -1 ENOENT (No such file or directory)
open("/usr/local/java/jdk1.7/bin/tls/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/local/java/jdk1.7/bin/tls", 0x7fff753015f0) = -1 ENOENT (No such file or directory)
open("/usr/local/java/jdk1.7/bin/x86_64/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/local/java/jdk1.7/bin/x86_64", 0x7fff753015f0) = -1 ENOENT (No such file or directory)
open("/usr/local/java/jdk1.7/bin/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/local/java/jdk1.7/bin", {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=17276, ...}) = 0
mmap(NULL, 17276, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f0c93200000
close(3)                                = 0
open("/lib64/libpthread.so.0", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000^\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=142688, ...}) = 0
mmap(NULL, 2212848, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0c92dca000
mprotect(0x7f0c92de1000, 2097152, PROT_NONE) = 0
mmap(0x7f0c92fe1000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7f0c92fe1000
mmap(0x7f0c92fe3000, 13296, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f0c92fe3000
close(3)                                = 0
open("tls/x86_64/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("tls/libcrypt.so.1", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("x86_64/libcrypt.so.1", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("libcrypt.so.1", O_RDONLY)         = -1 ENOENT (No such file or directory)
open("/usr/local/java/jdk1.7/bin/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib64/libcrypt.so.1", 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\0\f\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=40400, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0c931ff000
mmap(NULL, 2318816, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0c92b93000
mprotect(0x7f0c92b9a000, 2097152, PROT_NONE) = 0
mmap(0x7f0c92d9a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x7f0c92d9a000
mmap(0x7f0c92d9c000, 184800, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f0c92d9c000
close(3)                                = 0
open("tls/x86_64/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("tls/libdl.so.2", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("x86_64/libdl.so.2", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("libdl.so.2", O_RDONLY)            = -1 ENOENT (No such file or directory)
open("/usr/local/java/jdk1.7/bin/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib64/libdl.so.2", 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\340\r\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=19536, ...}) = 0
mmap(NULL, 2109696, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0c9298f000
mprotect(0x7f0c92991000, 2097152, PROT_NONE) = 0
mmap(0x7f0c92b91000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f0c92b91000
close(3)                                = 0
open("tls/x86_64/libz.so.1", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("tls/libz.so.1", O_RDONLY)         = -1 ENOENT (No such file or directory)
open("x86_64/libz.so.1", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("libz.so.1", O_RDONLY)             = -1 ENOENT (No such file or directory)
open("/usr/local/java/jdk1.7/bin/libz.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib64/libz.so.1", 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 !\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=88600, ...}) = 0
mmap(NULL, 2183696, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0c92779000
mprotect(0x7f0c9278e000, 2093056, PROT_NONE) = 0
mmap(0x7f0c9298d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14000) = 0x7f0c9298d000
close(3)                                = 0
open("tls/x86_64/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("tls/librt.so.1", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("x86_64/librt.so.1", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("librt.so.1", O_RDONLY)            = -1 ENOENT (No such file or directory)
open("/usr/local/java/jdk1.7/bin/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib64/librt.so.1", 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\240!\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=43944, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0c931fe000
mmap(NULL, 2128816, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0c92571000
mprotect(0x7f0c92578000, 2093056, PROT_NONE) = 0
mmap(0x7f0c92777000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7f0c92777000
close(3)                                = 0
open("tls/x86_64/libstdc++.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("tls/libstdc++.so.6", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("x86_64/libstdc++.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libstdc++.so.6", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/usr/local/java/jdk1.7/bin/libstdc++.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libstdc++.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\360c\5\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=987096, ...}) = 0
mmap(NULL, 3166648, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0c9226b000
mprotect(0x7f0c92353000, 2097152, PROT_NONE) = 0
mmap(0x7f0c92553000, 36864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe8000) = 0x7f0c92553000
mmap(0x7f0c9255c000, 82360, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f0c9255c000
close(3)                                = 0
open("tls/x86_64/libm.so.6", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("tls/libm.so.6", O_RDONLY)         = -1 ENOENT (No such file or directory)
open("x86_64/libm.so.6", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("libm.so.6", O_RDONLY)             = -1 ENOENT (No such file or directory)
open("/usr/local/java/jdk1.7/bin/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib64/libm.so.6", O_RDONLY)      = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p>\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=596360, ...}) = 0
mmap(NULL, 2633912, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0c91fe7000
mprotect(0x7f0c9206a000, 2093056, PROT_NONE) = 0
mmap(0x7f0c92269000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x82000) = 0x7f0c92269000
close(3)                                = 0
open("tls/x86_64/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("tls/libgcc_s.so.1", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("x86_64/libgcc_s.so.1", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("libgcc_s.so.1", O_RDONLY)         = -1 ENOENT (No such file or directory)
open("/usr/local/java/jdk1.7/bin/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib64/libgcc_s.so.1", 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\20)\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=90880, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0c931fd000
mmap(NULL, 2186584, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0c91dd1000
mprotect(0x7f0c91de7000, 2093056, PROT_NONE) = 0
mmap(0x7f0c91fe6000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x7f0c91fe6000
close(3)                                = 0
open("tls/x86_64/libc.so.6", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("tls/libc.so.6", O_RDONLY)         = -1 ENOENT (No such file or directory)
open("x86_64/libc.so.6", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("libc.so.6", O_RDONLY)             = -1 ENOENT (No such file or directory)
open("/usr/local/java/jdk1.7/bin/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib64/libc.so.6", O_RDONLY)      = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000\356\1\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1923352, ...}) = 0
mmap(NULL, 3750184, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0c91a3d000
mprotect(0x7f0c91bc7000, 2097152, PROT_NONE) = 0
mmap(0x7f0c91dc7000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18a000) = 0x7f0c91dc7000
mmap(0x7f0c91dcd000, 14632, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f0c91dcd000
close(3)                                = 0
open("tls/x86_64/libfreebl3.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("tls/libfreebl3.so", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("x86_64/libfreebl3.so", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("libfreebl3.so", O_RDONLY)         = -1 ENOENT (No such file or directory)
open("/usr/local/java/jdk1.7/bin/libfreebl3.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib64/libfreebl3.so", 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@<\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=469528, ...}) = 0
mmap(NULL, 2582368, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0c917c6000
mprotect(0x7f0c91837000, 2093056, PROT_NONE) = 0
mmap(0x7f0c91a36000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x70000) = 0x7f0c91a36000
mmap(0x7f0c91a39000, 14176, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f0c91a39000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0c931fc000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0c931fb000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0c931f9000
arch_prctl(ARCH_SET_FS, 0x7f0c931f9720) = 0
mprotect(0x7f0c91a36000, 8192, PROT_READ) = 0
mprotect(0x7f0c91dc7000, 16384, PROT_READ) = 0
mprotect(0x7f0c92269000, 4096, PROT_READ) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0c931f8000
mprotect(0x7f0c92553000, 28672, PROT_READ) = 0
mprotect(0x7f0c92777000, 4096, PROT_READ) = 0
mprotect(0x7f0c9298d000, 4096, PROT_READ) = 0
mprotect(0x7f0c92b91000, 4096, PROT_READ) = 0
mprotect(0x7f0c92d9a000, 4096, PROT_READ) = 0
mprotect(0x7f0c92fe1000, 4096, PROT_READ) = 0
mprotect(0x7f0c93206000, 4096, PROT_READ) = 0
munmap(0x7f0c93200000, 17276)           = 0
set_tid_address(0x7f0c931f99f0)         = 1269
set_robust_list(0x7f0c931f9a00, 24)     = 0
futex(0x7fff75301eec, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0x7fff75301eec, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, NULL, 7f0c931f9720) = -1 EAGAIN (Resource temporarily unavailable)
rt_sigaction(SIGRTMIN, {0x7f0c92dcfcb0, [], SA_RESTORER|SA_SIGINFO, 0x7f0c92dd97e0}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x7f0c92dcfd40, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7f0c92dd97e0}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=10240*1024, rlim_max=RLIM64_INFINITY}) = 0
futex(0x7f0c9255cd08, FUTEX_WAKE_PRIVATE, 2147483647) = 0
brk(0)                                  = 0x3c63000
brk(0x3c84000)                          = 0x3c84000
open("/sys/devices/system/cpu/online", O_RDONLY|O_CLOEXEC) = 3
read(3, "0-7\n", 8192)                  = 4
close(3)                                = 0
stat("/etc/my.cnf", 0x7fff752fc910)     = -1 ENOENT (No such file or directory)
stat("/etc/mysql/my.cnf", 0x7fff752fc910) = -1 ENOENT (No such file or directory)
stat("/data/mysql3306/my.cnf", {st_mode=S_IFREG|0644, st_size=2419, ...}) = 0
open("/data/mysql3306/my.cnf", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2419, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0c93204000
read(3, "[client]\nport\t= 3306\nsocket\t= /d"..., 4096) = 2419
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7f0c93204000, 4096)            = 0
stat("/root/.my.cnf", 0x7fff752fc910)   = -1 ENOENT (No such file or directory)
stat("/root/.mylogin.cnf", 0x7fff752fc910) = -1 ENOENT (No such file or directory)
getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=4*1024}) = 0
setrlimit(RLIMIT_NOFILE, {rlim_cur=3*1024, rlim_max=3*1024}) = 0
getrlimit(RLIMIT_NOFILE, {rlim_cur=3*1024, rlim_max=3*1024}) = 0
umask(026)                              = 022
open("/etc/localtime", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=388, ...}) = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=388, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0c93204000
read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\2\0\0\0\0"..., 4096) = 388
lseek(3, -240, SEEK_CUR)                = 148
read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0\3\0\0\0\0"..., 4096) = 240
close(3)                                = 0
munmap(0x7f0c93204000, 4096)            = 0
uname({sys="Linux", node="MysqlTest-200-15", ...}) = 0
brk(0x3ca6000)                          = 0x3ca6000
lstat("/application", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/application/mysql", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/mysql3306", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/mysql3306/data", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/application/mysql/share/english/errmsg.sys", O_RDONLY) = 3
read(3, "\376\376\3\1\1\0 \27\1\0009\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\10\0", 32) = 32
read(3, "\0\0\0\0\10\0\0\0\20\0\0\0\23\0\0\0\27\0\0\0D\0\0\0m\0\0\0\231\0\0\0"..., 4324) = 4324
read(3, "hashchk\0isamchk\0NO\0YES\0Can't cre"..., 71456) = 71456
close(3)                                = 0
stat("/application/mysql/share/charsets/Index.xml", {st_mode=S_IFREG|0644, st_size=18710, ...}) = 0
open("/application/mysql/share/charsets/Index.xml", O_RDONLY) = 3
read(3, "<!--?xml version='1.0' encoding=\"ut"..., 18710) = 18710
close(3)                                = 0
futex(0x1e7dfa0, FUTEX_WAKE_PRIVATE, 2147483647) = 0
brk(0x3cc7000)                          = 0x3cc7000
open("/data/mysql3306/data/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
fcntl(3, F_GETFD)                       = 0x1 (flags FD_CLOEXEC)
brk(0x3cee000)                          = 0x3cee000
getdents(3, /* 2 entries */, 32768)     = 48
getdents(3, /* 0 entries */, 32768)     = 0
close(3)                                = 0
brk(0x3cdc000)                          = 0x3cdc000
open("/data/mysql3306/data/is_writable", O_RDONLY|O_CREAT|O_EXCL|O_NOCTTY|0x28, 0640) = 3
close(3)                                = 0
unlink("/data/mysql3306/data/is_writable") = 0
unlink("/data/mysql3306/data/MysqlTest-200-15.LOWER-TEST") = -1 ENOENT (No such file or directory)
open("/data/mysql3306/data/MysqlTest-200-15.lower-test", O_RDWR|O_CREAT, 0666) = 3
close(3)                                = 0
stat("/data/mysql3306/data/MysqlTest-200-15.LOWER-TEST", 0x7fff75301530) = -1 ENOENT (No such file or directory)
unlink("/data/mysql3306/data/MysqlTest-200-15.lower-test") = 0
unlink("/data/mysql3306/data/MysqlTest-200-15.LOWER-TEST") = -1 ENOENT (No such file or directory)
open("/data/mysql3306/data/MysqlTest-200-15.lower-test", O_RDWR|O_CREAT, 0666) = 3
close(3)                                = 0
stat("/data/mysql3306/data/MysqlTest-200-15.LOWER-TEST", 0x7fff75301530) = -1 ENOENT (No such file or directory)
unlink("/data/mysql3306/data/MysqlTest-200-15.lower-test") = 0
rt_sigaction(SIGSEGV, {0x7c1090, [], SA_RESTORER|SA_NODEFER|SA_RESETHAND, 0x7f0c92dd97e0}, NULL, 8) = 0
rt_sigaction(SIGABRT, {0x7c1090, [], SA_RESTORER|SA_NODEFER|SA_RESETHAND, 0x7f0c92dd97e0}, NULL, 8) = 0
rt_sigaction(SIGBUS, {0x7c1090, [], SA_RESTORER|SA_NODEFER|SA_RESETHAND, 0x7f0c92dd97e0}, NULL, 8) = 0
rt_sigaction(SIGILL, {0x7c1090, [], SA_RESTORER|SA_NODEFER|SA_RESETHAND, 0x7f0c92dd97e0}, NULL, 8) = 0
rt_sigaction(SIGFPE, {0x7c1090, [], SA_RESTORER|SA_NODEFER|SA_RESETHAND, 0x7f0c92dd97e0}, NULL, 8) = 0
rt_sigaction(SIGPIPE, {SIG_IGN, [], SA_RESTORER, 0x7f0c92dd97e0}, NULL, 8) = 0
rt_sigaction(SIGALRM, {SIG_IGN, [], SA_RESTORER, 0x7f0c92dd97e0}, NULL, 8) = 0
rt_sigaction(SIGUSR1, {0x7b11c0, [], SA_RESTORER, 0x7f0c92dd97e0}, NULL, 8) = 0
rt_sigaction(SIGTERM, {SIG_DFL, [], SA_RESTORER, 0x7f0c92dd97e0}, NULL, 8) = 0
rt_sigaction(SIGHUP, {SIG_DFL, [], SA_RESTORER, 0x7f0c92dd97e0}, NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [HUP INT QUIT TERM TSTP], NULL, 8) = 0
chdir("/data/mysql3306/data/")          = 0
geteuid()                               = 0
socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(3)                                = 0
socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(3)                                = 0
open("/etc/nsswitch.conf", O_RDONLY)    = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=1688, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0c93204000
read(3, "#\n# /etc/nsswitch.conf\n#\n# An ex"..., 4096) = 1688
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7f0c93204000, 4096)            = 0
open("tls/x86_64/libnss_files.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("tls/libnss_files.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("x86_64/libnss_files.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libnss_files.so.2", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("/usr/local/java/jdk1.7/bin/libnss_files.so.2", 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=17276, ...}) = 0
mmap(NULL, 17276, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f0c93200000
close(3)                                = 0
open("/lib64/libnss_files.so.2", 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\360!\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=65960, ...}) = 0
mmap(NULL, 2151824, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0c915b8000
mprotect(0x7f0c915c5000, 2093056, PROT_NONE) = 0
mmap(0x7f0c917c4000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xc000) = 0x7f0c917c4000
close(3)                                = 0
mprotect(0x7f0c917c4000, 4096, PROT_READ) = 0
munmap(0x7f0c93200000, 17276)           = 0
open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
fcntl(3, F_GETFD)                       = 0x1 (flags FD_CLOEXEC)
fstat(3, {st_mode=S_IFREG|0644, st_size=899, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0c93204000
read(3, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 899
close(3)                                = 0
munmap(0x7f0c93204000, 4096)            = 0
stat("/data/mysql3306/data/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/proc/sys/kernel/ngroups_max", O_RDONLY) = 3
read(3, "65536\n", 31)                  = 6
close(3)                                = 0
socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(3)                                = 0
socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(3)                                = 0
open("/etc/group", O_RDONLY|O_CLOEXEC)  = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=455, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0c93204000
lseek(3, 0, SEEK_CUR)                   = 0
read(3, "root:x:0:\nbin:x:1:bin,daemon\ndae"..., 4096) = 455
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7f0c93204000, 4096)            = 0
setgroups(1, [500])                     = 0
setgid(500)                             = 0
setuid(500)                             = 0
rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [HUP INT QUIT TERM TSTP], 8) = 0
mmap(NULL, 10489856, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f0c90bb7000
mprotect(0x7f0c90bb7000, 4096, PROT_NONE) = 0
clone(child_stack=0x7f0c915b6fd0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f0c915b79d0, tls=0x7f0c915b7700, child_tidptr=0x7f0c915b79d0) = 1270
futex(0x7fff753013f0, FUTEX_WAKE_PRIVATE, 2147483647) = 1
rt_sigprocmask(SIG_SETMASK, [HUP INT QUIT TERM TSTP], NULL, 8) = 0
close(2)                                = 0
open("/data/mysql3306/error.log", O_WRONLY|O_CREAT|O_APPEND, 0666) = -1 EACCES (Permission denied)
close(1)                                = 0
open("/data/mysql3306/error.log", O_WRONLY|O_CREAT|O_APPEND, 0666) = -1 EACCES (Permission denied)
open("/data/mysql3306/error.log", O_WRONLY|O_CREAT|O_APPEND, 0666) = -1 EACCES (Permission denied)
open("/data/mysql3306/error.log", O_WRONLY|O_CREAT|O_APPEND, 0666) = -1 EACCES (Permission denied)
open("/data/mysql3306/error.log", O_WRONLY|O_CREAT|O_APPEND, 0666) = -1 EACCES (Permission denied)
open("/data/mysql3306/error.log", O_WRONLY|O_CREAT|O_APPEND, 0666) = -1 EACCES (Permission denied)
tgkill(1269, 1270, SIGRT_3)             = 0
exit_group(1)                           = ?
+++ exited with 1 +++


哈哈感覺看起來很明瞭,很弱智的錯誤...
關於strace 選項說明(注摘自網際網路)
-c 統計每一系統呼叫的所執行的時間,次數和出錯的次數等.
-d 輸出strace關於標準錯誤的除錯資訊.
-f 跟蹤由fork呼叫所產生的子程式.
-ff 如果提供-o filename,則所有程式的跟蹤結果輸出到相應的filename.pid中,pid是各程式的程式號.
-F 嘗試跟蹤vfork呼叫.在-f時,vfork不被跟蹤.
-h 輸出簡要的幫助資訊.
-i 輸出系統呼叫的入口指標.
-q 禁止輸出關於脫離的訊息.
-r 列印出相對時間關於,,每一個系統呼叫.
-t 在輸出中的每一行前加上時間資訊.
-tt 在輸出中的每一行前加上時間資訊,微秒級.
-ttt 微秒級輸出,以秒了表示時間.
-T 顯示每一呼叫所耗的時間.
-v 輸出所有的系統呼叫.一些呼叫關於環境變數,狀態,輸入輸出等呼叫由於使用頻繁,預設不輸出.
-V 輸出strace的版本資訊.
-x 以十六進位制形式輸出非標準字串
-xx 所有字串以十六進位制形式輸出.
-a column
設定返回值的輸出位置.預設 為40.
-e expr
指定一個表示式,用來控制如何跟蹤.格式如下:
[qualifier=][!]value1[,value2]...
qualifier只能是 trace,abbrev,verbose,raw,signal,read,write其中之一.value是用來限定的符號或數字.預設的 qualifier是 trace.感嘆號是否定符號.例如:
-eopen等價於 -e trace=open,表示只跟蹤open呼叫.而-etrace!=open表示跟蹤除了open以外的其他呼叫.有兩個特殊的符號 all 和 none.
注意有些shell使用!來執行歷史記錄裡的命令,所以要使用\\.
-e trace=set
只跟蹤指定的系統 呼叫.例如:-e trace=open,close,rean,write表示只跟蹤這四個系統呼叫.預設的為set=all.
-e trace=file
只跟蹤有關檔案操作的系統呼叫.
-e trace=process
只跟蹤有關程式控制的系統呼叫.
-e trace=network
跟蹤與網路有關的所有系統呼叫.
-e strace=signal
跟蹤所有與系統訊號有關的 系統呼叫
-e trace=ipc
跟蹤所有與程式通訊有關的系統呼叫
-e abbrev=set
設定 strace輸出的系統呼叫的結果集.-v 等與 abbrev=none.預設為abbrev=all.
-e raw=set
將指 定的系統呼叫的引數以十六進位制顯示.
-e signal=set
指定跟蹤的系統訊號.預設為all.如 signal=!SIGIO(或者signal=!io),表示不跟蹤SIGIO訊號.
-e read=set
輸出從指定檔案中讀出 的資料.例如:
-e read=3,5
-e write=set
輸出寫入到指定檔案中的資料.
-o filename
將strace的輸出寫入檔案filename
-p pid
跟蹤指定的程式pid.
-s strsize
指定輸出的字串的最大長度.預設為32.檔名一直全部輸出.
-u username
以username 的UID和GID執行被跟蹤的命令

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24486203/viewspace-2131154/,如需轉載,請註明出處,否則將追究法律責任。

相關文章