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

crash in ycm_core.so as I open one c++ source file with boost feature #2258

Closed
9 of 11 tasks
joecgs opened this issue Jul 25, 2016 · 4 comments
Closed
9 of 11 tasks

crash in ycm_core.so as I open one c++ source file with boost feature #2258

joecgs opened this issue Jul 25, 2016 · 4 comments

Comments

@joecgs
Copy link

joecgs commented Jul 25, 2016

Issue Prelude

Please complete these steps and check these boxes (by putting an x inside
the brackets) before filing your issue:

  • I have read and understood YCM's CONTRIBUTING document.
  • I have read and understood YCM's CODE_OF_CONDUCT document.
  • I have read and understood YCM's README, especially the
    Frequently Asked Questions section.
  • I have searched YCM's issue tracker to find issues similar to the one I'm
    about to report and couldn't find an answer to my problem. (Example Google
    search.
    )
  • If filing a bug report, I have included the output of vim --version.
  • If filing a bug report, I have included the output of :YcmDebugInfo.
  • If filing a bug report, I have included the output of
    :YcmToggleLogs stderr.
  • If filing a bug report, I have included which OS (including specific OS
    version) I am using.
  • If filing a bug report, I have included a minimal test case that reproduces
    my issue.
  • I understand this is an open-source project staffed by volunteers and
    that any help I receive is a selfless, heartfelt gift of their free time. I
    know I am not entitled to anything and will be polite and courteous.
  • I understand my issue may be closed if it becomes obvious I didn't
    actually perform all of these steps.

Thank you for adhering to this process! It ensures your issue is resolved
quickly and that neither your nor our time is needlessly wasted.

Issue Details

[If filing a bug report, please include a list of steps that describe how to
reproduce the bug you are experiencing. Also include test code if relevant.]

os: Centos 6.2
clang: 3.8
vim version

$ vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Sep 21 2015 19:42:23)
Compiled by nebchen<nebchen@tencent.com>
Huge version without GUI.  Features included (+) or not (-):
+arabic          +file_in_path    +mouse_sgr       +tag_binary
+autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
-balloon_eval    +float           +mouse_urxvt     -tag_any_white
-browse          +folding         +mouse_xterm     -tcl
++builtin_terms  -footer          +multi_byte      +terminfo
+byte_offset     +fork()          +multi_lang      +termresponse
+cindent         +gettext         -mzscheme        +textobjects
-clientserver    -hangul_input    +netbeans_intg   +title
-clipboard       +iconv           +path_extra      -toolbar
+cmdline_compl   +insert_expand   -perl            +user_commands
+cmdline_hist    +jumplist        +persistent_undo +vertsplit
+cmdline_info    +keymap          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       +python          +viminfo
+cscope          +lispindent      -python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con      -lua             +rightleft       +windows
+diff            +menu            -ruby            +writebackup
+digraphs        +mksession       +scrollbind      -X11
-dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     -xim
+emacs_tags      -mouseshape      -sniff           -xsmp
+eval            +mouse_dec       +startuptime     -xterm_clipboard
+ex_extra        -mouse_gpm       +statusline      -xterm_save
+extra_search    -mouse_jsbterm   -sun_workshop
+farsi           +mouse_netterm   +syntax
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc   -L/usr/local/lib -Wl,--as-needed -o vim        -lm -ltinfo -lnsl  -lselinux     -L/usr/local/lib/python2.7/config -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic

and, in .ycm_extra_conf.py, i append boost header path:

# for boost
'-isystem',
'/usr/local/include',

core file(core_python_1469537805.14131) generated as i open the file demo.cpp which has content as below:

#include <boost/interprocess/managed_shared_memory.hpp>
#include <boost/interprocess/allocators/node_allocator.hpp>

typedef boost::interprocess::node_allocator<int, boost::interprocess::managed_shared_memory::segment_manager> TestAllocator;

int main() {
    return 0;
}

crashed in ycm_core.so, gdb's backtrace output is as below:

#0  0x00007f4c40e22885 in raise () from /lib64/libc.so.6
#1  0x00007f4c40e24065 in abort () from /lib64/libc.so.6
#2  0x00007f4c40e5f977 in __libc_message () from /lib64/libc.so.6
#3  0x00007f4c40e65296 in malloc_printerr () from /lib64/libc.so.6
#4  0x00007f4c40e67f44 in _int_free () from /lib64/libc.so.6
#5  0x00007f4c32123bfd in clang::ASTUnit::~ASTUnit() () from /data/home/user00/neo/neo-dotfile/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../libclang.so
#6  0x00007f4c32124135 in llvm::CrashRecoveryContextDeleteCleanup<clang::ASTUnit>::recoverResources() () from /data/home/user00/neo/neo-dotfile/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../libclang.so
#7  0x00007f4c3371acc1 in llvm::CrashRecoveryContext::~CrashRecoveryContext() () from /data/home/user00/neo/neo-dotfile/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../libclang.so
#8  0x00007f4c31e7f857 in clang_parseTranslationUnit2FullArgv () from /data/home/user00/neo/neo-dotfile/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../libclang.so
#9  0x00007f4c34b9a849 in YouCompleteMe::TranslationUnit::TranslationUnit(std::string const&, std::vector<UnsavedFile, std::allocator<UnsavedFile> > const&, std::vector<std::string, std::allocator<std::string> > const&, void*) ()
   from /data/home/user00/neo/neo-dotfile/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycm_core.so
#10 0x00007f4c34b98a48 in boost::detail::sp_if_not_array<YouCompleteMe::TranslationUnit>::type boost::make_shared<YouCompleteMe::TranslationUnit, std::string const&, std::vector<UnsavedFile, std::allocator<UnsavedFile> > const&, std::vector<std::string, std::allocator<std::string> > const&, void*&>(std::string const&, std::vector<UnsavedFile, std::allocator<UnsavedFile> > const&, std::vector<std::string, std::allocator<std::string> > const&, void*&) ()
   from /data/home/user00/neo/neo-dotfile/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycm_core.so
#11 0x00007f4c34b984f6 in YouCompleteMe::TranslationUnitStore::GetOrCreate(std::string const&, std::vector<UnsavedFile, std::allocator<UnsavedFile> > const&, std::vector<std::string, std::allocator<std::string> > const&, bool&) ()
   from /data/home/user00/neo/neo-dotfile/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycm_core.so
#12 0x00007f4c34b8f7fb in YouCompleteMe::ClangCompleter::UpdateTranslationUnit(std::string const&, std::vector<UnsavedFile, std::allocator<UnsavedFile> > const&, std::vector<std::string, std::allocator<std::string> > const&) ()
   from /data/home/user00/neo/neo-dotfile/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycm_core.so
#13 0x00007f4c34b87dbc in boost::python::objects::caller_py_function_impl<boost::python::detail::caller<std::vector<YouCompleteMe::Diagnostic, std::allocator<YouCompleteMe::Diagnostic> > (YouCompleteMe::ClangCompleter::*)(std::string const&, std::vector<UnsavedFile, std::allocator<UnsavedFile> > const&, std::vector<std::string, std::allocator<std::string> > const&), boost::python::default_call_policies, boost::mpl::vector5<std::vector<YouCompleteMe::Diagnostic, std::allocator<YouCompleteMe::Diagnostic> >, YouCompleteMe::ClangCompleter&, std::string const&, std::vector<UnsavedFile, std::allocator<UnsavedFile> > const&, std::vector<std::string, std::allocator<std::string> > const&> > >::operator()(_object*, _object*) ()
   from /data/home/user00/neo/neo-dotfile/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycm_core.so
#14 0x00007f4c34bc94ad in boost::python::objects::function::call(_object*, _object*) const () from /data/home/user00/neo/neo-dotfile/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycm_core.so
#15 0x00007f4c34bc96b8 in boost::detail::function::void_function_ref_invoker0<boost::python::objects::(anonymous namespace)::bind_return, void>::invoke(boost::detail::function::function_buffer&) ()
   from /data/home/user00/neo/neo-dotfile/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycm_core.so
#16 0x00007f4c34bc3993 in boost::python::handle_exception_impl(boost::function0<void>) () from /data/home/user00/neo/neo-dotfile/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycm_core.so
#17 0x00007f4c34bc7ed9 in function_call () from /data/home/user00/neo/neo-dotfile/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycm_core.so
#18 0x00007f4c420c5d73 in PyObject_Call (func=0x11537c0, arg=<optimized out>, kw=<optimized out>) at Objects/abstract.c:2529
#19 0x00007f4c4217491a in do_call (nk=<optimized out>, na=<optimized out>, pp_stack=0x7f4c0bffcd58, func=0x11537c0) at Python/ceval.c:4253
#20 call_function (oparg=<optimized out>, pp_stack=0x7f4c0bffcd58) at Python/ceval.c:4058
#21 PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:2681
#22 0x00007f4c4217722e in PyEval_EvalCodeEx (co=0x7f4c35e639b0, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=2, kws=0x7f4c35205d40, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3267
#23 0x00007f4c42175867 in fast_function (nk=<optimized out>, na=2, n=<optimized out>, pp_stack=0x7f4c0bffcf58, func=0x7f4c353928c0) at Python/ceval.c:4131
#24 call_function (oparg=<optimized out>, pp_stack=0x7f4c0bffcf58) at Python/ceval.c:4056
#25 PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:2681
#26 0x00007f4c4217722e in PyEval_EvalCodeEx (co=0x7f4c35114d30, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=0, kws=0x7f4c42531068, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3267
#27 0x00007f4c420f5388 in function_call (func=0x7f4c353990c8, arg=0x7f4c42531050, kw=0x7f4c3522be88) at Objects/funcobject.c:526
#28 0x00007f4c420c5d73 in PyObject_Call (func=0x7f4c353990c8, arg=<optimized out>, kw=<optimized out>) at Objects/abstract.c:2529
#29 0x00007f4c42173e15 in ext_do_call (nk=1112739920, na=<optimized out>, flags=<optimized out>, pp_stack=0x7f4c0bffd228, func=0x7f4c353990c8) at Python/ceval.c:4348
#30 PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:2720
#31 0x00007f4c4217722e in PyEval_EvalCodeEx (co=0x7f4c35eea030, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=0, kws=0x7f4c42531068, kwcount=0, defs=0x0, defcount=0, closure=0x7f4c35efbe60) at Python/ceval.c:3267
#32 0x00007f4c420f5388 in function_call (func=0x7f4c353ac0c8, arg=0x7f4c42531050, kw=0x7f4c3522bd70) at Objects/funcobject.c:526
#33 0x00007f4c420c5d73 in PyObject_Call (func=0x7f4c353ac0c8, arg=<optimized out>, kw=<optimized out>) at Objects/abstract.c:2529
#34 0x00007f4c42173e15 in ext_do_call (nk=1112739920, na=<optimized out>, flags=<optimized out>, pp_stack=0x7f4c0bffd4f8, func=0x7f4c353ac0c8) at Python/ceval.c:4348
#35 PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:2720
#36 0x00007f4c4217722e in PyEval_EvalCodeEx (co=0x7f4c35ee6eb0, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=0, kws=0x7f4c42531068, kwcount=0, defs=0x0, defcount=0, closure=0x7f4c376e7200) at Python/ceval.c:3267
#37 0x00007f4c420f5388 in function_call (func=0x7f4c353ac140, arg=0x7f4c42531050, kw=0x7f4c3522bc58) at Objects/funcobject.c:526
#38 0x00007f4c420c5d73 in PyObject_Call (func=0x7f4c353ac140, arg=<optimized out>, kw=<optimized out>) at Objects/abstract.c:2529
#39 0x00007f4c42173e15 in ext_do_call (nk=1112739920, na=<optimized out>, flags=<optimized out>, pp_stack=0x7f4c0bffd7c8, func=0x7f4c353ac140) at Python/ceval.c:4348
#40 PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:2720
#41 0x00007f4c4217722e in PyEval_EvalCodeEx (co=0x7f4c376b82b0, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=0, kws=0x7f4c42531068, kwcount=0, defs=0x0, defcount=0, closure=0x7f4c35f4df80) at Python/ceval.c:3267
#42 0x00007f4c420f5388 in function_call (func=0x7f4c353ac1b8, arg=0x7f4c42531050, kw=0x7f4c3522b4b0) at Objects/funcobject.c:526
#43 0x00007f4c420c5d73 in PyObject_Call (func=0x7f4c353ac1b8, arg=<optimized out>, kw=<optimized out>) at Objects/abstract.c:2529
#44 0x00007f4c42173e15 in ext_do_call (nk=1112739920, na=<optimized out>, flags=<optimized out>, pp_stack=0x7f4c0bffda98, func=0x7f4c353ac1b8) at Python/ceval.c:4348
#45 PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:2720
#46 0x00007f4c4217722e in PyEval_EvalCodeEx (co=0x7f4c3510abb0, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=2, kws=0x7f4bfc001580, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3267
#47 0x00007f4c42175867 in fast_function (nk=<optimized out>, na=2, n=<optimized out>, pp_stack=0x7f4c0bffdc98, func=0x7f4c350fded8) at Python/ceval.c:4131
#48 call_function (oparg=<optimized out>, pp_stack=0x7f4c0bffdc98) at Python/ceval.c:4056
#49 PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:2681
#50 0x00007f4c4217722e in PyEval_EvalCodeEx (co=0x7f4c3510ad30, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=3, kws=0x7f4c3522c1f8, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3267
#51 0x00007f4c42175867 in fast_function (nk=<optimized out>, na=3, n=<optimized out>, pp_stack=0x7f4c0bffde98, func=0x7f4c35f11050) at Python/ceval.c:4131
#52 call_function (oparg=<optimized out>, pp_stack=0x7f4c0bffde98) at Python/ceval.c:4056
#53 PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:2681
#54 0x00007f4c4217722e in PyEval_EvalCodeEx (co=0x7f4c3510adb0, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=3, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3267
#55 0x00007f4c420f5281 in function_call (func=0x7f4c35f110c8, arg=0x7f4c353960f0, kw=0x0) at Objects/funcobject.c:526
#56 0x00007f4c420c5d73 in PyObject_Call (func=0x7f4c35f110c8, arg=<optimized out>, kw=<optimized out>) at Objects/abstract.c:2529
#57 0x00007f4c420d83af in instancemethod_call (func=0x7f4c35f110c8, arg=0x7f4c353960f0, kw=0x0) at Objects/classobject.c:2602
#58 0x00007f4c420c5d73 in PyObject_Call (func=0x7f4c35396500, arg=<optimized out>, kw=<optimized out>) at Objects/abstract.c:2529
#59 0x00007f4c4213252c in slot_tp_call (self=0x7f4c35391890, args=0x7f4c376ce248, kwds=0x0) at Objects/typeobject.c:5449
---Type <return> to continue, or q <return> to quit---
@Valloric
Copy link
Member

That's a libclang crash. Could you provide more info so that we can reproduce this? Please see CONTRIBUTING.md for advice on how to do that.

@r4nt @d0k

@joecgs
Copy link
Author

joecgs commented Jul 26, 2016

@Valloric thank you for your response.
issue details have been updated, which includes os, vim version, repro, and core file's gdb backtrace.
if you need more information, please free to let me know, thanks again.

@joecgs joecgs changed the title crash in ycm_core.so crash in ycm_core.so as I open one c++ source file with boost feature Jul 27, 2016
@micbou
Copy link
Collaborator

micbou commented Aug 6, 2016

I can't reproduce the issue on CentOS 7.2 64-bit. Did you build YCM with system Boost? What is the output of :YcmDebugInfo in an empty C++ file? When writing the contents of your demo.cpp file, at which point does it crash?

@micbou
Copy link
Collaborator

micbou commented Aug 20, 2016

No answer. Closing as not reproducible.

@micbou micbou closed this as completed Aug 20, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants