Date: Fri, 22 Jun 2012 18:22:16 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: David Wolfskill <david@catwhisker.org>, current@freebsd.org Subject: Re: SIGSEGV in lots of processes (head i386 @r237440) Message-ID: <20120622152216.GG2337@deviant.kiev.zoral.com.ua> In-Reply-To: <20120622141020.GF2337@deviant.kiev.zoral.com.ua> References: <20120622134959.GT1874@albert.catwhisker.org> <20120622141020.GF2337@deviant.kiev.zoral.com.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
--xNzB6LhEaj9ZrCy/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 22, 2012 at 05:10:20PM +0300, Konstantin Belousov wrote: > On Fri, Jun 22, 2012 at 06:49:59AM -0700, David Wolfskill wrote: > > Just updated my laptop's head slice from r237378 to r237440; while > > it did manage to get to multi-user mode, I was only able to login as > > root, and whenever I tried to do much of anything, the sell (csh) exited > > with a SIGSEGV. > >=20 > > I finally gave it a "3-fingered salute", [Ctl-Alt-Del], and init > > appeared to enter a non-terminating SIGSEGV loop. > >=20 > > My build machine is still building the kernel; assuming(!) I see similar > > behavior on that, I should be able to poke around a bit, as I have a > > serial console on it (though I'll be remote from it, as I'll be at > > work). > >=20 > > Anyway, I thought I'd mention this in case it might help someone. > >=20 > > The typescript from the "svn update" and the resulting build may be > > found at <http://www/~david/FreeBSD/head_r237440.txt>. > This is on i386, right ? >=20 > Can you boot single-user and just type date in the shell ? > Does it segfault ? >=20 > If yes, does setting sysctl kern.timecounter.fast_gettime to 0 fix > segfault from date(1) ? Ok, I probably can guess the cause. I suppose that 'date' does not segfaults. Please try the following (which I forgot to commit). Sorry. diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index f0546b0..30efecd 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -469,7 +469,8 @@ osendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) } =20 regs->tf_esp =3D (int)fp; - regs->tf_eip =3D PS_STRINGS - szosigcode; + regs->tf_eip =3D p->p_sysent->sv_sigcode_base + szsigcode - + szosigcode; regs->tf_eflags &=3D ~(PSL_T | PSL_D); regs->tf_cs =3D _ucodesel; regs->tf_ds =3D _udatasel; @@ -596,7 +597,8 @@ freebsd4_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset= _t *mask) } =20 regs->tf_esp =3D (int)sfp; - regs->tf_eip =3D PS_STRINGS - szfreebsd4_sigcode; + regs->tf_eip =3D p->p_sysent->sv_sigcode_base + szsigcode - + szfreebsd4_sigcode; regs->tf_eflags &=3D ~(PSL_T | PSL_D); regs->tf_cs =3D _ucodesel; regs->tf_ds =3D _udatasel; @@ -747,7 +749,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) } =20 regs->tf_esp =3D (int)sfp; - regs->tf_eip =3D PS_STRINGS - *(p->p_sysent->sv_szsigcode); + regs->tf_eip =3D p->p_sysent->sv_sigcode_base; regs->tf_eflags &=3D ~(PSL_T | PSL_D); regs->tf_cs =3D _ucodesel; regs->tf_ds =3D _udatasel; --xNzB6LhEaj9ZrCy/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/kjagACgkQC3+MBN1Mb4iPoACgs79U06M46XxkJkL3zHusChqA nkMAnRI1K/MX7mZK1t6ICamO43jWdeU1 =MZA6 -----END PGP SIGNATURE----- --xNzB6LhEaj9ZrCy/--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120622152216.GG2337>