lkml.org 
[lkml]   [2000]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectwierd behaviour with hard disks
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/

\
 
 \ /
  Last update: 2005-03-22 12:41    [W:0.045 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site