Bug 271683 - devel/kommit: crashes whilst opening /usr/src
Summary: devel/kommit: crashes whilst opening /usr/src
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-kde (group)
URL:
Keywords: crash
Depends on:
Blocks:
 
Reported: 2023-05-27 18:40 UTC by Graham Perrin
Modified: 2024-05-02 03:55 UTC (History)
2 users (show)

See Also:
jhale: maintainer-feedback+


Attachments
Konsole output (333.43 KB, text/plain)
2023-05-27 18:44 UTC, Graham Perrin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Perrin freebsd_committer freebsd_triage 2023-05-27 18:40:59 UTC
I opened /usr/doc without error. Then pulled, fast forward only. 

With a subsequent attempt to open /usr/src the application crashed. 

% kommit
QKqueueFileSystemWatcherEngine::addPaths: open: No such file or directory
QProcess: Destroyed while process ("git") is still running.
QProcess: Destroyed while process ("git") is still running.
KCrash: Application 'kommit' crashing...
QSocketNotifier: Invalid socket 8 and type 'Read', disabling...
QSocketNotifier: Invalid socket 11 and type 'Read', disabling...
QSocketNotifier: Invalid socket 12 and type 'Read', disabling...
QSocketNotifier: Invalid socket 27 and type 'Read', disabling...
KCrash: Attempting to start /usr/local/lib/libexec/drkonqi
Unable to start Dr. Konqi
% pkg iinfo kommit
kommit-1.0.2
% uname -aKU
FreeBSD mowa219-gjp4-8570p-freebsd 14.0-CURRENT FreeBSD 14.0-CURRENT #41 main-n263189-c2c9ac88c2bb-dirty: Sat May 27 16:55:26 BST 2023     grahamperrin@mowa219-gjp4-8570p-freebsd:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG amd64 1400089 1400089
% Unable to find file for pid 35332 expected at "kcrash-metadata/35332.ini"

%
Comment 1 Graham Perrin freebsd_committer freebsd_triage 2023-05-27 18:44:06 UTC
Created attachment 242450 [details]
Konsole output

I aimed to reproduce the crash, symptoms were different. 

From the attached file (whilst using Plasma as grahamperrin, not as user bbsadmin-l): 

% kommit
QKqueueFileSystemWatcherEngine::addPaths: open: No such file or directory
kf.config.core: Created a KConfigGroup on an inaccessible config location "/usr/home/bbsadmin-l/.directory" "Desktop Entry"
kf.config.core: Created a KConfigGroup on an inaccessible config location "/usr/home/bbsadmin-l/.directory" "Desktop Entry"
kf.config.core: Created a KConfigGroup on an inaccessible config location "/usr/home/bbsadmin-l/.directory" "Desktop Entry"
kf.config.core: Created a KConfigGroup on an inaccessible config location "/usr/home/bbsadmin-l/.directory" "Desktop Entry"
QProcess: Destroyed while process ("git") is still running.
KCrash: Application 'kommit' crashing...
QSocketNotifier: Invalid socket 8 and type 'Read', disabling...
QSocketNotifier: Invalid socket 11 and type 'Read', disabling...
QSocketNotifier: Invalid socket 12 and type 'Read', disabling...
QSocketNotifier: Invalid socket 27 and type 'Read', disabling...
=== Crash on git process ===
====
ERROR:
====
 ""
====
OUTPUR:
====
…
Comment 2 Graham Perrin freebsd_committer freebsd_triage 2023-05-27 18:52:53 UTC
Third run, this time I aimed to open /usr/src first (instead of /usr/doc first). 

% kommit
QKqueueFileSystemWatcherEngine::addPaths: open: No such file or directory
kf.config.core: Created a KConfigGroup on an inaccessible config location "/usr/home/bbsadmin-l/.directory" "Desktop Entry"
kf.config.core: Created a KConfigGroup on an inaccessible config location "/usr/home/bbsadmin-l/.directory" "Desktop Entry"
kf.config.core: Created a KConfigGroup on an inaccessible config location "/usr/home/bbsadmin-l/.directory" "Desktop Entry"
kf.config.core: Created a KConfigGroup on an inaccessible config location "/usr/home/bbsadmin-l/.directory" "Desktop Entry"
QProcess: Destroyed while process ("git") is still running.
QProcess: Destroyed while process ("git") is still running.
KCrash: Application 'kommit' crashing...
QSocketNotifier: Invalid socket 8 and type 'Read', disabling...
QSocketNotifier: Invalid socket 11 and type 'Read', disabling...
QSocketNotifier: Invalid socket 12 and type 'Read', disabling...
QSocketNotifier: Invalid socket 27 and type 'Read', disabling...
KCrash: Attempting to start /usr/local/lib/libexec/drkonqi
Unable to start Dr. Konqi
% 

I'll test on 13.2-RELEASE. 

(An upstream bug, maybe? I wonder …)
Comment 3 Graham Perrin freebsd_committer freebsd_triage 2023-05-27 20:10:27 UTC
(In reply to Graham Perrin from comment #2)

> I'll test on 13.2-RELEASE. 

I used Kommit to clone releng/13.2 to /usr/src, then quit and reopened the app. 

A first attempt to open /usr/src resulted in a crash.
Comment 4 Jason E. Hale freebsd_committer freebsd_triage 2023-12-31 17:43:46 UTC
I've tried updating kommit to 1.3.1, which seems to run more efficiently and not crash with large codebases, but a new arguably worse issue has cropped up where all commit dates displayed are very close to the UXIX epoch i.e., every commit in the repositories I've tested were all made in the month of January 1970 with various dates and timestamps, which is clearly erroneous.

Version 1.0.2 doesn't seem to have this problem, however. Upstream switched to using libgit2 between releases and this new problem is probably related to that, but I haven't confirmed it. If I get some time, I'll try to bisect the code and see where things went awry.

There were no 1.1.x or 1.2.x releases tagged, BTW. 1.3.0 and 1.3.1 were tagged, but no tarballs for either have been made publicly available AFAICT. Just going off of what upstream git tells me. [1] Version 1.3.1 reports itself as 1.4.0, as well.

[1] https://invent.kde.org/sdk/kommit/-/tags
Comment 5 commit-hook freebsd_committer freebsd_triage 2024-01-04 18:01:11 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b1951d0cb332f8494ab94ff5fa28c34dd4a55c18

commit b1951d0cb332f8494ab94ff5fa28c34dd4a55c18
Author:     Jason E. Hale <jhale@FreeBSD.org>
AuthorDate: 2024-01-02 18:39:15 +0000
Commit:     Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2024-01-04 18:00:58 +0000

    devel/kommit: Update to HEAD (1.3.1-20)

    Version 1.3.1 was tagged, but distfiles ever since 1.0.2 have not been
    created as of writing for unknown reasons, so fetch from the upstream
    git repo instead. There exists a rather nasty bug that disrupts the
    space-time continuum in the v1.3.1 tag, however, where displayed commit
    dates are off by a factor of 10^-3, displaying milliseconds instead of
    seconds elapsed since the UNIX epoch. This has since been fixed in [1],
    but a new tag that includes this commit has yet to be created, so I'm
    just going with the latest commit which seems to build and run fine.
    Most of the other commits after the v1.3.1 tag are bot-created to update
    documentation and the human-created ones appear to be entirely
    reasonable.

    The main purpose of this update is to try to mitigate crashes with large
    and long-historied codebases like the FreeBSD src tree as reported in
    [2]. Upstream has migrated to using devel/libgit2 since the previous
    version (1.0.2) which makes kommit load very large trees noticably faster
    (anecdotally, 8-9 seconds faster for the entire FreeBSD src tree on my 4
    year old laptop which is still rather slow at around 21 seconds,
    at least by modern expectations of instantaneous results, but a win is
    still a win).

    Plus it seems to be more stable in terms of closing cleanly on exit.
    For example, 1.0.2, likely unbeknownst to the user, would continue to
    consume roughly 4GB of RAM and happily burden 50% of a CPU core. It may
    have actually closed eventually, but after 5 minutes I got borded and
    terminated the process manually. I'm no longer seeing this behavior in
    1.3.1-20, however. The application now exits almost immediately once the
    tree has been loaded and either window close or choosing Quit from the
    file menu (Ctrl+Q) has been selected.

    [1] https://invent.kde.org/sdk/kommit/-/commit/6d0a0bb043de981c3b4d7fe54debe49ead541dbe

    PR:             271683 [2]
    Reported by:    grahamperrin [2]

 devel/kommit/Makefile  | 16 ++++++++++------
 devel/kommit/distinfo  |  6 +++---
 devel/kommit/pkg-plist | 14 +++++++++-----
 3 files changed, 22 insertions(+), 14 deletions(-)
Comment 6 Jason E. Hale freebsd_committer freebsd_triage 2024-01-04 18:04:03 UTC
Could you please try the latest version I just committed?
Comment 7 Jason E. Hale freebsd_committer freebsd_triage 2024-05-02 03:55:45 UTC
Closing due to receiving no further feedback from submitter after port was updated 4 months ago to address the issue.