Subject: cp caused a panic
To: None <port-i386@NetBSD.ORG>
From: Brian Stark <bstark@empros.com>
List: port-i386
Date: 06/09/1997 10:30:00
Hello

I am running NetBSD 1.2.1/i386 and my kernel decided to panic last night 
when I was copying a file. I am wondering if anyone has any ideas as to why 
this happened. Here's what I did/saw:

  cp /seagate/gpc20.tgz .
  panic: allocbuf: buffer larger than MAXBSIZE requested.
  stopped at _Debugger+0x4: leave

Also, after I had rebooted my machine, I noticed that the file gpc20.tgz
no longer existed under /seagate. The gpc20.tgz file is 1,710,665 bytes and 
/seagate is a 2GB MS-DOS file system, formatted by Win95. I was copying the 
file to a 3GB Western Digital hard drive that has two partitions -- one for 
Win95 (about 2GB in size) and the other for NetBSD (about 1GB in size). The 
NetBSD partition has about 500MB free, so there is no shortage of disk space.

I have copied large files before on my WD drive, and cp has not caused a 
panic. This is my first time copying files between my Seagate and the WD 
drive. Is there something obviously wrong with what I am doing? If it 
helps at all, I mount my Seagate drive like this in /etc/fstab:

  "/dev/wd1e /seagate msdos rw"

Right now it looks like I need to increase the value of MAXBSIZE and try 
again (where is this defined?), but I am wondering what the cp code is 
doing... Copying a file isn't that difficult, you read from the source file 
and write to the target file until finished processing the source file.
Does cp try to allocate one buffer to copy the entire file at once?


Thanks,

Brian

-------------------------------------------------------------------------
| Brian Stark                       | Internet : bstark@siemens-psc.com |
| Siemens Energy & Automation, Inc. |          : bstark@empros.com      |
| Power Systems Control Division    |                                   |
| 7225 Northland Drive              | Voice    : +1 612 536-4697        |
| Brooklyn Park, MN 55428   USA     | Fax      : +1 612 536-4919        |
-------------------------------------------------------------------------