oftc注册服务器占用,golang服务器程序运行过程中崩溃,报错:fatal error: runtime: out of memory...
用golang编写的游戏服务器程序,在接受来自客户端的链接请求时有一定概率崩溃,崩溃时的打印如下:
fatal error: runtime: out of memory
runtime stack:
runtime.throw(0x81b890, 0x16)
/usr/local/go/src/runtime/panic.go:527 +0x90
runtime.sysMap(0xc8530d0000, 0x72730000, 0x9b8f00, 0x9d7b58)
/usr/local/go/src/runtime/mem_linux.go:203 +0x9b
runtime.mHeap_SysAlloc(0x9b8f00, 0x72730000, 0xc820000a80)
/usr/local/go/src/runtime/malloc.go:426 +0x160
runtime.mHeap_Grow(0x9b8f00, 0x39398, 0x0)
/usr/local/go/src/runtime/mheap.go:628 +0x63
runtime.mHeap_AllocSpanLocked(0x9b8f00, 0x39394, 0xc82009edc0)
/usr/local/go/src/runtime/mheap.go:532 +0x5f1
runtime.mHeap_Alloc_m(0x9b8f00, 0x39394, 0xffffff0100000000, 0xc820037ec8)
/usr/local/go/src/runtime/mheap.go:425 +0x1ac
runtime.mHeap_Alloc.func1()
/usr/local/go/src/runtime/mheap.go:484 +0x41
runtime.systemstack(0xc820037ee0)
/usr/local/go/src/runtime/asm_amd64.s:278 +0xab
runtime.mHeap_Alloc(0x9b8f00, 0x39394, 0x10100000000, 0xc82009e000)
/usr/local/go/src/runtime/mheap.go:485 +0x63
runtime.largeAlloc(0x72726f4c, 0xc800000001, 0x44fcc0)
/usr/local/go/src/runtime/malloc.go:748 +0xb3
runtime.mallocgc.func3()
/usr/local/go/src/runtime/malloc.go:637 +0x33
runtime.systemstack(0xc82001e000)
/usr/local/go/src/runtime/asm_amd64.s:262 +0x79
runtime.mstart()
/usr/local/go/src/runtime/proc1.go:668
goroutine 211 [running]:
runtime.systemstack_switch()
/usr/local/go/src/runtime/asm_amd64.s:216 fp=0xc820040890 sp=0xc820040888
runtime.mallocgc(0x72726f4c, 0x6ef040, 0x1, 0xc852bbe630)
/usr/local/go/src/runtime/malloc.go:638 +0x9c4 fp=0xc820040960 sp=0xc820040890
runtime.newarray(0x6ef040, 0x72726f4c, 0x40d5e6)
/usr/local/go/src/runtime/malloc.go:780 +0xc9 fp=0xc8200409a0 sp=0xc820040960
runtime.makeslice(0x6e1a80, 0x72726f4c, 0x72726f4c, 0x0, 0x0, 0x0)
/usr/local/go/src/runtime/slice.go:32 +0x165 fp=0xc8200409f0 sp=0xc8200409a0
github.com/chronicaww/gomsg.SingleRead(0xc84daaa798, 0x0, 0x0, 0x0, 0x0)
/Users/chronicaww/gopath/src/github.com/chronicaww/gomsg/msg.go:197 +0x69d fp=0xc820040cc0 sp=0xc8200409f0
_/Users/chronicaww/gitspace/moeMobileServer/player.readMsg(0xc84daaa798, 0xc850756cc0)
/Users/chronicaww/gitspace/moeMobileServer/player/player.go:91 +0x189 fp=0xc820040db0 sp=0xc820040cc0
_/Users/chronicaww/gitspace/moeMobileServer/player.(*Player).Start(0xc8200e0ea0, 0xc84daaa798, 0xc82001c1e0, 0xc82001c240, 0xc8200a4150, 0x10, 0x10, 0x4e2b, 0x0, 0x0, ...)
/Users/chronicaww/gitspace/moeMobileServer/player/player.go:55 +0x371 fp=0xc820040f48 sp=0xc820040db0
main.acceptNewConn(0xc84daaa798)
/Users/chronicaww/gitspace/moeMobileServer/moeMobile.go:133 +0xab fp=0xc820040fa8 sp=0xc820040f48
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1721 +0x1 fp=0xc820040fb0 sp=0xc820040fa8
created by main.main
/Users/chronicaww/gitspace/moeMobileServer/moeMobile.go:103 +0x6d5
goroutine 1 [IO wait]:
net.runtime_pollWait(0x7f31ebaae0d0, 0x72, 0xc8200101c0)
/usr/local/go/src/runtime/netpoll.go:157 +0x60
net.(*pollDesc).Wait(0xc820047a30, 0x72, 0x0, 0x0)
/usr/local/go/src/net/fd_poll_runtime.go:73 +0x3a
net.(*pollDesc).WaitRead(0xc820047a30, 0x0, 0x0)
/usr/local/go/src/net/fd_poll_runtime.go:78 +0x36
net.(*netFD).accept(0xc8200479d0, 0x0, 0x7f31ebaae5a0, 0xc852bb2400)
/usr/local/go/src/net/fd_unix.go:408 +0x27c
net.(*TCPListener).AcceptTCP(0xc82002a058, 0x873b08, 0x0, 0x0)
/usr/local/go/src/net/tcpsock_posix.go:254 +0x4d
main.main()
/Users/chronicaww/gitspace/moeMobileServer/moeMobile.go:102 +0x6b3
goroutine 17 [IO wait, 414 minutes]:
net.runtime_pollWait(0x7f31ebaae010, 0x72, 0xc8200101c0)
/usr/local/go/src/runtime/netpoll.go:157 +0x60
net.(*pollDesc).Wait(0xc8200a6300, 0x72, 0x0, 0x0)
/usr/local/go/src/net/fd_poll_runtime.go:73 +0x3a
net.(*pollDesc).WaitRead(0xc8200a6300, 0x0, 0x0)
/usr/local/go/src/net/fd_poll_runtime.go:78 +0x36
net.(*netFD).accept(0xc8200a62a0, 0x0, 0x7f31ebaae5a0, 0xc8200b01c0)
/usr/local/go/src/net/fd_unix.go:408 +0x27c
net.(*TCPListener).AcceptTCP(0xc8200b2010, 0xa, 0x0, 0x0)
/usr/local/go/src/net/tcpsock_posix.go:254 +0x4d
main.manage(0x7531)
/Users/chronicaww/gitspace/moeMobileServer/moeMobile.go:118 +0x159
created by main.main
/Users/chronicaww/gitspace/moeMobileServer/moeMobile.go:68 +0x1ec
goroutine 5 [select]:
_/Users/chronicaww/gitspace/moeMobileServer/glog.(*Log).processMsg(0xc8200ce000)
/Users/chronicaww/gitspace/moeMobileServer/glog/player.go:136 +0x310
created by _/Users/chronicaww/gitspace/moeMobileServer/glog.GetLogInstance
/Users/chronicaww/gitspace/moeMobileServer/glog/player.go:85 +0x428
goroutine 6 [select]:
_/Users/chronicaww/gitspace/moeMobileServer/playerlist.(*PlayerList).processMsg(0x9b11c0)
/Users/chronicaww/gitspace/moeMobileServer/playerlist/playerlist.go:48 +0x2c7
created by _/Users/chronicaww/gitspace/moeMobileServer/playerlist.(*PlayerList).Start
/Users/chronicaww/gitspace/moeMobileServer/playerlist/playerlist.go:33 +0x128
goroutine 201 [select]:
_/Users/chronicaww/gitspace/moeMobileServer/player.(*Player).process(0xc8205b85b0)
/Users/chronicaww/gitspace/moeMobileServer/player/player.go:112 +0x338
created by _/Users/chronicaww/gitspace/moeMobileServer/player.(*Player).Start
/Users/chronicaww/gitspace/moeMobileServer/player/player.go:52 +0x317
goroutine 200 [IO wait]:
net.runtime_pollWait(0x7f31ebaadb90, 0x72, 0xc8200101c0)
/usr/local/go/src/runtime/netpoll.go:157 +0x60
net.(*pollDesc).Wait(0xc84ddb7fe0, 0x72, 0x0, 0x0)
/usr/local/go/src/net/fd_poll_runtime.go:73 +0x3a
net.(*pollDesc).WaitRead(0xc84ddb7fe0, 0x0, 0x0)
/usr/local/go/src/net/fd_poll_runtime.go:78 +0x36
net.(*netFD).Read(0xc84ddb7f80, 0xc852bbe600, 0x8, 0x8, 0x0, 0x7f31ebaa8050, 0xc8200101c0)
/usr/local/go/src/net/fd_unix.go:232 +0x23a
net.(*conn).Read(0xc82002afb0, 0xc852bbe600, 0x8, 0x8, 0x8, 0x0, 0x0)
/usr/local/go/src/net/net.go:172 +0xe4
github.com/chronicaww/gomsg.SingleRead(0xc82002afb0, 0x0, 0x0, 0x0, 0x0)
/Users/chronicaww/gopath/src/github.com/chronicaww/gomsg/msg.go:168 +0x106
_/Users/chronicaww/gitspace/moeMobileServer/player.readMsg(0xc82002afb0, 0xc8502b4ae0)
/Users/chronicaww/gitspace/moeMobileServer/player/player.go:91 +0x189
_/Users/chronicaww/gitspace/moeMobileServer/player.(*Player).Start(0xc8205b85b0, 0xc82002afb0, 0xc82001c1e0, 0xc82001c240, 0xc8200a4150, 0x10, 0x10, 0x4e2b, 0x0, 0x0, ...)
/Users/chronicaww/gitspace/moeMobileServer/player/player.go:55 +0x371
main.acceptNewConn(0xc82002afb0)
/Users/chronicaww/gitspace/moeMobileServer/moeMobile.go:133 +0xab
created by main.main
/Users/chronicaww/gitspace/moeMobileServer/moeMobile.go:103 +0x6d5
goroutine 196 [IO wait, 3 minutes]:
net.runtime_pollWait(0x7f31ebaadf50, 0x72, 0xc8200101c0)
/usr/local/go/src/runtime/netpoll.go:157 +0x60
net.(*pollDesc).Wait(0xc82049b8e0, 0x72, 0x0, 0x0)
/usr/local/go/src/net/fd_poll_runtime.go:73 +0x3a
net.(*pollDesc).WaitRead(0xc82049b8e0, 0x0, 0x0)
/usr/local/go/src/net/fd_poll_runtime.go:78 +0x36
net.(*netFD).Read(0xc82049b880, 0xc820353dc0, 0x8, 0x8, 0x0, 0x7f31ebaa8050, 0xc8200101c0)
/usr/local/go/src/net/fd_unix.go:232 +0x23a
net.(*conn).Read(0xc82002a0a8, 0xc820353dc0, 0x8, 0x8, 0x8, 0x0, 0x0)
/usr/local/go/src/net/net.go:172 +0xe4
github.com/chronicaww/gomsg.SingleRead(0xc82002a0a8, 0x0, 0x0, 0x0, 0x0)
/Users/chronicaww/gopath/src/github.com/chronicaww/gomsg/msg.go:168 +0x106
_/Users/chronicaww/gitspace/moeMobileServer/player.readMsg(0xc82002a0a8, 0xc8203942a0)
/Users/chronicaww/gitspace/moeMobileServer/player/player.go:91 +0x189
_/Users/chronicaww/gitspace/moeMobileServer/player.(*Player).Start(0xc8200e0340, 0xc82002a0a8, 0xc82001c1e0, 0xc82001c240, 0xc8200a4150, 0x10, 0x10, 0x4e2b, 0x0, 0x0, ...)
/Users/chronicaww/gitspace/moeMobileServer/player/player.go:55 +0x371
main.acceptNewConn(0xc82002a0a8)
/Users/chronicaww/gitspace/moeMobileServer/moeMobile.go:133 +0xab
created by main.main
/Users/chronicaww/gitspace/moeMobileServer/moeMobile.go:103 +0x6d5
goroutine 197 [select]:
_/Users/chronicaww/gitspace/moeMobileServer/player.(*Player).process(0xc8200e0340)
/Users/chronicaww/gitspace/moeMobileServer/player/player.go:112 +0x338
created by _/Users/chronicaww/gitspace/moeMobileServer/player.(*Player).Start
/Users/chronicaww/gitspace/moeMobileServer/player/player.go:52 +0x317
goroutine 198 [runnable]:
time.Sleep(0xc350)
/usr/local/go/src/runtime/time.go:59 +0xf9
github.com/chronicaww/gomsg.SingleRead(0xc82002af70, 0x0, 0x0, 0x0, 0x0)
/Users/chronicaww/gopath/src/github.com/chronicaww/gomsg/msg.go:177 +0xb9b
_/Users/chronicaww/gitspace/moeMobileServer/player.readMsg(0xc82002af70, 0xc84dd3df80)
/Users/chronicaww/gitspace/moeMobileServer/player/player.go:91 +0x189
_/Users/chronicaww/gitspace/moeMobileServer/player.(*Player).Start(0xc8200afee0, 0xc82002af70, 0xc82001c1e0, 0xc82001c240, 0xc8200a4150, 0x10, 0x10, 0x4e2b, 0x0, 0x0, ...)
/Users/chronicaww/gitspace/moeMobileServer/player/player.go:55 +0x371
main.acceptNewConn(0xc82002af70)
/Users/chronicaww/gitspace/moeMobileServer/moeMobile.go:133 +0xab
created by main.main
/Users/chronicaww/gitspace/moeMobileServer/moeMobile.go:103 +0x6d5
goroutine 199 [select]:
_/Users/chronicaww/gitspace/moeMobileServer/player.(*Player).process(0xc8200afee0)
/Users/chronicaww/gitspace/moeMobileServer/player/player.go:112 +0x338
created by _/Users/chronicaww/gitspace/moeMobileServer/player.(*Player).Start
/Users/chronicaww/gitspace/moeMobileServer/player/player.go:52 +0x317
goroutine 209 [running]:
goroutine running on other thread; stack unavailable
created by main.main
/Users/chronicaww/gitspace/moeMobileServer/moeMobile.go:103 +0x6d5
goroutine 210 [select]:
_/Users/chronicaww/gitspace/moeMobileServer/player.(*Player).process(0xc8200ae000)
/Users/chronicaww/gitspace/moeMobileServer/player/player.go:112 +0x338
created by _/Users/chronicaww/gitspace/moeMobileServer/player.(*Player).Start
/Users/chronicaww/gitspace/moeMobileServer/player/player.go:52 +0x317
goroutine 212 [select]:
_/Users/chronicaww/gitspace/moeMobileServer/player.(*Player).process(0xc8200e0ea0)
/Users/chronicaww/gitspace/moeMobileServer/player/player.go:112 +0x338
created by _/Users/chronicaww/gitspace/moeMobileServer/player.(*Player).Start
/Users/chronicaww/gitspace/moeMobileServer/player/player.go:52 +0x317
oftc注册服务器占用,golang服务器程序运行过程中崩溃,报错:fatal error: runtime: out of memory...相关推荐
- SpringBoot项目在eclipse中能运行,部署到服务器 nohup java -jar 方式运行就无法显示报错
SpringBoot项目在eclipse中能运行,部署到服务器 nohup java -jar 方式运行就无法显示报错: *************************** APPLICATION ...
- 内存管理——程序运行过程中内存的作用以及如何与cpu、os交互
今年以来,内存条价格暴涨,已经跃升为新的新一代理财产品,所以今天就和大家讨论一下内存条的话题,主要内容就是在程序运行过程中,内存的作用以及如何与CPU,OS交互. 我们先来讨论:计算机的运行究竟是在做 ...
- 程序运行过程中遇到“ORA-03114: not connected to ORACLE”的问题解决
程序运行过程中遇到"ORA-03114: not connected to ORACLE"的问题解决 参考文章: (1)程序运行过程中遇到"ORA-03114: not ...
- C# winform程序运行过程中提示尝试读取或写入受保护的内存.这通常指示其他内存已损坏的
C# winform程序运行过程中提示"尝试读取或写入受保护的内存.这通常指示其他内存已损坏的" 错误,如下图所示 查看详细信息如下 未处理System.AccessViolati ...
- java在程序运行过程中_Java内存管理-程序运行过程(一)
做一个积极的人 编码.改bug.提升自己 我有一个乐园,面向编程,春暖花开! 勿在浮沙筑高台,出来混迟早要还的. 相信在做Java开发的伙伴一定知道 JVM(Java Virtual Machine( ...
- 放在NSArray、NSDictionary等容器内的对象Item,Item中的property在程序运行过程中被无故释放...
可能是被释放的property本身是OC对象而它的属性被误写成assign,例如: @interface MyItem : Object @property (nonatomic, assign) N ...
- 运行SVO报错fatal error: sophus/se3.hpp: No such file or directory
近日,参照此篇文章ubuntu16.04 ROS环境下配置和运行SVO配置并运行SVO时,到第(7)步编译svo时出现错误,错误信息很长,其实原因只有一个,如下: fatal error: sophu ...
- 运行mybatis时显示报错:Error updating database. Cause: java.sql.SQLException: Error setting driver on
在运行mybatis测试类的时候,结果报错; Error updating database. Cause: java.sql.SQLException: Error setting driver o ...
- C#程序运行过程中出错,报程序挂起,如“其他挂起签名1:xxx”
原因:某东西长时间占用窗体导致的,如弹出一个对话框,但是迟迟不去确定它,然而其他部分还在运行,此时就会报该错误: 解决:不产生长期占用窗体的动作,或者及时释放.
最新文章
- linux的软件包是独立的,Linux系统下软件包的安装
- 使用ST05研究customer product id存储逻辑
- Springboot-Jpa多数据库配置-2.0+版本
- 华三交换机如何进入配置_学校机房项目交换机的如何配置,理解这篇,交换机配置不再难...
- “龙书”作者斩获图灵奖!谷歌 AI 大神、Swift 之父都受它启蒙
- c语言递归解决汉诺塔问题
- java.lang.ClassNotFoundException: org.openxmlformats.schemas.wordprocessingml.x2006.main.impl.CTPIm
- 「Leetcode」206.反转链表:听说过两天反转链表又写不出来了?
- Redis学习笔记~关于空间换时间的查询案例
- yaml 文件格式语法
- 在线扒站复活版可预览网站html源码
- 传统项目管理 VS 敏捷项目管理
- 运行navicat报出Missing required library libmysql_d.dll,126问题
- 初学JAVA项目(四、魔域:文字RPG游戏)
- (30)tensorboard ValueError: Duplicate plugins for name projector
- VuePress开启评论、VuePress评论功能。
- 排序之low逼三人组及其python代码实现
- 分门别类刷leetcode——动态规划(C++实现)
- 如何在 Mac 中隐藏文件或文件夹?
- 二维码怎么制作?手把手教你制作生成
热门文章
- vue base64图片不显示_技巧 | word中插入的图片显示不完整怎么办?
- C语言 vprintf 函数 - C语言零基础入门教程
- android studio中断,Android Studio是否有任何修复方法可以在Macbook Pro中断开测试设备的连接?...
- python包含多个元组的元组_如何在python中将多个”列出的”元组连接成一个元组?...
- oracle 对两列加唯一性束_oracle中创建unique唯一约束(单列和多列) 。
- 滴答定时器的计数模式_【高手私藏】STM32学习笔记:SysTick滴答时钟
- mysql多实例配置安装_MySQL多实例安装配置方案
- sap系统搭建教程_詹迟迟:如何搭建知识付费系统?知识付费系统搭建教程
- linux收回用户执行权限,Linux之文件权限管理命令
- html5 密码框明文,elementUI的密码框的密文和明文