[
https://issues.apache.org/jira/browse/MINIFICPP-990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16897258#comment-16897258
]
Andrew Christianson commented on MINIFICPP-990:
-----------------------------------------------
Due to the nature of the bug (shutdown signal handling) it is kind of tricky to
debug, but I think this is the relevant gdb/backtrace info:
{noformat}
Thread 1 "minifi" received signal SIGSEGV, Segmentation fault.
__new_sem_post (sem=0x7ffff7ffb000) at sem_post.c:36
36 sem_post.c: No such file or directory.
(gdb) bt
#0 __new_sem_post (sem=0x7ffff7ffb000) at sem_post.c:36
#1 <signal handler called>
#2 0x00007ffff71c868d in syscall () from /usr/lib64/haswell/libc.so.6
#3 0x00007ffff74e7a5d in std::__atomic_futex_unsigned_base::_M_futex_wait_until
(this=this@entry=0x5555561eeeb0, __addr=__addr@entry=0x5555561eeeb0,
__val=2147483648, __has_timeout=__has_timeout@entry=true, __s=...,
__s@entry=...,
__ns=__ns@entry=...) at
../../../../../gcc-9.1.0/libstdc++-v3/src/c++11/futex.cc:76
#4 0x00005555558659ba in
std::__atomic_futex_unsigned<2147483648u>::_M_load_and_test_until (__ns=...,
__s=..., __has_timeout=true, __mo=std::memory_order_acquire, __equal=true,
__operand=1, __assumed=<optimized out>, this=0x5555561eeeb0)
at /usr/include/c++/9/bits/atomic_base.h:569
#5
std::__atomic_futex_unsigned<2147483648u>::_M_load_and_test_until_impl<std::chrono::duration<long,
std::ratio<1l, 1000000000l> > > (__atime=<synthetic pointer>...,
__mo=std::memory_order_acquire, __equal=true, __operand=1,
__assumed=<optimized out>, this=0x5555561eeeb0) at
/usr/include/c++/9/bits/atomic_futex.h:140
#6
std::__atomic_futex_unsigned<2147483648u>::_M_load_when_equal_until<std::chrono::duration<long,
std::ratio<1l, 1000000000l> > > (__atime=<synthetic pointer>...,
__mo=std::memory_order_acquire, __val=1, this=0x5555561eeeb0)
at /usr/include/c++/9/bits/atomic_futex.h:199
#7
std::__future_base::_State_baseV2::wait_until<std::chrono::_V2::system_clock,
std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (__abs=<synthetic
pointer>..., this=0x5555561eeea0) at /usr/include/c++/9/future:380
#8 std::__basic_future<void>::wait_until<std::chrono::_V2::system_clock,
std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (__abs=<synthetic
pointer>..., this=<synthetic pointer>) at /usr/include/c++/9/future:708
#9 org::apache::nifi::minifi::FlowController::waitUnload (this=0x5555561a6200,
timeToWaitMs=<optimized out>) at
/home/achristianson/workspace/nifi-minifi-cpp-experimental/libminifi/src/FlowController.cpp:272
#10 0x0000555555773421 in main (argc=<optimized out>, argv=<optimized out>) at
/usr/include/c++/9/bits/shared_ptr_base.h:1020
{noformat}
Seems to crash in this bit from FlowController.cpp:
{noformat}
if (std::future_status::ready == unload_task.wait_until(wait_time)) {
running_ = false;
}{noformat}
> Segfault on SIGINT after shutdown initiated
> --------------------------------------------
>
> Key: MINIFICPP-990
> URL: https://issues.apache.org/jira/browse/MINIFICPP-990
> Project: Apache NiFi MiNiFi C++
> Issue Type: Bug
> Reporter: Andrew Christianson
> Priority: Major
>
> If I send a SIGINT (ctrl-c) to MiNiFI, MiNiFi begins shutdown. If I send
> another SIGINT while that shutdown is in progress, MiNiFi crashes with a
> segfault.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)