Giter Club home page Giter Club logo

Comments (6)

hijkzzz avatar hijkzzz commented on August 26, 2024

ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
是pygame找不到声卡报错,没有影响

Segmentation fault
我这边Windows MSVC编译上没有发现这个问题,应该不是程序逻辑导致越界访问
可能是GCC编译模式不是x64-Release或者LibTorch的动态链接库没有放到环境变量?

from alpha-zero-gomoku.

qiqiguaitm avatar qiqiguaitm commented on August 26, 2024

验证了下,跟 ’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.

hijkzzz avatar hijkzzz commented on August 26, 2024

首先很抱歉因为我一直在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.

qiqiguaitm avatar qiqiguaitm commented on August 26, 2024

测试了下几个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.

hijkzzz avatar hijkzzz commented on August 26, 2024

辛苦了,那就继续coredump直接定位到出错的行,fix一下就应该没问题了
mcts里面就一个锁,刚测试了一下这个锁不能注释,否则会出现很多脏读什么的

找到一个相关的Question:https://stackoverflow.com/questions/40619532/segmentation-faults-when-trying-to-use-any-cuda-functionality

from alpha-zero-gomoku.

Augustusmyc avatar Augustusmyc commented on August 26, 2024

测试了下几个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)

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.