Bug #3935
closedScheduler::executeEvent segfault (armhf)
100%
Description
Environment: Linux 4.4.43-ti-r84 armv7l, Docker armhf-ubuntu_core 16.10
Packages: nfd-all 0.5.1-ppa2~yakkety
Command: HOME=/var/lib/ndn/nfd nfd
Expected: NFD starts
Actual: NFD crashes with segfault in ndn::util::scheduler::Scheduler::executeEvent
Files
Updated by Junxiao Shi almost 8 years ago
- File valgrind.txt valgrind.txt added
- File gdb.txt gdb.txt added
- File vgcore.5528.7z.001 vgcore.5528.7z.001 added
- File vgcore.5528.7z.002 vgcore.5528.7z.002 added
- File vgcore.5528.7z.003 vgcore.5528.7z.003 added
I have captured a core dump.
The following debug symbols are installed: ndn-cxx-dbg nfd-dbg libcrypto++6-dbg libgcc1-dbg libsqlite3-0-dbg.
And the logs are captured with:
HOME=/var/lib/ndn/nfd valgrind nfd &> valgrind.txt
gdb /usr/bin/nfd vgcore.* -ex 'thread apply all bt full' -ex quit > gdb.txt
The crash occurs when Boost.Scope_Exit invokes the callback, or within that callback.
gdb.txt thread 1 backtrace contains:
#4 ndn::util::scheduler::Scheduler::executeEvent (this=0x7161228, error=...) at ../src/util/scheduler.cpp:142
boost_se_guard_142 = {f_ = {<boost::function0<void>> = {<boost::function_base> = {
vtable = 0x4ba2605 <void boost::function0<void>::assign_to<ndn::util::scheduler::Scheduler::executeEvent(boost::system::error_code const&)::{lambda()#1}>(ndn::util::scheduler::Scheduler::executeEvent(boost::system::error_code const&)::{lambda()#1})::stored_vtable+1>, functor = {obj_ptr = 0x0, type = {type = 0x0, const_qualified = 17, volatile_qualified = 209}, func_ptr = 0x0,
bound_memfunc_ptr = {memfunc_ptr = &virtual table offset 0, this adjustment 38660232, obj_ptr = 0xbd9d5130},
obj_ref = {obj_ptr = 0x0, is_const_qualified = 17, is_volatile_qualified = 209}, data = 0 '\000'}},
static args = <optimized out>, static arity = <optimized out>}, <No data fields>}}
now = {d_ = {rep_ = 8673241945747}}
In a different system (amd64 architecture), the same function's frame looks like:
#0 ndn::util::scheduler::Scheduler::executeEvent (this=0x7fffe4015ac0, error=...) at ../src/util/scheduler.cpp:145
boost_se_guard_142 = {f_ = {<boost::function0<void>> = {<boost::function_base> = {vtable = 0x0, functor = {
obj_ptr = 0x7fffe4027140, type = {type = 0x7fffe4027140, const_qualified = false, volatile_qualified = false},
func_ptr = 0x7fffe4027140, bound_memfunc_ptr = {
memfunc_ptr = (void (boost::detail::function::X::*)(boost::detail::function::X * const,
int)) 0x7fffe4027140, this adjustment 4294967296, obj_ptr = 0x7fffe4000900}, obj_ref = {obj_ptr = 0x7fffe4027140,
is_const_qualified = false, is_volatile_qualified = false}, data = 64 '@'}}, static args = <optimized out>,
static arity = <optimized out>}, <No data fields>}}
now = <optimized out>
Notice that the crashing process has func_ptr = 0x0
, while the other system has func_ptr = 0x7fffe4027140
.
Updated by Davide Pesavento almost 8 years ago
Can you confirm that the segfault goes away if you revert commit:86dfa53feee7821446520cdfc41f29436d93689d ?
Updated by Junxiao Shi almost 8 years ago
The segfault occurs in Docker container. I tried two different machines and backtrace is the same.
There is no segfault when running on the host.
Can you confirm that the segfault goes away if you revert commit:86dfa53feee7821446520cdfc41f29436d93689d ?
Yes.
Updated by Junxiao Shi almost 8 years ago
- Status changed from New to Code review
- Assignee set to Junxiao Shi
- Target version set to v0.6
Updated by Davide Pesavento over 7 years ago
- Status changed from Code review to Closed
- % Done changed from 0 to 100