11.1-RELEASE virtualbox-ose panic: ncpus is 0 with non-zero map

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

11.1-RELEASE virtualbox-ose panic: ncpus is 0 with non-zero map

Craig Leres-3
I freebsd-upgrade'd one of my 10.3-RELEASE poudriere build servers to
11.1-RELEASE-p8 yesterday and have found that starting virtualbox
panic's the system with: ncpus is 0 with non-zero map

     virtualbox-ose-5.2.8_1         General-purpose full virtualizer for
x86 hardware
     virtualbox-ose-kmod-5.2.8_1    VirtualBox kernel module for FreeBSD

I have a custom kernel but the changes are minor (MAXCPU=64, PPS_SYNC,
DDB/GDB, etc.) It doesn't look like virtualbox-ose or
virtualbox-ose-kmod have changed very recently so I'm not sure how to
debug this. But I'm not 100% sure I ran virtual box with the current
version of the virtualbox-ose-kmod kernel modules loaded. The system has
a X5690 processor with 24 cores.

I've attached dmesg.boot

                Craig


_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"

dmesg.boot (17K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: 11.1-RELEASE virtualbox-ose panic: ncpus is 0 with non-zero map

Allan Jude-9
On 2018-04-04 17:13, Craig Leres wrote:

> I freebsd-upgrade'd one of my 10.3-RELEASE poudriere build servers to
> 11.1-RELEASE-p8 yesterday and have found that starting virtualbox
> panic's the system with: ncpus is 0 with non-zero map
>
>     virtualbox-ose-5.2.8_1         General-purpose full virtualizer for
> x86 hardware
>     virtualbox-ose-kmod-5.2.8_1    VirtualBox kernel module for FreeBSD
>
> I have a custom kernel but the changes are minor (MAXCPU=64, PPS_SYNC,
> DDB/GDB, etc.) It doesn't look like virtualbox-ose or
> virtualbox-ose-kmod have changed very recently so I'm not sure how to
> debug this. But I'm not 100% sure I ran virtual box with the current
> version of the virtualbox-ose-kmod kernel modules loaded. The system has
> a X5690 processor with 24 cores.
>
> I've attached dmesg.boot
>
>         Craig
>
>
>
> _______________________________________________
> [hidden email] mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "[hidden email]"
>
So are you loading the virtualbox module from 10.3 into an 11.1 kernel?

You'll need to rebuild the virtualbox-ose-kmod port to match the kernel
you are running.

--
Allan Jude


signature.asc (851 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: 11.1-RELEASE virtualbox-ose panic: ncpus is 0 with non-zero map

Craig Leres-3
On 04/04/18 15:33, Allan Jude wrote:
> So are you loading the virtualbox module from 10.3 into an 11.1 kernel?
>
> You'll need to rebuild the virtualbox-ose-kmod port to match the kernel
> you are runnin

As part of the upgrade I removed all packages (pkg delete -fya), after I
used enough pkg.freebsd.org packages to be able to run poudriere to
rebuild all of the packages I use. Then I reinstalled all packages from
my pkg server (pkg clean -ay ; pkg upgrade -yf ; pkg clean -ay).

I just verified that /boot/modules/vbox*.ko match the ones in the
package in
/public/FreeBSD:11:amd64/latest/All/virtualbox-ose-kmod-5.2.8_1.txz on
my server.

                Craig
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: 11.1-RELEASE virtualbox-ose panic: ncpus is 0 with non-zero map

Allan Jude-9
On 2018-04-04 18:42, Craig Leres wrote:

> On 04/04/18 15:33, Allan Jude wrote:
>> So are you loading the virtualbox module from 10.3 into an 11.1 kernel?
>>
>> You'll need to rebuild the virtualbox-ose-kmod port to match the kernel
>> you are runnin
>
> As part of the upgrade I removed all packages (pkg delete -fya), after I
> used enough pkg.freebsd.org packages to be able to run poudriere to
> rebuild all of the packages I use. Then I reinstalled all packages from
> my pkg server (pkg clean -ay ; pkg upgrade -yf ; pkg clean -ay).
>
> I just verified that /boot/modules/vbox*.ko match the ones in the
> package in
> /public/FreeBSD:11:amd64/latest/All/virtualbox-ose-kmod-5.2.8_1.txz on
> my server.
>
>         Craig
> _______________________________________________
> [hidden email] mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "[hidden email]"

The official packages are built for the GENERIC kernel, I think
specifically changing the MAXCPU will change the size of one of the
structs used by the module, causing this issue.

--
Allan Jude
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: 11.1-RELEASE virtualbox-ose panic: ncpus is 0 with non-zero map

Craig Leres-3
On 04/04/18 15:51, Allan Jude wrote:
> The official packages are built for the GENERIC kernel, I think
> specifically changing the MAXCPU will change the size of one of the
> structs used by the module, causing this issue.

I'm not so sure about that. I believe MAXCPU changes some data structure
sizes and allows for kernels that have up to that many cores. I don't
believe loadable drivers care what it is.

They system I built the virtualbox-ose-kmod package on was running the
same 64 MAXCPU kernel at the time (I built and booted the custom kernel
before building packages).

                Craig
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

RE: 11.1-RELEASE virtualbox-ose panic: ncpus is 0 with non-zero map

Cy Schubert-4
In reply to this post by Craig Leres-3
I had the same problem on -current last week. Rebuilding the vbox kld resolved the panic.

I also rebuilt the GUI for clean and healthy living.

---
Sent using a tiny phone keyboard.
Apologies for any typos and autocorrect.
Also, this old phone only supports top post. Apologies.

Cy Schubert
<[hidden email]> or <[hidden email]>
The need of the many outweighs the greed of the few.
---

-----Original Message-----
From: Allan Jude
Sent: 04/04/2018 16:52
To: [hidden email]
Subject: Re: 11.1-RELEASE virtualbox-ose panic: ncpus is 0 with non-zero map

On 2018-04-04 18:42, Craig Leres wrote:

> On 04/04/18 15:33, Allan Jude wrote:
>> So are you loading the virtualbox module from 10.3 into an 11.1 kernel?
>>
>> You'll need to rebuild the virtualbox-ose-kmod port to match the kernel
>> you are runnin
>
> As part of the upgrade I removed all packages (pkg delete -fya), after I
> used enough pkg.freebsd.org packages to be able to run poudriere to
> rebuild all of the packages I use. Then I reinstalled all packages from
> my pkg server (pkg clean -ay ; pkg upgrade -yf ; pkg clean -ay).
>
> I just verified that /boot/modules/vbox*.ko match the ones in the
> package in
> /public/FreeBSD:11:amd64/latest/All/virtualbox-ose-kmod-5.2.8_1.txz on
> my server.
>
>         Craig
> _______________________________________________
> [hidden email] mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "[hidden email]"

The official packages are built for the GENERIC kernel, I think
specifically changing the MAXCPU will change the size of one of the
structs used by the module, causing this issue.

--
Allan Jude
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: 11.1-RELEASE virtualbox-ose panic: ncpus is 0 with non-zero map

Craig Leres-3
On 04/04/18 16:19, Cy Schubert wrote:
> I had the same problem on -current last week. Rebuilding the vbox kld resolved the panic.
>
> I also rebuilt the GUI for clean and healthy living.

I rebuild all packages I use daily so I'll reinstall it once I catch up
with the p9 update. Thanks!

                Craig
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: 11.1-RELEASE virtualbox-ose panic: ncpus is 0 with non-zero map

Eugene Grosbein-10
In reply to this post by Craig Leres-3
05.04.2018 5:42, Craig Leres wrote:

> I just verified that /boot/modules/vbox*.ko match the ones in the package
> in /public/FreeBSD:11:amd64/latest/All/virtualbox-ose-kmod-5.2.8_1.txz on my server.

This is known problem that was raised multiple times in several mailing lists.

In short: you cannot use kernel modules from packages reliably, period.
You *must* use all kernel modules compiled using corresponding /usr/src tree,
this includes kernel modules from ports too.

Sometimes packaged modules may work, but there is no guarantee,
because packages are built using previous supported release from same branch
but kernel modules have to be built with exactly same release sources to match the kernel.





_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: 11.1-RELEASE virtualbox-ose panic: ncpus is 0 with non-zero map

Craig Leres-3
On 04/04/18 21:15, Eugene Grosbein wrote:
> 05.04.2018 5:42, Craig Leres wrote:
>
>> I just verified that /boot/modules/vbox*.ko match the ones in the package
>> in /public/FreeBSD:11:amd64/latest/All/virtualbox-ose-kmod-5.2.8_1.txz on my server.
>
> This is known problem that was raised multiple times in several mailing lists.

Thanks for that; once I went looking I found this PR:

     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219913

     Due to ABI difference (vboxdrv passes cpuset_t parameter (bitfield
     with CPU_SETSIZE -> MAXCPU bits) into smp_rendezvous_cpus())
     kernel panics with "ncpus is 0 with non-zero map" message.

Part of my normal FreeBSD upgrade process was to raise MAXCPU to 64. As
it turns out that is already the default for 10 and the default was
*raised* to 256 for 11.

So the solution is: don't mess with MAXCPU.

                Craig
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"