Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Jan 2010 18:05:54 +0200
From:      David Naylor <naylor.b.david@gmail.com>
To:        gary.jennejohn@freenet.de
Cc:        freebsd-current@freebsd.org
Subject:   Re: stacked unionfs freeze and crash FreeBSD
Message-ID:  <201001201805.57798.naylor.b.david@gmail.com>
In-Reply-To: <20100120162821.3f53af6a@ernst.jennejohn.org>
References:  <201001201543.15818.naylor.b.david@gmail.com> <20100120162821.3f53af6a@ernst.jennejohn.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart20388899.MH42N7fnO0
Content-Type: multipart/mixed;
  boundary="Boundary-01=_inyVL6GVTrfFMMh"
Content-Transfer-Encoding: 7bit


--Boundary-01=_inyVL6GVTrfFMMh
Content-Type: Text/Plain;
  charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On Wednesday 20 January 2010 17:28:21 Gary Jennejohn wrote:
> On Wed, 20 Jan 2010 15:43:12 +0200 David Naylor wrote:
> > Hi,
> >
> > The attached script, that uses stacked unionfs, causes FreeBSD-9 (cvsup
> > yesterday) to freeze and FreeBSD-8 (cvsup two days ago) to crash:
> >
> > Fatal double fault
> > rip-0xffffffff81e4c1
> > rsp=3D0xffffff80b133ef50
> > rbp=3D0xffffff80b133f150
> > cupid =3D 2; apic id =3D 02
> > panic: double fault
> > cpuid =3D 2
> > uptime: 1h44m35s
> > cannot dump.  Device not defined or unavailable
> >
> >
> > Both systems use the stock GENERIC kernel, i.e. -9 had full diagnostics
> > built in (and was run under VirtualBox) and -8 had no diagnostics (and
> > was run native).
> >
> > A LOR is produces prior to freezing under -9 (quiet a time prior).  See
> > kern/141950.
> >
> > The script uses unionfs to build ports (in an attempt to create a
> > tinderbox without the need to delete and/or extract packages).  To use
> > the script to:
> >
> > # mkdir /tmp/localbase /tmp/builddir
> > # env LOCALBASE=3D/tmp/localbase BUILDDIR=3D/tmp/builddir
> > ./ports-union-builder.sh
>=20
> Is your /tmp big enough?

I was actually using /home, didn't think people wanted to contaminate that=
=20
directory.  Plenty of space. =20

> > This will try build everything for x11/xorg.
> >
> > Is it possible that VirtualBox is interfering in getting usable
> > diagnostics for -9
>=20
> Who knows?  You might try posting your shell script so others can give
> it a whirl on a "real" 9-current system.

I did attach the script.  Guess mailer ate it, again.  I'll try again... =20

> > and how can I setup a dump device for -8.  Currently I have:
> >
> > # swapinfo
> > Device          1K-blocks     Used    Avail Capacity
> > /dev/ad4s1b       8388608        0  8388608     0%
> > /dev/ad8s1b       8388608        0  8388608     0%
> > Total            16777216        0 16777216     0%
>=20
> Do you have dumpdev defined in /etc/rc.conf and/or do you see
> /dev/dumpdev?  Having /dev/dumpdev indicates that dumpon succeeded.

No I haven't and no I don't.  I thought it automatically used swap? =20

I'll 'activate' it and post the results. =20

> Do you have less than 8GB of memory?  See dumpon(8) for restrictions.

I have 6GB. =20

--Boundary-01=_inyVL6GVTrfFMMh
Content-Type: text/plain; charset="ISO-8859-1"; name="ports-union-builder.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="ports-union-builder.txt"

#!/bin/sh

BUILDDIR=${BUILDDIR:-/usr/build}
LOCALBASE=${LOCALBASE:-/usr/local}
PORTSDIR=${PORTSDIR:-/usr/ports}
PORT_DBDIR=${PKG_DBDIR:-$BUILDDIR/db_ports}
PKG_DBDIR=${PKG_DBDIR:-$BUILDDIR/db_pkg}
PACKAGES=${PACKAGES:-$BUILDDIR/packages}

MAKE="env LOCALBASE=$LOCALBASE PORTSDIR=$PORTSDIR PORT_DBDIR=$PORT_DBDIR PKG_DBDIR=$PKG_DBDIR PACKAGES=$PACKAGES make"

set -e

mkdir -p $BUILDDIR $LOCALBASE $PKG_DBDIR $PACKAGES

port2name() {

  echo $1 | sed 's|[/.-]|_|g'

}

port2pkg() {

  local pkg_name=
  local port=

  port=$1; shift
  eval pkg_name=PKG$(port2name $port)
  eval pkg=\$$pkg_name
  if [ -z "$pkg" ]
  then
    pkg=$($MAKE -C $port -V PKGNAME)
    eval $pkg_name=$pkg
  fi

}

depends() {

  local depend=
  local depends_name=
  local _deps=
  local name=
  local port=

  port=$1

  eval depends_name=DEPEND$(port2name $port)
  eval deps=\"\$$depends_name\"

  if [ -z "$deps" ]
  then
    echo "Getting dependancies for $port" > /dev/stderr

    depend_list="$($MAKE -C $port -V BUILD_DEPENDS -V LIB_DEPENDS -V RUN_DEPENDS)"
    for depend in $depend_list
    do
      name=$(echo $depend | cut -f 2 -d ':')
      depends $name
      _deps="$_deps $deps $name"
    done

    deps=$(for depend in $_deps
    do
      echo $depend
    done | sort -u)

    depends_name=$depends_name
    eval $depends_name=\"$deps \"
  fi

}

build() {

  local _deps=
  local dep=
  local port=

  port=$1

  depends $port
  _deps="$deps"
  for dep in $_deps
  do
    port2pkg $dep
    if [ ! -d $BUILDDIR/$pkg ]
    then
      if ! build $dep
      then
        echo "Port $port failed due to dependancy $dep"
        return 255
      fi
    fi
  done

  echo "Building port $port..."

  for pkg in $_deps
  do
    port2pkg $pkg
    mount -t unionfs -r -o noatime $BUILDDIR/$pkg $LOCALBASE
  done
  port2pkg $port
  mkdir -p $BUILDDIR/$pkg
  mount -t unionfs -o noatime $BUILDDIR/$pkg $LOCALBASE

  set +e
  trap "true" INT TERM EXIT
  $MAKE -C $port clean build install package -DNO_DEPENDS -DBATCH
  status=$?
  trap - INT TERM EXIT
  set -e

  umount $LOCALBASE
  for pkg in $(echo $_deps | sort -r)
  do
    #port2pkg $pkg
    umount $LOCALBASE
  done

  if [ $status -ne 0 ]
  then
    echo "Port $port failed to build"
    rm -rf $BUILDDIR/$pkg || (chflags -R 0 $BUILDDIR/$pkg; rm -rf $BUILDDIR/$pkg)
  else
    $MAKE -C $port clean
  fi

  return $status

}

build /usr/ports/x11/xorg

--Boundary-01=_inyVL6GVTrfFMMh--

--nextPart20388899.MH42N7fnO0
Content-Type: application/pgp-signature; name=signature.asc 
Content-Description: This is a digitally signed message part.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.13 (FreeBSD)

iEYEABECAAYFAktXKeUACgkQUaaFgP9pFrIk7wCcDx86bUEgStouDH3kPTtSB+Vc
/dQAn1fpKB81Svy1F2UJr9O4WN8hxBt9
=nFC2
-----END PGP SIGNATURE-----

--nextPart20388899.MH42N7fnO0--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001201805.57798.naylor.b.david>