Re: segfault in incremental build mode with partial files
Shigio YAMAGUCHI <[email protected]> Tue, 30 Jul 2024 08:40:34 +0900
| Newsgroups | gmane.comp.gnu.global.bugs |
|---|---|
| Message-ID | <CADJmJYrMg4bPu5DXBHnzrwYw-FnHYLU5jCXj5VfGZ8h0At=afg@mail.gmail.com> |
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=E2=80=AFPM 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=E2=80=AFPM 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=E2=80=AFAM Scott Mcdermott <[email protected]= et> 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/s= cott/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/v= im/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=3Dt@entry=3D0x555555694920, key=3Dkey@entry=3D0x0, h=3Dh= @entry=3D0x55555588a630, index=3D0) at bt_delete.c:507 >> > 507 ip[0] =3D ip[1] < offset ? ip[1] + nbytes : ip= [1]; >> > (gdb) bt >> > #0 __bt_dleaf (t=3Dt@entry=3D0x555555694920, key=3Dkey@entry=3D0x0, h= =3Dh@entry=3D0x55555588a630, index=3D0) at bt_delete.c:507 >> > #1 0x0000555555609515 in __bt_delete (dbp=3D<optimized out>, key=3D<o= ptimized out>, flags=3D<optimized out>) at bt_delete.c:114 >> > #2 0x0000555555573356 in dbop_delete (dbop=3D<optimized out>, path=3D= path@entry=3D0x0) at dbop.c:506 >> > #3 0x0000555555578ce3 in gtags_delete (gtop=3D0x555555693660, deletes= et=3Ddeleteset@entry=3D0x55555565a090) at gtagsop.c:592 >> > #4 0x000055555556553f in updatetags (dbpath=3Ddbpath@entry=3D0x7fffff= ffc1f0 "/home/scott/var/vim/tags/home-scott-.vim", >> > root=3Droot@entry=3D0x7fffffffd1f0 "/home/scott/.vim", deleteset= =3Ddeleteset@entry=3D0x55555565a090, addlist=3Daddlist@entry=3D0x55555567e6= 80) at gtags.c:957 >> > #5 0x0000555555565aa1 in incremental (dbpath=3Ddbpath@entry=3D0x7ffff= fffc1f0 "/home/scott/var/vim/tags/home-scott-.vim", >> > root=3Droot@entry=3D0x7fffffffd1f0 "/home/scott/.vim") at gtags.c:= 808 >> > #6 0x00005555555647c0 in main (argc=3D<optimized out>, argv=3D<optimi= zed out>) at gtags.c:576 >> >> >> >> -- >> Shigio YAMAGUCHI <[email protected]> >> PGP fingerprint: >> 26F6 31B4 3D62 4A92 7E6F 1C33 969C 3BE3 89DD A6EB --=20 Shigio YAMAGUCHI <[email protected]> PGP fingerprint: 26F6 31B4 3D62 4A92 7E6F 1C33 969C 3BE3 89DD A6EB