wierd behaviour with hard disks

From: Ashutosh S. Rajekar (asr@giaspna.vsnl.net.in)
Date: Sat Oct 21 2000 - 21:50:15 EST


Hello,

System: RedHat 6.2, AMD K6-2 500 Mhz, 64MB SDRAM (100Mhz), 512kb L2 cache.
Kernel: 2.2.14-5.0

I am running a utility that reads the entire hard disk sector by sector
twice, and compares the two buffers for each read. This is causing wierd
behaviour; sometimes I get a segmentation fault, sometimes the system runs
the init boot sequence again (if I run the program in runlevel 1, then it
automatically starts the system in runlevel 3) !!!

Also, I get errors using the 'llseek' and '_llseek' functions; sometimes
they work correctly, and otherwise they return errno=22 (EINVAL).
(my hard disk is a 2.1 GB Seagate drive, and the errors are returned
with lseek offsets that are sometimes just 1 byte from the start of the
disk == SEEK_SET !!!)

Sometimes, due to heavy memory allocation, the kernel starts killing the
system daemons, including the kernel threads, and the system just hangs.
(I have a program that starts allocating memory infinitely, 1024 bytes at
a time, in a for loop, and it too displays the same behaviour).

The code is very simple ... I open the device file, read 512 bytes at a
time, and continue to do so till the end of the hard disk is reached.

Any ideas ?

Thanks,
----------------------
Ashutosh S. Rajekar
IBM India.
http://www.rajekar.org

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Oct 23 2000 - 21:00:18 EST