From nobody@FreeBSD.org  Wed May 10 22:24:31 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id D272716A471
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 10 May 2006 22:24:31 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8FB6443D46
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 10 May 2006 22:24:31 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k4AMOVQd028735
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 10 May 2006 22:24:31 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k4AMOVh5028734;
	Wed, 10 May 2006 22:24:31 GMT
	(envelope-from nobody)
Message-Id: <200605102224.k4AMOVh5028734@www.freebsd.org>
Date: Wed, 10 May 2006 22:24:31 GMT
From: Juan Fco Rodriguez <juan.fco.rodriguez@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: write failure on transfer (wrote -1 bytes of 1425408 bytes)
X-Send-Pr-Version: www-2.3

>Number:         97108
>Category:       bin
>Synopsis:       sysinstall(8): write failure on transfer (wrote -1 bytes of 1425408 bytes)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-sysinstall
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 10 22:30:17 GMT 2006
>Closed-Date:    
>Last-Modified:  Tue Jul 13 14:50:03 UTC 2010
>Originator:     Juan Fco Rodriguez
>Release:        6.0-SECURITY
>Organization:
Alma Technologies
>Environment:
root@juanillo:/home/jrh$ uname -a
FreeBSD juanillo.no-ip.info 6.0-SECURITY FreeBSD 6.0-SECURITY #0: Tue Apr 18 08:56:09 UTC 2006     root@builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
I can't make a binary upgrade with sysinstall.

It always fails at the same byte of the base distribution.
I think it's not a hard disk problem, because when
I skip the base distribution the rest of the packages 
(doc for example) go through that byte and finishes 
all the chunks OK.

I output here a dmesg and a df -h 
(the machine is an old pentium I
but i've tried to attach the hard disk to another
machine, another pentium I machine, and i've got the
same problem).

it's very annoying the opacity of the error message,
even if you can not fix this problem, it would be a
nice idea to elaborate this error to let future users
imagine where the problem might be.

I even offer you an account to log in if you need
more info. Thank you very much.

Copyright (c) 1992-2005 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD 6.0-SECURITY #0: Tue Apr 18 08:56:09 UTC 2006
    root@builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Pentium/P55C (199.43-MHz 586-class CPU)
  Origin = "GenuineIntel"  Id = 0x543  Stepping = 3
  Features=0x8001bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8,MMX>
real memory  = 536870912 (512 MB)
avail memory = 516030464 (492 MB)
Intel Pentium detected, installing workaround for F00F bug
npx0: [FAST]
npx0: <math processor> on motherboard
npx0: INT 16 interface
cpu0 on motherboard
pcib0: <Host to PCI bridge> pcibus 0 on motherboard
pci0: <PCI bus> on pcib0
isab0: <PCI-ISA bridge> at device 7.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel PIIX3 WDMA2 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xffa0-0xffaf at device 7.1 on
 pci0
ata0: <ATA channel 0> on atapci0
ata1: <ATA channel 1> on atapci0
uhci0: <Intel 82371SB (PIIX3) USB controller> port 0xff80-0xff9f irq 9 at device 7.2 on pci0
uhci0: [GIANT-LOCKED]
usb0: <Intel 82371SB (PIIX3) USB controller> on uhci0
usb0: USB revision 1.0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
cbb0: <RF5C475 PCI-CardBus Bridge> at device 13.0 on pci0
cardbus0: <CardBus bus> on cbb0
pccard0: <16-bit PCCard bus> on cbb0
cbb: Unable to map IRQ...
device_attach: cbb0 attach returned 12
rl0: <RealTek 8139 10/100BaseTX> port 0xf400-0xf4ff mem 0xffbef800-0xffbef8ff irq 10 at device 14.0 on pci0
miibus0: <MII bus> on rl0
rlphy0: <RealTek internal media interface> on miibus0
rlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
rl0: Ethernet address: 00:30:bd:b5:b6:17
rl1: <RealTek 8139 10/100BaseTX> port 0xf800-0xf8ff mem 0xffbefc00-0xffbefcff irq 11 at device 15.0 on pci0
miibus1: <MII bus> on rl1
rlphy1: <RealTek internal media interface> on miibus1
rlphy1:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
rl1: Ethernet address: 00:e0:4c:a0:f5:24
pci0: <display, VGA> at device 16.0 (no driver attached)
pmtimer0 on isa0
orm0: <ISA Option ROMs> at iomem 0xc0000-0xc7fff,0xea000-0xebfff on isa0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
fdc0: <Enhanced floppy controller> at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0
fdc0: [FAST]
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode
ppbus0: <Parallel port bus> on ppc0
plip0: <PLIP network interface> on ppbus0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 16550A
sio1 at port 0x2f8-0x2ff irq 3 on isa0
sio1: type 16550A
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
unknown: <PNP0303> can't assign resources (port)
psmcpnp0: irq resource info is missing; assuming irq 12
unknown: <PNP0c01> can't assign resources (memory)
unknown: <PNP0700> can't assign resources (port)
unknown: <PNP0400> can't assign resources (port)
unknown: <PNP0501> can't assign resources (port)
unknown: <PNP0501> can't assign resources (port)
Timecounter "TSC" frequency 199432804 Hz quality 800
Timecounters tick every 1.000 msec
ad0: 38166MB <Seagate ST340810A 3.99> at ata0-master WDMA2
acd0: CDRW <NEC NR-7500A/1.20> at ata1-master PIO4
Trying to mount root from ufs:/dev/ad0s4a
ipfw2 (+ipv6) initialized, divert loadable, rule-based forwarding disabled, default to deny, logging disabled


The output of df -hi is:

root@juanillo:/home/jrh$ df -hi
Filesystem     Size    Used   Avail Capacity iused   ifree %iused  Mounted on
/dev/ad0s4a    295M    171M    101M    63%    4020   34122   11%   /
devfs          1.0K    1.0K      0B   100%       0       0  100%   /dev
/dev/ad0s4e    126M     14K    116M     0%       7   16247    0%   /tmp
/dev/ad0s4g    5.2G    2.0G    2.8G    42%   99061  579465   15%   /usr
/dev/ad0s4f    252M     98M    134M    42%    1388   31122    4%   /var
/dev/ad0s3      13G    6.3G    6.0G    51%  170485 1666569    9%   /usr/home
/dev/ad0s1     9.5G    8.4G    269M    97%      46 1295312    0%   /usr/home/compartido/eMule
root@juanillo:/home/jrh$ 

>How-To-Repeat:
Just ask me to let you log in my machine.
>Fix:
I dont understand why this is happening. it's not 
a disk issue because I can work without problems
on this machine (in my humble opinion).

Besides, searching on google I can find other
guys that have experienced the same issue, so
a clear response on this is really needed.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-qa 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat May 13 14:18:19 UTC 2006 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=97108 
Responsible-Changed-From-To: freebsd-bugs->freebsd-sysinstall 
Responsible-Changed-By: gavin 
Responsible-Changed-When: Tue Jul 13 13:37:12 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer(s) 

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

From: Garrett Cooper <yanegomi@gmail.com>
To: bug-followup@FreeBSD.org, juan.fco.rodriguez@gmail.com
Cc:  
Subject: Re: bin/97108: sysinstall(8): write failure on transfer (wrote -1 
	bytes of 1425408 bytes)
Date: Tue, 13 Jul 2010 07:42:16 -0700

 It might help if we actually captured the error and displayed it...
 Thanks,
 -Garrett
 
 Index: dist.c
 ===================================================================
 --- dist.c	(revision 206173)
 +++ dist.c	(working copy)
 @@ -40,7 +40,9 @@
  #include <sys/time.h>
  #include <sys/uio.h>
  #include <ctype.h>
 +#include <errno.h>
  #include <signal.h>
 +#include <string.h>
  #include <libutil.h>
 
  unsigned int Dists;
 @@ -658,6 +660,7 @@
  	    /* No substitution necessary */
  	    retval = write(fd2, buf, realsize);
  	    if (retval != realsize) {
 +		msgDebug("Write failure on transfer: %s", strerror(errno));
  		fclose(fp);
  		dialog_clear_norefresh();
  		msgConfirm("Write failure on transfer! (wrote %d bytes of %d
 bytes)", retval, realsize);
 @@ -669,6 +672,7 @@
  		if ((buf[j] != 0x0d) || (j == total - 1) || (buf[j + 1] != 0x0a)) {
  		    retval = write(fd2, buf + j, 1);
  		    if (retval != 1) {
 +			msgDebug("Write failure on transfer: %s", strerror(errno));
  			fclose(fp);
  			dialog_clear_norefresh();
  			msgConfirm("Write failure on transfer! (wrote %d bytes of %d
 bytes)", j, chunksize);
>Unformatted:
