Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example echo can't run on mac! #62

Open
zhangcunli opened this issue Sep 18, 2021 · 6 comments
Open

Example echo can't run on mac! #62

zhangcunli opened this issue Sep 18, 2021 · 6 comments

Comments

@zhangcunli
Copy link

➜ echo_server--20210918-1516-test git:(master) ✗ pwd
................./getty/examples/echo/tcp-echo/server/target/darwin/echo_server--20210918-1516-test
➜ echo_server--20210918-1516-test git:(master) ✗ sh bin/load_echo_server.sh start
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x7fff65d50476]

runtime stack:
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff65d50476
stack: frame={sp:0x70000bcf8e58, fp:0x70000bcf8ea8} stack=[0x70000bc79338,0x70000bcf8f38)
0x000070000bcf8d58: 0x010070000bcf8d78 0x0000000000000004
0x000070000bcf8d68: 0x000000000000001f 0x00007fff65d50476
0x000070000bcf8d78: 0x0b01dfacedebac1e 0x0000000000000001
0x000070000bcf8d88: 0x00000000040370b1 <runtime.throw+0x0000000000000071> 0x000070000bcf8e28
0x000070000bcf8d98: 0x000000000439db39 0x000070000bcf8de0
0x000070000bcf8da8: 0x0000000004037368 <runtime.fatalthrow.func1+0x0000000000000048> 0x000000c000001520
0x000070000bcf8db8: 0x0000000000000001 0x0000000000000001
0x000070000bcf8dc8: 0x000070000bcf8e28 0x00000000040370b1 <runtime.throw+0x0000000000000071>
0x000070000bcf8dd8: 0x000000c000001520 0x000070000bcf8e18
0x000070000bcf8de8: 0x00000000040372f0 <runtime.fatalthrow+0x0000000000000050> 0x000070000bcf8df8
0x000070000bcf8df8: 0x0000000004037320 <runtime.fatalthrow.func1+0x0000000000000000> 0x000000c000001520
0x000070000bcf8e08: 0x00000000040370b1 <runtime.throw+0x0000000000000071> 0x000070000bcf8e28
0x000070000bcf8e18: 0x000070000bcf8e48 0x00000000040370b1 <runtime.throw+0x0000000000000071>
0x000070000bcf8e28: 0x000070000bcf8e30 0x00000000040370e0 <runtime.throw.func1+0x0000000000000000>
0x000070000bcf8e38: 0x00000000043a3f42 0x000000000000002a
0x000070000bcf8e48: 0x000070000bcf8e98 0x000000000404d6d6 <runtime.sigpanic+0x0000000000000396>
0x000070000bcf8e58: <0x00000000043a3f42 0x000070000bcf8e80
0x000070000bcf8e68: 0x000070000bcf8ed8 0x0000000004028506 <runtime.(*mheap).allocSpan+0x0000000000000546>
0x000070000bcf8e78: 0x000000c00009c000 0x0000000000002000
0x000070000bcf8e88: 0x000000c000000008 0x0000000000000000
0x000070000bcf8e98: 0x000070000bcf8ee0 !0x00007fff65d50476
0x000070000bcf8ea8: >0x000070000bcf8ee0 0x00000000045e7000
0x000070000bcf8eb8: 0x0000000000000420 0x00000000040d2f85 <golang.org/x/sys/unix.libc_ioctl_trampoline+0x0000000000000005>

@Lvnszn
Copy link
Collaborator

Lvnszn commented Sep 18, 2021

Could you plz show me the load_echo_server.sh script and how to build binary?

@AlexStocks
Copy link
Owner

@zhangcunli pls tell me the version of getty u using. I can not reproduce the problem.

@zhangcunli
Copy link
Author

  1. getty version: master branch

2.build and run
sh assembly/mac/test.sh
cd target/darwin/echo_server--20210922-0957-test

export APP_CONF_FILE="conf/config.yml"
export APP_LOG_CONF_FILE="conf/log.xml"
./sbin/echo_server
or sh bin/load_echo_server.sh start

fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x7fff65d50476]

runtime stack:
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff65d50476
stack: frame={sp:0x7ffeefbff468, fp:0x7ffeefbff4b8} stack=[0x7ffeefb80508,0x7ffeefbff570)
0x00007ffeefbff368: 0x01007ffeefbff388 0x0000000000000004
0x00007ffeefbff378: 0x000000000000001f 0x00007fff65d50476
0x00007ffeefbff388: 0x0b01dfacedebac1e 0x0000000000000001
0x00007ffeefbff398: 0x0000000004036ef1 <runtime.throw+0x0000000000000071> 0x00007ffeefbff438
0x00007ffeefbff3a8: 0x000000000439dab0 0x00007ffeefbff3f0
0x00007ffeefbff3b8: 0x00000000040371a8 <runtime.fatalthrow.func1+0x0000000000000048> 0x0000000004640ee0
0x00007ffeefbff3c8: 0x0000000000000001 0x0000000000000001
0x00007ffeefbff3d8: 0x00007ffeefbff438 0x0000000004036ef1 <runtime.throw+0x0000000000000071>
0x00007ffeefbff3e8: 0x0000000004640ee0 0x00007ffeefbff428
0x00007ffeefbff3f8: 0x0000000004037130 <runtime.fatalthrow+0x0000000000000050> 0x00007ffeefbff408
0x00007ffeefbff408: 0x0000000004037160 <runtime.fatalthrow.func1+0x0000000000000000> 0x0000000004640ee0
0x00007ffeefbff418: 0x0000000004036ef1 <runtime.throw+0x0000000000000071> 0x00007ffeefbff438
0x00007ffeefbff428: 0x00007ffeefbff458 0x0000000004036ef1 <runtime.throw+0x0000000000000071>
0x00007ffeefbff438: 0x00007ffeefbff440 0x0000000004036f20 <runtime.throw.func1+0x0000000000000000>
0x00007ffeefbff448: 0x00000000043a3eb9 0x000000000000002a
0x00007ffeefbff458: 0x00007ffeefbff4a8 0x000000000404d516 <runtime.sigpanic+0x0000000000000396>
0x00007ffeefbff468: <0x00000000043a3eb9 0x00007ffeefbff490
0x00007ffeefbff478: 0x00007ffeefbff4e8 0x0000000004028346 <runtime.(*mheap).allocSpan+0x0000000000000546>
0x00007ffeefbff488: 0x000000c00029e000 0x0000000000002000
0x00007ffeefbff498: 0x000000c000000008 0x0000000000000000
0x00007ffeefbff4a8: 0x00007ffeefbff4f0 !0x00007fff65d50476
0x00007ffeefbff4b8: >0x00007ffeefbff4f0 0x00000000045e7000
0x00007ffeefbff4c8: 0x0000000000000420 0x00000000040d2e65 <golang.org/x/sys/unix.libc_ioctl_trampoline+0x0000000000000005>
0x00007ffeefbff4d8: 0x000000000406bf7f <runtime.syscall+0x000000000000001f> 0x000000c00004eca8
0x00007ffeefbff4e8: 0x00000000046414a0 0x000000c00004ec78
0x00007ffeefbff4f8: 0x0000000004069dd0 <runtime.asmcgocall+0x0000000000000070> 0x00007ffeefbff530
0x00007ffeefbff508: 0x000000000400f68e <runtime.persistentalloc.func1+0x000000000000002e> 0x0000000000000020
0x00007ffeefbff518: 0x0000000004640ee0 0x0000000004675020
0x00007ffeefbff528: 0x00000000000003b0 0x000000c000256000
0x00007ffeefbff538: 0x0000000004067ee9 <runtime.systemstack+0x0000000000000049> 0x0000000000000004
0x00007ffeefbff548: 0x0000000004407188 0x0000000004640ee0
0x00007ffeefbff558: 0x00007ffeefbff5a0 0x0000000004067de5 <runtime.mstart+0x0000000000000005>
0x00007ffeefbff568: 0x0000000004067d9d <runtime.rt0_go+0x000000000000013d>
runtime.throw({0x43a3eb9, 0x7ffeefbff490})
/Users/zhangcunli/Documents/go/src/runtime/panic.go:1198 +0x71
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff65d50476
stack: frame={sp:0x7ffeefbff468, fp:0x7ffeefbff4b8} stack=[0x7ffeefb80508,0x7ffeefbff570)
0x00007ffeefbff368: 0x01007ffeefbff388 0x0000000000000004
0x00007ffeefbff378: 0x000000000000001f 0x00007fff65d50476
0x00007ffeefbff388: 0x0b01dfacedebac1e 0x0000000000000001
0x00007ffeefbff398: 0x0000000004036ef1 <runtime.throw+0x0000000000000071> 0x00007ffeefbff438
0x00007ffeefbff3a8: 0x000000000439dab0 0x00007ffeefbff3f0
0x00007ffeefbff3b8: 0x00000000040371a8 <runtime.fatalthrow.func1+0x0000000000000048> 0x0000000004640ee0
0x00007ffeefbff3c8: 0x0000000000000001 0x0000000000000001
0x00007ffeefbff3d8: 0x00007ffeefbff438 0x0000000004036ef1 <runtime.throw+0x0000000000000071>
0x00007ffeefbff3e8: 0x0000000004640ee0 0x00007ffeefbff428
0x00007ffeefbff3f8: 0x0000000004037130 <runtime.fatalthrow+0x0000000000000050> 0x00007ffeefbff408
0x00007ffeefbff408: 0x0000000004037160 <runtime.fatalthrow.func1+0x0000000000000000> 0x0000000004640ee0
0x00007ffeefbff418: 0x0000000004036ef1 <runtime.throw+0x0000000000000071> 0x00007ffeefbff438
0x00007ffeefbff428: 0x00007ffeefbff458 0x0000000004036ef1 <runtime.throw+0x0000000000000071>
0x00007ffeefbff438: 0x00007ffeefbff440 0x0000000004036f20 <runtime.throw.func1+0x0000000000000000>
0x00007ffeefbff448: 0x00000000043a3eb9 0x000000000000002a
0x00007ffeefbff458: 0x00007ffeefbff4a8 0x000000000404d516 <runtime.sigpanic+0x0000000000000396>
0x00007ffeefbff468: <0x00000000043a3eb9 0x00007ffeefbff490
0x00007ffeefbff478: 0x00007ffeefbff4e8 0x0000000004028346 <runtime.(*mheap).allocSpan+0x0000000000000546>
0x00007ffeefbff488: 0x000000c00029e000 0x0000000000002000
0x00007ffeefbff498: 0x000000c000000008 0x0000000000000000
0x00007ffeefbff4a8: 0x00007ffeefbff4f0 !0x00007fff65d50476
0x00007ffeefbff4b8: >0x00007ffeefbff4f0 0x00000000045e7000
0x00007ffeefbff4c8: 0x0000000000000420 0x00000000040d2e65 <golang.org/x/sys/unix.libc_ioctl_trampoline+0x0000000000000005>
0x00007ffeefbff4d8: 0x000000000406bf7f <runtime.syscall+0x000000000000001f> 0x000000c00004eca8
0x00007ffeefbff4e8: 0x00000000046414a0 0x000000c00004ec78
0x00007ffeefbff4f8: 0x0000000004069dd0 <runtime.asmcgocall+0x0000000000000070> 0x00007ffeefbff530
0x00007ffeefbff508: 0x000000000400f68e <runtime.persistentalloc.func1+0x000000000000002e> 0x0000000000000020
0x00007ffeefbff518: 0x0000000004640ee0 0x0000000004675020
0x00007ffeefbff528: 0x00000000000003b0 0x000000c000256000
0x00007ffeefbff538: 0x0000000004067ee9 <runtime.systemstack+0x0000000000000049> 0x0000000000000004
0x00007ffeefbff548: 0x0000000004407188 0x0000000004640ee0
0x00007ffeefbff558: 0x00007ffeefbff5a0 0x0000000004067de5 <runtime.mstart+0x0000000000000005>
0x00007ffeefbff568: 0x0000000004067d9d <runtime.rt0_go+0x000000000000013d>
runtime.sigpanic()
/Users/zhangcunli/Documents/go/src/runtime/signal_unix.go:719 +0x396

goroutine 18 [syscall]:
syscall.syscall(0x40d2e60, 0x1, 0x40487413, 0xc00004ed38)
/Users/zhangcunli/Documents/go/src/runtime/sys_darwin.go:22 +0x3b fp=0xc00004eca8 sp=0xc00004ec88 pc=0x4066a9b
syscall.syscall(0xc000290330, 0xc00006eaa0, 0xc0001462b8, 0xc00001d8b0)
:1 +0x26 fp=0xc00004ecf0 sp=0xc00004eca8 pc=0x406c726
golang.org/x/sys/unix.ioctl(0xc00001d888, 0xc0002922c0, 0x2b1)
/Users/zhangcunli/Documents/work/edget/getty/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go:746 +0x39 fp=0xc00004ed20 sp=0xc00004ecf0 pc=0x40d2af9
golang.org/x/sys/unix.IoctlGetTermios(...)
/Users/zhangcunli/Documents/work/edget/getty/vendor/golang.org/x/sys/unix/ioctl.go:63
github.com/mattn/go-isatty.IsTerminal(0x45fd450)
/Users/zhangcunli/Documents/work/edget/getty/vendor/github.com/mattn/go-isatty/isatty_bsd.go:10 +0x50 fp=0xc00004ed90 sp=0xc00004ed20 pc=0x40d2f10
github.com/AlexStocks/log4go.CPrintfln({0x440bba0, 0xc000010018}, {0x45e750c, 0x5, 0xc00003deb0}, {0xc0002922c0, 0x2b1})
/Users/zhangcunli/Documents/work/edget/getty/vendor/github.com/AlexStocks/log4go/color.go:51 +0xf9 fp=0xc00004ee20 sp=0xc00004ed90 pc=0x429d279
github.com/AlexStocks/log4go.cInfo(...)
/Users/zhangcunli/Documents/work/edget/getty/vendor/github.com/AlexStocks/log4go/color.go:69
github.com/AlexStocks/log4go.(*ConsoleLogWriter).run(0xc000252000, {0x440bba0, 0xc000010018})
/Users/zhangcunli/Documents/work/edget/getty/vendor/github.com/AlexStocks/log4go/termlog.go:98 +0x36d fp=0xc00004efb8 sp=0xc00004ee20 pc=0x42a676d
github.com/AlexStocks/log4go.NewConsoleLogWriter·dwrap·11()
/Users/zhangcunli/Documents/work/edget/getty/vendor/github.com/AlexStocks/log4go/termlog.go:39 +0x2e fp=0xc00004efe0 sp=0xc00004efb8 pc=0x42a63ce
runtime.goexit()
/Users/zhangcunli/Documents/go/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc00004efe8 sp=0xc00004efe0 pc=0x406a0c1
created by github.com/AlexStocks/log4go.NewConsoleLogWriter
/Users/zhangcunli/Documents/work/edget/getty/vendor/github.com/AlexStocks/log4go/termlog.go:39 +0x134

goroutine 1 [runnable]:
syscall.fcntl(0x9, 0x2, 0x1)
/Users/zhangcunli/Documents/go/src/syscall/zsyscall_darwin_amd64.go:319 +0xc5
syscall.CloseOnExec(...)
/Users/zhangcunli/Documents/go/src/syscall/exec_unix.go:105
net.sysSocket(0x1, 0xc00022e750, 0xc000214c40)
/Users/zhangcunli/Documents/go/src/net/sys_cloexec.go:26 +0x8c
net.socket({0x44136d0, 0xc00001c608}, {0x4391dd3, 0x3}, 0x2, 0x1, 0x40c11cc, 0x0, {0x4415fb0, 0xc00022e780}, ...)
/Users/zhangcunli/Documents/go/src/net/sock_posix.go:20 +0x71
net.internetSocket({0x44136d0, 0xc00001c608}, {0x4391dd3, 0x3}, {0x4415fb0, 0xc00022e780}, {0x0, 0x0}, 0xc00022e780, 0x0, ...)
/Users/zhangcunli/Documents/go/src/net/ipsock_posix.go:142 +0xf8
net.(*sysListener).listenTCP(0xc00013baf8, {0x44136d0, 0xc00001c608}, 0x43b2e50)
/Users/zhangcunli/Documents/go/src/net/tcpsock_posix.go:169 +0x85
net.(*ListenConfig).Listen(0xc00013bb70, {0x44136d0, 0xc00001c608}, {0x4391dd3, 0xc00013bb78}, {0xc000214c40, 0x203000})
/Users/zhangcunli/Documents/go/src/net/dial.go:639 +0x25e
net.Listen({0x4391dd3, 0x0}, {0xc000214c40, 0x400ef14})
/Users/zhangcunli/Documents/go/src/net/dial.go:712 +0x4b
github.com/AlexStocks/getty/transport.(*server).listenTCP(0xc00025c2a0)
/Users/zhangcunli/Documents/work/edget/getty/transport/server.go:187 +0x134
github.com/AlexStocks/getty/transport.(*server).listen(0x437e740)
/Users/zhangcunli/Documents/work/edget/getty/transport/server.go:233 +0x39
github.com/AlexStocks/getty/transport.(*server).RunEventLoop(0xc00025c2a0, 0x2)
/Users/zhangcunli/Documents/work/edget/getty/transport/server.go:469 +0x27
main.initServer()
/Users/zhangcunli/Documents/work/edget/getty/examples/echo/tcp-echo/server/app/server.go:160 +0x316
main.main()
/Users/zhangcunli/Documents/work/edget/getty/examples/echo/tcp-echo/server/app/server.go:73 +0x6c

goroutine 9 [chan receive]:
github.com/dubbogo/gost/time.NewWheel.func1()
/Users/zhangcunli/Documents/work/edget/getty/vendor/github.com/dubbogo/gost/time/wheel.go:61 +0x4d
created by github.com/dubbogo/gost/time.NewWheel
/Users/zhangcunli/Documents/work/edget/getty/vendor/github.com/dubbogo/gost/time/wheel.go:59 +0x16f

goroutine 19 [runnable]:
syscall.syscall(0x409f580, 0x6, 0xc0001a62c0, 0x82)
/Users/zhangcunli/Documents/go/src/runtime/sys_darwin.go:22 +0x3b
syscall.write(0xc000212600, {0xc0001a62c0, 0xc000194d70, 0x404a0d9})
/Users/zhangcunli/Documents/go/src/syscall/zsyscall_darwin_amd64.go:1635 +0x49
syscall.Write(...)
/Users/zhangcunli/Documents/go/src/syscall/syscall_unix.go:214
internal/poll.ignoringEINTRIO(...)
/Users/zhangcunli/Documents/go/src/internal/poll/fd_unix.go:582
internal/poll.(*FD).Write(0xc000212600, {0xc0001a62c0, 0x82, 0x2c0})
/Users/zhangcunli/Documents/go/src/internal/poll/fd_unix.go:275 +0x36e
os.(*File).write(...)
/Users/zhangcunli/Documents/go/src/os/file_posix.go:49
os.(*File).Write(0xc000216040, {0xc0001a62c0, 0x1, 0x400cb6a})
/Users/zhangcunli/Documents/go/src/os/file.go:176 +0x65
fmt.Fprint({0x440bba0, 0xc000216040}, {0xc000194e88, 0x1, 0x1})
/Users/zhangcunli/Documents/go/src/fmt/print.go:233 +0x75
github.com/AlexStocks/log4go.NewFileLogWriter.func1()
/Users/zhangcunli/Documents/work/edget/getty/vendor/github.com/AlexStocks/log4go/filelog.go:217 +0x447
created by github.com/AlexStocks/log4go.NewFileLogWriter
/Users/zhangcunli/Documents/work/edget/getty/vendor/github.com/AlexStocks/log4go/filelog.go:168 +0x285

goroutine 20 [select]:
github.com/AlexStocks/log4go.NewFileLogWriter.func1()
/Users/zhangcunli/Documents/work/edget/getty/vendor/github.com/AlexStocks/log4go/filelog.go:178 +0x10c
created by github.com/AlexStocks/log4go.NewFileLogWriter
/Users/zhangcunli/Documents/work/edget/getty/vendor/github.com/AlexStocks/log4go/filelog.go:168 +0x285

goroutine 21 [select]:
github.com/AlexStocks/log4go.NewFileLogWriter.func1()
/Users/zhangcunli/Documents/work/edget/getty/vendor/github.com/AlexStocks/log4go/filelog.go:178 +0x10c
created by github.com/AlexStocks/log4go.NewFileLogWriter
/Users/zhangcunli/Documents/work/edget/getty/vendor/github.com/AlexStocks/log4go/filelog.go:168 +0x285

goroutine 22 [runnable]:
net/http.ListenAndServe({0x0, 0x0}, {0x0, 0x0})
/Users/zhangcunli/Documents/go/src/net/http/server.go:3182
main.initProfiling.func1()
/Users/zhangcunli/Documents/work/edget/getty/examples/echo/tcp-echo/server/app/server.go:91 +0x2f
created by main.initProfiling
/Users/zhangcunli/Documents/work/edget/getty/examples/echo/tcp-echo/server/app/server.go:90 +0x17e
➜ echo_server--20210922-1007-test git:(master) ✗

@Lvnszn @AlexStocks

@Lvnszn
Copy link
Collaborator

Lvnszn commented Sep 22, 2021

I couldn't reproduce the problem.
image

Here is my wechat: jax_110, plz feel free call me and talk with this issue.

@zhangcunli
Copy link
Author

Another question:

  1. I just run server ./sbin/echo_server and client ./sbin/echo_client.
  2. Both client and server output error log [session.conn.read] = error:unexpected EOF. Why?

[2021/09/23 19:58:29 CST] [INFO] (config.go:main.initConf:174) config{&main.Config{AppName:"ECHO-CLIENT", LocalHost:"127.0.0.1", ServerHost:"127.0.0.1", ServerPort:10000, ProfilePort:20080, ConnectionNum:1, HeartbeatPeriod:"10s", heartbeatPeriod:10000000000, SessionTimeout:"20s", sessionTimeout:20000000000, EchoString:"Hello, getty!", EchoTimes:3, FailFastTimeout:"3s", failFastTimeout:3000000000, GettySessionParam:main.GettySessionParam{CompressEncoding:true, TcpNoDelay:true, TcpKeepAlive:true, KeepAlivePeriod:"120s", keepAlivePeriod:120000000000, TcpRBufSize:262144, TcpWBufSize:65536, PkgWQSize:256, TcpReadTimeout:"1s", tcpReadTimeout:1000000000, TcpWriteTimeout:"5s", tcpWriteTimeout:5000000000, WaitTimeout:"1s", waitTimeout:1000000000, MaxMsgLen:128, SessionName:"echo-client"}}}
[2021/09/23 19:58:29 CST] [INFO] (main.go:main.initProfiling:86) App Profiling startup on address{127.0.0.1:20080/debug/pprof/}
[2021/09/23 19:58:29 CST] [INFO] (handler.go:main.(*EchoMessageHandler).OnOpen:52) OnOpen session{session {echo-client:TCP_CLIENT:1:127.0.0.1:59602<->127.0.0.1:10000}, Read Bytes: 0, Write Bytes: 0, Read Pkgs: 0, Write Pkgs: 0} add.
[2021-09-23/19:58:29 main.main: main.go: 71] ECHO-CLIENT starts successfull! its version=1.3.0

[2021/09/23 19:58:29 CST] [INFO] (main.go:main.main:72) ECHO-CLIENT starts successfull! its version=1.3.0

[2021-09-23/19:58:30 main.test: main.go: 214] after loop 3 times, echo cost 0 ms
[2021/09/23 19:58:30 CST] [INFO] (main.go:main.test:213) after loop 3 times, echo cost 0 ms
[2021/09/23 19:58:30 CST] [INFO] (readwriter.go:main.(*EchoPackageHandler).Write:82) WriteEchoPkgTimeMs = 194.963µs, buf:Hello, getty!
[2021/09/23 19:58:30 CST] [INFO] (readwriter.go:main.(*EchoPackageHandler).Write:82) WriteEchoPkgTimeMs = 13.99µs, buf:Hello, getty!
[2021/09/23 19:58:30 CST] [INFO] (readwriter.go:main.(*EchoPackageHandler).Write:82) WriteEchoPkgTimeMs = 6.781µs, buf:Hello, getty!
[2021/09/23 19:58:30 CST] [EROR] (session.go:github.com/AlexStocks/getty/transport.(*session).handleTCPPackage:750) {echo-client:TCP_CLIENT:1:127.0.0.1:59602<->127.0.0.1:10000}, [session.conn.read] = error:unexpected EOF
github.com/AlexStocks/getty/transport.(*gettyTCPConn).recv
/Users/zhangcunli/Documents/work/edget/getty/transport/connection.go:263
github.com/AlexStocks/getty/transport.(*session).handleTCPPackage
/Users/zhangcunli/Documents/work/edget/getty/transport/session.go:739
github.com/AlexStocks/getty/transport.(*session).handlePackage
/Users/zhangcunli/Documents/work/edget/getty/transport/session.go:688
runtime.goexit
/Users/zhangcunli/Documents/work/go1.16.8/src/runtime/asm_amd64.s:1371
github.com/AlexStocks/getty/transport.(*session).handleTCPPackage
/Users/zhangcunli/Documents/work/edget/getty/transport/session.go:750
github.com/AlexStocks/getty/transport.(*session).handlePackage
/Users/zhangcunli/Documents/work/edget/getty/transport/session.go:688
runtime.goexit
/Users/zhangcunli/Documents/work/go1.16.8/src/runtime/asm_amd64.s:1371
[2021/09/23 19:58:30 CST] [INFO] (session.go:github.com/AlexStocks/getty/transport.(*session).handlePackage.func1:671) {echo-client:TCP_CLIENT:1:127.0.0.1:59602<->127.0.0.1:10000}, [session.handlePackage] gr will exit now, left gr num 1
[2021/09/23 19:58:30 CST] [INFO] (session.go:github.com/AlexStocks/getty/transport.(*session).handleLoop:560) session session-closed, Read Bytes: 0, Write Bytes: 138, Read Pkgs: 0, Write Pkgs: 3, [session.handleLoop] got done signal. wQ is nil.
[2021/09/23 19:58:30 CST] [INFO] (handler.go:main.(*EchoMessageHandler).OnClose:63) OnClose session{session session-closed, Read Bytes: 0, Write Bytes: 138, Read Pkgs: 0, Write Pkgs: 3} is closing......
[2021/09/23 19:58:30 CST] [INFO] (client.go:main.(*EchoClient).removeSession:112) after remove session{session session-closed, Read Bytes: 0, Write Bytes: 138, Read Pkgs: 0, Write Pkgs: 3}, left session number:0
[2021/09/23 19:58:30 CST] [INFO] (session.go:github.com/AlexStocks/getty/transport.(*session).handleLoop.func1:542) session session-closed, Read Bytes: 0, Write Bytes: 138, Read Pkgs: 0, Write Pkgs: 3, [session.handleLoop] goroutine exit now, left gr num 0
[2021/09/23 19:58:30 CST] [INFO] (handler.go:main.(*EchoMessageHandler).OnOpen:52) OnOpen session{session {echo-client:TCP_CLIENT:2:127.0.0.1:59605<->127.0.0.1:10000}, Read Bytes: 0, Write Bytes: 0, Read Pkgs: 0, Write Pkgs: 0} add.
[2021/09/23 19:58:30 CST] [EROR] (session.go:github.com/AlexStocks/getty/transport.(*session).handlePackage.func1:674) session-closed, [session.handlePackage] error:unexpected EOF
github.com/AlexStocks/getty/transport.(*gettyTCPConn).recv
/Users/zhangcunli/Documents/work/edget/getty/transport/connection.go:263
github.com/AlexStocks/getty/transport.(*session).handleTCPPackage
/Users/zhangcunli/Documents/work/edget/getty/transport/session.go:739
github.com/AlexStocks/getty/transport.(*session).handlePackage
/Users/zhangcunli/Documents/work/edget/getty/transport/session.go:688
runtime.goexit
/Users/zhangcunli/Documents/work/go1.16.8/src/runtime/asm_amd64.s:1371
github.com/AlexStocks/getty/transport.(*session).handleTCPPackage
/Users/zhangcunli/Documents/work/edget/getty/transport/session.go:793
github.com/AlexStocks/getty/transport.(*session).handlePackage
/Users/zhangcunli/Documents/work/edget/getty/transport/session.go:688
runtime.goexit
/Users/zhangcunli/Documents/work/go1.16.8/src/runtime/asm_amd64.s:1371
github.com/AlexStocks/getty/transport.(*session).handlePackage.func1
/Users/zhangcunli/Documents/work/edget/getty/transport/session.go:674
github.com/AlexStocks/getty/transport.(*session).handlePackage
/Users/zhangcunli/Documents/work/edget/getty/transport/session.go:696
runtime.goexit
/Users/zhangcunli/Documents/work/go1.16.8/src/runtime/asm_amd64.s:1371

@AlexStocks
Copy link
Owner

hey guy, it is not a problem. what u should do, IMO, read the codes and get what's the meaning of the panic stack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants