Present Location: News >> Blog >> OS X Mavericks 6in4 Tunnel Crash


> OS X Mavericks 6in4 Tunnel Crash
Posted by prox, from Charlotte, on December 19, 2013 at 16:17 local (server) time

Well, this one is a bummer.  Apparently, Mac OS X Mavericks introduced a bug in either the gif(4) driver or kernel that crashes the whole machine when an IPv6 address is removed from a 6in4 tunnel interface.  The gif(4) driver in the BSD world provides a generic driver to tunnel IP in IP (any version inside any other version).

If you want to try it, do this as root:

/sbin/ifconfig gif0 up
/sbin/ifconfig gif0 tunnel
/sbin/ifconfig gif0 inet6 2001:db8:1:116::2/64
/sbin/route add -inet6 default 2001:db8:1:116::1
/sbin/route delete -inet6 default
/sbin/ifconfig gif0 -tunnel
/sbin/ifconfig gif0 inet6 2001:db8:1:116::2/64 -alias

The last command triggers a kernel panic and reboot after a few seconds.  I discovered this after loading my IPv6 6in4 tunneling script on my old MacBook Air.  The tunnel works fine when it's up.  However, tearing it down seems to be problematic, to say the least.  My script doesn't even get to the point where gif0 is brought down.

The backtrace and some associated information looks like this:

Thu Dec 19 13:37:50 2013
panic(cpu 1 caller 0xffffff80164d143e): Preemption level underflow, possible cause unlocking an unlocked mutex or spinlock
Backtrace (CPU 1), Frame : Return Address
0xffffff80a5e536d0 : 0xffffff8016422f69 
0xffffff80a5e53750 : 0xffffff80164d143e 
0xffffff80a5e53760 : 0xffffff80164d11cf 
0xffffff80a5e53770 : 0xffffff801664ce14 
0xffffff80a5e537b0 : 0xffffff801662bb33 
0xffffff80a5e538d0 : 0xffffff8016730aac 
0xffffff80a5e539a0 : 0xffffff8016714519 
0xffffff80a5e53dc0 : 0xffffff801672b6cc 
0xffffff80a5e53e20 : 0xffffff801672b308 
0xffffff80a5e53e60 : 0xffffff801672afea 
0xffffff80a5e53f20 : 0xffffff801644a15a 
0xffffff80a5e53fb0 : 0xffffff80164d6aa7 

BSD process name corresponding to current thread: kernel_task

Mac OS version:

Kernel version:
Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64
Kernel UUID: [removed]
Kernel slide:     0x0000000016200000
Kernel text base: 0xffffff8016400000
System model name: MacBookAir3,1 (Mac-[removed])

The full report can be found here.  I removed some values in it that I thought might be harmful if they are public (I could be mistaken).  I also filed a bug report with Apple on this: 15701774.  I'm fairly sure this is not hardware-related or related to VirtualBox, Cisco AnyConnect, or TunnelBlick kernel extensions being present since I can crash another Mavericks install running in a VM that has none of them loaded.

Update: I did realize I was not running the latest version of OS X Mavericks, 10.9.1.  I just upgraded but the issue is still present.  Here is a crash report under 10.9.1.

Update: Apple closed my bug report as a duplicate of 14929904.

> Add Comment

New comments are currently disabled for this entry.