Subject: bug#64200: Netsurf very frequently freezes when editing text (Harfbuzz issue?)

From: Csepp <[email-masked]>
Date: Thu, 22 Jun 2023 00:00:32 +0200

John Kehayias <[email-masked]> writes:

> Hi Josselin and Csepp,
>
> On Wed, Jun 21, 2023 at 11:08 AM, Josselin Poiret wrote:
>
>> Hi Csepp,
>>
>> Csepp <[email-masked]> writes:
>>
>>> Like the title says.  It never happens when just browsing, but happens
>>> very frequently (like a minute after starting to type) when editing
>>> text, at least on Brutaldon, but maybe on other sites too.
>>>
>>> I noticed that our Harfbuzz package is two entire major releases behind.
>>> Maybe there are bugfixes in the latest one that we could use?
>>>
>>> I tried building it but it froze up my laptop for some reason (rather
>>> strange, even if it runs out of memory it should just be killed by
>>> earlyoom) so I haven't attempted to test this theory yet.
>>>
>>> Is there any particular reason Harfbuzz wasn't covered by the last
>>> core-updates?  If it turns out to be a bug in it, what would be the best
>>> way to proceed?
>>
>> core-updates was lagging behind, and while merging you don't want to
>> introduce potential sources of issues.  This could maybe go into the
>> graphics updates along with mesa, if John thinks it's appropriate.
>>
>
> Likely that it was just overlooked, these things happen. Despite being
> two major releases behind, our version is less than a year old at
> least, so it wasn't completely forgotten :)
>
> I just tried a guix build harfbuzz --with-latest=harfbuzz and it
> worked, but I only built once and didn't try dependents. A quick look
> at the changelog shows mostly fixes and new API, doesn't look like
> anything immediately obvious as breaking, but this will affect ~9000
> packages.
>
> I do think this could be a more impactful change than the Mesa update
> but I say we put them all on a feature branch and see how the builds
> work out. If harfbuzz needs more work than it seems, we can just hold
> off on it and group it with the inevitable next Mesa update or some
> other related packages.
>
> How does that sound? I'll give it some days for comments on my
> previous message about a Mesa branch but the patches here are all
> trivial (so far...) so it would be nice to get builds started soon. My
> thoughts for Mesa were hopefully just a few days of checking builds
> and then merging, to keep it simple and straightforward. But we should
> group builds together rather than wasting resources.
>
> John
>
> PS: Csepp if you can reproduce the build failure and attach a log
> somewhere, that would be helpful. If newer harfbuzz is helpful but too
> drastic of a change everywhere, we could have a 'harfbuzz-next' to
> ease the transition.
>
> PPS: I'll bring this up elsewhere, but on a similar vein I noticed our
> freetype package is built without brotli support (anyone know why?).
> It is needed for the update to Godot 4. I'll raise the details on a
> forthcoming Godot patch.

So, I built Netsurf with --with-latest=harfbuzz, which also affected
GTK+ and a bunch of other packages along the way, and it worked on my
first attempt, just needed a stronger machine.
I copied over the resulting Netsurf to my laptop and have been using it
all day today, it seems to have shooed that bug away.
(Don't squash bugs, bugs are good for the ecosystem. They are only a
problem when they get inside your mainframe and cause a short. UwU)
BTW there was no log when it caused my system to hang.  I had to reboot
it with sysrq.  Probably a kernel bug?

So it looks like Harfbuzz can be updated without any problem.