Netsurf very frequently freezes when editing text (Harfbuzz issue?)

  • Open
  • quality assurance status badge
Details
3 participants
  • Josselin Poiret
  • John Kehayias
  • Csepp
Owner
unassigned
Submitted by
Csepp
Severity
normal
C
(address . bug-guix@gnu.org)
87a5wto7da.fsf@riseup.net
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?
J
J
Josselin Poiret wrote on 21 Jun 2023 11:08
(name . John Kehayias)(address . john.kehayias@protonmail.com)
87ilbh41xx.fsf@jpoiret.xyz
Hi Csepp,

Csepp <raingloom@riseup.net> writes:

Toggle quote (15 lines)
> 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.

Best,
--
Josselin Poiret
-----BEGIN PGP SIGNATURE-----

iQHDBAEBCgAuFiEEOSSM2EHGPMM23K8vUF5AuRYXGooFAmSSvioQHGRldkBqcG9p
cmV0Lnh5egAKCRBQXkC5Fhcaiqk6C/jySsOlbHcIH5Vj3GltfKrVICH0RhSlswO2
AWoE4Sb7VtK6dP2/dvK9KLBvubjiAtO38lofxSWNf6v1MIWRvkTcnOM656JplyFC
qLOzdNsHgx50HLSgF7pGHd19epTQYLJJ1lP2YS9EE04yCf4GzEuw1qsv1tJJS11e
WwpyrqKIa8ic/DYxlQ+VJat+rvvRAjJMv4C9suLQNxaYwniMPtN4k/KbRP6oZ8iO
yoz0gBel6z8utcQHTlPdQwUBwU58/GK7Rb25mdyIm2pPVzV8gnSyW/OMWLSdcb3l
FsdJalPMi44jbPnHasCQrQEBQbzkQffNPHD7rVGNIFVWZxMqJqPXLuwE9cxpzqB5
yU64xUjXi1AQQxMrNAbwdJsvhlCLYLKBGuBtxyC6quaHtEybHfTp3NDGkMYr2FGu
VibGwNQN5jkhMPcCqggr2Df4xQaxjxPQdtjeCEyWrNUQ0YspQxgiTAF64gGPefmS
jpdMLTn2SWnVYv0X5QjMSBFE86TKNA==
=E67I
-----END PGP SIGNATURE-----

J
J
John Kehayias wrote on 21 Jun 2023 16:46
(name . Josselin Poiret)(address . dev@jpoiret.xyz)
87o7l8g9fg.fsf@protonmail.com
Hi Josselin and Csepp,

On Wed, Jun 21, 2023 at 11:08 AM, Josselin Poiret wrote:

Toggle quote (24 lines)
> Hi Csepp,
>
> Csepp <raingloom@riseup.net> 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.
C
(name . John Kehayias)(address . john.kehayias@protonmail.com)
87mt0smpz4.fsf@riseup.net
John Kehayias <john.kehayias@protonmail.com> writes:

Toggle quote (63 lines)
> Hi Josselin and Csepp,
>
> On Wed, Jun 21, 2023 at 11:08 AM, Josselin Poiret wrote:
>
>> Hi Csepp,
>>
>> Csepp <raingloom@riseup.net> 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.
J
J
John Kehayias wrote on 22 Jun 2023 03:08
(name . Csepp)(address . raingloom@riseup.net)
87jzvwfgn3.fsf@protonmail.com
Dear Csepp,

On Thu, Jun 22, 2023 at 12:00 AM, Csepp wrote:

Toggle quote (13 lines)
>
> 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.

Great, that's good to hear and a nontrivial test too! I'll await
comments on this mesa+friends update branch and plan on including the
harfbuzz update there. Stay tuned...

John
C
(name . John Kehayias)(address . john.kehayias@protonmail.com)
87r0pz0xtp.fsf@riseup.net
John Kehayias <john.kehayias@protonmail.com> writes:

Toggle quote (23 lines)
> Dear Csepp,
>
> On Thu, Jun 22, 2023 at 12:00 AM, Csepp wrote:
>
>>
>> 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.
>
> Great, that's good to hear and a nontrivial test too! I'll await
> comments on this mesa+friends update branch and plan on including the
> harfbuzz update there. Stay tuned...
>
> John

Well, now the bug is back somehow??? I haven't updated anything since
then. Didn't change fonts either.
Still happens in a Harfbuzz call.
J
J
John Kehayias wrote on 29 Jun 2023 17:06
(name . Csepp)(address . raingloom@riseup.net)
871qhu8g0g.fsf@protonmail.com
On Mon, Jun 26, 2023 at 04:16 AM, Csepp wrote:

Toggle quote (28 lines)
> John Kehayias <john.kehayias@protonmail.com> writes:
>
>> Dear Csepp,
>>
>> On Thu, Jun 22, 2023 at 12:00 AM, Csepp wrote:
>>
>>> 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.
>>
>> Great, that's good to hear and a nontrivial test too! I'll await
>> comments on this mesa+friends update branch and plan on including the
>> harfbuzz update there. Stay tuned...
>>
>> John
>
> Well, now the bug is back somehow??? I haven't updated anything since
> then. Didn't change fonts either.
> Still happens in a Harfbuzz call.

Ah, sorry to hear that, that's annoying! I'll be making the mesa
branch today, but not sure if I'll include harfbuzz. I have another
font related big change, so maybe best to have a separate branch for
those. In either case, guess this doesn't help your bug, sorry!

John
?