LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   copy to SATA makes system freeze (Slack 12) (https://www.linuxquestions.org/questions/slackware-14/copy-to-sata-makes-system-freeze-slack-12-a-579782/)

furryspider 08-25-2007 02:15 PM

copy to SATA makes system freeze (Slack 12)
 
Hi,

I got myself a new computer and have found a little problem with my current installation. I hope someone here can help me.

System:
========================
Processor: AMD Athlon 64 X2 4200 EE
RAM: 2 x 1024 Corsair TwinX
Mainboard: ASUS M2N4-SLI with nforce4-Chipset
SATA-Harddisk: Samsung HD252KJ (250GB, 16MB Cache)
OS: Slackware 12.0 (Kernel 2.6.21.5-smp)


Problem:
========================
I want the SATA drive to hold my OS and a big data partition. Many partitions on that drive are encrypted (LUKS). When I copy anything over, say, a few MB onto such a partition, the disk stays active for a moment, then the system freezes and reboots. This is true for copies from another disk as well as for copies within the same HDD.

I'm currently running the same OS from my old IDE harddisk, installed in the same computer. Copy operations to any IDE or USB drive, encrypted or not, work flawlessly.

This is some relevant stuff from dmesg:
Code:

Loading iSCSI transport class v2.0-724.
sata_nv 0000:00:07.0: version 3.3
ACPI: PCI Interrupt Link [APSI] enabled at IRQ 23
ACPI: PCI Interrupt 0000:00:07.0[A] -> Link [APSI] -> GSI 23 (level, low) -> IRQ 16
sata_nv 0000:00:07.0: Using ADMA mode
PCI: Setting latency timer of device 0000:00:07.0 to 64
ata1: SATA max UDMA/133 cmd 0xf8810480 ctl 0xf88104a0 bmdma 0x0001d400 irq 16
ata2: SATA max UDMA/133 cmd 0xf8810580 ctl 0xf88105a0 bmdma 0x0001d408 irq 16
scsi0 : sata_nv
ata1: SATA link down (SStatus 0 SControl 300)
scsi1 : sata_nv
ata2: SATA link down (SStatus 0 SControl 300)
ACPI: PCI Interrupt Link [APSJ] enabled at IRQ 22
ACPI: PCI Interrupt 0000:00:08.0[A] -> Link [APSJ] -> GSI 22 (level, low) -> IRQ 17
sata_nv 0000:00:08.0: Using ADMA mode
PCI: Setting latency timer of device 0000:00:08.0 to 64
ata3: SATA max UDMA/133 cmd 0xf8812480 ctl 0xf88124a0 bmdma 0x0001c000 irq 17
ata4: SATA max UDMA/133 cmd 0xf8812580 ctl 0xf88125a0 bmdma 0x0001c008 irq 17
scsi2 : sata_nv
ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata3.00: ATAPI, max UDMA/66
ata3.00: configured for UDMA/66
scsi3 : sata_nv
ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata4.00: ATA-8: SAMSUNG HD252KJ, CM100-10, max UDMA7
ata4.00: 488397168 sectors, multi 1: LBA48 NCQ (depth 31/32)
ata4.00: configured for UDMA/133
scsi 2:0:0:0: CD-ROM            PIONEER  DVD-RW  DVR-212  1.21 PQ: 0 ANSI: 5
ata3: bounce limit 0xFFFFFFFF, segment boundary 0xFFFF, hw segs 127
sr0: scsi3-mmc drive: 40x/40x writer dvd-ram cd/rw xa/form2 cdda tray
sr 2:0:0:0: Attached scsi CD-ROM sr0
scsi 3:0:0:0: Direct-Access    ATA      SAMSUNG HD252KJ  CM10 PQ: 0 ANSI: 5
ata4: bounce limit 0xFFFFFFFFFFFFFFFF, segment boundary 0xFFFFFFFF, hw segs 61
SCSI device sda: 488397168 512-byte hdwr sectors (250059 MB)
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
SCSI device sda: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
SCSI device sda: 488397168 512-byte hdwr sectors (250059 MB)
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
SCSI device sda: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sda: sda1 sda2 sda3 sda4 < sda5 sda6 sda7 >
sd 3:0:0:0: Attached scsi disk sda

This is the hdparm output for the SATA drive:
Code:

/dev/sda:
 IO_support    =  0 (default 16-bit)
 readonly      =  0 (off)
 readahead    = 256 (on)
 geometry      = 30401/255/63, sectors = 488397168, start = 0

ATA device, with non-removable media
        Model Number:      SAMSUNG HD252KJ                       
        Serial Number:      S0NJJ1MP601089     
        Firmware Revision:  CM100-10
        Transport:          Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5
Standards:
        Supported: 8 7 6 5
        Likely used: 8
Configuration:
        Logical                max        current
        cylinders        16383        16383
        heads                16        16
        sectors/track        63        63
        --
        CHS current addressable sectors:  16514064
        LBA    user addressable sectors:  268435455
        LBA48  user addressable sectors:  488397168
        device size with M = 1024*1024:      238475 MBytes
        device size with M = 1000*1000:      250059 MBytes (250 GB)
Capabilities:
        LBA, IORDY(can be disabled)
        Queue depth: 32
        Standby timer values: spec'd by Standard, no device specific minimum
        R/W multiple sector transfer: Max = 16        Current = 1
        Recommended acoustic management value: 254, current value: 0
        DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6 udma7
            Cycle time: min=120ns recommended=120ns
        PIO: pio0 pio1 pio2 pio3 pio4
            Cycle time: no flow control=120ns  IORDY flow control=120ns
Commands/features:
        Enabled        Supported:
          *        SMART feature set
                    Security Mode feature set
          *        Power Management feature set
          *        Write cache
          *        Look-ahead
          *        Host Protected Area feature set
          *        WRITE_BUFFER command
          *        READ_BUFFER command
          *        NOP cmd
          *        DOWNLOAD_MICROCODE
                    SET_MAX security extension
                    Automatic Acoustic Management feature set
          *        48-bit Address feature set
          *        Device Configuration Overlay feature set
          *        Mandatory FLUSH_CACHE
          *        FLUSH_CACHE_EXT
          *        SMART error logging
          *        SMART self-test
          *        General Purpose Logging feature set
          *        64-bit World wide name
          *        Segmented DOWNLOAD_MICROCODE
          *        SATA-I signaling speed (1.5Gb/s)
          *        SATA-II signaling speed (3.0Gb/s)
          *        Native Command Queueing (NCQ)
          *        Host-initiated interface power management
          *        Phy event counters
                    DMA Setup Auto-Activate optimization
                    Device-initiated interface power management
          *        Software settings preservation
          *        SMART Command Transport (SCT) feature set
          *        SCT Long Sector Access (AC1)
          *        SCT LBA Segment Access (AC2)
          *        SCT Error Recovery Control (AC3)
          *        SCT Features Control (AC4)
          *        SCT Data Tables (AC5)
Security:
        Master password revision code = 65534
                supported
        not        enabled
        not        locked
                frozen
        not        expired: security count
                supported: enhanced erase
        112min for SECURITY ERASE UNIT. 112min for ENHANCED SECURITY ERASE UNIT.
Checksum: correct

Just before the reboot, /var/log/messages gives me this:
Code:

ata4: soft resetting port
ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata4.00: configured for UDMA/133
sd 3:0:0:0: SCSI error: return code = 0x08000002
sda: Current [descriptor]: sense key=0xb
    ASC=0x0 ASCQ=0x0
Descriptor sense data with sense descriptors (in hex):
        72 0b 00 00 00 00 00 0c 00 0a 80 00 00 00 00 00
        00 00 00 00
sd 3:0:0:0: SCSI error: return code = 0x08000002
sda: Current [descriptor]: sense key=0xb
    ASC=0x0 ASCQ=0x0
Descriptor sense data with sense descriptors (in hex):
        72 0b 00 00 00 00 00 0c 00 0a 80 00 00 00 00 00
        00 00 00 00
ata4: EH complete
SCSI device sda: 488397168 512-byte hdwr sectors (250059 MB)
sda: Write Protect is off
SCSI device sda: write cache: enabled, read cache: enabled, doesn't support DPO or FUA

I've checked non-encrypted partitions on the same drive. They seem to work fine.

And there's another weird thing: Just to check things I booted a Live CD (Knoppix 5.2 c't DVD with 2.6.19.5). All copy operations work absolutely fine there, to encrypted as well as unencrypted partitions. I wasn't able to get a /var/log/messages output, since Knoppix doesn't seem to have that, but here are some dmesg lines:
Code:

Loading iSCSI transport class v2.0-724.<7>sata_nv 0000:00:07.0: version 2.0
ACPI: PCI Interrupt Link [APSI] enabled at IRQ 23
ACPI: PCI Interrupt 0000:00:07.0[A] -> Link [APSI] -> GSI 23 (level, low) -> IRQ 16
PCI: Setting latency timer of device 0000:00:07.0 to 64
ata1: SATA max UDMA/133 cmd 0x9F0 ctl 0xBF2 bmdma 0xD400 irq 16
ata2: SATA max UDMA/133 cmd 0x970 ctl 0xB72 bmdma 0xD408 irq 16
scsi0 : sata_nv
ata1: SATA link down (SStatus 0 SControl 300)
scsi1 : sata_nv
ata2: SATA link down (SStatus 0 SControl 300)
ACPI: PCI Interrupt Link [APSJ] enabled at IRQ 22
ACPI: PCI Interrupt 0000:00:08.0[A] -> Link [APSJ] -> GSI 22 (level, low) -> IRQ 17
PCI: Setting latency timer of device 0000:00:08.0 to 64
ata3: SATA max UDMA/133 cmd 0x9E0 ctl 0xBE2 bmdma 0xC000 irq 17
ata4: SATA max UDMA/133 cmd 0x960 ctl 0xB62 bmdma 0xC008 irq 17
scsi2 : sata_nv
ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata3.00: ATAPI, max UDMA/66
ata3.00: configured for UDMA/66
scsi3 : sata_nv
ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata4.00: ATA-8, max UDMA7, 488397168 sectors: LBA48 NCQ (depth 0/32)
ata4.00: ata4: dev 0 multi count 1
ata4.00: configured for UDMA/133
scsi 2:0:0:0: CD-ROM            PIONEER  DVD-RW  DVR-212  1.21 PQ: 0 ANSI: 5
sr0: scsi3-mmc drive: 62x/62x writer dvd-ram cd/rw xa/form2 cdda tray
sr 2:0:0:0: Attached scsi CD-ROM sr0
scsi 3:0:0:0: Direct-Access    ATA      SAMSUNG HD252KJ  CM10 PQ: 0 ANSI: 5
SCSI device sda: 488397168 512-byte hdwr sectors (250059 MB)
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
SCSI device sda: drive cache: write back
SCSI device sda: 488397168 512-byte hdwr sectors (250059 MB)
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
SCSI device sda: drive cache: write back
 sda: sda1 sda2 sda3 sda4 < sda5 sda6 sda7 >
sd 3:0:0:0: Attached scsi disk sda

Apart from the difference in sata_nv versions (3.3 for Slack, 2.0 for Knoppix), I can't spot anything fishy there.

I tried recompiling device-mapper and cryptsetup, to no avail. Next I compiled a new kernel (2.6.22.5) to check if maybe dm_mod/dm_crypt of Slack 12 were the culprits. No good, the same behaviour persists.

So now I'm fresh out of ideas, and I'm starting to grow a little sick of crashing/rebooting/fs-checking my system over and over. If anyone here has ANY idea of how to trace this, please let me know. If you need more information, just tell me what to get.

Thanks in advance!

acummings 08-26-2007 11:40 PM

I don't have hardware requireing sata_nv. I only found that others using sata_nv with LUKS have had probs. Alan.

http://www.google.com/linux?q=sata_n...G=Search&hl=en

Code:

https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.20/+bug/82528

http://bugzilla.kernel.org/show_bug.cgi?id=8020



All times are GMT -5. The time now is 06:39 PM.