Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 333293 - kernel >= 2.6.34.2: can't shutdown iface with IPv6 addresses
Summary: kernel >= 2.6.34.2: can't shutdown iface with IPv6 addresses
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-18 10:33 UTC by Martin Volf
Modified: 2010-10-04 16:54 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
ipv6-keep-route-for-tentative-address.patch (ipv6-keep-route-for-tentative-address.patch,1.32 KB, patch)
2010-08-20 04:57 UTC, Martin Volf
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Volf 2010-08-18 10:33:08 UTC
With the Linux kernel version 2.6.34.2 or newer (from kernel.org), my machine can't shutdown or reboot cleanly, because /etc/init.d/net.br0 can't stop the interface, it continually prints this:

 unregister_netdevice: waiting for br0 to become free. Usage count = 1

This regression was introduced in 2.6.34.2 linux kernel by the patch called
ipv6-keep-route-for-tentative-address.patch, but I don't think that it is a regression in the kernel. I fixed it by defining the predown() function in /etc/conf.d, which flushes IPv6 addresses:
predown()
{
  if [[ -d /proc/sys/net/ipv6 ]]; then
    ip -6 addr flush dev $IFACE &>/dev/null || return 1
  fi
  return 0
}

(beware, it is a very simple function, it does not check is_net_fs nor is_union_fs, as the run_stop() function in /etc/init.d/net.lo does).

Maybe something like this could be a standard part of the /etc/init.d/net.lo script.

I have tried the versions 2.6.34.2, 2.6.34.4 and 2.6.35.2, all are affected,
2.6.34.1 or older is OK.

Reproducible: Always

Steps to Reproduce:
1. have IPv6 address
2. linux kernel >= 2.6.34.2
3. reboot

Actual Results:  
the /etc/init.d/net.br0 script won't stop the br0 interface, it continually prints:

 unregister_netdevice: waiting for br0 to become free. Usage count = 1

and the machine won't reboot or shutdown.

Expected Results:  
reboot or shutdown in finite time

emerge --info
Portage 2.1.8.3 (default/linux/amd64/10.0, gcc-4.4.4, glibc-2.11.2-r0, 2.6.35.2 x86_64)
=================================================================
System uname: Linux-2.6.35.2-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E8400_@_3.00GHz-with-gentoo-1.12.13
Timestamp of tree: Wed, 18 Aug 2010 05:45:01 +0000
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r3, 3.1.2-r4
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.4-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.34
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/app-defaults /usr/share/X11/xkb /usr/share/ddccontrol-db/monitor /usr/share/hddtemp /usr/share/mc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=core2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="ftp://ftp.sh.cvut.cz/MIRRORS/gentoo http://gentoo.ynet.sk/pub ftp://ftp.tu-clausthal.de/pub/linux/gentoo ftp://gd.tuwien.ac.at/opsys/linux/gentoo/ http://www.gigaload.org/gentoo.org/ http://ftp.easynet.nl/mirror/gentoo/ http://gentoo.osuosl.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo ftp://ftp.fi.muni.cz/pub/linux/gentoo "
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/x11 /var/lib/layman/sunrise /Data/Gentoo/local"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi alsa amd64 asf bash-completion berkdb bluetooth bzip2 cairo cdda cdr cli cracklib crypt cups cxx devil dga dia divx divx4linux dri dts dv dvd dvdr dvdread emf enca encode exif fam fame fbcon ffmpeg firefox flac font-server fontconfig gd gdbm gif gmedia gpm gtk hddtemp iconv ieee1394 imagemagick imap ipv6 javascript jpeg jpeg2k kqemu lcms libcaca libnotify lm_sensors lua lzo mad matroska mbox mikmod mjpeg mmap mmx mng modules mozilla moznocompose moznoirc moznomail mp3 mpeg mplayer multilib nas ncurses nls nptl nptlonly nsplugin ogg opengl openmp pam pcre pdf perl plotutils png postscript ppds pppd python qt3support qt4 quicktime radeon readline reflection replytolist rrdcgi samba sdl session slang speex spell spl srt sse sse2 ssl ssse3 startup-notification svg sysfs tcpd tetex theora tiff timidity truetype unicode usb v4l v4l2 vorbis wma wmf wmp x264 xcb xcomposite xinerama xorg xosd xpm xscreensaver xv xvid xvmc zlib zvbi" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon vesa fbdev v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Mike Pagano gentoo-dev 2010-08-20 00:35:57 UTC
I see a similar thread being discussed on linux-netdev, though with no resolution.

http://marc.info/?t=127879909300002&r=1&w=2

Would you be interested in doing a bisect between 2.6.34.1 and 2.6.34.2

Comment 2 Martin Volf 2010-08-20 04:57:22 UTC
Created attachment 243661 [details, diff]
ipv6-keep-route-for-tentative-address.patch
Comment 3 Martin Volf 2010-08-20 04:58:13 UTC
> Would you be interested in doing a bisect between 2.6.34.1 and 2.6.34.2
 
I did, the offending patch is called ipv6-keep-route-for-tentative-address.patch
(attached).
Comment 4 Mike Pagano gentoo-dev 2010-09-03 16:32:37 UTC
Ok, let's first see if this is fixed in the development tree. Please test with git-sources-2.6.36_rc3 or later and also, can you attach the dmesg during the issue?