Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jul 2017 17:05:04 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-jail@FreeBSD.org
Subject:   [Bug 213896] when starting vimage jails the kernel crashes
Message-ID:  <bug-213896-9824-wZEWRl3c7x@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-213896-9824@https.bugs.freebsd.org/bugzilla/>
References:  <bug-213896-9824@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D213896

--- Comment #10 from gronke <stefan@gronke.net> ---
I used a similar script to reproduce the bug and noticed it only occurs when
the host's epair nic went up before destroying the jail.

This snippet manually attaches the nic to the jail after it was started and
takes "yes" as first argument to change the host's nic state.

$ ./crash-demo.sh no
...
> done
$ ./crash-demo.sh yes
> crash

--

#!/bin/sh

UPDOWNIF=3D"$1"
BRIDGE_IF=3Dbridge1

ifconfig $BRIDGE_IF create
set -x

for i in $(seq 0 200); do

  #jail -c vnet persist path=3D$RELEASE_FOLDER name=3Djail-vnet
  jail -c vnet persist name=3Djail-vnet

  epair_a=3D"$(ifconfig epair create)"
  epair_b=3D"$(echo $epair_a | rev | cut -c2- | rev)b"

  mac_a=3D$(openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//')

  ifconfig $epair_a name a-$i
  ifconfig a-$i ether "$mac_a"

  if [ "$UPDOWNIF" =3D=3D "yes" ]; then
    ifconfig a-$i up
  fi

  ifconfig $BRIDGE_IF addm a-$i
  ifconfig $epair_b vnet jail-vnet

  jexec jail-vnet /sbin/ifconfig $epair_b name vnet0
  jexec jail-vnet /sbin/ifconfig vnet0 up
  jexec jail-vnet /sbin/ifconfig

  jail -r jail-vnet

  if [ "$UPDOWNIF" =3D=3D "yes" ]; then
    ifconfig a-$i down
  fi
  ifconfig $BRIDGE_IF deletem a-$i
  ifconfig a-$i destroy

done

echo "done"

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-213896-9824-wZEWRl3c7x>