Comments (24)
assert(proto[name] == nil and proto[id] == nil)
像是重复注册了socket消息处理
from skynet_fly.
你有重写require么?
from skynet_fly.
from skynet_fly.
201行到53行出错了
from skynet_fly.
估计跟新机无关,可能是旧机代码或者新机代码没有完全一致
from skynet_fly.
没有重写,同样的文件夹刚刚上传到腾讯云那个机器上,能跑起来
from skynet_fly.
我试一下在新机git拉取再重新编译看看
========
重新拉取git源码编译也跑不起来
from skynet_fly.
你可以打印log 看看,是被哪个地方注册了
from skynet_fly.
我去看看 ,怀疑是运维那边搞了什么占用了
from skynet_fly.
估计是socket.lua这个文件被加载2次了,正常require只会加载一次
from skynet_fly.
from skynet_fly.
[:00000010][20231128 14:10:53 94]skynet.register_protocol...
[:00000010][20231128 14:10:53 95]skynet.register_protocol...
果然是注册了两次
from skynet_fly.
我暂时不清楚为啥你的环境会加载两次,你可以关注一下require “socket”的地方
from skynet_fly.
试了几台机器,腾讯云的能跑起来,阿里云的不行,
可能是安装源不同导致的,我再研究一下。
from skynet_fly.
会不会是阿里云的gcc有问题
from skynet_fly.
我有遇到过,自己编译安装的gcc然后编译skynet会有点问题
from skynet_fly.
from skynet_fly.
from skynet_fly.
你说一下 系统版本,gcc版本,我有空去试一下,估计是lua require的缓存没有生效
from skynet_fly.
加了日志打印的信息:
[:0000000f][20231128 18:18:07 74]preready write: share_config_m.required
1111111111111111 name: skynet.socket m: table: 0x7f9214400ac01111111111111111 name: skynet.socketdriver m: table: 0x7f9214400a80
[:00000010][20231128 18:18:07 76]skynet.register_protocol...
[:00000010][20231128 18:18:07 76]register_protocol:socket id:6
[:00000010][20231128 18:18:07 76]skynet.register_protocol...
[:00000010][20231128 18:18:07 76]register_protocol:socket id:6
[:00000010][20231128 18:18:07 76]lua call [d to :10 : 6 msgsz = 51] error : ../../skynet_fly/skynet/lualib/skynet.lua:967: ../../skynet_fly/skynet/lualib/skynet.lua:435: ../../skynet_fly/skynet/lualib/skynet/require.lua:99: ../../skynet_fly/skynet/lualib/skynet/require.lua:99: ../../skynet_fly/skynet/lualib/skynet/require.lua:99: ../../skynet_fly/skynet/lualib/skynet/require.lua:99: ../../skynet_fly/skynet/lualib/skynet.lua:54: assertion failed!
stack traceback:
[C]: in function 'assert'
../../skynet_fly/skynet/lualib/skynet.lua:54: in function 'skynet.register_protocol'
../../skynet_fly/skynet/lualib/skynet/socket.lua:218: in upvalue 'modfunc'
../../skynet_fly/skynet/lualib/skynet/require.lua:70: in function <../../skynet_fly/skynet/lualib/skynet/require.lua:69>
[C]: in function 'xpcall'
../../skynet_fly/skynet/lualib/skynet/require.lua:83: in function 'skynet.require.require'
(...tail calls...)
../../skynet_fly/lualib/utils/net/util_net_base.lua:2: in upvalue 'modfunc'
../../skynet_fly/skynet/lualib/skynet/require.lua:70: in function <../../skynet_fly/skynet/lualib/skynet/require.lua:69>
[C]: in function 'xpcall'
../../skynet_fly/skynet/lualib/skynet/require.lua:83: in function 'skynet.require.require'
(...tail calls...)
../../skynet_fly/lualib/utils/net/ws_pbnet_util.lua:3: in upvalue 'modfunc'
../../skynet_fly/skynet/lualib/skynet/require.lua:70: in function <../../skynet_fly/skynet/lualib/skynet/require.lua:69>
[C]: in function 'xpcall'
../../skynet_fly/skynet/lualib/skynet/require.lua:83: in function 'skynet.require.require'
(...tail calls...)
.//lualib/hall/hall_plug.lua:54: in upvalue 'modfunc'
../../skynet_fly/skynet/lualib/skynet/require.lua:70: in function <../../skynet_fly/skynet/lualib/skynet/require.lua:69>
[C]: in function 'xpcall'
../../skynet_fly/skynet/lualib/skynet/require.lua:83: in function 'skynet.require.require'
(...tail calls...)
.../skynet_fly/lualib/module/room_game/room_game_hall_m.lua:451: in upvalue 'module_start'
../../skynet_fly/service/hot_container.lua:110: in function 'room_game_hall_m.start'
../../skynet_fly/lualib/utils/skynet_util.lua:40: in upvalue 'f'
../../skynet_fly/skynet/lualib/skynet.lua:385: in function <../../skynet_fly/skynet/lualib/skynet.lua:357>
stack traceback:
[C]: in function 'error'
../../skynet_fly/skynet/lualib/skynet/require.lua:99: in function 'skynet.require.require'
(...tail calls...)
../../skynet_fly/lualib/utils/net/util_net_base.lua:2: in upvalue 'modfunc'
../../skynet_fly/skynet/lualib/skynet/require.lua:70: in function <../../skynet_fly/skynet/lualib/skynet/require.lua:69>
[C]: in function 'xpcall'
../../skynet_fly/skynet/lualib/skynet/require.lua:83: in function 'skynet.require.require'
(...tail calls...)
../../skynet_fly/lualib/utils/net/ws_pbnet_util.lua:3: in upvalue 'modfunc'
../../skynet_fly/skynet/lualib/skynet/require.lua:70: in function <../../skynet_fly/skynet/lualib/skynet/require.lua:69>
[C]: in function 'xpcall'
../../skynet_fly/skynet/lualib/skynet/require.lua:83: in function 'skynet.require.require'
(...tail calls...)
.//lualib/hall/hall_plug.lua:54: in upvalue 'modfunc'
../../skynet_fly/skynet/lualib/skynet/require.lua:70: in function <../../skynet_fly/skynet/lualib/skynet/require.lua:69>
[C]: in function 'xpcall'
../../skynet_fly/skynet/lualib/skynet/require.lua:83: in function 'skynet.require.require'
(...tail calls...)
.../skynet_fly/lualib/module/room_game/room_game_hall_m.lua:451: in upvalue 'module_start'
../../skynet_fly/service/hot_container.lua:110: in function 'room_game_hall_m.start'
../../skynet_fly/lualib/utils/skynet_util.lua:40: in upvalue 'f'
../../skynet_fly/skynet/lualib/skynet.lua:385: in function <../../skynet_fly/skynet/lualib/skynet.lua:357>
stack traceback:
[C]: in function 'error'
../../skynet_fly/skynet/lualib/skynet/require.lua:99: in function 'skynet.require.require'
(...tail calls...)
../../skynet_fly/lualib/utils/net/ws_pbnet_util.lua:3: in upvalue 'modfunc'
../../skynet_fly/skynet/lualib/skynet/require.lua:70: in function <../../skynet_fly/skynet/lualib/skynet/require.lua:69>
[C]: in function 'xpcall'
../../skynet_fly/skynet/lualib/skynet/require.lua:83: in function 'skynet.require.require'
(...tail calls...)
.//lualib/hall/hall_plug.lua:54: in upvalue 'modfunc'
../../skynet_fly/skynet/lualib/skynet/require.lua:70: in function <../../skynet_fly/skynet/lualib/skynet/require.lua:69>
[C]: in function 'xpcall'
../../skynet_fly/skynet/lualib/skynet/require.lua:83: in function 'skynet.require.require'
(...tail calls...)
.../skynet_fly/lualib/module/room_game/room_game_hall_m.lua:451: in upvalue 'module_start'
../../skynet_fly/service/hot_container.lua:110: in function 'room_game_hall_m.start'
../../skynet_fly/lualib/utils/skynet_util.lua:40: in upvalue 'f'
../../skynet_fly/skynet/lualib/skynet.lua:385: in function <../../skynet_fly/skynet/lualib/skynet.lua:357>
stack traceback:
[C]: in function 'error'
../../skynet_fly/skynet/lualib/skynet/require.lua:99: in function 'skynet.require.require'
(...tail calls...)
.//lualib/hall/hall_plug.lua:54: in upvalue 'modfunc'
../../skynet_fly/skynet/lualib/skynet/require.lua:70: in function <../../skynet_fly/skynet/lualib/skynet/require.lua:69>
[C]: in function 'xpcall'
../../skynet_fly/skynet/lualib/skynet/require.lua:83: in function 'skynet.require.require'
(...tail calls...)
.../skynet_fly/lualib/module/room_game/room_game_hall_m.lua:451: in upvalue 'module_start'
../../skynet_fly/service/hot_container.lua:110: in function 'room_game_hall_m.start'
../../skynet_fly/lualib/utils/skynet_util.lua:40: in upvalue 'f'
../../skynet_fly/skynet/lualib/skynet.lua:385: in function <../../skynet_fly/skynet/lualib/skynet.lua:357>
stack traceback:
[C]: in function 'error'
../../skynet_fly/skynet/lualib/skynet/require.lua:99: in function 'skynet.require.require'
(...tail calls...)
.../skynet_fly/lualib/module/room_game/room_game_hall_m.lua:451: in upvalue 'module_start'
../../skynet_fly/service/hot_container.lua:110: in function 'room_game_hall_m.start'
../../skynet_fly/lualib/utils/skynet_util.lua:40: in upvalue 'f'
../../skynet_fly/skynet/lualib/skynet.lua:385: in function <../../skynet_fly/skynet/lualib/skynet.lua:357>
stack traceback:
[C]: in function 'assert'
../../skynet_fly/skynet/lualib/skynet.lua:967: in function 'skynet.dispatch_message'
[:0000000d][20231128 18:18:07 76][fatal][contriner_mgr][../../skynet_fly/service/contriner_mgr.lua:81]launch_new_module err room_game_hall_m {
net_util = ws_pbnet_util,
hall_plug = hall_plug,
}[:00000011][20231128 18:18:07 76]LAUNCH snlua hot_container room_game_alloc_m 1 2023-11-28[18:18:07] 1701166687 1
[:00000011][20231128 18:18:07 76]register_protocol:lua id:10
[:00000011][20231128 18:18:07 76]register_protocol:response id:1
[:00000011][20231128 18:18:07 76]register_protocol:error id:7
[:00000011][20231128 18:18:07 76]register_protocol:debug id:9
[:00000011][20231128 18:18:07 77]write_module_info: room_game_alloc_m
[:00000012][20231128 18:18:07 77]LAUNCH snlua hot_container room_game_table_m 1 2023-11-28[18:18:07] 1701166687 1
[:00000012][20231128 18:18:07 77]register_protocol:lua id:10
[:00000012][20231128 18:18:07 77]register_protocol:response id:1
[:00000012][20231128 18:18:07 77]register_protocol:error id:7
[:00000012][20231128 18:18:07 77]register_protocol:debug id:9
[:00000011][20231128 18:18:07 77]preready write: room_game_alloc_m.required
1111111111111111 name: skynet.socketdriver m: table: 0x7f9216326640[:00000012][20231128 18:18:07 78]skynet.register_protocol...
[:00000012][20231128 18:18:07 78]register_protocol:socket id:6
1111111111111111 name: skynet.socket m: table: 0x7f92163266801111111111111111 name: skynet.socket m: table: 0x7f9216326680
1111111111111111 name: skynet.socketdriver m: table: 0x7f9216326640
[:00000012][20231128 18:18:07 79]skynet.register_protocol...
[:00000012][20231128 18:18:07 79]register_protocol:socket id:6
[:00000012][20231128 18:18:07 79]lua call [d to :12 : 11 msgsz = 95] error : ../../skynet_fly/skynet/lualib/skynet.lua:967: ../../skynet_fly/skynet/lualib/skynet.lua:435: ../../skynet_fly/skynet/lualib/skynet/require.lua:99: ../../skynet_fly/skynet/lualib/skynet/require.lua:99: ../../skynet_fly/skynet/lualib/skynet/require.lua:99: ../../skynet_fly/skynet/lualib/skynet/require.lua:99: ../../skynet_fly/skynet/lualib/skynet.lua:54: assertion failed!
stack traceback:
[C]: in function 'assert'
../../skynet_fly/skynet/lualib/skynet.lua:54: in function 'skynet.register_protocol'
../../skynet_fly/skynet/lualib/skynet/socket.lua:218: in upvalue 'modfunc'
机器信息是:
[root@beta-centos-1 game]# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
[root@beta-centos-1 game]# uname -a
Linux beta-centos-1 3.10.0-1160.99.1.el7.x86_64 #1 SMP Wed Sep 13 14:19:20 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
[root@beta-centos-1 game]# cat /proc/version
Linux version 3.10.0-1160.99.1.el7.x86_64 ([email protected]) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ) #1 SMP Wed Sep 13 14:19:20 UTC 2023
然后gcc版本是这样安装的:
sudo yum install centos-release-scl -y
sudo yum install devtoolset-8-gcc* -y
sudo scl enable devtoolset-8 bash
mv /usr/bin/gcc /usr/bin/gcc-4.8.5
ln -s /opt/rh/devtoolset-8/root/bin/gcc /usr/bin/gcc
mv /usr/bin/g++ /usr/bin/g++-4.8.5
ln -s /opt/rh/devtoolset-8/root/bin/g++ /usr/bin/g++
我打算用源码重新装一遍gcc,然后整理一个安装脚本出来。
from skynet_fly.
源码编译安装了gcc12,也还是不行
from skynet_fly.
我用虚拟机装了centos7.9 编译运行没有发现问题
from skynet_fly.
我在阿里云的机器上
直接用git clone 的skynet_fly
然后执行这些命令
然后make cleanall
makebuild
cd examples/
cd digitalbomb/
sh ../../binshell/make_server.sh ../../
sh script/restart.sh load_mods.lua
启动没有报错
from skynet_fly.
我今天重新买了机器试了下,没有问题了...
from skynet_fly.
Related Issues (9)
- 如何解析业务层json数据包的内容 HOT 4
- 如何调整util_net_base.lua HOT 1
- 常驻的table如何热更 HOT 1
- Is it possible to use lua-radix-router to get the best performance? HOT 11
- make build fail due to luaclib/lfs.so HOT 6
- 这个支持多台机器分布式部署吗 HOT 3
- 在游戏中使用redisf会报错 HOT 1
- json插件如何正确使用 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from skynet_fly.