Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用vulkan出现Segmentation fault (core dumped) #1637

Open
FB-wh opened this issue Mar 20, 2020 · 3 comments
Open

使用vulkan出现Segmentation fault (core dumped) #1637

FB-wh opened this issue Mar 20, 2020 · 3 comments

Comments

@FB-wh
Copy link

FB-wh commented Mar 20, 2020

RTX 2080显卡,使用vulkan 1.1.121
net->set_vulkan_device(0);
net->opt.lightmode = false;
net->opt.use_vulkan_compute = 1;

最多开启8个线程并行,就会出现Segmentation fault (core dumped)。
gdb查看core:
#289 0x00007f0116711105 in ncnn::Net::forward_layer(int, std::vector<ncnn::Mat, std::allocator<ncnn::Mat> >&, std::vector<ncnn::VkMat, std::allocator<ncnn::VkMat> >&, ncnn::VkCompute&, ncnn::Option&) const () from /usr/lib/libfacRecSdk_x86_1.0.1.so #290 0x00007f0116711105 in ncnn::Net::forward_layer(int, std::vector<ncnn::Mat, std::allocator<ncnn::Mat> >&, std::vector<ncnn::VkMat, std::allocator<ncnn::VkMat> >&, ncnn::VkCompute&, ncnn::Option&) const () from /usr/lib/libfacRecSdk_x86_1.0.1.so #291 0x00007f0116710cad in ncnn::Net::forward_layer(int, std::vector<ncnn::Mat, std::allocator<ncnn::Mat> >&, std::vector<ncnn::VkMat, std::allocator<ncnn::VkMat> >&, ncnn::VkCompute&, ncnn::Option&) const () ---Type <return> to continue, or q <return> to quit--- from /usr/lib/libfacRecSdk_x86_1.0.1.so #292 0x00007f0116710cad in ncnn::Net::forward_layer(int, std::vector<ncnn::Mat, std::allocator<ncnn::Mat> >&, std::vector<ncnn::VkMat, std::allocator<ncnn::VkMat> >&, ncnn::VkCompute&, ncnn::Option&) const () from /usr/lib/libfacRecSdk_x86_1.0.1.so #293 0x00007f0116710cad in ncnn::Net::forward_layer(int, std::vector<ncnn::Mat, std::allocator<ncnn::Mat> >&, std::vector<ncnn::VkMat, std::allocator<ncnn::VkMat> >&, ncnn::VkCompute&, ncnn::Option&) const () from /usr/lib/libfacRecSdk_x86_1.0.1.so #294 0x00007f0116710cad in ncnn::Net::forward_layer(int, std::vector<ncnn::Mat, std::allocator<ncnn::Mat> >&, std::vector<ncnn::VkMat, std::allocator<ncnn::VkMat> >&, ncnn::VkCompute&, ncnn::Option&) const () from /usr/lib/libfacRecSdk_x86_1.0.1.so #295 0x00007f0116711105 in ncnn::Net::forward_layer(int, std::vector<ncnn::Mat, std::allocator<ncnn::Mat> >&, std::vector<ncnn::VkMat, std::allocator<ncnn::VkMat> >&, ncnn::VkCompute&, ncnn::Option&) const () from /usr/lib/libfacRecSdk_x86_1.0.1.so #296 0x00007f0116710cad in ncnn::Net::forward_layer(int, std::vector<ncnn::Mat, std::allocator<ncnn::Mat> >&, std::vector<ncnn::VkMat, std::allocator<ncnn::VkMat> >&, ncnn::VkCompute&, ncnn::Option&) const () from /usr/lib/libfacRecSdk_x86_1.0.1.so #297 0x00007f0116710cad in ncnn::Net::forward_layer(int, std::vector<ncnn::Mat, std::allocator<ncnn::Mat> >&, std::vector<ncnn::VkMat, std::allocator<ncnn::VkMat> >&, ncnn::VkCompute&, ncnn::Option&) const () from /usr/lib/libfacRecSdk_x86_1.0.1.so #298 0x00007f0116713f64 in ncnn::Extractor::extract(int, ncnn::VkMat&, ncnn::VkCompute&) () from /usr/lib/libfacRecSdk_x86_1.0.1.so #299 0x00007f0116716dd5 in ncnn::Extractor::extract(int, ncnn::Mat&) () from /usr/lib/libfacRecSdk_x86_1.0.1.so #300 0x00007f01166e786f in _extract(FeatureContext*, unsigned char*, Feature**, int) () from /usr/lib/libfacRecSdk_x86_1.0.1.so #301 0x0000000000407f1c in _extract_from_rect2 (e_ctx=0x2a2a900, l_ctx=0x1e62f50) at ./main_gpu.cpp:64 ---Type <return> to continue, or q <return> to quit--- #302 0x000000000040c0b0 in std::_Bind_simple<void (*(FeatureContext*, LandmarkContext*))(FeatureContext*, LandmarkContext*)>::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) (this=0x7effdbe2f8e8) at /usr/include/c++/5/functional:1531 #303 0x000000000040bf6a in std::_Bind_simple<void (*(FeatureContext*, LandmarkContext*))(FeatureContext*, LandmarkContext*)>::operator()() (this=0x7effdbe2f8e8) at /usr/include/c++/5/functional:1520 #304 0x000000000040b956 in std::thread::_Impl<std::_Bind_simple<void (*(FeatureContext*, LandmarkContext*))(FeatureContext*, LandmarkContext*)> >::_M_run() (this=0x7effdbe2f8d0) at /usr/include/c++/5/thread:115 #305 0x00007f0115b34a60 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #306 0x00007f011647b6db in start_thread (arg=0x7effa1e61700) at pthread_create.c:463 #307 0x00007f011558f88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

@nihui
Copy link
Member

nihui commented Mar 20, 2020

贴下最开始的 backtrace

@FB-wh
Copy link
Author

FB-wh commented Mar 20, 2020

贴下最开始的 backtrace

Type "apropos word" to search for commands related to "word"...
Reading symbols from a.out...done.
[New LWP 584]
[New LWP 365]
[New LWP 391]
[New LWP 406]
[New LWP 393]
[New LWP 392]
[New LWP 395]
[New LWP 394]
[New LWP 396]
[New LWP 407]
[New LWP 408]
[New LWP 398]
[New LWP 411]
[New LWP 417]
[New LWP 405]
[New LWP 418]
[New LWP 420]
[New LWP 422]
[New LWP 423]
[New LWP 426]
[New LWP 586]
[New LWP 429]
[New LWP 428]
[New LWP 425]
[New LWP 403]
[New LWP 400]
[New LWP 409]
[New LWP 412]
[New LWP 416]
[New LWP 421]
[New LWP 424]
[New LWP 427]
[New LWP 430]
[New LWP 431]
[New LWP 399]
[New LWP 419]
[New LWP 410]
[New LWP 404]
[New LWP 581]
[New LWP 413]
[New LWP 414]
[New LWP 402]
[New LWP 415]
[New LWP 578]
[New LWP 579]
[New LWP 580]
[New LWP 582]
[New LWP 583]
[New LWP 585]
[New LWP 587]
[New LWP 588]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `./a.out'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f6b0e2af56c in ncnn::Net::forward_layer(int, std::vector<ncnn::Mat, std::allocatorncnn::Mat >&, std::vector<ncnn::VkMat, std::allocatorncnn::VkMat >&, ncnn::VkCompute&, ncnn::Option&) const ()
from /usr/lib/libfacRecSdk_x86_1.0.1.so
#1 0x00007f6b0e2acc8d in ncnn::Net::forward_layer(int, std::vector<ncnn::Mat, std::allocatorncnn::Mat >&, std::vector<ncnn::VkMat, std::allocatorncnn::VkMat >&, ncnn::VkCompute&, ncnn::Option&) const ()
from /usr/lib/libfacRecSdk_x86_1.0.1.so
#2 0x00007f6b0e2ad0e5 in ncnn::Net::forward_layer(int, std::vector<ncnn::Mat, std::allocatorncnn::Mat >&, std::vector<ncnn::VkMat, std::allocatorncnn::VkMat >&, ncnn::VkCompute&, ncnn::Option&) const ()
from /usr/lib/libfacRecSdk_x86_1.0.1.so
#3 0x00007f6b0e2acc8d in ncnn::Net::forward_layer(int, std::vector<ncnn::Mat, std::allocatorncnn::Mat >&, std::vector<ncnn::VkMat, std::allocatorncnn::VkMat >&, ncnn::VkCompute&, ncnn::Option&) const ()
from /usr/lib/libfacRecSdk_x86_1.0.1.so
#4 0x00007f6b0e2acc8d in ncnn::Net::forward_layer(int, std::vector<ncnn::Mat, std::allocatorncnn::Mat >&, std::vector<ncnn::VkMat, std::allocatorncnn::VkMat >&, ncnn::VkCompute&, ncnn::Option&) const ()
from /usr/lib/libfacRecSdk_x86_1.0.1.so
#5 0x00007f6b0e2acc8d in ncnn::Net::forward_layer(int, std::vector<ncnn::Mat, std::allocatorncnn::Mat >&, std::vector<ncnn::VkMat, std::allocatorncnn::VkMat >&, ncnn::VkCompute&, ncnn::Option&) const ()
from /usr/lib/libfacRecSdk_x86_1.0.1.so
#6 0x00007f6b0e2acc8d in ncnn::Net::forward_layer(int, std::vector<ncnn::Mat, std::allocatorncnn::Mat >&, std::vector<ncnn::VkMat, std::allocatorncnn::VkMat >&, ncnn::VkCompute&, ncnn::Option&) const ()
from /usr/lib/libfacRecSdk_x86_1.0.1.so
#7 0x00007f6b0e2ad0e5 in ncnn::Net::forward_layer(int, std::vector<ncnn::Mat, std::allocatorncnn::Mat >&, std::vector<ncnn::VkMat, std::allocatorncnn::VkMat >&, ncnn::VkCompute&, ncnn::Option&) const ()
...
一直到#289 0x00007f0116711105

@sdnusqy-art
Copy link

请问问题解决了吗,怎么解决的,谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants