Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: RPI3 sd lockups?



I have been running an RPi3b+ for more than a year doing mostly ./build.sh ; the 'system' remained on the SD card, but a USB HD held the source.  About a month ago, I couldn't log in to my account!  Figuring I was hacked, went to console, root login worked.

Fishing around more, /usr/pkg/bin/zsh was gone!  W T F?  

Using Occam, I figured corrupt SD card. I replaced it, all is fine.  Yet....

Is there a preferred way to determine which sectors are bad on the old SD card?    Plugged in a USB-to-SDcard adaptor with the presumed bad uSD:

Jul  3 04:11:55 S /netbsd: [ 370462.5581262] umass2: using SCSI over Bulk-Only
Jul  3 04:11:55 S /netbsd: [ 370462.5581262] scsibus2 at umass2: 2 targets, 1 lun per target
Jul  3 04:11:55 S /netbsd: [ 370462.5781259] sd2 at scsibus2 target 0 lun 0: <Generic-, USB3.0 CRW   -SD, 1.00> disk removable
Jul  3 04:11:56 S /netbsd: [ 370463.6182434] sd2: fabricating a geometry
Jul  3 04:11:56 S /netbsd: [ 370463.6182434] sd2: 30528 MB, 30528 cyl, 64 head, 32 sec, 512 bytes/sect x 62521344 sectors
Jul  3 10:09:54 S /netbsd: [ 370463.6382510] sd2: fabricating a geometry

Then ran this:

# nice dd if=/dev/rsd2 of=/dev/null
62521344+0 records in
62521344+0 records out
32010928128 bytes transferred in 30505.600 secs (1049345 bytes/sec)
#

No errors were reported in /var/log/messages

So now I'm wondering: was I hacked?  Or is dd not the best way to test for bad sectors?  Or, has the SD card somehow re-mapped the bad sectors?  Or?


On Fri, Jul 3, 2020 at 12:34 PM Brad Spencer <brad%anduin.eldar.org@localhost> wrote:
Greg Troxel <gdt%lexort.com@localhost> writes:

> I have a few RPI3s, all running netbsd-8.  Two have been entirely
> stable, one on a UPS and one not.  One, not on a UPS, has over the last
> month or two started having odd lockups.  The symptom is
>
>   logging messages that the sd card cannot be written, but not medium
>   error.  Looks like controller out to lunch.  I don't have the text -
>   it doesn't get writtten.
>
>   weewx ends up with multiple copies
>
>   kernel accepts writes to files, but the blocks don't make it out
>
>   on inspection, the sd card is fine
>
>
> On my todo list is updating to netbsd-9.  Besides that, I wonder if
> anybody has wisdom in terms of:
>
>   - smells like power supply issue
>   - smells like hardware failure
>   - known netbsd-8 issue
>   - smells like SD card issue anyway
>
> ?

Can you break into ddb and see if there are a lot of processes hung up??
I have a RPI2 that doesn't like to have more than 1 device on its I2C
bus, it turns out, and if one of the devices hangs on read eventually
the system will hang up completely, probably due to filling up memory
and/or the process table (one of the devices is read every minute).  I
noted complaints much like you mention, where it could not write to the
SD card if I let it go on long enough in this situation.  This is with
NetBSD 9.x.




--
Brad Spencer - brad%anduin.eldar.org@localhost - KC8VKS - http://anduin.eldar.org


Home | Main Index | Thread Index | Old Index