Hello, > I don't understand your request. A reproducible environment means: 1. Everything in the right state. 2. A series of steps that leads to a broken state from the 1.
We don't want an already broken tags file, or debugger's output showing the broken state. > Since it's working on newly generated database, and subsequent > incremental works fine, I will just report back if it happens again. It doesn't seem to be reproducible in your environment. Your offer is much appreciated. Regards, Shigio On Mon, Jul 29, 2024 at 2:40 PM Scott Mcdermott <[email protected]> wrote: > > I don't understand your request. The git repo of my vim > config was the working directory where gtags was run when it > crashed. It is the reproduction environment. > > I can send you the partial gtags files that were generated and > cause the error on incremental update, if you like, but they are > large, as you can see from the file listing (GTAGS file was > 353.9MB, GRTAGS was 4.3MB, GPATH was 2.1MB). > > Strangely, after deleting those files and running non-incremental > build, it finishes with only 327KB GPATH, 16.4KB GRTAGS, > and 1.1MB GTAGS. I have no idea how the files that cause the > crash could have gotten so large. > > But only gtags created them, and it crashes with --incremental. > > Since it's working on newly generated database, and subsequent > incremental works fine, I will just report back if it happens again. > Thanks. > > ____ > > On Sun, Jul 28, 2024 at 4:43 PM Shigio YAMAGUCHI <[email protected]> wrote: >> >> Hello, >> Could you please send me a reproduction environment without >> vim-related files? Thank you in advance. >> >> Regards, >> Shigio >> >> On Mon, Jul 29, 2024 at 12:03 AM Scott Mcdermott <[email protected]> wrote: >> > >> > This is to report a crash and segfault when running gtags >> > in incremental mode. >> > >> > My editor is configured to run gtags in all git repos. It's crashing >> > when I edit in my ~/.vim/ directory, which is a checkout of >> > https://github.com/smemsh/.vim/ repo (config file is "gtags.conf" >> > therein). This gtags was built in May of this year from the >> > then-current trunk. I checked and it looks like no crash fixes >> > have been committed since. System is Ubuntu22 on x86_64. >> > >> > This problem went away when I removed the existing files >> > (so it was non-incremental). The tags update script has a trap >> > to remove partials if no finish (editor exits before gtags finishes, >> > process group is killed), but the update wrapper has race >> > conditions so it probably didn't work and the file generation was >> > incomplete. >> > >> > Nonetheless, gtags still should not crash. >> > >> > Let me know if more information is needed (i.e., build with -g, or >> > upload the partials -- which I saved -- somewhere). >> > >> > See below; eom. >> > >> > $ cd var/vim/tags/home-scott-.vim >> > >> > $ lsa >> > -rw-r--r-- 1 1001 666 2.0M 20240712000626 GPATH >> > -rw-r--r-- 1 1001 666 4.1M 20240712055818 GRTAGS >> > -rw-r--r-- 1 1001 666 338M 20240712055818 GTAGS >> > >> > $ gdb -q -d ~/upsrc/global --args `which gtags` --incremental >> > /home/scott/var/vim/tags/home-scott-.vim >> > Reading symbols from /usr/local/bin/gtags... >> > (gdb) r >> > Starting program: /usr/local/bin/gtags --incremental >> > /home/scott/var/vim/tags/home-scott-.vim >> > [Thread debugging using libthread_db enabled] >> > Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". >> > [Detaching after fork from child process 4066050] >> > [Detaching after fork from child process 4066053] >> > [Detaching after fork from child process 4066054] >> > >> > Program received signal SIGSEGV, Segmentation fault. >> > __bt_dleaf (t=t@entry=0x555555694920, key=key@entry=0x0, >> > h=h@entry=0x55555588a630, index=0) at bt_delete.c:507 >> > 507 ip[0] = ip[1] < offset ? ip[1] + nbytes : ip[1]; >> > (gdb) bt >> > #0 __bt_dleaf (t=t@entry=0x555555694920, key=key@entry=0x0, >> > h=h@entry=0x55555588a630, index=0) at bt_delete.c:507 >> > #1 0x0000555555609515 in __bt_delete (dbp=<optimized out>, key=<optimized >> > out>, flags=<optimized out>) at bt_delete.c:114 >> > #2 0x0000555555573356 in dbop_delete (dbop=<optimized out>, >> > path=path@entry=0x0) at dbop.c:506 >> > #3 0x0000555555578ce3 in gtags_delete (gtop=0x555555693660, >> > deleteset=deleteset@entry=0x55555565a090) at gtagsop.c:592 >> > #4 0x000055555556553f in updatetags (dbpath=dbpath@entry=0x7fffffffc1f0 >> > "/home/scott/var/vim/tags/home-scott-.vim", >> > root=root@entry=0x7fffffffd1f0 "/home/scott/.vim", >> > deleteset=deleteset@entry=0x55555565a090, >> > addlist=addlist@entry=0x55555567e680) at gtags.c:957 >> > #5 0x0000555555565aa1 in incremental (dbpath=dbpath@entry=0x7fffffffc1f0 >> > "/home/scott/var/vim/tags/home-scott-.vim", >> > root=root@entry=0x7fffffffd1f0 "/home/scott/.vim") at gtags.c:808 >> > #6 0x00005555555647c0 in main (argc=<optimized out>, argv=<optimized >> > out>) at gtags.c:576 >> >> >> >> -- >> Shigio YAMAGUCHI <[email protected]> >> PGP fingerprint: >> 26F6 31B4 3D62 4A92 7E6F 1C33 969C 3BE3 89DD A6EB -- Shigio YAMAGUCHI <[email protected]> PGP fingerprint: 26F6 31B4 3D62 4A92 7E6F 1C33 969C 3BE3 89DD A6EB
