# DRM_MEM_MAGIC include/drm/drmP.h: Input/output error [HW]

## lostinspace2011

I was trying to get my framebuffer to display correctly and recompiled my kernel. After doing a make clean I get this error persistently. Any suggestion on how to resolve this. This happens with the latest stable kernel 2.6.30-gentoo-r5 and I am using amd64 / x86_64

 *Quote:*   

> 
> 
> hound linux # make 
> 
>   CHK     include/linux/version.h
> ...

 Last edited by lostinspace2011 on Sun Oct 25, 2009 10:46 pm; edited 1 time in total

----------

## Sadako

Given the input/output error you received, my first guess would actually be filesystem corruption...

Or even worse, a problem with the physical disk...

Can you open the file at /usr/src/linux/include/drm/drmP.h at all (just try to cat it)?

If not, fsck, and/or badblocks...

----------

## lostinspace2011

Yes I can. The file is there and I can open it in VIM as well.

 *Quote:*   

> 
> 
> hound linux # ls -l /usr/src/linux/include/drm/drmP.h
> 
> -rw-r--r-- 1 root root 50425 Jun 10 04:05 /usr/src/linux/include/drm/drmP.h
> ...

 

however md5sum fails with the same error

 *Quote:*   

> 
> 
> hound linux # md5sum /usr/src/linux/include/drm/drmP.h
> 
> md5sum: /usr/src/linux/include/drm/drmP.h: Input/output error
> ...

 

I wonder what is causing this.

----------

## lostinspace2011

You were right. I even tried rebooting. Does this look like a hardware or software error. 

 *Quote:*   

> 
> 
>     7.434063] EXT3 FS on sda4, internal journal
> 
> [    7.856776] Adding 2104504k swap on /dev/sda3.  Priority:-1 extents:1 across:2104504k 
> ...

 

----------

## Sadako

Odd...

Does dmesg tell you anything of interest?

Try to copy the file to a backup and remove the original;

```
cd /usr/src/linux/include/drm/

cp -a drmP.h _drmP.h && rm drmP.h && mv _drmP.h drmP.h
```

Odds are either the cp or rm will fail, if the cp fails you can just cat it to a new file as that seemed to work for you.

Best solution would probably be to just `rm -r /usr/src/linux-2.6.30-gentoo-r5 and re-emerge, but I'd strongly recommend both a badblocks scan and an fsck before doing so.

----------

## Sadako

I r teh slowpoke, disregard my last

Looks like a hardware issue to me, so don't know what else to tell you, other than to try playing around with hdparm, smartmontools or something similar to see if the disks' smart system can tell you anything...

----------

## linuxtuxhellsinki

First just backup all important data and then test the drive with smartmontools, but it really looks like the drive is going "out of order" and it might happen any time now after that kind of messages (just change it).

But maybe you'd check that the sata-cable is good first   :Rolling Eyes: 

----------

## lostinspace2011

I booted using the install CD and ran a fsck fixing all issues. It reported that several issues have been fixed, although after booting back into my normal system I still got the same error compiling the kernel. I have deleted the kernel source files and re-emerged them. Busy trying again. 

I also installed smartmontools and have fired off a long test (smartctl -t long /dev/sda4). It says the test will complete in 111 minutes. What section of the smartmontools section should I look out for. 

 *Quote:*   

> 
> 
> smartctl version 5.38 [x86_64-pc-linux-gnu] Copyright (C) 2002-8 Bruce Allen
> 
> Home page is http://smartmontools.sourceforge.net/
> ...

 

----------

## linuxtuxhellsinki

 *lostinspace2011 wrote:*   

> What section of the smartmontools section should I look out for. 
> 
>  *Quote:*   
> 
> Self-test execution status:      ( 121)	The previous self-test completed having
> ...

 

Those errors are all bad and normally there's no errors at the end of smartctl output and you've 591 (showing 5 last one). And that last line shows that the drive couldn't run the last offline test because there's "broken sectors" which it can't read.

Just change it, cause there's still warranty and it should be enough for the manufacturer if you send that smart-log. At least I could change my  80GB (Seagate Momentus 5400.3, Device Model: ST980815A) drive by just mailing the smart-log and I didn't even have any problems with it, just quite lot of errors at log but not even close of the amount that you've.

http://www.newegg.com/Product/Product.aspx?Item=N82E16822148214

 *Quote:*   

> 
> 
> Manufacturer Warranty
> 
> Beyond any applicable Newegg return policy, this item is warranted independently by the product's Manufacturer. Below is a summary provided for convenience only and may not be accurate or current. 
> ...

 

----------

