vim-gutentags icon indicating copy to clipboard operation
vim-gutentags copied to clipboard

Error code 122 & 139

Open ijpq opened this issue 2 years ago • 6 comments

Describe the bug error code 122 and 139 show up

Steps to reproduce

  1. cd to a c/cpp project
  2. vi *.cpp

Share your setup

  • What OS and version of Vim are you using?
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Jun 19 2022 10:22:43); 4.15.0-171-generic #180-Ubuntu SMP Wed Mar 2 17:25:05 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
  • What version of ctags, gtags, or whatever do you have installed?
Universal Ctags 5.9.0(cbdc5c4b), Copyright (C) 2015-2022 Universal Ctags Team
Universal Ctags is derived from Exuberant Ctags.
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Jun 22 2022, 19:50:12
  URL: https://ctags.io/
  Optional compiled features: +wildcards, +regex, +gnulib_regex, +iconv, +option-directory, +xpath, +packcc, +optscript
----
gtags (Global) 6.6.8
Powered by Berkeley DB 1.85.
Copyright (c) 1996-2021 Tama Communications Corporation
License GPLv3+: GNU GPL version 3 or later <http://www.gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
  • Are you using g:gutentags_cache_dir?
let s:vim_tags = expand('~/.cache/tags')                                                                                                                                                                    
let g:gutentags_cache_dir = s:vim_tags 

Post the logs

"dnn/src/cuda/norm/opr_impl.cpp" 168L, 7446B
gutentags: Scanning buffer 'dnn/src/cuda/norm/opr_impl.cpp' for gutentags setup...
gutentags: No specific project type.
gutentags: Not adding cscope DB file because it doesn't exist yet: /home/tangke/.cache/tags/home-tangke-MegBrain/GTAGS
gutentags: Setting gutentags for buffer 'dnn/src/cuda/norm/opr_impl.cpp'
gutentags: Generating tags file: /home/tangke/.cache/tags/home-tangke-MegBrain-.tags
gutentags: Generating wildignore options: /home/tangke/.cache/tags/_wildignore.options
gutentags: Running: ['/home/tangke/.vim_runtime/my_plugins/vim-gutentags/plat/unix/update_tags.sh', '-e', 'ctags', '-t', '/home/tangke/.cache/tags/home-tangke-MegBrain-.tags', '-p', '/home/tangke/MegBrain', '-o'
, '/home/tangke/.vim_runtime/my_plugins/vim-gutentags/res/ctags_recursive.options', '-O', '--fields=+niazS', '-O', '--extra=+q', '-O', '--c++-kinds=+px', '-O', '--c-kinds=+px', '-O', '--extras=+q', '-O', '--outp
ut-format=e-ctags', '-x', '@/home/tangke/.cache/tags/_wildignore.options', '-l', '/home/tangke/.cache/tags/home-tangke-MegBrain-.tags.log']
gutentags: In:      /home/tangke/MegBrain
gutentags: Generating missing tags file: /home/tangke/.cache/tags/home-tangke-MegBrain/GTAGS
gutentags: Running: ['/home/tangke/.vim_runtime/my_plugins/vim-gutentags/plat/unix/update_gtags.sh', '-e', 'gtags', '--incremental', '/home/tangke/.cache/tags/home-tangke-MegBrain']
gutentags: In:      /home/tangke/MegBrain
gutentags: 
Press ENTER or type command to continue                                                                                                                                                                            
gutentags: [job stderr]: 'executing job failed: Permission denied'                                                                                                                                                 
gutentags: [job stdout]: 'Locking tags file...'                                                                                                                                                                    
gutentags: [job stdout]: 'Running ctags on whole project'                                                                                                                                                          
gutentags: [job stdout]: 'ctags -f "/home/tangke/.cache/tags/home-tangke-MegBrain-.tags.temp" "--options=/home/tangke/.vim_runtime/my_plugins/vim-gutentags/res/ctags_recursive.options"  --fields=+niazS --extra=+
q --c++-kinds=+px --c-kinds=+px --extras=+q --output-format=e-ctags --exclude=@/home/tangke/.cache/tags/_wildignore.options "/home/tangke/MegBrain"'                                                               
gutentags: [job stderr]: 'ctags: Warning: --extra option is obsolete; use --extras instead'                                                                                                                        
gutentags: Finished gtags_cscope job.                                                                                                                                                                              
gutentags: Not adding cscope DB file because it doesn't exist yet: /home/tangke/.cache/tags/home-tangke-MegBrain/GTAGS                                                                                             
gutentags: gtags-cscope job failed, returned: 122                                                                                                                                                                  
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 44)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 44)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 44)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 44)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 44)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 44)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 44)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 44)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 44)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 44)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 44)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 44)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 44)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 51)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 51)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 51)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 51)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 51)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 51)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/docs/html/jquery.js(line: 44)'                                                                          
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/docs/html/jquery.js(line: 44)'                                                                          
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/docs/html/jquery.js(line: 44)'                                                                          
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/docs/html/jquery.js(line: 44)'                                                                          
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/docs/html/jquery.js(line: 44)'                                                                          
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/docs/html/jquery.js(line: 44)'
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/docs/html/jquery.js(line: 51)'                                                                          
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/docs/html/jquery.js(line: 51)'                                                                          
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/docs/html/jquery.js(line: 51)'                                                                          
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/docs/html/jquery.js(line: 51)'                                                                          
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/docs/html/jquery.js(line: 51)'                                                                          
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/docs/html/jquery.js(line: 51)'                                                                          
gutentags: [job stderr]: 'Segmentation fault (core dumped)'                                                                                                                                                        
gutentags: Finished ctags job.                                                                                                                                                                                     
gutentags: ctags job failed, returned: 139

Additional context Add any other context about the problem here.

ijpq avatar Jun 22 '22 15:06 ijpq

i found out the log declares some shell script need execute i execute chmod +x update_*.sh within unix dir. but log output shows as follow:

"dnn/src/cuda/norm/opr_impl.cpp" 168L, 7446B
gutentags: Scanning buffer 'dnn/src/cuda/norm/opr_impl.cpp' for gutentags setup...
gutentags: No specific project type.
gutentags: Not adding cscope DB file because it doesn't exist yet: /home/tangke/MegBrain/{HOME}/.cache/tags/home-tangke-MegBrain/GTAGS
gutentags: Setting gutentags for buffer 'dnn/src/cuda/norm/opr_impl.cpp'
gutentags: Generating missing tags file: /home/tangke/MegBrain/{HOME}/.cache/tags/home-tangke-MegBrain-.tags
gutentags: Generating wildignore options: /home/tangke/MegBrain/{HOME}/.cache/tags/_wildignore.options
gutentags: Running: ['/home/tangke/.vim_runtime/my_plugins/vim-gutentags/plat/unix/update_tags.sh', '-e', 'ctags', '-t', '/home/tangke/MegBrain/{HOME}/.cache/tags/home-tangke-MegBrain-.tags', '-p', '/home/tangke
/MegBrain', '-o', '/home/tangke/.vim_runtime/my_plugins/vim-gutentags/res/ctags_recursive.options', '-O', '--fields=+niazS', '-O', '--extra=+q', '-O', '--c++-kinds=+px', '-O', '--c-kinds=+px', '-O', '--extras=+q
', '-O', '--output-format=e-ctags', '-x', '@/home/tangke/MegBrain/{HOME}/.cache/tags/_wildignore.options', '-l', '/home/tangke/MegBrain/{HOME}/.cache/tags/home-tangke-MegBrain-.tags.log']
gutentags: In:      /home/tangke/MegBrain
gutentags: Generating missing tags file: /home/tangke/MegBrain/{HOME}/.cache/tags/home-tangke-MegBrain/GTAGS
gutentags: Running: ['/home/tangke/.vim_runtime/my_plugins/vim-gutentags/plat/unix/update_gtags.sh', '-e', 'gtags', '--incremental', '/home/tangke/MegBrain/{HOME}/.cache/tags/home-tangke-MegBrain']
gutentags: In:      /home/tangke/MegBrain
gutentags: 
gutentags: [job stdout]: 'Running gtags:'
gutentags: [job stdout]: 'gtags  --incremental /home/tangke/MegBrain/{HOME}/.cache/tags/home-tangke-MegBrain'
gutentags: [job stdout]: 'Locking tags file...'
gutentags: [job stdout]: 'Running ctags on whole project'
gutentags: [job stdout]: 'ctags -f "/home/tangke/MegBrain/{HOME}/.cache/tags/home-tangke-MegBrain-.tags.temp" "--options=/home/tangke/.vim_runtime/my_plugins/vim-gutentags/res/ctags_recursive.options"  --fields=
+niazS --extra=+q --c++-kinds=+px --c-kinds=+px --extras=+q --output-format=e-ctags --exclude=@/home/tangke/MegBrain/{HOME}/.cache/tags/_wildignore.options "/home/tangke/MegBrain"'
+niazS --extra=+q --c++-kinds=+px --c-kinds=+px --extras=+q --output-format=e-ctags --exclude=@/home/tangke/MegBrain/{HOME}/.cache/tags/_wildignore.options "/home/tangke/MegBrain"'                               

gutentags: [job stderr]: 'ctags: Warning: --extra option is obsolete; use --extras instead'                                                                                                                        
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 44)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 44)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 44)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 44)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 44)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 44)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 44)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 44)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 44)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 44)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 44)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 44)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 44)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 51)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 51)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 51)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 51)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 51)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 51)'                                                                               
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/docs/html/jquery.js(line: 44)'                                                                          
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/docs/html/jquery.js(line: 44)'                                                                          
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/docs/html/jquery.js(line: 44)'                                                                          
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/docs/html/jquery.js(line: 44)'                                                                          
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/docs/html/jquery.js(line: 44)'                                                                          
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/docs/html/jquery.js(line: 44)'                                                                          
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/docs/html/jquery.js(line: 44)'                                                                          
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/docs/html/jquery.js(line: 44)'                                                                          
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/docs/html/jquery.js(line: 44)'                                                                          
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/docs/html/jquery.js(line: 44)'                                                                          
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/docs/html/jquery.js(line: 44)'                                                                          
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/docs/html/jquery.js(line: 44)'                                                                          
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/docs/html/jquery.js(line: 44)'                                                                          
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/docs/html/jquery.js(line: 51)'                                                                          
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/docs/html/jquery.js(line: 51)'                                                                          
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/docs/html/jquery.js(line: 51)'                                                                          
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/docs/html/jquery.js(line: 51)'                                                                          
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/docs/html/jquery.js(line: 51)'                                                                          
gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/docs/html/jquery.js(line: 51)'                                                                          
gutentags: [job stderr]: 'Segmentation fault (core dumped)'                                                                                                                                                        
gutentags: Finished ctags job.                                                                                                                                                                                     
gutentags: ctags job failed, returned: 139                                                                                                                                                                         
gutentags: [job stderr]: 'Warning: symbol name is too long. (Ignored) [+1 ./third_party/llvm-project/compiler-rt/test/fuzzer/Bingo.h]'                                                                             
gutentags: [job stderr]: 'Warning: cannot stat ''gtest''. ignored.'                                                                                                                                                
gutentags: [job stderr]: 'Warning: cannot stat ''gtest''. ignored.'                                                                                                                                                
gutentags: [job stderr]: 'Warning: cannot stat ''megbrain''. ignored.'                                                                                                                                             
gutentags: [job stderr]: 'Warning: cannot stat ''update_year.py''. ignored.'                                                                                                                                       
gutentags: [job stdout]: 'Done.'                                                                                                                                                                                   
gutentags: Finished gtags_cscope job.                                                                                                                                                                              
gutentags: Adding cscope DB file: /home/tangke/MegBrain/{HOME}/.cache/tags/home-tangke-MegBrain/GTAGS

ijpq avatar Jun 22 '22 15:06 ijpq

Hi. I have same issue, but problem should be related to "universal-ctags" which segfaults, (see your error message gutentags: [job stderr]: 'Segmentation fault (core dumped)' ). To verify this you can go at the root of your project and run:

ctags -R .

and I expect you will get a segfault,

best Cristiano

cridemichel avatar Jul 02 '22 08:07 cridemichel

Hi. I have same issue, but problem should be related to "universal-ctags" which segfaults, (see your error message gutentags: [job stderr]: 'Segmentation fault (core dumped)' ). To verify this you can go at the root of your project and run:

ctags -R .

and I expect you will get a segfault,

best Cristiano

i have issued on universal-ctags repo, the developer make a new commit to fix this bug. is seems as segment fault caused by CUDA files but i haven't check whether the new commit could working. thx for reply.

ijpq avatar Jul 02 '22 09:07 ijpq

Hi, I hope new commit to universal-ctags repo will fix this issue, anyway in my repo there are no cuda files and I am experiencing same beahvior... best Cristiano

cridemichel avatar Jul 02 '22 11:07 cridemichel

hi, ijpq

just note this err:

gutentags: [job stderr]: 'ctags: Warning: --extra option is obsolete; use --extras instead'                                                                                                                        

I guess that g:gutentags_ctag_extra_args in your .vimrc is wrong.

let g:gutentags_ctags_extra_args+=['--extras=+q']

wow-yes avatar Jul 19 '22 02:07 wow-yes

The second error in your issue is

gutentags: [job stderr]: 'ctags: Warning: ignoring null tag in /home/tangke/MegBrain/third_party/cpp_redis/html/jquery.js(line: 44)'                                                                               

Obviously, (universal) ctags is trying to produce tag-cache for 'jquery.js'.

But your project is a c/c++ project. Your settings of vim-gutentags does not work for .js file.

You can ignore all the .js file by adding this into your _vimrc

let g:gutentags_ctags_exclude=['*.js']

wow-yes avatar Jul 19 '22 02:07 wow-yes

As @ijpq notes, some shell scripts were missing the execute flag. This has been fixed with 865d17a63b70690beee855e72abd38db278c1839.

The segmentation fault is indeed universal-ctags' bug, thanks for those who checked for updates that fixed this, and everybody who helped in general.

ludovicchabant avatar Nov 27 '22 21:11 ludovicchabant