我遇到了非常奇怪的问题,没有任何理由的 socat 会出现段错误,我不知道该怎么做才能调试出来。完整的日志:
2015/08/27 16:55:58 socat[1] N listening on AF=2 0.0.0.0:8080
2015/08/27 16:55:59 socat[1] N accepting connection from AF=2 10.116.176.1:53363 on AF=2 10.116.176.6:8080
2015/08/27 16:55:59 socat[1] N forked off child process 9
2015/08/27 16:55:59 socat[1] N listening on AF=2 0.0.0.0:8080
2015/08/27 16:55:59 socat[9] N opening connection to AF=2 10.116.1.191:8080
2015/08/27 16:55:59 socat[9] N successfully connected from local address AF=2 10.116.176.6:52167
2015/08/27 16:55:59 socat[9] N starting data transfer loop with FDs [6,6] and [5,5]
2015/08/27 16:55:59 socat[9] N socket 1 (fd 6) is at EOF
2015/08/27 16:55:59 socat[9] N socket 1 (fd 6) is at EOF
2015/08/27 16:55:59 socat[9] N socket 2 (fd 5) is at EOF
2015/08/27 16:55:59 socat[9] N exiting with status 0
2015/08/27 16:55:59 socat[1] N childdied(): handling signal 17
2015/08/27 16:56:04 socat[1] N accepting connection from AF=2 10.116.176.1:53367 on AF=2 10.116.176.6:8080
2015/08/27 16:56:04 socat[1] N forked off child process 10
2015/08/27 16:56:04 socat[1] N listening on AF=2 0.0.0.0:8080
2015/08/27 16:56:04 socat[10] N opening connection to AF=2 10.116.1.191:8080
2015/08/27 16:56:04 socat[10] N successfully connected from local address AF=2 10.116.176.6:52171
2015/08/27 16:56:04 socat[10] N starting data transfer loop with FDs [6,6] and [5,5]
2015/08/27 16:56:04 socat[10] N socket 1 (fd 6) is at EOF
2015/08/27 16:56:04 socat[10] N socket 1 (fd 6) is at EOF
2015/08/27 16:56:04 socat[10] N socket 2 (fd 5) is at EOF
2015/08/27 16:56:04 socat[10] N exiting with status 0
2015/08/27 16:56:04 socat[1] N childdied(): handling signal 17
2015/08/27 16:56:09 socat[1] N accepting connection from AF=2 10.116.176.1:53370 on AF=2 10.116.176.6:8080
2015/08/27 16:56:09 socat[1] N forked off child process 11
2015/08/27 16:56:09 socat[1] N listening on AF=2 0.0.0.0:8080
2015/08/27 16:56:09 socat[11] N opening connection to AF=2 10.116.1.191:8080
2015/08/27 16:56:09 socat[11] N successfully connected from local address AF=2 10.116.176.6:52174
2015/08/27 16:56:09 socat[11] N starting data transfer loop with FDs [6,6] and [5,5]
2015/08/27 16:56:09 socat[11] N socket 1 (fd 6) is at EOF
2015/08/27 16:56:09 socat[11] N socket 1 (fd 6) is at EOF
2015/08/27 16:56:09 socat[11] N socket 2 (fd 5) is at EOF
2015/08/27 16:56:09 socat[11] N exiting with status 0
2015/08/27 16:56:09 socat[1] N childdied(): handling signal 17
2015/08/27 16:56:14 socat[1] N accepting connection from AF=2 10.116.176.1:53373 on AF=2 10.116.176.6:8080
2015/08/27 16:56:14 socat[1] N forked off child process 12
2015/08/27 16:56:14 socat[1] N listening on AF=2 0.0.0.0:8080
2015/08/27 16:56:14 socat[12] N opening connection to AF=2 10.116.1.191:8080
2015/08/27 16:56:14 socat[12] N successfully connected from local address AF=2 10.116.176.6:52177
2015/08/27 16:56:14 socat[12] N starting data transfer loop with FDs [6,6] and [5,5]
2015/08/27 16:56:14 socat[12] N socket 1 (fd 6) is at EOF
2015/08/27 16:56:14 socat[12] N socket 1 (fd 6) is at EOF
2015/08/27 16:56:14 socat[12] N socket 2 (fd 5) is at EOF
2015/08/27 16:56:14 socat[12] N exiting with status 0
2015/08/27 16:56:14 socat[1] N childdied(): handling signal 17
2015/08/27 16:56:19 socat[1] N accepting connection from AF=2 10.116.176.1:53377 on AF=2 10.116.176.6:8080
2015/08/27 16:56:19 socat[1] N forked off child process 13
2015/08/27 16:56:19 socat[1] N listening on AF=2 0.0.0.0:8080
2015/08/27 16:56:19 socat[13] N opening connection to AF=2 10.116.1.191:8080
2015/08/27 16:56:19 socat[13] N successfully connected from local address AF=2 10.116.176.6:52181
2015/08/27 16:56:19 socat[13] N starting data transfer loop with FDs [6,6] and [5,5]
2015/08/27 16:56:19 socat[13] N socket 1 (fd 6) is at EOF
2015/08/27 16:56:19 socat[13] N socket 1 (fd 6) is at EOF
2015/08/27 16:56:19 socat[13] N socket 2 (fd 5) is at EOF
2015/08/27 16:56:19 socat[13] N exiting with status 0
2015/08/27 16:56:19 socat[1] N childdied(): handling signal 17
2015/08/27 16:56:24 socat[1] N accepting connection from AF=2 10.116.176.1:53380 on AF=2 10.116.176.6:8080
2015/08/27 16:56:24 socat[1] N forked off child process 14
2015/08/27 16:56:24 socat[1] N listening on AF=2 0.0.0.0:8080
2015/08/27 16:56:29 socat[1] N accepting connection from AF=2 10.116.176.1:53382 on AF=2 10.116.176.6:8080
2015/08/27 16:56:29 socat[1] N forked off child process 15
2015/08/27 16:56:29 socat[1] N listening on AF=2 0.0.0.0:8080
2015/08/27 16:56:29 socat[15] N opening connection to AF=2 10.116.1.191:8080
2015/08/27 16:56:29 socat[15] N successfully connected from local address AF=2 10.116.176.6:52186
2015/08/27 16:56:29 socat[15] N starting data transfer loop with FDs [6,6] and [5,5]
2015/08/27 16:56:29 socat[15] N socket 1 (fd 6) is at EOF
2015/08/27 16:56:29 socat[15] N socket 1 (fd 6) is at EOF
2015/08/27 16:56:29 socat[15] N socket 2 (fd 5) is at EOF
2015/08/27 16:56:29 socat[15] N exiting with status 0
2015/08/27 16:56:29 socat[1] N childdied(): handling signal 17
2015/08/27 16:56:33 socat[1] N socat_signal(): handling signal 11
2015/08/27 16:56:33 socat[1] E exiting on signal 11
2015/08/27 16:56:33 socat[1] N exit(139
我正在做的事情如下:
socat -x -v -d -d TCP-LISTEN:8080,reuseaddr,fork TCP:dnsname.of.the service:8080
socat 版本是:
/ # socat -V
socat by Gerhard Rieger - see www.dest-unreach.org
socat version 1.7.3.0 on Jun 16 2015 07:12:18
running on Linux version #21-Ubuntu SMP Sun Jun 14 18:31:11 UTC 2015, release 3.19.0-21-generic, machine x86_64
features:
#define WITH_STDIO 1
#define WITH_FDNUM 1
#define WITH_FILE 1
#define WITH_CREAT 1
#define WITH_GOPEN 1
#define WITH_TERMIOS 1
#define WITH_PIPE 1
#define WITH_UNIX 1
#define WITH_ABSTRACT_UNIXSOCKET 1
#define WITH_IP4 1
#define WITH_IP6 1
#define WITH_RAWIP 1
#define WITH_GENERICSOCKET 1
#define WITH_INTERFACE 1
#define WITH_TCP 1
#define WITH_UDP 1
#define WITH_SCTP 1
#define WITH_LISTEN 1
#define WITH_SOCKS4 1
#define WITH_SOCKS4A 1
#define WITH_PROXY 1
#define WITH_SYSTEM 1
#define WITH_EXEC 1
#undef WITH_READLINE
#define WITH_TUN 1
#define WITH_PTY 1
#undef WITH_OPENSSL
#undef WITH_FIPS
#undef WITH_LIBWRAP
#define WITH_SYCLS 1
#define WITH_FILAN 1
#define WITH_RETRY 1
#define WITH_MSGLEVEL 0 /*debug*/
任何帮助将不胜感激!