8000 Segfault in aria2::RequestGroupMan::fillRequestGroupFromReserver · Issue #775 · aria2/aria2 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Segfault in aria2::RequestGroupMan::fillRequestGroupFromReserver #775

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

Closed
stepanbujnak opened this issue Nov 16, 2016 · 2 comments
Closed

Comments

@stepanbujnak
Copy link
stepanbujnak commented Nov 16, 2016

I've encountered segfault with following GDB backtrace:

Thread 5 "downloader" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe7fff700 (LWP 2745)]
__gnu_cxx::__atomic_add_dispatch (__val=1, __mem=0x108) at /usr/include/c++/5/ext/atomicity.h:96
96            __atomic_add(__mem, __val);
(gdb) bt
#0  __gnu_cxx::__atomic_add_dispatch (__val=1, __mem=0x108) at /usr/include/c++/5/ext/atomicity.h:96
#1  std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy (this=0x100) at /usr/include/c++/5/bits/shared_ptr_base.h:134
#2  std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count (__r=..., this=0x7fffe7ffeb28) at /usr/include/c++/5/bits/shared_ptr_base.h:666
#3  std::__shared_ptr<aria2::RequestGroup, (__gnu_cxx::_Lock_policy)2>::__shared_ptr (this=0x7fffe7ffeb20) at /usr/include/c++/5/bits/shared_ptr_base.h:923
#4  std::shared_ptr<aria2::RequestGroup>::shared_ptr (this=0x7fffe7ffeb20) at /usr/include/c++/5/bits/shared_ptr.h:107
#5  aria2::RequestGroupMan::fillRequestGroupFromReserver (this=0x959d30, e=0x951670) at ../../src/src/RequestGroupMan.cc:546
#6  0x00007ffff750bd80 in aria2::FillRequestGroupCommand::execute (this=0x95b2b0) at ../../src/src/FillRequestGroupCommand.cc:70
#7  0x00007ffff74e5f0e in aria2::(anonymous namespace)::executeCommand (commands=std::deque with 5 elements = {...},-
    statusFilter=statusFilter@entry=aria2::Command::STATUS_ALL) at ../../src/src/DownloadEngine.cc:139
#8  0x00007ffff74e6033 in aria2::DownloadEngine::run (this=0x951670,  at ../../src/src/DownloadEngine.cc:177
#9  0x00007ffff767e990 in aria2::run (session=<optimized out>, mode=mode@entry=aria2::RUN_ONCE) at ../../src/src/aria2api.cc:157

This is version release-1.28.0 running on Ubuntu 16.04 x86_64.

I was wondering whether the problem could be that I'm calling ::aria::addUri() in multiple threads. Is the call thread safe? Couldn't find it in the documentation.

@tatsuhiro-t
Copy link
Collaborator

libaria2 is not thread safe. You have to use it from a single thread at a time.

@tatsuhiro-t
Copy link
Collaborator

Documented that libaria2 is not thread safe via commit 9d58ad9

@tatsuhiro-t tatsuhiro-t added this to the v1.30.0 milestone Nov 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants
0