Re: how can a bit be off in memory?



ray wrote:
On Fri, 29 Jun 2007 23:58:48 +0200, Charles T. Smith wrote:

Vim started crashing on me, particularly when I tried to open new lines. I finally checked it out with rpm and a newly downloaded copy of vim's
rpm and discovered that exactly one byte, deep into vim, was wrong.

I rebooted my machine (which has been super-solid for years) - and the
difference was gone.

So, what are the opinions - did I run into a hardware glich, or was
there a freaky issue with memory mapping?

I think I'd run 'badblocks' on the disk.

Oh..I had this years ago - and repeatably too..on a machine with some third party hardware in it.

Two bytes were FF on a file loaded from the floppy disk.

It turned out to be a timing issue: At a given point the DMA was doing its stuff, and the IO address momentarily passed that assigned to the 3rd party card, which was slow on decoding it, that it thought it was still there when the IO line went up..and so the card grabbed the bus and plonked an 'all ones' 16 bit on the thing..

My guess is yo have some marginal hardware in the system, and maybe the weather was warm, and the transfer from disk just happened to be in an area of memory that excited the bad hardware..

In other words a confluence of events conspired..

Never believe that computers are 100% reliable,. A friend spent some time years ago developing hardware: they ran into an interrupt timing issue. Every 4-5 hours the machine would crash when a timer interrupt interrupted a particular piece of code. For reasons deep and complex, they couldn't turn interrupts off, but the managed to re-code the bit of code so the offending part was very small, and they calculated the crash would occur only once in every 5 years or so.

They left it that way, knowing that occasionally a user would scratch his head, reboot, and shrug his shoulders 'I wonder what THAT was?' :-)
:-)

ONE bad byte is indicative of an 8 bit peripheral misbehaving. Its NOT indicative of a memory or disk error...those happen at the bit level and generally result in an error being flagged.

The odd thing is that your on-disk copy got corrupted..or was it? Or was it the LOADED copy that was corrupted?
.



Relevant Pages

  • Re: Polling loop good here???
    ... The "vertical retrace interrupt" was IRQ 2... ... In today's hardware - as has been mentioned - they've almost certainly ... it...make use of the drivers... ...
    (alt.lang.asm)
  • RE: Polling For 100 mbps Connections? (Was Re: Freebsd Theme Song)
    ... >> polling is less ... It depends on the hardware. ... >has built-in hardware interrupt throttling (such ...
    (freebsd-questions)
  • Re: linux-next: Tree for June 13: IO APIC breakage on HP nx6325
    ... If your patch is applied in its present form, all of the boxes from HP ... The workaround makes the system use the mixed interrupt mode (well, ... but it does not make your piece of hardware less broken. ... If we stopped using parts of some spec, ...
    (Linux-Kernel)
  • Re: Polling for ath driver
    ... but we've found polling to be extremely valuable on low-end hardware as described here. ... We use it only on fxp drivers, but it moved throughput on 133Mhz hardware from something around 8Mbps to 20Mbps on regular layer-3 packet forwarding and also bumped VPN performance up significantly when used with hardware VPN accelerators. ... Unless you've significantly restructured the interrupt handling in the ... Adding polling to this driver does increase performance on embedded ...
    (freebsd-net)
  • Re: How to debug inside the BIOS and/or interrupt?
    ... I'm not sure I can help with your specific code problem but if the program works when you read only one chunk of data at a time from disk, but locks up after a while if you read multiple chunks, then probably one of two things is happening -- some memory is being corrupted or an interrupt is taking too long somewhere. ... one nice way to debug interrupt problems on such hardware is to modify your interrupt routine so that it toggles a pin that you can look at with a 'scope. ... That's usually not wise to attempt within an interrupt but you can simulate such a thing by doing something like writing to a fixed, preallocated error log in memory, or to a hardware register. ... Again you might find the printer port convenient for this, or if you have at least an EGA compatible display on your hardware, you can do things like change the background color of the screen by writing to the overcan register. ...
    (comp.lang.asm.x86)

Quantcast