Re: SIGSEGV in lots of processes (head i386 @r237440)

看板FB_current作者時間13年前 (2012/06/23 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/4 (看更多)
--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/--
文章代碼(AID): #1FvBBV3c (FB_current)
文章代碼(AID): #1FvBBV3c (FB_current)