bhyve ppt usage can cause severe RAM corruption [Was: Re: panic: Memory modified after free in zio_create, passthru in use]

Harry Schmalzbauer freebsd at omnilan.de
Wed Oct 11 19:37:18 UTC 2017


 Bezüglich Harry Schmalzbauer's Nachricht vom 11.06.2017 12:37 (localtime):
>  Bezüglich Harry Schmalzbauer's Nachricht vom 06.06.2017 14:03 (localtime):
>>  Hello,
>>
>> suddenly, I'm getting this error:
>> /lib/libc.so.7: Undefined symbol "xdr_accepted_reply"
>>
>> Very mysterious: It showed up on a running system, which worked
>> flawlessly for some hours. And that host has root-fs (/) mounted
>> readonly from a memorydisk. So to my understanding, it's completely
>> impossible that /lib/libc.so.7 is corrupted since last boot.
>>
>> I'm completely out of ideas what could cause this strange error during
>> "normal" operation.
>>
>> Normal operation in this case is serving as a bhyve test machine.
>> I first noticed that error after one guest - with passthru device
>> attached - was shut down.
>>
>> My suspicion is some undiscovered passthru interference... Since I
>> noticed one other _very_ strange passthru-effect:
>> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=215740
> Hello,
>
> this time I caught a panic with a debuging kernel under 11.1-BETA1,
> which again occured after shuting down a VM which had ppt in use:
>
…
> Please, can anybody of the xperts add a comment?

It turned out that it's a problem with PCIe cards which don't support
FLR or cards, which are not PCIe, even if they have FLR capabilitiy.

jhb@ helped me to diagnose this.

Unfortunately I once forgot to manually bring down the passthrough-nics
in question, which resulted in a completely destroyed ZFS pool.
That hurted, so I won't rely on manual intervention before shutting down
(I had to recreate the complete (system) pool).
Unfortunately my skills don't allow me to help fixing the root cause, so
I created a little rc(8) script, which should protect reliably.
Please see also https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222937

Since it's quite small overhead, I'll also attach it here (to be copied
to /etc/rc.d).

-harry

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pciptdetach
URL: <http://lists.freebsd.org/pipermail/freebsd-virtualization/attachments/20171011/7333d65c/attachment.ksh>


More information about the freebsd-virtualization mailing list