Port-sparc64 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Firefox52 broken on NetBSD9.3 / pkgsrc-2022Q4



On Sun, Mar 12, 2023 at 5:53 PM David Brownlee <abs%absd.org@localhost> wrote:
>
> On Sun, 12 Mar 2023 at 13:30, Connor McLaughlan <cont6pro3%gmail.com@localhost> wrote:
> > So i did extensive testing by building complete pkgsrc release and on
> > top their firefox52 package to spot the release where it begins to
> > fail.
> > This is the result:
> >
> > 2022Q4 -> crashes
> > 2022Q3 -> untested
> > 2022Q2 -> untested
> > 2022Q1 -> crashes
> > 2021Q4 -> crashes
> > 2021Q3 -> working
> > 2021Q2 -> untested
> > 2021Q1 -> working
> > 2020Q4 -> working
> >
> > It seems the failure got introduced between 2021Q3 and 2021Q4.
> > But i cant really spot a difference between firefox52 pkgrevision 39
> > of 2021Q3 and pkgrevision 41 of 2021Q4.
> >
> > So i suspect the dependencies of firefox52 to possibly be the cause if
> > no one else has a better idea.
> > I will begin to downgrade the dependencies in 2021Q4 to those of
> > 2021Q3 and test if a certain change makes firefox52 working again.
>
> Good detective work!
>
> You should be able to test _some_ of the dependency combinations by
> mixing and matching binary packages from 2021Q3 & 2021Q4 (some will
> probably have an ABI change and Just Not Work - so will need building
> from source), but the mix & match of binary packages may be able to
> eliminate some combinations (and might even find the issue - stranger
> things have happened).
>
> Best of luck - looking forward to the next installment :)
>
> David

I found the problem!

It seems a certain thread of firefox52 is crashing without notice
leading to the error and I finally found the cause after replacing
almost the whole dependency tree it occurred to me that neither the
dependencies nor the firefox pkgversion might be the cause.
Searching through the pkgsrc-2021Q4 release notes i found that
hardening was elevated and more hardening was enabled exactly in this
release where the problems seems to have started.

Release notes tell:
" - PKGSRC_USE_MKPIE was enabled on some architectures.  Packages that
   provide static libraries to other packages should be rebuilt with
   MKPIE enabled.  Some packages may experience runtime errors on
   platforms like i386 - usually this is due to unsafe assembly code,
   which should be disabled when MKPIE is enabled.
 - PKGSRC_USE_SSP was bumped from "yes" to "strong".  This is not
   expected to have a noticable effect."

So i searched for how to disable those when experiencing runtime
errors and found this webpage:
https://www.netbsd.org/docs/pkgsrc/hardening.html#hardening.caveats.pie

I added all workarounds as told to mozilla-common.mk before .include
"../../mk/bsd.prefs.mk":
MKPIE_SUPPORTED= no
FORTIFY_SUPPORTED= no
RELRO_SUPPORTED= no
SSP_SUPPORTED= no

And after recompiling firefox52 it is working again!
I possibly overshot here..possibly only SSP and/or MKPIE need to be disabled.

So how to proceed from here? It seems not only firefox52 is affected
on sparc64, but also thunderbird52 and possibly other packages...

Regards,
Connor


Home | Main Index | Thread Index | Old Index