svn commit: r340247 - user/pho/stress2/misc
Peter Holm
pho at FreeBSD.org
Thu Nov 8 12:45:30 UTC 2018
Author: pho
Date: Thu Nov 8 12:45:28 2018
New Revision: 340247
URL: https://svnweb.freebsd.org/changeset/base/340247
Log:
Added tow ifconfig(8) test scenarios.
Sponsored by: Dell EMC Isilon
Added:
user/pho/stress2/misc/ifconfig.sh (contents, props changed)
user/pho/stress2/misc/ifconfig2.sh (contents, props changed)
Added: user/pho/stress2/misc/ifconfig.sh
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ user/pho/stress2/misc/ifconfig.sh Thu Nov 8 12:45:28 2018 (r340247)
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+# Test scenario from D17599 "Fix for double free when deleting entries from
+# epoch managed lists"
+# by Hans Petter Selasky <hselasky at freebsd.org>
+
+# "panic: starting DAD on non-tentative address 0xfffff8010c311000" seen.
+# https://people.freebsd.org/~pho/stress/log/epoch.txt
+
+# Fatal trap 9: general protection fault while in kernel mode
+# https://people.freebsd.org/~pho/stress/log/epoch-2.txt
+
+# $FreeBSD$
+
+[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1
+if=`ifconfig | grep -w mtu | grep -v RUNNING | sed 's/:.*//' | head -1`
+[ -z "$if" ] &&
+ if=`ifconfig | \
+ awk '/^[a-z].*: / {gsub(":", ""); ifn = $1}; /no car/{print ifn; exit}'`
+
+[ -z "$if" ] && exit 0
+echo "Using $if for test."
+ifconfig $if | grep -q RUNNING && running=1
+
+start=`date +%s`
+while [ $((`date +%s` - start)) -lt 300 ]; do
+ for i in `jot 255`; do
+ (ifconfig $if.$i create
+ ifconfig $if.$i inet 224.0.0.$i
+ ifconfig $if.$i destroy) > /dev/null 2>&1 &
+ done
+ wait
+done
+[ $running ] || ifconfig $if down
+
+exit 0
Added: user/pho/stress2/misc/ifconfig2.sh
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ user/pho/stress2/misc/ifconfig2.sh Thu Nov 8 12:45:28 2018 (r340247)
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+# Test scenario from D17599 "Fix for double free when deleting entries from
+# epoch managed lists"
+# by Hans Petter Selasky <hselasky at freebsd.org>
+
+# Page fault in nd6_dad_timer+0x6b seen:
+# https://people.freebsd.org/~pho/stress/log/ifconfig2.txt
+
+# $FreeBSD$
+
+[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1
+if=`ifconfig | grep -w mtu | grep -v RUNNING | sed 's/:.*//' | head -1`
+[ -z "$if" ] &&
+ if=`ifconfig | \
+ awk '/^[a-z].*: / {gsub(":", ""); ifn = $1}; /no car/{print ifn; exit}'`
+
+[ -z "$if" ] && exit 0
+echo "Using $if for test."
+ifconfig $if | grep -q RUNNING && running=1
+
+sync=/tmp/`basename $0`.sync
+rm -f $sync
+for i in `jot 5`; do
+ (
+ while [ ! -f $sync ]; do
+ sleep .1
+ done
+ while [ -f $sync ]; do
+ ifconfig $if.$i create
+ ifconfig $if.$i inet 224.0.0.$i
+ ifconfig $if.$i destroy
+ done
+ ) > /dev/null 2>&1 &
+done
+touch $sync
+sleep 120
+rm -f $sync
+wait
+[ $running ] || ifconfig $if down
+
+exit 0
More information about the svn-src-user
mailing list