Giter Site home page Giter Site logo

Comments (12)

cloudwu avatar cloudwu commented on August 16, 2024

31a4688
6a7043c

和它是相关的,不可以单独使用 d629648

from skynet.

cloudwu avatar cloudwu commented on August 16, 2024

为避免问题,我已将以上几个关联 commit 合并为一个:89a821c

后续几个 commits 是为了修复其中没有写对的 skynet_calloc()

from skynet.

cloudwu avatar cloudwu commented on August 16, 2024

我查了一下,skynet 中并没有直接使用 calloc 。我的系统上并不会出错,所以你需要具体定位你的问题。

from skynet.

hanyu363 avatar hanyu363 commented on August 16, 2024

奇怪了。是不是我的系统是用alpine 3.19导致的。
我拉取了最新的代码。。编译运行测试范例就会闪退。。
用release tag的版本就没问题。

from skynet.

cloudwu avatar cloudwu commented on August 16, 2024

你可以 gdb 看看出错在哪里。或者再 review/debug 一下 89a821c ,它的修改并不复杂。就是把 memory cookie 从内存块的尾部移到了头部而已,并额外记录了内存块的 size ,不再依赖 malloc_usable_size 。理论上来说,它减少了而不是增加了对 CRT 的依赖。

from skynet.

hanyu363 avatar hanyu363 commented on August 16, 2024

我先停止更新至最新版本。保证团队开发进度。
在研究一下吧。。我没有底层开发能力。。gdb基本没用过。。
我看看能不能继续定位到准确行数。

from skynet.

cloudwu avatar cloudwu commented on August 16, 2024

@EfveZombie 也可以看看之前的修改会不会还有什么问题。
@hanyu363 你可以加上 MEMORY_CHECK 宏,看看是否能发现问题。

from skynet.

ylme avatar ylme commented on August 16, 2024

建议试试 make cleanall 之后再重新 make 运行试试

from skynet.

EfveZombie avatar EfveZombie commented on August 16, 2024

重新 review 了一下, 没看出什么会导致 crash 的问题, 可能 skynet_realloc 中先 get_cookie_sizeclean_prefix 语义会比较明确一些, 然后 skynet_calloc 里面 fill_prefixsize 参数填 nmemb * size 跟其它接口的含义统一, 不过都不影响逻辑正常运行才对

from skynet.

cloudwu avatar cloudwu commented on August 16, 2024

重新 review 了一下, 没看出什么会导致 crash 的问题, 可能 skynet_realloc 中先 get_cookie_sizeclean_prefix 语义会比较明确一些, 然后 skynet_calloc 里面 fill_prefixsize 参数填 nmemb * size 跟其它接口的含义统一, 不过都不影响逻辑正常运行才对

是的,这个只影响统计,且 skynet 事实上并没有使用 calloc 。我改了一下:aa20f76

from skynet.

hanyu363 avatar hanyu363 commented on August 16, 2024

我现在的复现步骤就是。
启动一个alpine:3.19的镜像。
安装好编译工具
从github中clone好源码
make linux
进行编译。。
完成后。。
skynet examples/config.c1
之后。就会出现闪退。。
好像就是cluster.open的时候出问题了。。
你们在本地编译竟然没问题。我就郁闷了。。
我用别的系统在试试。

from skynet.

spin6lock avatar spin6lock commented on August 16, 2024

我用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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.