Code Monkey home page Code Monkey logo

Comments (2)

cloudwu avatar cloudwu commented on September 22, 2024

首先,问题出现在 lua gc 的时候,看起来是 lua vm 内部的状态错了。虽然是调用 sharedata.flush 导致,但只能说明

https://github.com/cloudwu/skynet/blob/v1.5.0/lualib/skynet/sharedata.lua#L60

sharedata.flush 这个操作调用了 fullgc ( collectgarbage() )而已。我不认为是 sharedata 本身的问题。

ps. 无论如何,都没有理由把 skynet 停留在旧版本,除非你有独自维护它的能力。且 lua 本身也在更迭,同样也没有理由停留在某个旧版本。比如 https://lua.org/bugs.html 这里可以看到,每个小版本都 fix 了大量的 bug 。

从 coredump log 看,https://github.com/cloudwu/skynet/blob/v1.5.0/3rd/lua/lstring.c#L211 这一行指: gc 在清理短字符串时,vm 里的短字符串 hash 表上的链表指针出错了。sharedata 库也没有能力写坏它。

我认为你需要排查的是所有 C 代码,找到内存越界,或其它内存错误。 至少,你可以先检查 double free 等简单的问题: https://github.com/cloudwu/skynet/wiki/MemoryHook

因为 coredump 很罕见,那么你需要重点考虑那些很少运行到的 C 代码。

from skynet.

ghost90240 avatar ghost90240 commented on September 22, 2024

谢谢云大的意见。
MEMORY_CHECK 已经带上了的,我更到最新版本后续再观察下。

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.