-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
loadfile加载pb文件后好像没释放资源导致崩溃 #271
Comments
请教下,我不太明白,那问题的关键是从哪里入手处理呢 |
你diff一下,没改多少。 |
提一个pr? |
另外能给一个崩溃的堆栈吗?理论上这个库应该单线程使用,如果有多个Lua状态也是可以的,但是如果你多线程使用了同一个状态那可能的确会有点问题,具体情况要看堆栈。不过多线程其实也能用,你要看看unsafe模块,它提供了“多个状态共享载入数据”的功能。 |
@cloudfreexiao 你来提个pr? |
没用过 unsafe 相关的 接口 目前的做法是让整个进程只加载一次的同时再标记成共享保证只有一个的lua state https://github.com/cloudfreexiao/lua-protobuf/tree/pr |
可以贴一下你的代码吗?我想实验一下 |
lua 5.3.4
ubuntu 22
下载代码并生成pb.so,我服务器的skynet的agent服务,lua代码加载pb模块,然后pb去loadfile XXX.pb文件后能解析protobuf协议,但是agent退出时导致主进程崩溃,屏蔽了loadfile之后,agent退出就没问题,这个pb是不是需要释放资源?
The text was updated successfully, but these errors were encountered: