Comments (12)
和它是相关的,不可以单独使用 d629648
from skynet.
为避免问题,我已将以上几个关联 commit 合并为一个:89a821c
后续几个 commits 是为了修复其中没有写对的 skynet_calloc()
from skynet.
我查了一下,skynet 中并没有直接使用 calloc 。我的系统上并不会出错,所以你需要具体定位你的问题。
from skynet.
奇怪了。是不是我的系统是用alpine 3.19导致的。
我拉取了最新的代码。。编译运行测试范例就会闪退。。
用release tag的版本就没问题。
from skynet.
你可以 gdb 看看出错在哪里。或者再 review/debug 一下 89a821c ,它的修改并不复杂。就是把 memory cookie 从内存块的尾部移到了头部而已,并额外记录了内存块的 size ,不再依赖 malloc_usable_size
。理论上来说,它减少了而不是增加了对 CRT 的依赖。
from skynet.
我先停止更新至最新版本。保证团队开发进度。
在研究一下吧。。我没有底层开发能力。。gdb基本没用过。。
我看看能不能继续定位到准确行数。
from skynet.
@EfveZombie 也可以看看之前的修改会不会还有什么问题。
@hanyu363 你可以加上 MEMORY_CHECK
宏,看看是否能发现问题。
from skynet.
建议试试 make cleanall
之后再重新 make 运行试试
from skynet.
重新 review 了一下, 没看出什么会导致 crash 的问题, 可能 skynet_realloc
中先 get_cookie_size
再 clean_prefix
语义会比较明确一些, 然后 skynet_calloc
里面 fill_prefix
的 size
参数填 nmemb * size
跟其它接口的含义统一, 不过都不影响逻辑正常运行才对
from skynet.
重新 review 了一下, 没看出什么会导致 crash 的问题, 可能
skynet_realloc
中先get_cookie_size
再clean_prefix
语义会比较明确一些, 然后skynet_calloc
里面fill_prefix
的size
参数填nmemb * size
跟其它接口的含义统一, 不过都不影响逻辑正常运行才对
是的,这个只影响统计,且 skynet 事实上并没有使用 calloc 。我改了一下:aa20f76
from skynet.
我现在的复现步骤就是。
启动一个alpine:3.19的镜像。
安装好编译工具
从github中clone好源码
make linux
进行编译。。
完成后。。
skynet examples/config.c1
之后。就会出现闪退。。
好像就是cluster.open的时候出问题了。。
你们在本地编译竟然没问题。我就郁闷了。。
我用别的系统在试试。
from skynet.
我用alpine:3.19和最新master (059fd5c ) 没法复现呢,重现步骤:
docker pull alpine:3.19
docker run -it alpine:3.19 sh
apk add gcc git musl-dev make autoconf
git clone https://github.com/cloudwu/skynet.git
cd skynet
make linux
./skynet examples/config.c1
输出:
/skynet # ./skynet examples/config.c1
[:00000002] LAUNCH snlua bootstrap
[:00000003] LAUNCH snlua launcher
[:00000004] LAUNCH snlua cdummy
[:00000005] LAUNCH harbor 0 4
[:00000006] LAUNCH snlua datacenterd
[:00000007] LAUNCH snlua service_mgr
[:00000008] LAUNCH snlua cluster1
[:00000009] LAUNCH snlua clusterd
[:0000000a] LAUNCH snlua simpledb
[:00000009] Register [sdb] :0000000a
[:00000009] Unregister [sdb] :0000000a
[:00000009] Register [sdb] :0000000a
nil
nil
foobar
foobar2
[:0000000b] LAUNCH snlua gate
[:0000000b] Listen on 127.0.0.1:2528
[:0000000c] LAUNCH snlua gate
[:0000000c] Listen on 127.0.0.1:2529
[:0000000d] LAUNCH snlua snaxd pingserver
ping server start:
[:00000002] KILL self
from skynet.
Related Issues (20)
- skynet的actor问题
- 在压测过程中遇到jemalloc 内存利用率过低问题
- skynet加载自定义c模块成功,table也能打印出两个函数名称,但是调用时函数为nil HOT 7
- 关于skynet.sleep时间不准确的问题 HOT 1
- sharedata.flush 导致 coredump HOT 2
- 副本集主从切换问题 HOT 2
- 多agent,服务之间发送消息延迟过高
- http发送get请求收到服务器回复之后几分钟之后才返回
- 多agent,服务之间消息延迟很高 HOT 1
- redis 链接 假如的密码不对,好像内存会一直上涨。 HOT 1
- 为什么skynet.wait里生成session没有check? HOT 1
- 宕机了,恳请云风大大帮我看看
- symbol SSL_set_connect_state version OPENSSL_1.0.0 not defined in file libssl.so.1.0.0
- 阿里云服务器Debian12 出现一个必然崩溃bug,不链接jemalloc却没问题 HOT 1
- ./skynet examples/config.c1 报错闪退
- clusteragent中`register_name_mt.__index`重入,导致请求结果"Invalid name"。 HOT 6
- skynet.send发送到一个无效地址时,是否抛出错误或者提示更合理?
- 你好,用了一年多skynet的mongodb存储很稳定,最近需要将mongodb连到mongodb+srv,使用云存储,我不太清楚如何处理,所以想请教下
- clusterd 接受一个连接,启动clusteragent时,forward失败,导致clusteragent服务创建失败,这时fd无法正常关闭 HOT 4
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.