Date: Sun, 28 Feb 2010 22:20:46 +0100 From: Attilio Rao <attilio@freebsd.org> To: Andrew Brampton <brampton+freebsd@gmail.com> Cc: freebsd-current@freebsd.org Subject: Re: minidump fails on SMP machines Message-ID: <3bbf2fe11002281320l3bb91c1t6865666672565530@mail.gmail.com> In-Reply-To: <d41814901002281256q6d5eb6ecn38fd5489128e3750@mail.gmail.com> References: <d41814901002281256q6d5eb6ecn38fd5489128e3750@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
2010/2/28 Andrew Brampton <brampton+freebsd@gmail.com>: > Hello, > > When many interrupts are firing on my amd64 SMP machine, and a panic > occurs, dump will fail with the error "Attempt to write outside dump > device boundaries". This problem has been discussed before[1][2], and > I even filled a PR about it last year[3]. > > From what I understand the reason this occurs is because interrupts > are not disabled on all cores during the dump. There was even a TODO > comment about this in kern_shutdown.c > =C2=A0414 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* XXX This doesn't disable interrup= ts any more. =C2=A0Reconsider? */ > =C2=A0415 =C2=A0 =C2=A0 =C2=A0 =C2=A0splhigh(); > > However, looking at my FreeBSD 8.0 and HEAD source, these two lines > were removed by commit r196198 by attilio. Now that commit seems to > deal with disabling interrupts on other cores, but perhaps not > specifically to fix this bug. So my question is, should this dump bug > now be fixed? Or should the XXX comment been left in? Or is the dump > bug caused by something else? I would appreciate this problem being > fixed, as it causes me a lot of headaches when trying to debug my > kernel module :(. So, I didn't look in big detail to your problem, but specifically, spinlock_enter() just disable the interrupts on the machine it runs on. If you want to handle also the APs case you need to install an IPI or maybe you can do this with a rendezvous points. Said that, please also note that the place where spinlock_enter() is called now is too late wrt dumping -- I assume physical dump to happen far earlier than the spinlock_exit(). Thanks, Attilio --=20 Peace can only be achieved by understanding - A. Einstein
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3bbf2fe11002281320l3bb91c1t6865666672565530>