From fireball@zerouptime.ch  Sat Oct  2 17:10:24 2004
Return-Path: <fireball@zerouptime.ch>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id EAE7C16A4DD
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  2 Oct 2004 17:10:24 +0000 (GMT)
Received: from mail.zerouptime.ch (mail.zerouptime.ch [81.6.6.91])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 798AC43D2D
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  2 Oct 2004 17:10:24 +0000 (GMT)
	(envelope-from fireball@zerouptime.ch)
Received: by mail.zerouptime.ch (Postfix, from userid 1000)
	id D9C2F325; Sat,  2 Oct 2004 19:10:23 +0200 (CEST)
Message-Id: <20041002171023.D9C2F325@mail.zerouptime.ch>
Date: Sat,  2 Oct 2004 19:10:23 +0200 (CEST)
From: Jonas Nagel <fireball@zerouptime.ch>
Reply-To: Jonas Nagel <fireball@zerouptime.ch>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: gifconfig output corruption
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         72263
>Category:       kern
>Synopsis:       [gif] gifconfig output corruption
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 02 17:20:23 GMT 2004
>Closed-Date:    Sat Jun 10 18:26:45 GMT 2006
>Last-Modified:  Sat Jun 10 18:26:45 GMT 2006
>Originator:     Jonas Nagel
>Release:        FreeBSD 4.10-RELEASE i386
>Organization:
>Environment:
System: FreeBSD got.zerouptime.ch 4.10-RELEASE FreeBSD 4.10-RELEASE #3: Sun Jun 13 15:47:26 CEST 2004     root@www.zerouptime.ch:/usr/obj/usr/src/sys/FW  i386


>Description:
	When one uses gifconfig -a or ifconfig to display configuration of the gif-tunnel interfaces
	it will not be displayed (correctly). gifconfig displays garbage within the output and ifconfig
	displays nothing at all.

	Besides that, everything works as designed.

	Also when I use gifconfig gifn delete and then 'sh /etc/rc.network start' again; everything works,
	but no info visible, corruption of output stays the same.

	got# gifconfig -a
	gif0: flags=8011<UP,POINTOPOINT,MULTICAST> mtu 1280
        	physical address zP  --> 
	gif1: flags=8011<UP,POINTOPOINT,MULTICAST> mtu 1280
        	physical address zP  --> 

	got# ifconfig |grep gif
	gif0: flags=8011<UP,POINTOPOINT,MULTICAST> mtu 1280
	gif1: flags=8011<UP,POINTOPOINT,MULTICAST> mtu 1280

	But the interfaces are configured with valid ip addresses in rc.conf and work correctly.

>How-To-Repeat:
	No idea, besides typing gifconfig -a or ifconfig |grep gif  
        you cannot reproduce this straight away, after a fresh boot, but it seems to happen over the time,
	when its already running a while;

	--> 6:55PM  up 111 days, 32 mins, 1 user, load averages: 0.00, 0.02, 0.19

	I don't want to boot the firewall, just to see if it works again, because I remember some time ago,
	when I configured it first, it displayed all correctly.
	
>Fix:

	It's hard to tell, if you do not understand, how this could happen at all.


>Release-Note:
>Audit-Trail:

From: Brooks Davis <brooks@one-eyed-alien.net>
To: Jonas Nagel <fireball@zerouptime.ch>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: kern/72263: gifconfig output corruption
Date: Sat, 2 Oct 2004 10:47:14 -0700

 On Sat, Oct 02, 2004 at 07:10:23PM +0200, Jonas Nagel wrote:
 > >Description:
 > 	When one uses gifconfig -a or ifconfig to display configuration of the gif-tunnel interfaces
 > 	it will not be displayed (correctly). gifconfig displays garbage within the output and ifconfig
 > 	displays nothing at all.
 > 
 > 	Besides that, everything works as designed.
 > 
 > 	Also when I use gifconfig gifn delete and then 'sh /etc/rc.network start' again; everything works,
 > 	but no info visible, corruption of output stays the same.
 > 
 > 	got# gifconfig -a
 > 	gif0: flags=8011<UP,POINTOPOINT,MULTICAST> mtu 1280
 >         	physical address zP  --> 
 > 	gif1: flags=8011<UP,POINTOPOINT,MULTICAST> mtu 1280
 >         	physical address zP  --> 
 
 This sort of error is usually a symptom of your userland and kernel
 being out of sync.
 
 > 	got# ifconfig |grep gif
 > 	gif0: flags=8011<UP,POINTOPOINT,MULTICAST> mtu 1280
 > 	gif1: flags=8011<UP,POINTOPOINT,MULTICAST> mtu 1280
 > 
 > 	But the interfaces are configured with valid ip addresses in rc.conf and work correctly.
 
 This is the expected output from that command.  The configuration lines
 do not contain the string gif so the grep won't match them...
 
 > >How-To-Repeat:
 > 	No idea, besides typing gifconfig -a or ifconfig |grep gif  
 >         you cannot reproduce this straight away, after a fresh boot, but it seems to happen over the time,
 > 	when its already running a while;
 > 	--> 6:55PM  up 111 days, 32 mins, 1 user, load averages: 0.00, 0.02, 0.19
 >
 > 	I don't want to boot the firewall, just to see if it works again, because I remember some time ago,
 > 	when I configured it first, it displayed all correctly.
 
 This sounds like some sort of memory corruption.  I don't give us any
 real chance of being able to fix this problem with so little
 information.  I can't replicate it here.
 
 -- Brooks

From: Jonas Nagel <fireball@zerouptime.ch>
To: Brooks Davis <brooks@one-eyed-alien.net>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: kern/72263: gifconfig output corruption
Date: Sun, 03 Oct 2004 23:38:41 +0200

 > This sort of error is usually a symptom of your userland and kernel
 > being out of sync.
 
 Hrm. Cannot imagine that as I usually do installkernel/installworld/mergemaster
 at the same time before booting once (minor version/fixes upgrade),
 because I don't want to make exactly this stuff happen (I could forget
 to do the installworld, yadda yadda...).
 
 > This is the expected output from that command.  The configuration lines
 > do not contain the string gif so the grep won't match them...
 
 Um, right, my fault. But that is not the issue though:
 
 got# ifconfig gif0
 gif0: flags=8011<UP,POINTOPOINT,MULTICAST> mtu 1280
 got# ifconfig gif1
 gif1: flags=8011<UP,POINTOPOINT,MULTICAST> mtu 1280
 
 > This sounds like some sort of memory corruption.  I don't give us any
 > real chance of being able to fix this problem with so little
 > information.  I can't replicate it here.
 
 I hear ya. Well what I can do anyway; do the upgrade to RELEASE-p2 and
 then reinstall everything again during the process and make sure that I
 don't miss anything during the upgrade (in case I really did forget the
 installworld or something). And then I'd report back with a new pr, if
 this would happen again.
 
 In meantime I guess you should close the pr, doing this stressed little
 bulky bugreporting system a favour, not having to list this report
 anymore (since this could take quite a while and finally might forget
 about it, if it does not repeat).
 
 Thanks for your quick response anyway; I'm impressed.
 
 -- 
 Jonas Nagel <fireball@zerouptime.ch>
 
State-Changed-From-To: open->closed 
State-Changed-By: brooks 
State-Changed-When: Mon Oct 4 15:04:57 GMT 2004 
State-Changed-Why:  
Submitter requested we close this since it's going to be hard to 
reproduce assuming it is a memory corruption bug.  We'll reopen if 
we can find a way to reproduce this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=72263 

From: Jonas Nagel <fireball@zerouptime.ch>
To: Brooks Davis <brooks@FreeBSD.org>
Cc: freebsd-bugs@FreeBSD.org, FreeBSD-gnats-submit@freebsd.org
Subject: Re: kern/72263: gifconfig output corruption
Date: Wed, 06 Oct 2004 18:50:20 +0200

 > Submitter requested we close this since it's going to be hard to
 > reproduce assuming it is a memory corruption bug.  We'll reopen if
 > we can find a way to reproduce this.
 
 Ok, well let's reopen this. I just upgraded to 4.10-RELEASE-p3 just to
 make sure I didn't fsck up somewhere, and it seems like I can reliably
 repeat the issue;
 
 FreeBSD got.zerouptime.ch 4.10-RELEASE-p3 FreeBSD 4.10-RELEASE-p3 #0:
 Wed Oct  6 02:49:24 CEST 2004 root@www.zerouptime.ch:/usr/obj/usr/src/sys/F=
 W
 i386
 
 got# ls -l `which gifconfig`
 -r-xr-xr-x  1 root  wheel  11432 Oct  6 18:08 /usr/sbin/gifconfig
 
 got# ls -l `which ifconfig`
 -r-xr-xr-x  1 root  wheel  280788 Oct  6 18:05 /sbin/ifconfig
 
 The corrupted part in the gifconfig remains the same ("physical address z=
 =B8P=D5  -->")
 apparently.
 
 And the ifconfig output is still empty, too.
 
 --=20
 Jonas Nagel <fireball@zerouptime.ch>
 
State-Changed-From-To: closed->open 
State-Changed-By: linimon 
State-Changed-When: Wed Oct 6 17:37:21 GMT 2004 
State-Changed-Why:  
Reopened at submitter's request. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=72263 

From: Jonas Nagel <fireball@zerouptime.ch>
To: Brooks Davis <brooks@FreeBSD.org>
Cc: freebsd-bugs@FreeBSD.org, FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: kern/72263: gifconfig output corruption
Date: Thu, 07 Oct 2004 21:56:49 +0200

 Ok, I got news on this:
 
 I saw that it works ok when doing the configuration manually, but it
 wont work with the following entries in rc.conf:
 
 gif_interfaces="gif0"
 gifconfig_gif0="81.6.6.90 210.5.10.80"
 ifconfig_gif0="inet 192.168.0.1 192.168.3.1 netmask 0xffffff00"
 
 (IP's given are examples)
 
 Any ideas on that? I double checked that with the handbook/man pages and
 it all *should* work this way. But it doesn't for some reason.
 -- 
 Jonas Nagel <fireball@zerouptime.ch>
 

From: Brooks Davis <brooks@one-eyed-alien.net>
To: Jonas Nagel <fireball@zerouptime.ch>
Cc: freebsd-bugs@FreeBSD.org, FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: kern/72263: gifconfig output corruption
Date: Thu, 7 Oct 2004 13:17:59 -0700

 On Thu, Oct 07, 2004 at 09:56:49PM +0200, Jonas Nagel wrote:
 > Ok, I got news on this:
 > 
 > I saw that it works ok when doing the configuration manually, but it
 > wont work with the following entries in rc.conf:
 > 
 > gif_interfaces="gif0"
 > gifconfig_gif0="81.6.6.90 210.5.10.80"
 > ifconfig_gif0="inet 192.168.0.1 192.168.3.1 netmask 0xffffff00"
 > 
 > (IP's given are examples)
 > 
 > Any ideas on that? I double checked that with the handbook/man pages and
 > it all *should* work this way. But it doesn't for some reason.
 
 Adding those lines to rc.conf on a maching running 4.10-RELEASE with a
 few patchs unrelated to gif(4) works for me.  Is gif in your kernel or
 loaded as a module?  What's your kernel config look like?
 
 -- Brooks

From: Jonas Nagel <fireball@zerouptime.ch>
To: Brooks Davis <brooks@one-eyed-alien.net>
Cc: freebsd-bugs@FreeBSD.org, FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: kern/72263: gifconfig output corruption
Date: Fri, 08 Oct 2004 13:31:52 +0200

 > Adding those lines to rc.conf on a maching running 4.10-RELEASE with a
 > few patchs unrelated to gif(4) works for me.  Is gif in your kernel or
 > loaded as a module?  What's your kernel config look like?
 
 It's all in the kernel, no modules loaded:
 
 machine         i386
 cpu             I686_CPU
 ident           FW_IPSEC
 maxusers        0
 
 options         MATH_EMULATE            #Support for x87 emulation
 options         INET                    #InterNETworking
 options         FFS                     #Berkeley Fast Filesystem
 options         FFS_ROOT                #FFS usable as root device [keep this!]
 options         SOFTUPDATES             #Enable FFS soft updates support
 options         UFS_DIRHASH             #Improve performance on big directories
 options         NFS                     #Network Filesystem
 options         NFS_ROOT                #NFS usable as root device, NFS required
 options         MSDOSFS                 #MSDOS Filesystem
 options         CD9660                  #ISO 9660 Filesystem
 options         CD9660_ROOT             #CD-ROM usable as root, CD9660 required
 options         PROCFS                  #Process filesystem
 options         COMPAT_43               #Compatible with BSD 4.3 [KEEP THIS!]
 options         SCSI_DELAY=15000        #Delay (in ms) before probing SCSI
 options         UCONSOLE                #Allow users to grab the console
 options         USERCONFIG              #boot -c editor
 options         VISUAL_USERCONFIG       #visual boot -c editor
 options         KTRACE                  #ktrace(1) support
 options         SYSVSHM                 #SYSV-style shared memory
 options         SYSVMSG                 #SYSV-style message queues
 options         SYSVSEM                 #SYSV-style semaphores
 options         P1003_1B                #Posix P1003_1B real-time extensions
 options         _KPOSIX_PRIORITY_SCHEDULING
 options         KBD_INSTALL_CDEV        # install a CDEV entry in /dev
 
 device          isa
 device          pci
 
 # Floppy drives
 device          fdc0    at isa? port IO_FD1 irq 6 drq 2
 device          fd0     at fdc0 drive 0
 
 # ATA and ATAPI devices
 device          ata0    at isa? port IO_WD1 irq 14
 device          ata1    at isa? port IO_WD2 irq 15
 device          ata
 device          atadisk                 # ATA disk drives
 device          atapicd                 # ATAPI CDROM drives
 device          atapifd                 # ATAPI floppy drives
 options         ATA_STATIC_ID           #Static device numbering
 
 # atkbdc0 controls both the keyboard and the PS/2 mouse
 device          atkbdc0 at isa? port IO_KBD
 device          atkbd0  at atkbdc? irq 1 flags 0x1
 device          psm0    at atkbdc? irq 12
 
 device          vga0    at isa?
 
 # syscons is the default console driver, resembling an SCO console
 device          sc0     at isa? flags 0x100
 
 # Floating point support - do not disable.
 device          npx0    at nexus? port IO_NPX irq 13
 
 # Serial (COM) ports
 device          sio0    at isa? port IO_COM1 flags 0x10 irq 4
 device          sio1    at isa? port IO_COM2 irq 3
 device          sio2    at isa? disable port IO_COM3 irq 5
 device          sio3    at isa? disable port IO_COM4 irq 9
 
 # PCI Ethernet NICs that use the common MII bus controller code.
 # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
 device          miibus          # MII bus support
 device          rl              # RealTek 8129/8139
 device          xl              # 3Com 3c90x (``Boomerang'', ``Cyclone'')
 
 # Pseudo devices - the number indicates how many units to allocate.
 pseudo-device   loop            # Network loopback
 pseudo-device   ether           # Ethernet support
 pseudo-device   ppp     1       # Kernel PPP
 pseudo-device   tun             # Packet tunnel.
 pseudo-device   pty             # Pseudo-ttys (telnet etc)
 pseudo-device   gif     4       # IPv4 to IPv6 tunneling
 
 options        IPSEC              #new IPsec
 options        IPSEC_ESP
 options        IPSEC_DEBUG        #debug for IP security
 
 pseudo-device   crypto          # core crypto support
 pseudo-device   cryptodev       # /dev/crypto for access to h/w
 
 # The `bpf' pseudo-device enables the Berkeley Packet Filter.
 # Be aware of the administrative consequences of enabling this!
 pseudo-device   bpf     2       #Berkeley packet filter
 
 options         IPFILTER                #ipfilter support
 options         IPFILTER_LOG            #ipfilter logging
 options         TCP_DROP_SYNFIN
 options         ICMP_BANDLIM
 
 -- 
 Jonas Nagel <fireball@zerouptime.ch>
 

From: Jonas Nagel <fireball@zerouptime.ch>
To: Brooks Davis <brooks@FreeBSD.org>
Cc: freebsd-bugs@FreeBSD.org
Subject: Re: kern/72263: gifconfig output corruption
Date: Thu, 07 Oct 2004 21:56:49 +0200

 Ok, I got news on this:
 
 I saw that it works ok when doing the configuration manually, but it
 wont work with the following entries in rc.conf:
 
 gif_interfaces="gif0"
 gifconfig_gif0="81.6.6.90 210.5.10.80"
 ifconfig_gif0="inet 192.168.0.1 192.168.3.1 netmask 0xffffff00"
 
 (IP's given are examples)
 
 Any ideas on that? I double checked that with the handbook/man pages and
 it all *should* work this way. But it doesn't for some reason.
 -- 
 Jonas Nagel <fireball@zerouptime.ch>
 
 _______________________________________________
 freebsd-bugs@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
 To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org"
 

From: Jonas Nagel <fireball@zerouptime.ch>
To: bug-followup@FreeBSD.org,
 fireball@zerouptime.ch
Cc:  
Subject: Re: kern/72263: [gif] gifconfig output corruption
Date: Sat, 10 Jun 2006 14:21:45 +0200

 Can't reproduce this anymore.
 
 Thank you very much.
 
 -- 
 Jonas Nagel <fireball@zerouptime.ch>
 "Everything we humans say is either meaningless or meaningful. A lot of people never learn the difference." (El Reg)
 
State-Changed-From-To: open->closed 
State-Changed-By: maxim 
State-Changed-When: Sat Jun 10 18:26:05 UTC 2006 
State-Changed-Why:  
The submitter reports he can't reproduce the problem anymore. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=72263 
>Unformatted:
