Skip to content

Fix segmentation fault in std::regex executor during vector stress test #804

@wyfanxiao

Description

@wyfanxiao

Environment

  • Product: observer (OceanBase seekdb)
  • Revision: 1-4eefc1340d7ee6776917ea7ac16bdba24fb7b01e
  • Build Branch: master
  • Build Time: May 22 2026 23:30:40
  • Build Flags: RelWithDebInfo|Sanity
  • Build Info: obbuild-sanity-master-101050

Description / Steps to Reproduce

The observer process crashed with a segmentation fault in the C++ standard library's regex executor during a vector stress test. The core dump and related data are available at the following location:

http://:13335/data/1/vec_stress/ddl_duomo/obm.z1.obs0/

Environment Information

The core dump can be analyzed with:

gdb bin/observer /data/1/core-T1_ReqWorker-258302-1779686073

Log Information / Stack Trace

The program terminated with a segmentation fault (SIGSEGV). The backtrace shows the crash originates from std::__detail::_Executor<char const*, ...>::_M_rep_once_more.

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00005605e52fb88c in std::__detail::_Executor<char const*, std::allocator<std::__cxx11::sub_match<char const*> >, std::__cxx11::regex_traits<char>, true>::_M_rep_once_more (this=<optimized out>, 
    __match_mode=<optimized out>, __i=<optimized out>) at ./deps/3rd/usr/local/oceanbase/devtools/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/regex_executor.tcc:176
176     ./deps/3rd/usr/local/oceanbase/devtools/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/regex_executor.tcc: No such file or directory.
[Current thread is 1 (Thread 0x7f28a9aeb240 (LWP 333193))]
(gdb) 
(gdb) bt
#0  0x00005605e52fb88c in std::__detail::_Executor<char const*, std::allocator<std::__cxx11::sub_match<char const*> >, std::__cxx11::regex_traits<char>, true>::_M_rep_once_more (this=<optimized out>, 
    __match_mode=<optimized out>, __i=<optimized out>) at ./deps/3rd/usr/local/oceanbase/devtools/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/regex_executor.tcc:176
#1  0x00005605e52f8dd9 in std::__detail::_Executor<char const*, std::allocator<std::__cxx11::sub_match<char const*> >, std::__cxx11::regex_traits<char>, true>::_M_handle_repeat (this=0x7f28a9abd0a0, 
    __match_mode=<optimized out>, __i=<optimized out>) at ./deps/3rd/usr/local/oceanbase/devtools/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/regex_executor.tcc:212
#2  0x00005605e52f9e07 in std::__detail::_Executor<char const*, std::allocator<std::__cxx11::sub_match<char const*> >, std::__cxx11::regex_traits<char>, true>::_M_handle_match (this=<optimized out>, 
    __match_mode=<optimized out>, __i=<optimized out>) at ./deps/3rd/usr/local/oceanbase/devtools/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/regex_executor.tcc:329
#3  0x00005605e52fba78 in std::__detail::_Executor<char const*, std::allocator<std::__cxx11::sub_match<char const*> >, std::__cxx11::regex_traits<char>, true>::_M_rep_once_more (this=<optimized out>, 
    __match_mode=<optimized out>, __i=<optimized out>) at ./deps/3rd/usr/local/oceanbase/devtools/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/regex_executor.tcc:184
#4  0x00005605e52f8dd9 in std::__detail::_Executor<char const*, std::allocator<std::__cxx11::sub_match<char const*> >, std::__cxx11::regex_traits<char>, true>::_M_handle_repeat (this=0x7f28a9abd0a0, 
    __match_mode=<optimized out>, __i=<optimized out>) at ./deps/3rd/usr/local/oceanbase/devtools/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/regex_executor.tcc:212
#5  0x00005605e52f9e07 in std::__detail::_Executor<char const*, std::allocator<std::__cxx11::sub_match<char const*> >, std::__cxx11::regex_traits<char>, true>::_M_handle_match (this=<optimized out>, 
    __match_mode=<optimized out>, __i=<optimized out>) at ./deps/3rd/usr/local/oceanbase/devtools/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/regex_executor.tcc:329
#6  0x00005605e52fba78 in std::__detail::_Executor<char const*, std::allocator<std::__cxx11::sub_match<char const*> >, std::__cxx11::regex_traits<char>, true>::_M_rep_once_more (this=<optimized out>, 
    __match_mode=<optimized out>, __i=<optimized out>) at ./deps/3rd/usr/local/oceanbase/devtools/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/regex_executor.tcc:184
#7  0x00005605e52f8dd9 in std::__detail::_Executor<char const*, std::allocator<std::__cxx11::sub_match<char const*> >, std::__cxx11::regex_traits<char>, true>::_M_handle_repeat (this=0x7f28a9abd0a0, 
    __match_mode=<optimized out>, __i=<optimized out>) at ./deps/3rd/usr/local/oceanbase/devtools/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/regex_executor.tcc:212
#8  0x00005605e52f9e07 in std::__detail::_Executor<char const*, std::allocator<std::__cxx11::sub_match<char const*> >, std::__cxx11::regex_traits<char>, true>::_M_handle_match (this=<optimized out>, 
    __match_mode=<optimized out>, __i=<optimized out>) at ./deps/3rd/usr/local/oceanbase/devtools/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/regex_executor.tcc:329
#9  0x00005605e52fba78 in std::__detail::_Executor<char const*, std::allocator<std::__cxx11::sub_match<char const*> >, std::__cxx11::regex_traits<char>, true>::_M_rep_once_more (this=<optimized out>, 
    __match_mode=<optimized out>, __i=<optimized out>) at ./deps/3rd/usr/local/oceanbase/devtools/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/regex_executor.tcc:184

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions