Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Dec 2006 01:49:46 -0500
From:      Joe Marcus Clarke <marcus@marcuscom.com>
To:        Doug Barton <dougb@FreeBSD.org>
Cc:        freebsd-gnome@FreeBSD.org
Subject:   Re: firefox 2 crashing with any printing-related activity
Message-ID:  <1166165386.15580.2.camel@shumai.marcuscom.com>
In-Reply-To: <458239B5.8020103@FreeBSD.org>
References:  <4581C70F.10709@FreeBSD.org> <1166154994.40786.26.camel@shumai.marcuscom.com> <458239B5.8020103@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-ZOCth+w5K/5xzX6Dh9iD
Content-Type: multipart/mixed; boundary="=-qjCNrf4lr0AQ5vTSowPi"


--=-qjCNrf4lr0AQ5vTSowPi
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Thu, 2006-12-14 at 21:59 -0800, Doug Barton wrote:
> Joe Marcus Clarke wrote:
> > On Thu, 2006-12-14 at 13:50 -0800, Doug Barton wrote:
>=20
> >> Howdy,
> >>
> >> For some time now, I have been having a problem with firefox 2. If I
> >> do anything printing related (including just print preview) firefox
> >> Seg faults. It will send the print job to the printer first, then
> >> crash when the dialog closes. Here is the information you requested on
> >> http://www.freebsd.org/gnome/docs/bugging.html
> >>
> >> FreeBSD lap 7.0-CURRENT-1213 FreeBSD 7.0-CURRENT-1213 #0: Wed Dec 13
> >> 21:36:15 PST 2006 i386
> >>
> >> This is an Intel Core 2 Duo system running i386 SMP. I'm running with
> >> X11BASE=3D/usr/local/xorg in order to help with the fixing of the port=
s
> >> prior to the move.
> >>
> >> pkg_info, env output, and gdb log are here:
> >>
> >> http://people.freebsd.org/~dougb/env.out
> >> http://people.freebsd.org/~dougb/pkg_info.out
> >> http://people.freebsd.org/~dougb/gdb.log
> >=20
> > I can't reproduce.  This stack trace is also missing four pretty
> > critical frames.
>=20
> Are you talking about 11-14? Are those frames, or are those stack values?
>=20
> >> Ports are up to date as of this morning, base is up to date as of last
> >> night.
> >>
> >> I tried this with CUPS off, and building firefox completely without
> >> CUPS on the system at all, and the result is the same. I've also tried
> >> building without using ccache.
> >=20
> > This doesn't matter.  Have you tried _running_ Firefox without cups-bas=
e
> > on the system?=20
>=20
> Well, yeah. Sorry if I wasn't clear. I've built firefox with and
> without CUPS installed. On the last run I even moved the
> libprintbackend-cups.* files out of the way to make sure they weren't
> available, and verified that the only print option was
> Postscript/default when I ran it. I also tried downloading the
> package, and got the same result.
>=20
> > CUPS will (once again) be dloaded by Firefox if present.
> > I tried both with and without cups-base installed, and I still can't ge=
t
> > Firefox to crash. =20
>=20
> D'oh. Questions, are you using an SMP box, and are you using -current?
> Because I can make a UP kernel, and/or try the test on RELENG_6 on the
> same box if that'll help.
>=20
> > I say, "once again" because we have seen a similar CUPS-related crash i=
n
> > the past,
>=20
> I remember that, but it looks like this one is not CUPS' fault.
>=20
> > and it looks like my bandaid fix was broken over the years.
> > If it is the same problem that we saw before, removing cups-base during
> > runtime should prevent the crash.  If so, we can re-patch Firefox not t=
o
> > use libcups, and instead CUPS users can rely on the CUPS lpd commands t=
o
> > do their printing.  It won't be as pretty, but it will at least avoid a
> > crash (unless someone can finally track down what the conflict is
> > between CUPS and Firefox).
>=20
> Well, ugly + works > pretty + crashes. :)
>=20
> Thanks to Jeremy's suggestion I created a new firefox with the debug
> OPTION (duh, should have thought of that). I uploaded the following:
>=20
> With CUPS
> http://people.freebsd.org/~dougb/debug.log
> http://people.freebsd.org/~dougb/gdb2.log
>=20
> Without CUPS
> http://people.freebsd.org/~dougb/debug-no-cups.log
> http://people.freebsd.org/~dougb/gdb2-no-cups.log

I believe I have found the problem.  Firefox was double-freeing a font
face.  The attached patch should fix this.

Joe

--=20
PGP Key : http://www.marcuscom.com/pgp.asc

--=-qjCNrf4lr0AQ5vTSowPi
Content-Disposition: attachment; filename=patch-gfx_src_ps_nsFontMetricsPS.cpp
Content-Transfer-Encoding: base64
Content-Type: text/x-patch; name=patch-gfx_src_ps_nsFontMetricsPS.cpp;
	charset=ISO-8859-1

LS0tIGdmeC9zcmMvcHMvbnNGb250TWV0cmljc1BTLmNwcC5vcmlnCUZyaSBEZWMgMTUgMDE6NDI6
MjUgMjAwNg0KKysrIGdmeC9zcmMvcHMvbnNGb250TWV0cmljc1BTLmNwcAlGcmkgRGVjIDE1IDAx
OjQxOjIwIDIwMDYNCkBAIC0xMDM3LDggKzEwMzcsMTAgQEAgbnNGb250UFNYZnQ6OkluaXQobnNY
ZnRFbnRyeSogYUVudHJ5LA0KIA0KIG5zRm9udFBTWGZ0Ojp+bnNGb250UFNYZnQoKQ0KIHsNCi0g
IGlmIChtRW50cnktPm1GYWNlKSANCisgIGlmIChtRW50cnktPm1GYWNlKSB7DQogICAgIEZUX0Rv
bmVfRmFjZShtRW50cnktPm1GYWNlKTsNCisgICAgbUVudHJ5LT5tRmFjZSA9IG5zbnVsbDsNCisg
IH0NCiANCiAgIGlmIChGVF9Eb25lX0ZyZWVUeXBlKG1GcmVlVHlwZUxpYnJhcnkpKQ0KICAgICBy
ZXR1cm47DQpAQCAtMjMyNyw4ICsyMzI5LDEwIEBAIG5zWGZ0VHlwZTFHZW5lcmF0b3I6OkluaXQo
bnNYZnRFbnRyeSogYUUNCiANCiBuc1hmdFR5cGUxR2VuZXJhdG9yOjp+bnNYZnRUeXBlMUdlbmVy
YXRvcigpDQogew0KLSAgaWYgKG1FbnRyeS0+bUZhY2UpIA0KKyAgaWYgKG1FbnRyeS0+bUZhY2Up
IHsNCiAgICAgRlRfRG9uZV9GYWNlKG1FbnRyeS0+bUZhY2UpOw0KKyAgICBtRW50cnktPm1GYWNl
ID0gbnNudWxsOw0KKyAgfQ0KIA0KICAgaWYgKEZUX0RvbmVfRnJlZVR5cGUobUZyZWVUeXBlTGli
cmFyeSkpDQogICAgIHJldHVybjsNCg==


--=-qjCNrf4lr0AQ5vTSowPi--

--=-ZOCth+w5K/5xzX6Dh9iD
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (FreeBSD)

iD8DBQBFgkWKb2iPiv4Uz4cRAq0sAKCM4hF3duQ4STQyLn3fPt5tR2M1qgCdHSJt
3077X+ALRM6azgmyH8P8Emc=
=vAxN
-----END PGP SIGNATURE-----

--=-ZOCth+w5K/5xzX6Dh9iD--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1166165386.15580.2.camel>