Comments (6)
ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
是pygame找不到声卡报错,没有影响
Segmentation fault
我这边Windows MSVC编译上没有发现这个问题,应该不是程序逻辑导致越界访问
可能是GCC编译模式不是x64-Release或者LibTorch的动态链接库没有放到环境变量?
from alpha-zero-gomoku.
验证了下,跟 ’GCC编译模式不是x64-Release或者LibTorch的动态链接库没有放到环境变量‘ 没关系
gdb跟踪,看到,get_action_probs里调用simulate出错
Thread 0x00002b1a5b018700 (most recent call first):
File "../build/library.py", line 710 in get_action_probs
File Segmentation fault (core dumped)
对了ubuntu 上c++11 编译不过,需要c++14
在CMakeLists.txt改为
cmake_minimum_required(VERSION 3.8.0)
project(library)
set(CMAKE_CXX_STANDARD 14)
from alpha-zero-gomoku.
首先很抱歉因为我一直在Windows下面测试,然后自己也没有Ubuntu的机器,所以很多地方不太完善
这里的调用关系是get_action_probs-->simulate-->libtorch(torchscript预测)
因为我这边MSVC编译的版本连续运行4天都没有任何错误
所以很难看出哪里非法指针/越界了
大佬有空的话可以gdb跟踪调试一下,应该很容易定位具体的报错位置,无奈我只有Windows x64~
或许是程序不严谨+GCC/MSVC的一些差异,又或者预编译的LibTorch与Ubuntu上GCC的兼容性,我之前遇到一次段错误是因为LibTorch是Release版本而MSVC设置为debug版本导致。
from alpha-zero-gomoku.
测试了下几个test.cpp,libtorch_test,thread_pool_test都没问题。看infer的中间结果也ok,说明libtorch没有问题
mcts_test运行会挂掉,gdb跟进了一下,发现,看起来是是锁的问题:
Thread 6 "mcts_test" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffa0626700 (LWP 21672)]
__GI___pthread_mutex_lock (mutex=0x28) at ../nptl/pthread_mutex_lock.c:67
67 ../nptl/pthread_mutex_lock.c: No such file or directory.
(gdb)
from alpha-zero-gomoku.
辛苦了,那就继续coredump直接定位到出错的行,fix一下就应该没问题了
mcts里面就一个锁,刚测试了一下这个锁不能注释,否则会出现很多脏读什么的
找到一个相关的Question:https://stackoverflow.com/questions/40619532/segmentation-faults-when-trying-to-use-any-cuda-functionality
from alpha-zero-gomoku.
测试了下几个test.cpp,libtorch_test,thread_pool_test都没问题。看infer的中间结果也ok,说明libtorch没有问题
mcts_test运行会挂掉,gdb跟进了一下,发现,看起来是是锁的问题:
Thread 6 "mcts_test" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffa0626700 (LWP 21672)]
__GI___pthread_mutex_lock (mutex=0x28) at ../nptl/pthread_mutex_lock.c:67
67 ../nptl/pthread_mutex_lock.c: No such file or directory.
(gdb)
@qiqiguaitm
你好,请问后来这个问题有解决么?我遇到类似的情况了
from alpha-zero-gomoku.
Related Issues (20)
- 你好,请问你的项目在别的电脑上如何运行呢? HOT 8
- ubuntu release 报错ImportError HOT 2
- How did you create SWIG for libtorch? HOT 1
- Which libtorch version is work? Can give ZIP link? HOT 1
- Was this tested against https://gomocup.org/? HOT 1
- network的input有3个channel,请问分别是什么?
- 为什么pretrained model这么弱 HOT 1
- Link to the 1.5-day pre-trained models is broken. HOT 1
- 版本 HOT 4
- libtorch_cpu.so: undefined symbol HOT 2
- 以前的百度云的模型分享失效了
- 关于mcts并行的一些困惑 HOT 2
- 一些开源许可证方面的咨询 HOT 2
- How to use your mcts with python
- 感谢楼主的分享,楼主试过多机多卡的CPU训练?? HOT 1
- The results shared from Baidu Network Disk have failed, could you please load another one? HOT 1
- 训练20次时失败 HOT 1
- windows下跑不了
- 并行MCTS代码不理解 HOT 3
- 自己的C++实现非常慢 HOT 1
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 alpha-zero-gomoku.