Re: Build fails in libpcap with WITHOUT_INET6

2017-03-28 Thread Randy Westlund
On Tue, Mar 28, 2017 at 07:44:55PM +0300, Alex Deiter wrote:
> Hello,
> 
> Please apply patch from upstream:
> 
> https://github.com/the-tcpdump-group/libpcap/pull/541
> 
> Fix compilation if INET6 isn't defined.
> Addresses GitHub issue #541, but differently from the pull request (it
> defines gen_gateway() with a function prototype rather than using a
> pre-prototype-style definition).
> 
> https://github.com/the-tcpdump-group/libpcap/commit/470df104c6f55f6d6f390df7448d8eb65c7642b9#diff-021c0dd9e9ed7100b9e31d8d95c930f2
> 
> Thank you!
> 
> Alex Deiter
> alex.dei...@gmail.com

That works, thanks.


signature.asc
Description: PGP signature


Build fails in libpcap with WITHOUT_INET6

2017-03-28 Thread Randy Westlund
Building r315872 for the Tegra (arm/armv6) board with WITHOUT_INET6 set fails
in libpcap:

> --- klm_prot_xdr.pico ---
> cc -target armv6-gnueabihf-freebsd12.0 --sysroot=/usr/home/randy/tegra/freebs
> d-obj/arm.armv6/usr/home/randy/tegra/freebsd/tmp -B/usr/home/randy/tegra/free
> bsd-obj/arm.armv6/usr/home/randy/tegra/freebsd/tmp/usr/bin -fpic -DPIC -g -O
> -pipe   -DYP -I/usr/home/randy/tegra/freebsd-obj/arm.armv6/usr/home/randy/teg
> ra/freebsd/tmp/usr/include/rpcsvc -MD  -MF.depend.klm_prot_xdr.pico -MTklm_pr
> ot_xdr.pico -std=gnu99 -Wsystem-headers -Werror -Wno-pointer-sign -Wno-empty-
> body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compar
> e -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-
> conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switc
> h -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses  -Qunused-arg
> uments  -c klm_prot_xdr.c -o klm_prot_xdr.pico
> --- all_subdir_lib/libpcap ---
> /usr/home/randy/tegra/freebsd/contrib/libpcap/gencode.c:695:9: error: no memb
> er named 'ai' in 'struct _compiler_state'
> cstate.ai = NULL;
> ~~ ^
> --- all_subdir_lib/librpcsvc ---
> --- mount_xdr.pico ---
> cc -target armv6-gnueabihf-freebsd12.0 --sysroot=/usr/home/randy/tegra/freebs
> d-obj/arm.armv6/usr/home/randy/tegra/freebsd/tmp -B/usr/home/randy/tegra/free
> bsd-obj/arm.armv6/usr/home/randy/tegra/freebsd/tmp/usr/bin -fpic -DPIC -g -O
> -pipe   -DYP -I/usr/home/randy/tegra/freebsd-obj/arm.armv6/usr/home/randy/teg
> ra/freebsd/tmp/usr/include/rpcsvc -MD  -MF.depend.mount_xdr.pico -MTmount_xdr
> .pico -std=gnu99 -Wsystem-headers -Werror -Wno-pointer-sign -Wno-empty-body -
> Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno
> -unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conver
> sion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno
> -switch-enum -Wno-knr-promoted-parameter -Wno-parentheses  -Qunused-arguments
>   -c mount_xdr.c -o mount_xdr.pico
> --- all_subdir_lib/libpcap ---
> /usr/home/randy/tegra/freebsd/contrib/libpcap/gencode.c:4916:13: error: use o
> f undeclared identifier 'cstate'
> bpf_error(cstate, "direction applied to 'gateway'");
>   ^
> /usr/home/randy/tegra/freebsd/contrib/libpcap/gencode.c:4923:11: error: use o
> f undeclared identifier 'cstate'
> switch (cstate->linktype) {
> ^
> /usr/home/randy/tegra/freebsd/contrib/libpcap/gencode.c:4961:17: error: use o
> f undeclared identifier 'cstate'
> b1 = gen_host(cstate, **alist++, 0x, proto, Q_OR, Q_H
> OST);
>   ^
> /usr/home/randy/tegra/freebsd/contrib/libpcap/gencode.c:4963:19: error: use o
> f undeclared identifier 'cstate'
> tmp = gen_host(cstate, **alist++, 0x, proto,
> Q_OR,
>^
> /usr/home/randy/tegra/freebsd/contrib/libpcap/gencode.c:4972:12: error: use o
> f undeclared identifier 'cstate'
> bpf_error(cstate, "illegal modifier of 'gateway'");
>   ^
> 6 errors generated.
> *** [gencode.o] Error code 1
> 
> make[5]: stopped in /usr/home/randy/tegra/freebsd/lib/libpcap
> 1 error
> 
> make[5]: stopped in /usr/home/randy/tegra/freebsd/lib/libpcap
> *** [all_subdir_lib/libpcap] Error code 2




signature.asc
Description: PGP signature


Re: WITH_INSTALL_AS_USER broken?

2016-08-24 Thread Randy Westlund
On Wed, Aug 24, 2016 at 04:48:54PM +, Brooks Davis wrote:
> WITH_INSTALL_AS_USER never worked except in select individual directories.
> Anything complicated caused it to break and it definitely never worked
> for installworld.  For installworld you want NO_ROOT.
> 
> NO_ROOT support should be migrated to share/mk/* rather than overriding
> things in Makefile.inc1 and WITH_INSTALL_AS_USER should be removed or
> made into a synonym for NO_ROOT.
> 
> -- Brooks

Defining NO_ROOT in src.conf worked, thanks.  Although it doesn't seem
to be documented in src.conf(5) or anywhere else I can find.




signature.asc
Description: PGP signature


WITH_INSTALL_AS_USER broken?

2016-08-24 Thread Randy Westlund
Is WITH_INSTALL_AS_USER supposed to work, or is it known to be broken?

I'm cross compiling -current (r304727) for arm, and trying to install world as
a user.  Install is trying to set the schg file flag on some libraries, which
is failing because I'm not root.

> --
> >>> Installing everything
> --
> cd /usr/home/randy/tegra/freebsd; make -f Makefile.inc1 install
> ===> lib (install)
> ===> lib/csu (install)
> ===> lib/csu/arm (install)
> install  -o randy -g 1001  -m 444 crt1.o crti.o crtn.o Scrt1.o gcrt1.o 
> /usr/home/randy/tegra/freebsd-root/usr/lib/
> ===> lib/libc (install)
> install  -C -o randy -g 1001 -m 444   libc.a 
> /usr/home/randy/tegra/freebsd-root/usr/lib/
> install  -C -o randy -g 1001 -m 444   libc_p.a 
> /usr/home/randy/tegra/freebsd-root/usr/lib/
> install  -s -o randy -g 1001 -m 444   -fschg -S  libc.so.7 
> /usr/home/randy/tegra/freebsd-root/lib/
> install: /usr/home/randy/tegra/freebsd-root/lib/libc.so.7: chflags: Operation 
> not permitted
> *** Error code 71
> 
> Stop.
> make[5]: stopped in /usr/home/randy/tegra/freebsd/lib/libc
> *** Error code 1


signature.asc
Description: PGP signature


Re: FreeBSD 11.0 RC1 kernel panic with iwm firmware

2016-08-23 Thread Randy Westlund
On Tue, Aug 23, 2016 at 08:26:13PM +0300, Tommi Pernila wrote:
> How to remove these kernel modules from a Geli encrypted harddisk?
> 
> Or what other method should be used to correct the situation?
> 
> I can re-install the machine, just trying to learn new tricks.
> 
> Br,
> 
> Tommi

I've had a similar situation in the past.  Here's what I remember doing:

Escape to the loader prompt during boot, then use 'unload' to prevent it
from loading those modules and 'boot -s' to bring the system up in
single-user mode so you can edit loader.conf.


signature.asc
Description: PGP signature


Re: CURRENT: [USB] : GEOM_PART: da4 was automatically resized.

2016-08-01 Thread Randy Westlund
On Mon, Aug 01, 2016 at 11:05:54AM +0200, O. Hartmann wrote:
> On every(!) USB drive which worked well with 11-CURRENT up to 11-BETA, I fail
> to access with 12-CURRENT (12.0-CURRENT FreeBSD 12.0-CURRENT #14 r303475: Fri
> Jul 29 11:59:11 CEST 2016) with the error shown below.
> 
> On USB flash drives I created myself, the suggested gpart command solved the
> problem, but I can not do this with drives I was given by a vendor or 
> supplier.
> 
> What is wrong?
> 
> Kind regards and thank you very much in advance,
> 
> O. Hartmann
> 
> 
> On console, I get the report:
> 
> [...]
> GEOM_PART: da4 was automatically resized.
>   Use `gpart commit da4` to save changes or `gpart undo da4` to revert them.

I noticed something similar when I was trying to dd a more recent
memstick installer to a USB drive on 12-CURRENT.  When I plugged in the
flash drive I couldn't dd to it until I noticed that message in syslog
and ran 'gpart undo da0'.  Looks like something is unhelpfully
auto-resizing partitions.


signature.asc
Description: PGP signature


Re: bhyve with lagg failover doesn't work on wifi

2016-07-29 Thread Randy Westlund
On Fri, Jul 29, 2016 at 01:06:52PM -0600, John Nielsen wrote:
> Generally speaking, you can't bridge the station side of a wireless link. The 
> access point will only accept frames with the station's MAC address. So what 
> you are seeing is expected, unfortunately.
> 
> Your best bet is probably to do NAT. Take lagg0 out of the bridge and use it 
> as your "public" interface. Assign a local IP to the bridge. Run a DHCP 
> server on your host (or in another VM on the bridge if you like) or just use 
> static internal IPs on your VMs. Enable IP forwarding (gateway_enable=yes in 
> rc.conf). Configure your firewall to NAT your private range out lagg0.
> 
> You can do other things with tunneling, etc. but you'll need a remote 
> endpoint for the tunnel. (If your access point runs FreeBSD you can use 
> either vxlan or gif+EtherIP and just use the wireless link to carry the 
> tunnel traffic, but I suspect that you want to roam between arbitrary access 
> points.)

Thanks for the explanation, that makes perfect sense.  I hadn't
considered the implications of a layer 2 bridge to a wireless link.


signature.asc
Description: PGP signature


bhyve with lagg failover doesn't work on wifi

2016-07-28 Thread Randy Westlund
I'm using bhyve on 11.0-BETA2, bridging tap0 to lagg0, a failover
between wifi and ethernet.  The bhyve VM's networking only works I'm
using ethernet.

> # Lagg config.
> ifconfig_em0="up"
> create_args_wlan0="wlanaddr 3c:97:0e:46:70:ca"
> wlans_iwn0="wlan0"
> ifconfig_wlan0="WPA"
> cloned_interfaces="lagg0 bridge0 tap0"
> ifconfig_lagg0="laggproto failover laggport em0 laggport wlan0 DHCP"
> # tap0 and bridge0 are for bhyve.
> ifconfig_bridge0="addm lagg0 addm tap0"

With the ethernet cable connected, the VM's networking works.  But when
I remove the ethernet cable and lagg0 fails over to wifi, the VM can no
longer use the network.

I can use tcpdump to see the DHCP packets going along this path:
vtnet0 -> tap0 -> bridge0 -> lagg0 -> wlan0

The DHCP requests appear on wlan0.  But the router never sees them.

Here's the ifconfig output when wlan0 is active:

> em0: flags=8943 metric 0 mtu 
> 1500
> 
> options=4219b
> ether 3c:97:0e:46:70:ca
> nd6 options=29
> media: Ethernet autoselect
> status: no carrier
> lo0: flags=8049 metric 0 mtu 16384
> options=63
> inet6 ::1 prefixlen 128
> inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
> inet 127.0.0.1 netmask 0xff00
> nd6 options=21
> groups: lo
> wlan0: flags=8943 metric 0 
> mtu 1500
> ether 3c:97:0e:46:70:ca
> nd6 options=29
> media: IEEE 802.11 Wireless Ethernet MCS mode 11ng
> status: associated
> ssid neural_network channel 1 (2412 MHz 11g ht/40+) bssid 
> c4:04:15:90:f5:fd
> regdomain FCC country US authmode WPA2/802.11i privacy ON
> deftxkey UNDEF AES-CCM 2:128-bit AES-CCM 3:128-bit txpower 30 bmiss 10
> scanvalid 60 protmode CTS ampdulimit 64k ampdudensity 8
> -amsdutx amsdurx shortgi -stbc wme roaming MANUAL
> groups: wlan
> lagg0: flags=8943 metric 0 
> mtu 1500
> ether 3c:97:0e:46:70:ca
> inet 192.168.1.17 netmask 0xff00 broadcast 192.168.1.255
> nd6 options=29
> media: Ethernet autoselect
> status: active
> groups: lagg
> laggproto failover lagghash l2,l3,l4
> laggport: em0 flags=1
> laggport: wlan0 flags=4
> bridge0: flags=8843 metric 0 mtu 1500
> ether 02:4a:6b:6e:fc:00
> nd6 options=9
> groups: bridge
> id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
> maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
> root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
> member: tap0 flags=143
> ifmaxaddr 0 port 6 priority 128 path cost 200
> member: lagg0 flags=143
> ifmaxaddr 0 port 4 priority 128 path cost 55
> tap0: flags=8943 metric 0 mtu 
> 1500
> options=8
> ether 00:bd:ea:f0:f6:00
> nd6 options=29
> media: Ethernet autoselect
> status: active
> groups: tap
> Opened by PID 1322



signature.asc
Description: PGP signature


Re: wpa_supplicant doesn't work with lagg

2016-07-28 Thread Randy Westlund
On Fri, Jul 29, 2016 at 12:02:56AM +0200, Ronald Klop wrote:
> I had the same problem a while ago.
> For some reason you need to use this construction to set the MAC now.
> 
> create_args_wlan0="wlanaddr 00:26:b9:12:34:56 country NL"
> 
> I don't know why this changed.

Thanks, that works.  I've filed a PR to update the handbook:

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


signature.asc
Description: PGP signature


Re: Boot environments and zfs canmount=noauto

2016-07-28 Thread Randy Westlund
On Thu, Jul 28, 2016 at 01:34:03PM +0300, Andriy Gapon wrote:
> Locally I have the following rc script to handle subordinate datasets of
> a boot environment: http://dpaste.com/0Q0JPGN.txt
> It is designed for exactly the scenario described above.
> The script is automatically enabled when zfs_enable is enabled.
> 
> It would probably make sense to include the script into the OS after
> some testing and a review.

Awesome, thanks.  I'll play with this over the weekend.

Maybe someday we'll be able to set something like canmount=with-parent,
which could be like noauto, except that it would mount when its parent
mounts.


signature.asc
Description: PGP signature


wpa_supplicant doesn't work with lagg

2016-07-28 Thread Randy Westlund
I'm having trouble using the lagg driver with wpa_supplicant.  When I
boot with this standard configuration, my wifi works fine:

> # Normal config.
> wlans_iwn0="wlan0"
> ifconfig_wlan0="WPA DHCP"
> ifconfig_em0="DHCP"

But when I boot with a lagg configuration, wpa_supplicant can't connect.

> # Lagg config.
> ifconfig_em0="up"
> ifconfig_iwn0="ether 3c:97:0e:46:70:ca"
> wlans_iwn0="wlan0"
> ifconfig_wlan0="WPA"
> cloned_interfaces="lagg0"
> ifconfig_lagg0="laggproto failover laggport em0 laggport wlan0 DHCP"

The system spends a full 5 minutes during boot trying to send DHCP
requests before finally giving up.  After boot, ifconfig shows that
wlan0 has the right ssid, but the status is 'no carrier':

> wlan0: flags=8843 metric 0 mtu 1500
> ether 3c:97:0e:46:70:ca
> nd6 options=29
> media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
> status: no carrier
> ssid neural_network channel 1 (2412 MHz 11g ht/40+)
> regdomain FCC country US authmode WPA1+WPA2/802.11i privacy ON
> deftxkey UNDEF txpower 30 bmiss 10 scanvalid 60 protmode CTS
> ampdulimit 8k -amsdutx amsdurx shortgi -stbc wme roaming MANUAL
> groups: wlan

If I then manually kill wpa_supplicant and restart it with the same
command, it works fine.

> /usr/sbin/wpa_supplicant -s -B -i wlan0 -c /etc/wpa_supplicant.conf -D bsd -P 
> /var/run/wpa_supplicant/wlan0.pid

> wlan0: flags=8843 metric 0 mtu 1500
> ether 3c:97:0e:46:70:ca
> nd6 options=29
> media: IEEE 802.11 Wireless Ethernet MCS mode 11ng
> status: associated
> ssid neural_network channel 1 (2412 MHz 11g ht/40+) bssid 
> c4:04:15:90:f5:fd
> regdomain FCC country US authmode WPA2/802.11i privacy ON
> deftxkey UNDEF AES-CCM 2:128-bit txpower 30 bmiss 10 scanvalid 60
> protmode CTS ampdulimit 64k ampdudensity 8 -amsdutx amsdurx shortgi
> -stbc wme roaming MANUAL
> groups: wlan

/var/log/messages shows:

> Jul 28 15:22:09 mako kernel: wlan0: link state changed to DOWN
> Jul 28 15:22:09 mako kernel: lagg0: link state changed to DOWN
> Jul 28 15:22:09 mako kernel: wlan0: link state changed to UP
> Jul 28 15:22:09 mako kernel: lagg0: link state changed to UP
> Jul 28 15:22:09 mako kernel: wlan0: link state changed to DOWN
> Jul 28 15:22:09 mako kernel: lagg0: link state changed to DOWN
> Jul 28 15:22:09 mako kernel: wlan0: link state changed to UP
> Jul 28 15:22:09 mako kernel: lagg0: link state changed to UP
> Jul 28 15:22:09 mako kernel: wlan0: link state changed to DOWN
> Jul 28 15:22:09 mako kernel: lagg0: link state changed to DOWN
> Jul 28 15:22:09 mako kernel: wlan0: link state changed to UP
> Jul 28 15:22:09 mako kernel: lagg0: link state changed to UP
> Jul 28 15:22:09 mako kernel: wlan0: link state changed to DOWN
> Jul 28 15:22:09 mako kernel: lagg0: link state changed to DOWN
> [snip]
> Jul 28 15:22:23 mako wpa_supplicant[329]: wlan0: CTRL-EVENT-SSID-REENABLED 
> id=2 ssid="neural_network"
> Jul 28 15:22:23 mako wpa_supplicant[329]: wlan0: Trying to associate with 
> c4:04:15:90:f5:fd (SSID='neural_network' freq=2412 MHz)
> Jul 28 15:22:23 mako kernel: wlan0: link state changed to UP
> Jul 28 15:22:23 mako kernel: lagg0: link state changed to UP
> Jul 28 15:22:23 mako wpa_supplicant[329]: wlan0: Associated with 
> c4:04:15:90:f5:fd
> Jul 28 15:22:23 mako dhclient[533]: send_packet: No buffer space available
> Jul 28 15:22:27 mako dhclient[533]: send_packet: No buffer space available
> Jul 28 15:22:27 mako kernel: wlan0: link state changed to DOWN
> Jul 28 15:22:27 mako kernel: lagg0: link state changed to DOWN
> Jul 28 15:22:27 mako wpa_supplicant[329]: wlan0: CTRL-EVENT-DISCONNECTED 
> bssid=c4:04:15:90:f5:fd reason=0
> Jul 28 15:22:27 mako wpa_supplicant[329]: wlan0: 
> CTRL-EVENT-SSID-TEMP-DISABLED id=2 ssid="neural_network" auth_failures=7 
> duration=90 reason=CONN_FAILED
> Jul 28 15:22:28 mako login: ROOT LOGIN (root) ON ttyv0
> Jul 28 15:22:31 mako dhclient[533]: send_packet: Network is down
> Jul 28 15:23:06 mako last message repeated 4 times

This is my hardware:

> iwn0@pci0:3:0:0:class=0x028000 card=0x13118086 chip=0x00858086 
> rev=0x34 hdr=0x00
> vendor = 'Intel Corporation'
> device = 'Centrino Advanced-N 6205 [Taylor Peak]'
> class  = network


I know I had this working at one point on 10.2-RELEASE, but recently
I've tried both 11.0-BETA2 and 12-CURRENT and get this behavior.  Any
advice for debugging?


signature.asc
Description: PGP signature


Boot environments and zfs canmount=noauto

2016-07-27 Thread Randy Westlund
I'm trying to follow Michael Dexter's post about using bhyve with boot
environments.  It involves moving all child datasets under
zroot/ROOT/default, so that you can have entirely independent systems.

http://callfortesting.org/bhyve-boot-environments/

> Let's change the datasets with "canmount on" to "canmount noauto":
> [snip]
> Considering that this setting is harmless to a system with a single
> boot environment, I would not object to it being the default. Hint
> hint. 

When I set all the datasets with canmount=on to canmount=noauto, only
zroot/ROOT/default gets mounted on next boot.  It's my understanding
that 'zfs mount -a' doesn't mount datasets with canmount=noauto, but if
I leave them with canmount=on, they will try to mount regardless of
which BE is active.

I'm trying this with 11.0-BETA2.  Can sometime tell me what I'm missing?


signature.asc
Description: PGP signature


Re: Panic when loading vboxdrv module

2016-07-26 Thread Randy Westlund
On Tue, Jul 26, 2016 at 09:22:47AM -0700, John Baldwin wrote:
> On Monday, July 25, 2016 11:08:15 PM Randy Westlund wrote:
> > On Mon, Jul 25, 2016 at 07:43:32PM -0400, Jung-uk Kim wrote:
> > > Oops, I meant INVARIANTS.  Anyway, it should be fixed in r419083.  I
> > > understand you have a panic with aio(4) but that's a separate issue.
> > > 
> > > Jung-uk Kim
> > 
> > Should I create a new PR for virtualbox and aio, or is this already
> > known?
> 
> Please.  cc me on it since I've hacked on aio in 11/HEAD.
> 
> -- 
> John Baldwin

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


signature.asc
Description: PGP signature


Re: Panic when loading vboxdrv module

2016-07-25 Thread Randy Westlund
On Mon, Jul 25, 2016 at 07:43:32PM -0400, Jung-uk Kim wrote:
> Oops, I meant INVARIANTS.  Anyway, it should be fixed in r419083.  I
> understand you have a panic with aio(4) but that's a separate issue.
> 
> Jung-uk Kim

Should I create a new PR for virtualbox and aio, or is this already
known?


signature.asc
Description: PGP signature


Re: Panic when loading vboxdrv module

2016-07-25 Thread Randy Westlund
On Mon, Jul 25, 2016 at 04:09:58PM -0400, Jung-uk Kim wrote:
> If you feel adventurous, please drop the attached patch in
> *emulators/virtualbox-ose/files* directory, and rebuild
> *emulators/virtualbox-ose-kmod*.
> 
> JK
> 
> * Note the patch directory is emulators/virtualbox-ose/files, not
> emulators/virtualbox-ose-kmod/files.

> --- src/VBox/HostDrivers/Support/SUPDrvInternal.h.orig2016-07-18 
> 11:56:19 UTC
> +++ src/VBox/HostDrivers/Support/SUPDrvInternal.h
> @@ -235,7 +235,7 @@
>  # define SUPDRV_WITHOUT_MSR_PROBER
>  #endif
>  
> -#if 1
> +#if 0
>  /** @def SUPDRV_USE_TSC_DELTA_THREAD
>   * Use a dedicated kernel thread to service TSC-delta measurement requests.
>   * @todo Test on servers with many CPUs and sockets. */

With the patch, vboxdrv loads successfully.  But when I start a VM, I
get the following panic (after rebuilding virtualbox-ose as well):

> vboxdrv: 82973020 VMMR0.r0
> vboxdrv: 82a92020 VBoxDDR0.r0
> vboxdrv: 82aaf020 VBoxDD2R0.r0
> panic: _mtx_lock_sleep: recursed on non-recursive mutex aiomtx @ 
> /usr/src/sys/kern/vfs_aio.c:996
> 
> cpuid = 1
> KBD: stack backtrace:
> db_trace_wrapper() at db_trace_wrapper+0x2b
> vpanic() at vpanic+0x182
> kassert_panic() at kassert_panic+0x126
> __mtx_lock_sleep() at __mtx_lock_sleep+0x228
> __mtx_lock_flags() at __mtx_lock_flags+0x10d
> aio_queue() at aio_queue+0x9d6
> amd64_syscall() at amd64_syscall+0x2db
> Xfast_syscall() at Xfast_syscall+0xfb
> --- syscall (465, FreeBSD ELF64, sys_aio_fsync), rip = 0x80119fa0a, rsp = 
> 0x7fffdf2abc98, rbp = 0x7fffdf2abcd0 ---
> KDB: enter: panic
> [ thread pid 14588 tid 101813 ]
> Stopped at  kdb_enter+0x3b: movq$0,kdb_why





signature.asc
Description: PGP signature


Panic when loading vboxdrv module

2016-07-25 Thread Randy Westlund
I'm running 12-CURRENT r303286 and virtualbox-ose-kmod-5.0.26.  I just
rebuilt the module, so I know they're in sync.  When I boot with
vboxdrv_load="YES" in /etc/loader.conf, I get this panic during boot:

> panic: mutex Giant owned at /usr/src/sys/kern/kern_sync.c:406
> cpuid = 0
> KDB: stack backtrace:
> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b
> vpanic() at vpanic+0x182
> panic() at panic+0x43
> __mtx_assert() at __mtx_assert+0xd1
> mi_switch() at mi_switch+0x7b
> sleepq_switch() at sleepq_switch+0x7e
> sleepq_timedwait() at sleepq_timedwait+0x43
> rtR0SemEventWait() at rtR0SemEventWait+0x267
> supdrvGipCreate() at supdrvGipCreate+0x7f6
> supdrvInitDexExt() at supdrvInitDexExt+0x18f
> VBoxDrvFreeBSDModuleEvent() at VBoxDrvFreeBSDModuleEvent+0x49
> module_register_init() at module_register_init+0xb0
> mi_startup() at mi_startup+0x118
> btext() at btext+0x2c
> KDB: enter: panic
> [ thread pid 0 tid 10 ]
> Stopped at  kdb_enter+0x3b: movq$0,kdb_why

I'm not sure whether this is a problem with the base system or the port,
but this happens every time I boot with the module enabled.


signature.asc
Description: PGP signature


Re: Port lang/gcc build fails on current

2016-06-07 Thread Randy Westlund
On Tue, Jun 07, 2016 at 06:05:11PM +1000, Graham Menhennitt wrote:
> Sorry, not sure what happened to the formatting there...
> 
> Try
> "LC_COLLATE="C" make
> 
> See e.g. https://forums.freebsd.org/threads/54172/
> 
> Graham

That did it; I can build lang/gcc now.  That thread is from Nov 2015.
Is collation broken for non-C locales, or did I make a mistake during an
update?  I'm using en_US.UTF-8.


signature.asc
Description: PGP signature


Port lang/gcc build fails on current

2016-06-06 Thread Randy Westlund
I can't build lang/gcc on current, but it works fine on 10.3.  I'm
running r301482 after a full rebuild and nothing in /etc/make.conf.  Any
ideas?

> c++ -c   -O2 -pipe -DLIBICONV_PLUG -fno-strict-aliasing  -DLIBICONV_PLUG 
> -DIN_GCC   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall 
> -Wno-narrowing -Wwrite-strings -Wcast-qual -Wm
> issing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros 
> -Wno-overlength-strings   -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild 
> -I/usr/ports/lang/gcc/work/gcc-4.8.5/gcc -I/usr/ports
> /lang/gcc/work/gcc-4.8.5/gcc/build 
> -I/usr/ports/lang/gcc/work/gcc-4.8.5/gcc/../include  
> -I/usr/ports/lang/gcc/work/gcc-4.8.5/gcc/../libcpp/include -DLIBICONV_PLUG \
> -o build/gencheck.o /usr/ports/lang/gcc/work/gcc-4.8.5/gcc/gencheck.c
> c++: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is 
> deprecated
> /bin/sh /usr/ports/lang/gcc/work/gcc-4.8.5/gcc/../move-if-change 
> tmp-gtype.state gtype.state
> build/gengtype  \
> -r gtype.state
> In file included from /usr/ports/lang/gcc/work/gcc-4.8.5/gcc/gencheck.c:23:
> In file included from ./tm.h:16:
> ./options.h:4293:3: error: redefinition of enumerator 'OPT_C'
>   OPT_C = 129,   /* -C */
>   ^
> ./options.h:4290:3: note: previous definition is here
>   OPT_C = 126,   /* -C */
>   ^
> ./options.h:4301:3: error: redefinition of enumerator 'OPT_d'
>   OPT_d = 137,   /* -d */
>   ^
> ./options.h:4299:3: note: previous definition is here
>   OPT_d = 135,   /* -d */
>   ^

[snip several more like it]

> ./options.h:5183:3: error: redefinition of enumerator 'OPT_v'
>   OPT_v = 1019,  /* -v */
>   ^
> ./options.h:5181:3: note: previous definition is here
>   OPT_v = 1017,  /* -v */
>   ^
> fatal error: too many errors emitted, stopping now [-ferror-limit=]
> 20 errors generated.
> Makefile:3840: recipe for target 'build/gencheck.o' failed
> gmake[4]: *** [build/gencheck.o] Error 1
> gmake[4]: *** Waiting for unfinished jobs
> echo timestamp > s-gtype
> /usr/ports/lang/gcc/work/gcc-4.8.5/gcc/doc/passes.texi:7: warning: node next 
> `Passes' in menu `GENERIC' and in sectioning `RTL' differ
> /usr/ports/lang/gcc/work/gcc-4.8.5/gcc/doc/rtl.texi:5: warning: node next 
> `RTL' in menu `Control Flow' and in sectioning `GENERIC' differ
> /usr/ports/lang/gcc/work/gcc-4.8.5/gcc/doc/rtl.texi:5: warning: node prev 
> `RTL' in menu `Tree SSA' and in sectioning `Passes' differ
> /usr/ports/lang/gcc/work/gcc-4.8.5/gcc/doc/generic.texi:9: warning: node prev 
> `GENERIC' in menu `Passes' and in sectioning `RTL' differ
> /usr/ports/lang/gcc/work/gcc-4.8.5/gcc/doc/tree-ssa.texi:9: warning: node 
> next `Tree SSA' in menu `RTL' and in sectioning `Loop Analysis and 
> Representation' differ
> /usr/ports/lang/gcc/work/gcc-4.8.5/gcc/doc/loop.texi:10: warning: node next 
> `Loop Analysis and Representation' in menu `Machine Desc' and in sectioning 
> `Control Flow' differ
> /usr/ports/lang/gcc/work/gcc-4.8.5/gcc/doc/loop.texi:10: warning: node prev 
> `Loop Analysis and Representation' in menu `Control Flow' and in sectioning 
> `Tree SSA' differ
> /usr/ports/lang/gcc/work/gcc-4.8.5/gcc/doc/cfg.texi:10: warning: node next 
> `Control Flow' in menu `Loop Analysis and Representation' and in sectioning 
> `Machine Desc' differ
> /usr/ports/lang/gcc/work/gcc-4.8.5/gcc/doc/cfg.texi:10: warning: node prev 
> `Control Flow' in menu `RTL' and in sectioning `Loop Analysis and 
> Representation' differ
> /usr/ports/lang/gcc/work/gcc-4.8.5/gcc/doc/md.texi:6: warning: node prev 
> `Machine Desc' in menu `Loop Analysis and Representation' and in sectioning 
> `Control Flow' differ
> rm cpp.pod gfortran.pod gcc.pod
> gmake[4]: Leaving directory '/usr/ports/lang/gcc/work/.build/gcc'
> Makefile:3908: recipe for target 'all-gcc' failed
> gmake[3]: *** [all-gcc] Error 2
> gmake[3]: Leaving directory '/usr/ports/lang/gcc/work/.build'
> Makefile:856: recipe for target 'all' failed
> gmake[2]: *** [all] Error 2
> gmake[2]: Leaving directory '/usr/ports/lang/gcc/work/.build'
> ===> Compilation failed unexpectedly.
> Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
> the maintainer.
> *** Error code 1
> Stop.
> make[1]: stopped in /usr/ports/lang/gcc
> *** Error code 1
> Stop.
> make: stopped in /usr/ports/lang/gcc


signature.asc
Description: PGP signature


Re: VirtualBox network connectivity broken on recent -CURRENT

2016-06-04 Thread Randy Westlund
On Fri, Jun 03, 2016 at 05:11:24PM -0700, Don Lewis wrote:
> It looks like something changed in -CURRENT to break network
> connectivity to VirtualBox guests.  This was last known to work with
> r299139 (May 6th) and is definitely broken with r301229.

I've been having VirtualBox networking problems as well.  I can't get my
VMs on the network recently, but I don't recall when it last worked.
Everything looks right from the guest (the arp cache shows the
VirtualBox NAT router), but tcpdump on the host shows no traffic.  I
haven't had time to investigate further :/


signature.asc
Description: PGP signature


Re: ZFS on root, beadm, and the /boot symlink

2016-05-22 Thread Randy Westlund
On Sun, May 22, 2016 at 03:11:52PM -0400, Allan Jude wrote:
> It is not possible to use boot environments when you have a separate
> bootpool. This is the motivation for my recent work to implement GELI in
> boot2 and loader, to allow you to combine GELI encryption with ZFS boot
> environments, which previously required a second unencrypted pool for
> the loader and kernel.

Ah, okay.  Thanks for all your work in this area.  I'll stay tuned.

Randy


signature.asc
Description: PGP signature


ZFS on root, beadm, and the /boot symlink

2016-05-22 Thread Randy Westlund
My system was installed from 10.1 or 10.2 with root on ZFS and geli, but
now it tracks current.  It is not an EFI system.  I'm trying to get boot
environments to work, but the /boot symlink is throwing me off.

I have two pools from the installer's layout; a small bootpool and
zroot.  The bootpool mounts at /bootpool and /boot is a symlink to it.

> randy@mako /> zfs get mountpoint bootpool
> NAME  PROPERTYVALUE   SOURCE
> bootpool  mountpoint  /bootpool   local
> 
> randy@mako /> ls -al /boot
> lrwxr-xr-x  1 root  wheel  13 Aug 12  2015 /boot -> bootpool/boot

When I try to activate a boot environment, I get this error:

> root@mako:/ # beadm activate r300358
> cp: /tmp/BE-r300358.FS6Xo6ot/boot/zfs/zpool.cache: No such file or directory

Because the new boot environment has a symlink to an empty directory:

> randy@mako /> ls -al /tmp/BE-r300358.FS6Xo6ot/boot
> lrwxr-xr-x  1 root  wheel  13 Aug 12  2015 /tmp/BE-r300358.FS6Xo6ot/boot -> 
> bootpool/boot
> 
> randy@mako /> ls -al /tmp/BE-r300358.FS6Xo6ot/bootpool
> total 9
> drwxr-xr-x   2 root  wheel   2 Aug 18  2015 .
> drwxr-xr-x  21 root  wheel  29 May 21 16:23 ..

Mergemaster complains about the /boot symlink as well.

I'm not sure what the cachefile does or why it's there.  It has a recent
modification time, but neither pool seems to reference it.

> randy@mako /> zpool get cachefile zroot
> NAME   PROPERTY   VALUE  SOURCE
> zroot  cachefile  -  default

> randy@mako /> zpool get cachefile bootpool
> NAME  PROPERTY   VALUE  SOURCE
> bootpool  cachefile  -  default

> randy@mako /> ls -al /boot/zfs/zpool.cache
> -rw-r--r--  1 root  wheel  2512 May 21 16:23 /boot/zfs/zpool.cache

What's the proper way to handle the /boot symlink with beadm?

Randy


signature.asc
Description: PGP signature