[lkml]   [2000]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectwierd behaviour with hard disks

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 ?

Ashutosh S. Rajekar
IBM India.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

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