Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Nov 2012 22:10:25 GMT
From:      Dave Hayes <dave@jetcafe.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   arm/173617: Dreamplug exhibits eSATA file corruption using network interface
Message-ID:  <201211132210.qADMAPq3027907@red.freebsd.org>
Resent-Message-ID: <201211132220.qADMK0h9045304@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         173617
>Category:       arm
>Synopsis:       Dreamplug exhibits eSATA file corruption using network interface
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-arm
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 13 22:20:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Dave Hayes
>Release:        9.1-PRERELEASE
>Organization:
>Environment:
FreeBSD fdev.dream-tech.com 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #1: Tue Nov 13 12:57:00 PST 2012     unixwiz@cdbuilder:/usr/obj.1.8R1-arm/arm.arm/usr/src.arm/sys/FBCDARM  arm
>Description:
It appears that eSATA file writes are somehow corrupted when downloading files. Using fetch as an example:

# fetch http://unbound.net/downloads/unbound-1.4.18.tar.gz
unbound-1.4.18.tar.gz                         100% of 3508 kB  173 kBps 00m00s
# sha256 unbound-1.4.18.tar.gz
SHA256 (unbound-1.4.18.tar.gz) = f792f0c5cee1510c5319e85b6d3873bde273e773b8c786bf56f92687376cb2d7
# fetch http://unbound.net/downloads/unbound-1.4.18.tar.gz
unbound-1.4.18.tar.gz                         100% of 3508 kB  174 kBps 00m00s
# sha256 unbound-1.4.18.tar.gz
SHA256 (unbound-1.4.18.tar.gz) = 47bf5330471aca39c08e7685a79f3e13735903d3ca97c264bb5aeb9abc73442b

This behavior was also tested and confirmed present using FTP instead of fetch.

Additionally, an interrupt storm was noticed on first booting the dreamplug with the eSATA device connected. 

Here is my kernel config file:
#
# Custom kernel for Marvell DreamPlug devices.
# 
# $FreeBSD:$
#
ident		DREAMPLUG
include		"../mv/kirkwood/std.dreamplug"

options 	SOC_MV_KIRKWOOD
makeoptions	MODULES_OVERRIDE=""

#makeoptions	DEBUG=-g		#Build kernel with gdb(1) debug symbols
makeoptions	WERROR="-Werror"

options 	SCHED_4BSD		#4BSD scheduler
options 	INET			#InterNETworking
options 	INET6			#IPv6 communications protocols
options 	FFS			#Berkeley Fast Filesystem
options		MD_ROOT			# MD is a potential root device
#options 	NFSCL			#New Network Filesystem Client
#options 	NFSLOCKD		#Network Lock Manager
#options 	NFS_ROOT		#NFS usable as /, requires NFSCL

#bootp/dhcp for remote booting
#options 	BOOTP
#options 	BOOTP_NFSROOT
#options 	BOOTP_NFSV3
#options 	BOOTP_WIRED_TO=mge0

# Root fs on USB device
options     ROOTDEVNAME=\"ufs:/dev/da2s2a\" 

options 	SYSVSHM			#SYSV-style shared memory
options 	SYSVMSG			#SYSV-style message queues
options 	SYSVSEM			#SYSV-style semaphores
options 	_KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions
options 	MUTEX_NOINLINE
options 	RWLOCK_NOINLINE
options 	NO_FFS_SNAPSHOT
options 	NO_SWAPPING


# Debugging
#options 	ALT_BREAK_TO_DEBUGGER
options		BREAK_TO_DEBUGGER
options 	DDB
#options 	DEADLKRES		#Enable the deadlock resolver
#options 	DIAGNOSTIC
#options 	INVARIANTS		#Enable calls of extra sanity checking
#options 	INVARIANT_SUPPORT	#Extra sanity checks of internal structures, required by INVARIANTS
options 	KDB
#options 	WITNESS			#Enable checks to detect deadlocks and cycles
#options 	WITNESS_SKIPSPIN	#Don't run witness on spinlocks for speed
#options 	WITNESS_KDB
#options		DEBUG

# Serial ports
device		uart

#ata devices
device          ata             #base ata driver
options         ATA_CAM         # Handle legacy controllers with CAM
options         ATA_STATIC_ID   # Static device numbering

# SCSI 
options 	SCSI_DELAY=5000		# Delay (in ms) before probing SCSI
device		scbus        # SCSI bus (required for SCSI) 
device		da           # Direct Access (disks) 
device		sa
device		cd           # CD 
device		pass 

# SATA
device		mvs	#Marvell Sata driver
device          ahci    # AHCI-compatible SATA controllers

# Partition support
options 	GEOM_PART_GPT
options 	GEOM_LABEL
options		GEOM_ELI

# UFS
options 	UFS_ACL
options 	UFS_DIRHASH
options		UFS_GJOURNAL 
options 	SOFTUPDATES

# FAT support
options 	MSDOSFS

# Misc FSs
options 	PROCFS
options		EXT2FS 
device		mem
options		PSEUDOFS        #Pseudo-filesystem framework 
options		CD9660            #ISO 9660 filesystem
options		VFS_AIO
options		CD9660_ICONV

# Sound
device 		sound
device 		snd_uaudio

# Networking
device		ether
device		mge			# Marvell Gigabit Ethernet controller
device		mii
device		miibus
device		e1000phy
device		bpf
options		HZ=1000
options		DEVICE_POLLING
device		vlan

#Misc Extra Netwroking
#options         NETATALK	#Appletalk communications protocols
#options         NETSMB		#SMB/CIFS requester
#options         SMBFS		#SMB/CIFS filesystem
options         VFS_AIO

# Pseudo devices.
device		loop		# Network loopback
device		random		# Entropy device
device		ether		# Ethernet support
device		vlan		# 802.1Q VLAN support
device		tun		# Packet tunnel.
device		pty		# BSD-style compatibility pseudo ttys
device		md		# Memory "disks"
device		gif		# IPv6 and IPv4 tunneling
device		faith		# IPv6-to-IPv4 relaying (translation)
device		firmware	# firmware assist module

#crypto
device		cesa			# Marvell security engine
device		crypto
device		cryptodev

#Wireless Networking
device          wlan
options         IEEE80211_DEBUG # enable debug msgs
options         IEEE80211_SUPPORT_MESH  # enable 802.11s draft support
device          wlan_wep        # 802.11 WEP support
device          wlan_ccmp       # 802.11 CCMP support
device          wlan_tkip       # 802.11 TKIP support
device          wlan_amrr       # AMRR transmit rate control algorithm

# USB DEBUG
#options 	USB_DEBUG	# enable debug msgs
#options		USB_REQ_DEBUG

# USB support
device		usb		# USB Bus (required)
device		ehci		# EHCI PCI->USB interface (USB 2.0)
device		umass		# Disks/Mass storage - Requires scbus and da
device		usfs
device		uhid
device		ums

#USB WIFI
device          rum             # Ralink Technology RT2501USB wireless NICs
device          uath            # Atheros AR5523 wireless NICs
device          ural            # Ralink Technology RT2500USB wireless NICs
device          zyd             # ZyDAS zb1211/zb1211b wireless NICs
device          urtw		# Realtek RTL8187B/L USB
device          upgt		# Conexant/Intersil PrismGT SoftMAC USB

# USB Serial devices
device		u3g		# USB-based 3G modems (Option, Huawei, Sierra)
#options         U3G_DEBUG

#USB Over Ethernet
device          cdce          # Generic USB over Ethernet

# MMC/SD (Currently not supported)
#device          mv_sdio
#device          mmc
#device          mmcsd
#device          sdhci          

#BLUETOOTH

# I2C (TWSI)
device		iic
device		iicbus
device		icee 

options		LIBICONV 
options		LIBMCHAIN 

# Flattened Device Tree
options 	FDT
options		FDT_DTB_STATIC
makeoptions	FDT_DTS_FILE=dreamplug.dts

#FireWall
device		if_bridge 

# Encapsulating Interface
device		enc

# IPSec
options		IPSEC
options 	IPSEC_NAT_T
options 	TCP_SIGNATURE		#include support for RFC 2385

# IPFW support
options 	IPFIREWALL
options 	IPFIREWALL_DEFAULT_TO_ACCEPT
options 	IPFIREWALL_FORWARD
options 	IPFIREWALL_VERBOSE
options 	IPFIREWALL_VERBOSE_LIMIT=100
options 	DUMMYNET
options 	IPDIVERT

# altq(9). Enable the base part of the hooks with the ALTQ option.
# Individual disciplines must be built into the base system and can not be
# loaded as modules at this point. ALTQ requires a stable TSC so if yours is
# broken or changes with CPU throttling then you must also have the ALTQ_NOPCC
# option.
options 	ALTQ
options 	ALTQ_CBQ	# Class Based Queueing
options 	ALTQ_RED	# Random Early Detection
options 	ALTQ_RIO	# RED In/Out
options 	ALTQ_HFSC	# Hierarchical Packet Scheduler
options 	ALTQ_CDNR	# Traffic conditioner
options 	ALTQ_PRIQ	# Priority Queueing
options 	ALTQ_NOPCC	# Required if the TSC is unusable
#options 	ALTQ_DEBUG

# MROUTING enables the kernel multicast packet forwarder, which works
# with mrouted and XORP.
options 	MROUTING		# Multicast routing

# Add multiple route table support
options		ROUTETABLES=16

# eliminating data copies on socket reads and writes.
# man 9 zero_copy
#options		ZERO_COPY_SOCKETS

#PF 
device          pf
device          pflog
device          pfsync


>How-To-Repeat:
Connect eSATA to dreamplug
Boot dreamplug with above config
Put it on a network
Then:

# gpart create -s gpt ada0
# gpart add -t freebsd-swap -s 2G ada0
# gpart add -t freebsd-ufs ada0

<add /dev/ada0p1 as swap and /dev/ada0p2 as a filesystem mounted on /foo>
# cd /foo
# fetch http://unbound.net/downloads/unbound-1.4.18.tar.gz
# sha256 unbound-1.4.18.tar.gz


>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211132210.qADMAPq3027907>