Re: OpenBSD hangs when i unplug USB disk

2012-12-17 Thread Marcos Ariel Laufer

On 11/20/2012 1:32 PM, Marcos Laufer wrote:

Peter Hessler wrote:

On 2012 Nov 20 (Tue) at 12:45:09 -0300 (-0300), Marcos Laufer wrote:
:Ok , i've just tried it on a OpenBSD 5.1 and unplugging the USB works
:just fine, no crash, no freeze.
:
:The weird thing and i don't understand why, is that you guys had good
:results with old OpenBSD versions and i didn't.
:

No, nobody bothered with older versions.  We run -current, or 5.1 at the
latest.



I'm sorry, but some people bothered, even asked me to send info 
because this worked with old versions of the OS to them and not to me. 
So i guess it has something to do with the firmware on the disk, i 
don't really know. But if it works on 5.1 then that's enough for me.





I'm sorry the problem is not solved. I installed OpenBSD 5.2 , attempted 
to format the disk and it ends with an error (i can only see it on 
console and didn't write it down) , and after that the device is 
detached and the port disabled. I am not in the datacenter right now so 
i can't unplug it and plug it in again (although now it does not hang 
the OS when doing this) to try again:


umass0 at uhub0 port 3 configuration 1 interface 0 Western Digital My 
Passport 0748 rev 2.10/10.15 addr 2

umass0: using SCSI over Bulk-Only
scsibus2 at umass0: 2 targets, initiator 0
sd1 at scsibus2 targ 1 lun 0: WD, My Passport 0748, 1015 SCSI4 
0/direct fixed

sd1: 953837MB, 512 bytes/sector, 1953458176 sectors
ses0 at scsibus2 targ 1 lun 1: WD, SES Device, 1015 SCSI4 13/enclosure 
services fixed

ses0: unable to read enclosure configuration
vscsi0 at root
scsibus3 at vscsi0: 256 targets
softraid0 at root
scsibus4 at softraid0: 256 targets
root on sd0a (dbca6b23415fa5d6.a) swap on sd0b dump on sd0b
WARNING: R/W mount of /mnt denied.  Filesystem is not clean - run fsck
sd1 detached
ses0 detached
scsibus2 detached
umass0 detached
umass0 at uhub0 port 3 configuration 1 interface 0 Western Digital My 
Passport 0748 rev 2.10/10.15 addr 2

umass0: using SCSI over Bulk-Only
scsibus2 at umass0: 2 targets, initiator 0
sd1 at scsibus2 targ 1 lun 0: WD, My Passport 0748, 1015 SCSI4 
0/direct fixed

sd1: 953837MB, 512 bytes/sector, 1953458176 sectors
ses0 at scsibus2 targ 1 lun 1: WD, SES Device, 1015 SCSI4 13/enclosure 
services fixed

ses0: unable to read enclosure configuration
sd1 detached
ses0 detached
scsibus2 detached
umass0 detached
uhub0: device problem, disabling port 3
umass0 at uhub0 port 4 configuration 1 interface 0 Western Digital My 
Passport 0748 rev 2.10/10.15 addr 2

umass0: using SCSI over Bulk-Only
scsibus2 at umass0: 2 targets, initiator 0
sd1 at scsibus2 targ 1 lun 0: WD, My Passport 0748, 1015 SCSI4 
0/direct fixed

sd1: 953837MB, 512 bytes/sector, 1953458176 sectors
ses0 at scsibus2 targ 1 lun 1: WD, SES Device, 1015 SCSI4 13/enclosure 
services fixed

ses0: unable to read enclosure configuration
sd1 detached
ses0 detached
scsibus2 detached
umass0 detached
umass0 at uhub0 port 4 configuration 1 interface 0 Western Digital My 
Passport 0748 rev 2.10/10.15 addr 2

umass0: using SCSI over Bulk-Only
scsibus2 at umass0: 2 targets, initiator 0
sd1 at scsibus2 targ 1 lun 0: WD, My Passport 0748, 1015 SCSI4 
0/direct fixed

sd1: 953837MB, 512 bytes/sector, 1953458176 sectors
ses0 at scsibus2 targ 1 lun 1: WD, SES Device, 1015 SCSI4 13/enclosure 
services fixed

ses0: unable to read enclosure configuration
sd1 detached
ses0 detached
scsibus2 detached
umass0 detached
uhub0: device problem, disabling port 4



Re: OpenBSD hangs when i unplug USB disk

2012-12-17 Thread Marcos Ariel Laufer

On 12/17/2012 2:23 PM, Marcos Ariel Laufer wrote:

On 11/20/2012 1:32 PM, Marcos Laufer wrote:

Peter Hessler wrote:

On 2012 Nov 20 (Tue) at 12:45:09 -0300 (-0300), Marcos Laufer wrote:
:Ok , i've just tried it on a OpenBSD 5.1 and unplugging the USB works
:just fine, no crash, no freeze.
:
:The weird thing and i don't understand why, is that you guys had good
:results with old OpenBSD versions and i didn't.
:

No, nobody bothered with older versions.  We run -current, or 5.1 at 
the

latest.



I'm sorry, but some people bothered, even asked me to send info 
because this worked with old versions of the OS to them and not to 
me. So i guess it has something to do with the firmware on the disk, 
i don't really know. But if it works on 5.1 then that's enough for me.





I'm sorry the problem is not solved. I installed OpenBSD 5.2 , 
attempted to format the disk and it ends with an error (i can only see 
it on console and didn't write it down) , and after that the device is 
detached and the port disabled. I am not in the datacenter right now 
so i can't unplug it and plug it in again (although now it does not 
hang the OS when doing this) to try again:


umass0 at uhub0 port 3 configuration 1 interface 0 Western Digital My 
Passport 0748 rev 2.10/10.15 addr 2

umass0: using SCSI over Bulk-Only
scsibus2 at umass0: 2 targets, initiator 0
sd1 at scsibus2 targ 1 lun 0: WD, My Passport 0748, 1015 SCSI4 
0/direct fixed

sd1: 953837MB, 512 bytes/sector, 1953458176 sectors
ses0 at scsibus2 targ 1 lun 1: WD, SES Device, 1015 SCSI4 
13/enclosure services fixed

ses0: unable to read enclosure configuration
vscsi0 at root
scsibus3 at vscsi0: 256 targets
softraid0 at root
scsibus4 at softraid0: 256 targets
root on sd0a (dbca6b23415fa5d6.a) swap on sd0b dump on sd0b
WARNING: R/W mount of /mnt denied.  Filesystem is not clean - run fsck
sd1 detached
ses0 detached
scsibus2 detached
umass0 detached
umass0 at uhub0 port 3 configuration 1 interface 0 Western Digital My 
Passport 0748 rev 2.10/10.15 addr 2

umass0: using SCSI over Bulk-Only
scsibus2 at umass0: 2 targets, initiator 0
sd1 at scsibus2 targ 1 lun 0: WD, My Passport 0748, 1015 SCSI4 
0/direct fixed

sd1: 953837MB, 512 bytes/sector, 1953458176 sectors
ses0 at scsibus2 targ 1 lun 1: WD, SES Device, 1015 SCSI4 
13/enclosure services fixed

ses0: unable to read enclosure configuration
sd1 detached
ses0 detached
scsibus2 detached
umass0 detached
uhub0: device problem, disabling port 3
umass0 at uhub0 port 4 configuration 1 interface 0 Western Digital My 
Passport 0748 rev 2.10/10.15 addr 2

umass0: using SCSI over Bulk-Only
scsibus2 at umass0: 2 targets, initiator 0
sd1 at scsibus2 targ 1 lun 0: WD, My Passport 0748, 1015 SCSI4 
0/direct fixed

sd1: 953837MB, 512 bytes/sector, 1953458176 sectors
ses0 at scsibus2 targ 1 lun 1: WD, SES Device, 1015 SCSI4 
13/enclosure services fixed

ses0: unable to read enclosure configuration
sd1 detached
ses0 detached
scsibus2 detached
umass0 detached
umass0 at uhub0 port 4 configuration 1 interface 0 Western Digital My 
Passport 0748 rev 2.10/10.15 addr 2

umass0: using SCSI over Bulk-Only
scsibus2 at umass0: 2 targets, initiator 0
sd1 at scsibus2 targ 1 lun 0: WD, My Passport 0748, 1015 SCSI4 
0/direct fixed

sd1: 953837MB, 512 bytes/sector, 1953458176 sectors
ses0 at scsibus2 targ 1 lun 1: WD, SES Device, 1015 SCSI4 
13/enclosure services fixed

ses0: unable to read enclosure configuration
sd1 detached
ses0 detached
scsibus2 detached
umass0 detached
uhub0: device problem, disabling port 4




Here's full dmesg when rebooting and tried to mount the sd1a partition 
afterwards.



OpenBSD 5.2 (GENERIC) #0: Fri Dec 14 23:58:18 ART 2012
r...@un8.huxley.com.ar:/u/system/src/sys/arch/i386/compile/GENERIC
cpu0: Intel(R) Xeon(TM) CPU 3.06GHz (GenuineIntel 686-class) 3.07 GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,CNXT-ID,xTPR

real mem  = 3220738048 (3071MB)
avail mem = 3157274624 (3011MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 12/31/99, BIOS32 rev. 0 @ 0xf, 
SMBIOS rev. 2.3 @ 0xec000 (42 entries)

bios0: vendor HP version P31 date 01/28/2004
bios0: HP ProLiant DL360 G3
acpi0 at bios0: rev 0
acpi0: sleep states S0 S4 S5
acpi0: tables DSDT FACP APIC SPCR
acpi0: wakeup devices
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: apic clock running at 133MHz
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 11, 16 pins
ioapic1 at mainbus0: apid 3 pa 0xfec01000, version 11, 16 pins
ioapic2 at mainbus0: apid 4 pa 0xfec02000, version 11, 16 pins
ioapic3 at mainbus0: apid 5 pa 0xfec03000, version 11, 16 pins
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (PCI1)
acpiprt2 at acpi0: bus 4 (PCI2)
acpicpu0 at acpi0
acpitz0 at acpi0: critical temperature is 

Re: OpenBSD hangs when i unplug USB disk

2012-11-20 Thread Marcos Laufer

Marcos Ariel Laufer wrote:

On 11/18/2012 12:35 PM, Paul de Weerd wrote:

On Thu, Nov 15, 2012 at 01:04:02PM -0300, Marcos Laufer wrote:
| I did this quite often a couple of weeks ago.  Haven't tried for a
| while (no need) and have upgraded to newer snaps a bunch of times
| since.  Tonight I'll confirm I can unplug safely on the latest snap.
|
| Thank you Paul, i look forward for the results of your testing 
tonight.


Apologies for the late response; my Thursday plans got changed at the
last minute.

However, I've verified that unplugging works fine with the latest
snapshot.  So no regressions from my POV.

Paul 'WEiRD' de Weerd

Damn, why mine isn't working fine then? Do you have i386 or AMD? I'll 
try latest 5.1 and 5.2 tomorrow and see what happens.





Ok , i've just tried it on a OpenBSD 5.1 and unplugging the USB works 
just fine, no crash, no freeze.


The weird thing and i don't understand why, is that you guys had good 
results with old OpenBSD versions and i didn't.


Regards,
Marcos



Re: OpenBSD hangs when i unplug USB disk

2012-11-20 Thread Paul de Weerd
On Mon, Nov 19, 2012 at 06:14:49PM -0300, Marcos Ariel Laufer wrote:
| However, I've verified that unplugging works fine with the latest
| snapshot.  So no regressions from my POV.
| 
| Damn, why mine isn't working fine then? Do you have i386 or AMD?
| I'll try latest 5.1 and 5.2 tomorrow and see what happens.

I've tested all currently connected disks on my machine:

sd0 at scsibus1 targ 1 lun 0: WD, My Passport 0740, 1003 SCSI4 0/direct fixed
sd1 at scsibus2 targ 1 lun 0: WD, My Passport 0748, 1010 SCSI4 0/direct fixed
sd2 at scsibus3 targ 1 lun 0: WD, My Passport 0730, 1015 SCSI4 0/direct fixed
sd3 at scsibus4 targ 1 lun 0: WD, My Passport 070A, 1032 SCSI2 0/direct fixed
sd4 at scsibus5 targ 1 lun 0: WD, My Passport 0748, 1010 SCSI4 0/direct fixed
sd5 at scsibus6 targ 1 lun 0: WD, My Passport 0748, 1010 SCSI4 0/direct fixed

which is running:

kern.version=OpenBSD 5.2-current (GENERIC.MP) #112: Tue Nov 13 12:57:16 MST 2012
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP

and I've not been able to reproduce the issue (dmesg with detach and
re-attach cycle for all disks included below).  In the past, I ran
i386 on another machine which also used a My Password disk (1008) and
did not have this issue there either, so I don't think it's an
i386-only problem...

Cheers,

Paul 'WEiRD' de Weerd

OpenBSD 5.2-current (GENERIC.MP) #112: Tue Nov 13 12:57:16 MST 2012
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 2144333824 (2044MB)
avail mem = 2064830464 (1969MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.3 @ 0xf0450 (76 entries)
bios0: vendor Dell Inc. version 2.1.0 date 12/04/2006
bios0: Dell Inc. OptiPlex 745
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT APIC BOOT ASF! MCFG HPET SLIC SSDT SSDT SSDT
acpi0: wakeup devices VBTN(S4) PCI0(S5) PCI4(S5) PCI2(S5) PCI3(S5) PCI1(S5) 
PCI5(S5) PCI6(S5) MOU_(S3) USB0(S3) USB1(S3) USB2(S3) USB3(S3) USB4(S3)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 CPU 6700 @ 2.66GHz, 2658.43 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF
cpu0: 4MB 64b/line 16-way L2 cache
cpu0: apic clock running at 265MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 CPU 6700 @ 2.66GHz, 2658.07 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF
cpu1: 4MB 64b/line 16-way L2 cache
ioapic0 at mainbus0: apid 8 pa 0xfec0, version 20, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 8
acpimcfg0 at acpi0 addr 0xe000, bus 0-255
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 4 (PCI4)
acpiprt1 at acpi0: bus 2 (PCI2)
acpiprt2 at acpi0: bus -1 (PCI3)
acpiprt3 at acpi0: bus 1 (PCI1)
acpiprt4 at acpi0: bus 3 (PCI5)
acpiprt5 at acpi0: bus -1 (PCI6)
acpiprt6 at acpi0: bus 0 (PCI0)
acpicpu0 at acpi0: PSS
acpicpu1 at acpi0: PSS
acpibtn0 at acpi0: VBTN
cpu0: Enhanced SpeedStep 2658 MHz: speeds: 2667, 2400, 2133, 1867, 1600 MHz
memory map conflict 0x7fe03c00/0x1fc400
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 Intel 82Q965 Host rev 0x02
ppb0 at pci0 dev 1 function 0 Intel 82Q965 PCIE rev 0x02: msi
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 ATI Radeon X1300 Pro rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
radeondrm0 at vga1: apic 8 int 16
drm0 at radeondrm0
ATI Radeon X1300 Pro Sec rev 0x00 at pci1 dev 0 function 1 not configured
uhci0 at pci0 dev 26 function 0 Intel 82801H USB rev 0x02: apic 8 int 16
uhci1 at pci0 dev 26 function 1 Intel 82801H USB rev 0x02: apic 8 int 17
ehci0 at pci0 dev 26 function 7 Intel 82801H USB rev 0x02: apic 8 int 22
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 Intel EHCI root hub rev 2.00/1.00 addr 1
azalia0 at pci0 dev 27 function 0 Intel 82801H HD Audio rev 0x02: msi
azalia0: codecs: Analog Devices AD1983
audio0 at azalia0
ppb1 at pci0 dev 28 function 0 Intel 82801H PCIE rev 0x02: msi
pci2 at ppb1 bus 2
ppb2 at pci0 dev 28 function 4 Intel 82801H PCIE rev 0x02: msi
pci3 at ppb2 bus 3
bge0 at pci3 dev 0 function 0 Broadcom BCM5754 rev 0x02, BCM5754/5787 A2 
(0xb002): apic 8 int 16, address 00:18:8b:6a:6d:87
brgphy0 at bge0 phy 1: BCM5787 10/100/1000baseT PHY, rev. 0
uhci2 at pci0 dev 29 function 0 Intel 82801H USB rev 0x02: apic 8 int 23
uhci3 at pci0 dev 29 function 1 Intel 82801H USB rev 0x02: apic 8 int 17
uhci4 at pci0 dev 29 function 2 Intel 82801H USB rev 0x02: apic 8 int 18
ehci1 at pci0 dev 29 function 7 Intel 82801H USB rev 0x02: apic 8 int 23
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 Intel EHCI root hub rev 

Re: OpenBSD hangs when i unplug USB disk

2012-11-20 Thread Peter Hessler
On 2012 Nov 20 (Tue) at 12:45:09 -0300 (-0300), Marcos Laufer wrote:
:Ok , i've just tried it on a OpenBSD 5.1 and unplugging the USB works
:just fine, no crash, no freeze.
:
:The weird thing and i don't understand why, is that you guys had good
:results with old OpenBSD versions and i didn't.
:

No, nobody bothered with older versions.  We run -current, or 5.1 at the
latest.

-- 
Did you know that Spiro Agnew is an anagram of Grow a Penis?



Re: OpenBSD hangs when i unplug USB disk

2012-11-20 Thread Marcos Laufer

Peter Hessler wrote:

On 2012 Nov 20 (Tue) at 12:45:09 -0300 (-0300), Marcos Laufer wrote:
:Ok , i've just tried it on a OpenBSD 5.1 and unplugging the USB works
:just fine, no crash, no freeze.
:
:The weird thing and i don't understand why, is that you guys had good
:results with old OpenBSD versions and i didn't.
:

No, nobody bothered with older versions.  We run -current, or 5.1 at the
latest.

  


I'm sorry, but some people bothered, even asked me to send info because 
this worked with old versions of the OS to them and not to me. So i 
guess it has something to do with the firmware on the disk, i don't 
really know. But if it works on 5.1 then that's enough for me.




Re: OpenBSD hangs when i unplug USB disk

2012-11-19 Thread Marcos Ariel Laufer

On 11/18/2012 12:35 PM, Paul de Weerd wrote:

On Thu, Nov 15, 2012 at 01:04:02PM -0300, Marcos Laufer wrote:
| I did this quite often a couple of weeks ago.  Haven't tried for a
| while (no need) and have upgraded to newer snaps a bunch of times
| since.  Tonight I'll confirm I can unplug safely on the latest snap.
|
| Thank you Paul, i look forward for the results of your testing tonight.

Apologies for the late response; my Thursday plans got changed at the
last minute.

However, I've verified that unplugging works fine with the latest
snapshot.  So no regressions from my POV.

Paul 'WEiRD' de Weerd

Damn, why mine isn't working fine then? Do you have i386 or AMD? I'll 
try latest 5.1 and 5.2 tomorrow and see what happens.




Re: OpenBSD hangs when i unplug USB disk

2012-11-18 Thread Paul de Weerd
On Thu, Nov 15, 2012 at 01:04:02PM -0300, Marcos Laufer wrote:
| I did this quite often a couple of weeks ago.  Haven't tried for a
| while (no need) and have upgraded to newer snaps a bunch of times
| since.  Tonight I'll confirm I can unplug safely on the latest snap.
| 
| Thank you Paul, i look forward for the results of your testing tonight.

Apologies for the late response; my Thursday plans got changed at the
last minute.

However, I've verified that unplugging works fine with the latest
snapshot.  So no regressions from my POV.

Paul 'WEiRD' de Weerd

-- 
[++-]+++.+++[---].+++[+
+++-].++[-]+.--.[-]
 http://www.weirdnet.nl/ 



Re: OpenBSD hangs when i unplug USB disk

2012-11-16 Thread Marcos Laufer
Kenneth R Westerback wrote:
 On Thu, Nov 15, 2012 at 12:48:03PM -0300, Marcos Laufer wrote:
   
 Kenneth R Westerback wrote:
 
 On Wed, Nov 14, 2012 at 04:22:20PM -0300, Marcos Laufer wrote:
   
 Hello, i'd like to inform a problem when dettaching an external 1TB
 USB disk drive , the system just freezes, i can't type anything.
 Also It stops responding to ping.
 If i don't unplug it then i can use the disk normally, i can copy
 and delete files with no problem. But as soon as i unplug the USB
 cord, the machine freezes.
 I've tested it on several machines, different OpenBSD versions
 starting from 4.3, i'm not asking for support, i know old OpenBSD
 versions are no longer supported, but this seemed pretty odd, i
 suppose that plugging and unplugging a USB disk should not cause any
 problems on any OS version.

 These are the lines on dmesg about this disk:


 Nov 14 16:00:31 hq /bsd: umass0 at uhub0
 Nov 14 16:00:31 hq /bsd:  port 5 configuration 1 interface 0
 Western Digital My Passport 0748 rev 2.10/10.15 addr 2
 Nov 14 16:00:31 hq /bsd: umass0: using SCSI over Bulk-Only
 Nov 14 16:00:31 hq /bsd: scsibus0 at umass0: 2 targets, initiator 0
 Nov 14 16:00:31 hq /bsd: sd0 at scsibus0 targ 1 lun 0: WD, My
 Passport 0748, 1015 SCSI4 0/direct fixed
 Nov 14 16:00:38 hq /bsd: sd0: 953837MB, 512 bytes/sec, 1953458176 sec total
 Nov 14 16:00:38 hq /bsd: ses0 at scsibus0 targ 1 lun 1: WD, SES
 Device, 1015 SCSI4 13/enclosure services fixed
 Nov 14 16:00:38 hq /bsd: ses0: unable to read enclosure configuration

 Best regards,
 Marcos

 
 As an experiment, try going into boot's config (-c at the boot) and
 disable ses. Then see if a) the ses device is still present, and b)
 if the absence of the ses device(s) alleviate the symptoms.

  Ken


   
 Hello, i've just tried this. The ses device is not present when i
 disable it at boot time, but the problem persists, if i unplug the
 USB cord (no matter if the partition is mounted or not) the OS just
 freezes. So i guess it is not related to the ses driver.

 This are the dmesg lines of this experiment:

 Nov 15 12:32:52 hq /bsd: umass0 at uhub0
 Nov 15 12:32:52 hq /bsd:  port 5 configuration 1 interface 0
 Western Digital My Passport 0748 rev 2.10/10.15 addr 2
 Nov 15 12:32:52 hq /bsd: umass0: using SCSI over Bulk-Only
 Nov 15 12:32:52 hq /bsd: scsibus0 at umass0: 2 targets, initiator 0
 Nov 15 12:32:52 hq /bsd: sd0 at scsibus0 targ 1 lun 0: WD, My
 Passport 0748, 1015 SCSI4 0/direct fixed
 Nov 15 12:32:59 hq /bsd: sd0: 953837MB, 512 bytes/sec, 1953458176 sec total
 Nov 15 12:32:59 hq /bsd: uk0 at scsibus0 targ 1 lun 1: WD, SES
 Device, 1015 SCSI4 13/enclosure services fixed

 

 Arrg. Need to kill all reference to that second device. Try a kernel with
 this diff. It should prevent probing anything but lun 0.

  Ken

 Index: umass_scsi.c
 ===
 RCS file: /cvs/src/sys/dev/usb/umass_scsi.c,v
 retrieving revision 1.38
 diff -u -p -r1.38 umass_scsi.c
 --- umass_scsi.c  17 Jul 2011 22:46:48 -  1.38
 +++ umass_scsi.c  15 Nov 2012 17:17:06 -
 @@ -92,7 +92,7 @@ umass_scsi_attach(struct umass_softc *sc
  
   scbus = umass_scsi_setup(sc);
   scbus-sc_link.adapter_target = UMASS_SCSIID_HOST;
 - scbus-sc_link.luns = sc-maxlun + 1;
 + scbus-sc_link.luns =  1;
   scbus-sc_link.flags = ~SDEV_ATAPI;
   scbus-sc_link.flags |= SDEV_UMASS;
  


   
Ken, i've applied your patch on an old OpenBSD 4.5 i use for testing 
purposes and the problem got solved. Now i can unplug the USB disk and 
no freeze at all. Is it safe to apply it on older and newer OpenBSD 
versions as well?

These are the new dmesg lines:

umass0 at uhub0 port 5 configuration 1 interface 0 Western Digital My 
Passport 0748 rev 2.10/10.15 addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: WD, My Passport 0748, 1015 SCSI4 
0/direct fixed
sd0: 953837MB, 512 bytes/sec, 1953458176 sec total

and after unpluggin the USB cord i get:

sd0 detached
scsibus0 detached
umass0 detached

And the OS does not freeze anymore.

Thank you very much!



Re: OpenBSD hangs when i unplug USB disk

2012-11-16 Thread Kenneth R Westerback
On Fri, Nov 16, 2012 at 12:02:11PM -0300, Marcos Laufer wrote:
 
 Kenneth R Westerback wrote:
 On Thu, Nov 15, 2012 at 12:48:03PM -0300, Marcos Laufer wrote:
 Kenneth R Westerback wrote:
 On Wed, Nov 14, 2012 at 04:22:20PM -0300, Marcos Laufer wrote:
 Hello, i'd like to inform a problem when dettaching an external 1TB
 USB disk drive , the system just freezes, i can't type anything.
 Also It stops responding to ping.
 If i don't unplug it then i can use the disk normally, i can copy
 and delete files with no problem. But as soon as i unplug the USB
 cord, the machine freezes.
 I've tested it on several machines, different OpenBSD versions
 starting from 4.3, i'm not asking for support, i know old OpenBSD
 versions are no longer supported, but this seemed pretty odd, i
 suppose that plugging and unplugging a USB disk should not cause any
 problems on any OS version.
 
 These are the lines on dmesg about this disk:
 
 
 Nov 14 16:00:31 hq /bsd: umass0 at uhub0
 Nov 14 16:00:31 hq /bsd:  port 5 configuration 1 interface 0
 Western Digital My Passport 0748 rev 2.10/10.15 addr 2
 Nov 14 16:00:31 hq /bsd: umass0: using SCSI over Bulk-Only
 Nov 14 16:00:31 hq /bsd: scsibus0 at umass0: 2 targets, initiator 0
 Nov 14 16:00:31 hq /bsd: sd0 at scsibus0 targ 1 lun 0: WD, My
 Passport 0748, 1015 SCSI4 0/direct fixed
 Nov 14 16:00:38 hq /bsd: sd0: 953837MB, 512 bytes/sec, 1953458176 sec 
 total
 Nov 14 16:00:38 hq /bsd: ses0 at scsibus0 targ 1 lun 1: WD, SES
 Device, 1015 SCSI4 13/enclosure services fixed
 Nov 14 16:00:38 hq /bsd: ses0: unable to read enclosure configuration
 
 Best regards,
 Marcos
 
 As an experiment, try going into boot's config (-c at the boot) and
 disable ses. Then see if a) the ses device is still present, and b)
 if the absence of the ses device(s) alleviate the symptoms.
 
  Ken
 
 
 Hello, i've just tried this. The ses device is not present when i
 disable it at boot time, but the problem persists, if i unplug the
 USB cord (no matter if the partition is mounted or not) the OS just
 freezes. So i guess it is not related to the ses driver.
 
 This are the dmesg lines of this experiment:
 
 Nov 15 12:32:52 hq /bsd: umass0 at uhub0
 Nov 15 12:32:52 hq /bsd:  port 5 configuration 1 interface 0
 Western Digital My Passport 0748 rev 2.10/10.15 addr 2
 Nov 15 12:32:52 hq /bsd: umass0: using SCSI over Bulk-Only
 Nov 15 12:32:52 hq /bsd: scsibus0 at umass0: 2 targets, initiator 0
 Nov 15 12:32:52 hq /bsd: sd0 at scsibus0 targ 1 lun 0: WD, My
 Passport 0748, 1015 SCSI4 0/direct fixed
 Nov 15 12:32:59 hq /bsd: sd0: 953837MB, 512 bytes/sec, 1953458176 sec total
 Nov 15 12:32:59 hq /bsd: uk0 at scsibus0 targ 1 lun 1: WD, SES
 Device, 1015 SCSI4 13/enclosure services fixed
 
 
 Arrg. Need to kill all reference to that second device. Try a kernel with
 this diff. It should prevent probing anything but lun 0.
 
  Ken
 
 Index: umass_scsi.c
 ===
 RCS file: /cvs/src/sys/dev/usb/umass_scsi.c,v
 retrieving revision 1.38
 diff -u -p -r1.38 umass_scsi.c
 --- umass_scsi.c 17 Jul 2011 22:46:48 -  1.38
 +++ umass_scsi.c 15 Nov 2012 17:17:06 -
 @@ -92,7 +92,7 @@ umass_scsi_attach(struct umass_softc *sc
  scbus = umass_scsi_setup(sc);
  scbus-sc_link.adapter_target = UMASS_SCSIID_HOST;
 -scbus-sc_link.luns = sc-maxlun + 1;
 +scbus-sc_link.luns =  1;
  scbus-sc_link.flags = ~SDEV_ATAPI;
  scbus-sc_link.flags |= SDEV_UMASS;
 
 
 Ken, i've applied your patch on an old OpenBSD 4.5 i use for testing
 purposes and the problem got solved. Now i can unplug the USB disk
 and no freeze at all. Is it safe to apply it on older and newer
 OpenBSD versions as well?
 
 These are the new dmesg lines:
 
 umass0 at uhub0 port 5 configuration 1 interface 0 Western Digital
 My Passport 0748 rev 2.10/10.15 addr 2
 umass0: using SCSI over Bulk-Only
 scsibus0 at umass0: 2 targets, initiator 0
 sd0 at scsibus0 targ 1 lun 0: WD, My Passport 0748, 1015 SCSI4
 0/direct fixed
 sd0: 953837MB, 512 bytes/sec, 1953458176 sec total
 
 and after unpluggin the USB cord i get:
 
 sd0 detached
 scsibus0 detached
 umass0 detached
 
 And the OS does not freeze anymore.
 
 Thank you very much!
 

I had deliberately NOT copied misc@ so random diagnostic  patches are not
floating around for the more excitable of our community to apply and
forget about. :-)

The diff is not the solution. It merely confirms that it is the ses*
devices that are the problem.

http://wdc.custhelp.com/app/answers/detail/a_id/3739/~/what-is-the-ses-driver,-why-is-it-needed,-and-how-to-get-the-driver-popup-to

is a fascinating page that google found for me. If you have windows or os x
available you might be able to disable the ses functionality, which would
be a better solution.

The proper OpenBSD solution is likely to involve upgrading the ses driver
to properly get disconnected.

 Ken



Re: OpenBSD hangs when i unplug USB disk

2012-11-16 Thread Kenneth R Westerback
On Wed, Nov 14, 2012 at 04:22:20PM -0300, Marcos Laufer wrote:
 Hello, i'd like to inform a problem when dettaching an external 1TB
 USB disk drive , the system just freezes, i can't type anything.
 Also It stops responding to ping.
 If i don't unplug it then i can use the disk normally, i can copy
 and delete files with no problem. But as soon as i unplug the USB
 cord, the machine freezes.
 I've tested it on several machines, different OpenBSD versions
 starting from 4.3, i'm not asking for support, i know old OpenBSD
 versions are no longer supported, but this seemed pretty odd, i
 suppose that plugging and unplugging a USB disk should not cause any
 problems on any OS version.
 
 These are the lines on dmesg about this disk:
 
 
 Nov 14 16:00:31 hq /bsd: umass0 at uhub0
 Nov 14 16:00:31 hq /bsd:  port 5 configuration 1 interface 0
 Western Digital My Passport 0748 rev 2.10/10.15 addr 2
 Nov 14 16:00:31 hq /bsd: umass0: using SCSI over Bulk-Only
 Nov 14 16:00:31 hq /bsd: scsibus0 at umass0: 2 targets, initiator 0
 Nov 14 16:00:31 hq /bsd: sd0 at scsibus0 targ 1 lun 0: WD, My
 Passport 0748, 1015 SCSI4 0/direct fixed
 Nov 14 16:00:38 hq /bsd: sd0: 953837MB, 512 bytes/sec, 1953458176 sec total
 Nov 14 16:00:38 hq /bsd: ses0 at scsibus0 targ 1 lun 1: WD, SES
 Device, 1015 SCSI4 13/enclosure services fixed
 Nov 14 16:00:38 hq /bsd: ses0: unable to read enclosure configuration
 
 Best regards,
 Marcos
 

I procured the device and tried it here. It's interesting that some
laptops get the ses device and some don't.

Will play with it some more on the device that can see the ses to see
if we can reproduce the problem and perhaps get a solution. So far
no machine has hung even when they see the ses device, although we
haven't tried doing any i/o to it.

 Ken



Re: OpenBSD hangs when i unplug USB disk

2012-11-15 Thread David Diggles
did you unmount it first?

Marcos Laufer mar...@ipv4networks.com wrote:

Hello, i'd like to inform a problem when dettaching an external 1TB USB

disk drive , the system just freezes, i can't type anything. Also It 
stops responding to ping.
If i don't unplug it then i can use the disk normally, i can copy and 
delete files with no problem. But as soon as i unplug the USB cord, the

machine freezes.
I've tested it on several machines, different OpenBSD versions starting

from 4.3, i'm not asking for support, i know old OpenBSD versions are
no 
longer supported, but this seemed pretty odd, i suppose that plugging 
and unplugging a USB disk should not cause any problems on any OS
version.

These are the lines on dmesg about this disk:


Nov 14 16:00:31 hq /bsd: umass0 at uhub0
Nov 14 16:00:31 hq /bsd:  port 5 configuration 1 interface 0 Western 
Digital My Passport 0748 rev 2.10/10.15 addr 2
Nov 14 16:00:31 hq /bsd: umass0: using SCSI over Bulk-Only
Nov 14 16:00:31 hq /bsd: scsibus0 at umass0: 2 targets, initiator 0
Nov 14 16:00:31 hq /bsd: sd0 at scsibus0 targ 1 lun 0: WD, My Passport

0748, 1015 SCSI4 0/direct fixed
Nov 14 16:00:38 hq /bsd: sd0: 953837MB, 512 bytes/sec, 1953458176 sec
total
Nov 14 16:00:38 hq /bsd: ses0 at scsibus0 targ 1 lun 1: WD, SES
Device, 
1015 SCSI4 13/enclosure services fixed
Nov 14 16:00:38 hq /bsd: ses0: unable to read enclosure configuration

Best regards,
Marcos

-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.



Re: OpenBSD hangs when i unplug USB disk

2012-11-15 Thread Marcos Ariel Laufer
Of course!!
I *always* umount the disk before unplugging it. That didn't stop the OS 
from freezing.
I've been using OpenBSD since 2.6, this never happened to me with any 
other USB hard disks. This one in particular i bought it a couple of 
days ago.


On 11/15/2012 6:19 AM, David Diggles wrote:
 did you unmount it first?

 Marcos Laufer mar...@ipv4networks.com wrote:

 Hello, i'd like to inform a problem when dettaching an external 1TB USB

 disk drive , the system just freezes, i can't type anything. Also It
 stops responding to ping.
 If i don't unplug it then i can use the disk normally, i can copy and
 delete files with no problem. But as soon as i unplug the USB cord, the

 machine freezes.
 I've tested it on several machines, different OpenBSD versions starting

 from 4.3, i'm not asking for support, i know old OpenBSD versions are
 no
 longer supported, but this seemed pretty odd, i suppose that plugging
 and unplugging a USB disk should not cause any problems on any OS
 version.

 These are the lines on dmesg about this disk:


 Nov 14 16:00:31 hq /bsd: umass0 at uhub0
 Nov 14 16:00:31 hq /bsd:  port 5 configuration 1 interface 0 Western
 Digital My Passport 0748 rev 2.10/10.15 addr 2
 Nov 14 16:00:31 hq /bsd: umass0: using SCSI over Bulk-Only
 Nov 14 16:00:31 hq /bsd: scsibus0 at umass0: 2 targets, initiator 0
 Nov 14 16:00:31 hq /bsd: sd0 at scsibus0 targ 1 lun 0: WD, My Passport

 0748, 1015 SCSI4 0/direct fixed
 Nov 14 16:00:38 hq /bsd: sd0: 953837MB, 512 bytes/sec, 1953458176 sec
 total
 Nov 14 16:00:38 hq /bsd: ses0 at scsibus0 targ 1 lun 1: WD, SES
 Device,
 1015 SCSI4 13/enclosure services fixed
 Nov 14 16:00:38 hq /bsd: ses0: unable to read enclosure configuration

 Best regards,
 Marcos



Re: OpenBSD hangs when i unplug USB disk

2012-11-15 Thread Otto Moerbeek
On Thu, Nov 15, 2012 at 07:45:40AM -0300, Marcos Ariel Laufer wrote:

 Of course!!
 I *always* umount the disk before unplugging it. That didn't stop the OS 
 from freezing.
 I've been using OpenBSD since 2.6, this never happened to me with any 
 other USB hard disks. This one in particular i bought it a couple of 
 days ago.

This particular disk has ses(4). That is uncommmon for a USB disk. My
guess the problem has something to do with that.

Cc'ing dlg@, maybe he has a clue.

-Otto

 
 
 On 11/15/2012 6:19 AM, David Diggles wrote:
  did you unmount it first?
 
  Marcos Laufer mar...@ipv4networks.com wrote:
 
  Hello, i'd like to inform a problem when dettaching an external 1TB USB
 
  disk drive , the system just freezes, i can't type anything. Also It
  stops responding to ping.
  If i don't unplug it then i can use the disk normally, i can copy and
  delete files with no problem. But as soon as i unplug the USB cord, the
 
  machine freezes.
  I've tested it on several machines, different OpenBSD versions starting
 
  from 4.3, i'm not asking for support, i know old OpenBSD versions are
  no
  longer supported, but this seemed pretty odd, i suppose that plugging
  and unplugging a USB disk should not cause any problems on any OS
  version.
 
  These are the lines on dmesg about this disk:
 
 
  Nov 14 16:00:31 hq /bsd: umass0 at uhub0
  Nov 14 16:00:31 hq /bsd:  port 5 configuration 1 interface 0 Western
  Digital My Passport 0748 rev 2.10/10.15 addr 2
  Nov 14 16:00:31 hq /bsd: umass0: using SCSI over Bulk-Only
  Nov 14 16:00:31 hq /bsd: scsibus0 at umass0: 2 targets, initiator 0
  Nov 14 16:00:31 hq /bsd: sd0 at scsibus0 targ 1 lun 0: WD, My Passport
 
  0748, 1015 SCSI4 0/direct fixed
  Nov 14 16:00:38 hq /bsd: sd0: 953837MB, 512 bytes/sec, 1953458176 sec
  total
  Nov 14 16:00:38 hq /bsd: ses0 at scsibus0 targ 1 lun 1: WD, SES
  Device,
  1015 SCSI4 13/enclosure services fixed
  Nov 14 16:00:38 hq /bsd: ses0: unable to read enclosure configuration
 
  Best regards,
  Marcos



Re: OpenBSD hangs when i unplug USB disk

2012-11-15 Thread Paul de Weerd
On Thu, Nov 15, 2012 at 11:53:07AM +0100, Otto Moerbeek wrote:
| On Thu, Nov 15, 2012 at 07:45:40AM -0300, Marcos Ariel Laufer wrote:
| 
|  Of course!!
|  I *always* umount the disk before unplugging it. That didn't stop the OS 
|  from freezing.
|  I've been using OpenBSD since 2.6, this never happened to me with any 
|  other USB hard disks. This one in particular i bought it a couple of 
|  days ago.
| 
| This particular disk has ses(4). That is uncommmon for a USB disk. My
| guess the problem has something to do with that.
| 
| Cc'ing dlg@, maybe he has a clue.

I have no problems whatsoever (mounting, umounting, using the disks,
etc) with mine:

umass0 at uhub0 port 3 configuration 1 interface 0 Western Digital My Passport 
0748 rev 2.10/10.10 addr 2
umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets, initiator 0
sd0 at scsibus1 targ 1 lun 0: WD, My Passport 0748, 1010 SCSI4 0/direct fixed
sd0: 1907697MB, 512 bytes/sector, 3906963456 sectors
ses0 at scsibus1 targ 1 lun 1: WD, SES Device, 1010 SCSI4 13/enclosure 
services fixed
ses0: unable to read enclosure configuration
umass1 at uhub0 port 4 configuration 1 interface 0 Western Digital My Passport 
0748 rev 2.10/10.10 addr 3
umass1: using SCSI over Bulk-Only
scsibus2 at umass1: 2 targets, initiator 0
sd1 at scsibus2 targ 1 lun 0: WD, My Passport 0748, 1010 SCSI4 0/direct fixed
sd1: 1907697MB, 512 bytes/sector, 3906963456 sectors
ses1 at scsibus2 targ 1 lun 1: WD, SES Device, 1010 SCSI4 13/enclosure 
services fixed
ses1: unable to read enclosure configuration
umass2 at uhub1 port 3 configuration 1 interface 0 Western Digital My Passport 
0740 rev 2.10/10.03 addr 2
umass2: using SCSI over Bulk-Only
scsibus3 at umass2: 2 targets, initiator 0
sd2 at scsibus3 targ 1 lun 0: WD, My Passport 0740, 1003 SCSI4 0/direct fixed
sd2: 953837MB, 512 bytes/sector, 1953458176 sectors
ses2 at scsibus3 targ 1 lun 1: WD, SES Device, 1003 SCSI4 13/enclosure 
services fixed
ses2: unable to read enclosure configuration
umass3 at uhub1 port 4 configuration 1 interface 0 Western Digital My Passport 
0748 rev 2.10/10.10 addr 3
umass3: using SCSI over Bulk-Only
scsibus4 at umass3: 2 targets, initiator 0
sd3 at scsibus4 targ 1 lun 0: WD, My Passport 0748, 1010 SCSI4 0/direct fixed
sd3: 1907697MB, 512 bytes/sector, 3906963456 sectors
ses3 at scsibus4 targ 1 lun 1: WD, SES Device, 1010 SCSI4 13/enclosure 
services fixed
ses3: unable to read enclosure configuration
umass4 at uhub1 port 5 configuration 1 interface 0 Western Digital My Passport 
0730 rev 2.10/10.15 addr 4
umass4: using SCSI over Bulk-Only
scsibus5 at umass4: 2 targets, initiator 0
sd4 at scsibus5 targ 1 lun 0: WD, My Passport 0730, 1015 SCSI4 0/direct fixed
sd4: 953837MB, 512 bytes/sector, 1953458176 sectors
ses4 at scsibus5 targ 1 lun 1: WD, SES Device, 1015 SCSI4 13/enclosure 
services fixed
ses4: unable to read enclosure configuration
umass5 at uhub1 port 6 configuration 1 interface 0 Western Digital My Passport 
070A rev 2.00/10.32 addr 5
umass5: using SCSI over Bulk-Only
scsibus6 at umass5: 2 targets, initiator 0
sd5 at scsibus6 targ 1 lun 0: WD, My Passport 070A, 1032 SCSI2 0/direct fixed
sd5: 953199MB, 512 bytes/sector, 1952151552 sectors
cd1 at scsibus6 targ 1 lun 1: WD, Virtual CD 070A, 1032 SCSI2 5/cdrom 
removable
ses5 at scsibus6 targ 1 lun 2: WD, SES Device, 1032 SCSI2 13/enclosure 
services fixed
ses5: unable to read enclosure configuration

Paul 'WEiRD' de Weerd

-- 
[++-]+++.+++[---].+++[+
+++-].++[-]+.--.[-]
 http://www.weirdnet.nl/ 



Re: OpenBSD hangs when i unplug USB disk

2012-11-15 Thread Marcos Ariel Laufer

Of course!!
I *always* umount the disk before unplugging it. That didn't stop the OS 
from freezing.
I've been using OpenBSD since 2.6, this never happened to me with any 
other USB hard disks. This one in particular i bought it a couple of 
days ago.



On 11/15/2012 1:58 AM, Paulm wrote:

You *do* know about mount(8)/umount(8), right?


On Wed, Nov 14, 2012 at 04:22:20PM -0300, Marcos Laufer wrote:

Hello, i'd like to inform a problem when dettaching an external 1TB
USB disk drive , the system just freezes, i can't type anything.
Also It stops responding to ping.
If i don't unplug it then i can use the disk normally, i can copy
and delete files with no problem. But as soon as i unplug the USB
cord, the machine freezes.
I've tested it on several machines, different OpenBSD versions
starting from 4.3, i'm not asking for support, i know old OpenBSD
versions are no longer supported, but this seemed pretty odd, i
suppose that plugging and unplugging a USB disk should not cause any
problems on any OS version.

These are the lines on dmesg about this disk:


Nov 14 16:00:31 hq /bsd: umass0 at uhub0
Nov 14 16:00:31 hq /bsd:  port 5 configuration 1 interface 0
Western Digital My Passport 0748 rev 2.10/10.15 addr 2
Nov 14 16:00:31 hq /bsd: umass0: using SCSI over Bulk-Only
Nov 14 16:00:31 hq /bsd: scsibus0 at umass0: 2 targets, initiator 0
Nov 14 16:00:31 hq /bsd: sd0 at scsibus0 targ 1 lun 0: WD, My
Passport 0748, 1015 SCSI4 0/direct fixed
Nov 14 16:00:38 hq /bsd: sd0: 953837MB, 512 bytes/sec, 1953458176 sec total
Nov 14 16:00:38 hq /bsd: ses0 at scsibus0 targ 1 lun 1: WD, SES
Device, 1015 SCSI4 13/enclosure services fixed
Nov 14 16:00:38 hq /bsd: ses0: unable to read enclosure configuration

Best regards,
Marcos




Re: OpenBSD hangs when i unplug USB disk

2012-11-15 Thread Kevin Chadwick
On Thu, 15 Nov 2012 07:45:40 -0300
Marcos Ariel Laufer mar...@ipversion4.com wrote:

 I've been using OpenBSD since 2.6, this never happened to me with any 
 other USB hard disks. This one in particular i bought it a couple of 
 days ago.

I wonder if it freezes other OS or causes problems before even the bios
boot selection?



Re: OpenBSD hangs when i unplug USB disk

2012-11-15 Thread Kenneth R Westerback
On Wed, Nov 14, 2012 at 04:22:20PM -0300, Marcos Laufer wrote:
 Hello, i'd like to inform a problem when dettaching an external 1TB
 USB disk drive , the system just freezes, i can't type anything.
 Also It stops responding to ping.
 If i don't unplug it then i can use the disk normally, i can copy
 and delete files with no problem. But as soon as i unplug the USB
 cord, the machine freezes.
 I've tested it on several machines, different OpenBSD versions
 starting from 4.3, i'm not asking for support, i know old OpenBSD
 versions are no longer supported, but this seemed pretty odd, i
 suppose that plugging and unplugging a USB disk should not cause any
 problems on any OS version.
 
 These are the lines on dmesg about this disk:
 
 
 Nov 14 16:00:31 hq /bsd: umass0 at uhub0
 Nov 14 16:00:31 hq /bsd:  port 5 configuration 1 interface 0
 Western Digital My Passport 0748 rev 2.10/10.15 addr 2
 Nov 14 16:00:31 hq /bsd: umass0: using SCSI over Bulk-Only
 Nov 14 16:00:31 hq /bsd: scsibus0 at umass0: 2 targets, initiator 0
 Nov 14 16:00:31 hq /bsd: sd0 at scsibus0 targ 1 lun 0: WD, My
 Passport 0748, 1015 SCSI4 0/direct fixed
 Nov 14 16:00:38 hq /bsd: sd0: 953837MB, 512 bytes/sec, 1953458176 sec total
 Nov 14 16:00:38 hq /bsd: ses0 at scsibus0 targ 1 lun 1: WD, SES
 Device, 1015 SCSI4 13/enclosure services fixed
 Nov 14 16:00:38 hq /bsd: ses0: unable to read enclosure configuration
 
 Best regards,
 Marcos
 

As an experiment, try going into boot's config (-c at the boot) and
disable ses. Then see if a) the ses device is still present, and b)
if the absence of the ses device(s) alleviate the symptoms.

 Ken



Re: OpenBSD hangs when i unplug USB disk

2012-11-15 Thread Otto Moerbeek
On Thu, Nov 15, 2012 at 12:02:38PM +0100, Paul de Weerd wrote:

 On Thu, Nov 15, 2012 at 11:53:07AM +0100, Otto Moerbeek wrote:
 | On Thu, Nov 15, 2012 at 07:45:40AM -0300, Marcos Ariel Laufer wrote:
 | 
 |  Of course!!
 |  I *always* umount the disk before unplugging it. That didn't stop the OS 
 |  from freezing.
 |  I've been using OpenBSD since 2.6, this never happened to me with any 
 |  other USB hard disks. This one in particular i bought it a couple of 
 |  days ago.
 | 
 | This particular disk has ses(4). That is uncommmon for a USB disk. My
 | guess the problem has something to do with that.
 | 
 | Cc'ing dlg@, maybe he has a clue.
 
 I have no problems whatsoever (mounting, umounting, using the disks,
 etc) with mine:

Did you also try unplugging it? If that works and since the OP did not
state the newest version he tried this on, we can probably conclude
this is already fixed. 

-Otto

 
 umass0 at uhub0 port 3 configuration 1 interface 0 Western Digital My 
 Passport 0748 rev 2.10/10.10 addr 2
 umass0: using SCSI over Bulk-Only
 scsibus1 at umass0: 2 targets, initiator 0
 sd0 at scsibus1 targ 1 lun 0: WD, My Passport 0748, 1010 SCSI4 0/direct 
 fixed
 sd0: 1907697MB, 512 bytes/sector, 3906963456 sectors
 ses0 at scsibus1 targ 1 lun 1: WD, SES Device, 1010 SCSI4 13/enclosure 
 services fixed
 ses0: unable to read enclosure configuration
 umass1 at uhub0 port 4 configuration 1 interface 0 Western Digital My 
 Passport 0748 rev 2.10/10.10 addr 3
 umass1: using SCSI over Bulk-Only
 scsibus2 at umass1: 2 targets, initiator 0
 sd1 at scsibus2 targ 1 lun 0: WD, My Passport 0748, 1010 SCSI4 0/direct 
 fixed
 sd1: 1907697MB, 512 bytes/sector, 3906963456 sectors
 ses1 at scsibus2 targ 1 lun 1: WD, SES Device, 1010 SCSI4 13/enclosure 
 services fixed
 ses1: unable to read enclosure configuration
 umass2 at uhub1 port 3 configuration 1 interface 0 Western Digital My 
 Passport 0740 rev 2.10/10.03 addr 2
 umass2: using SCSI over Bulk-Only
 scsibus3 at umass2: 2 targets, initiator 0
 sd2 at scsibus3 targ 1 lun 0: WD, My Passport 0740, 1003 SCSI4 0/direct 
 fixed
 sd2: 953837MB, 512 bytes/sector, 1953458176 sectors
 ses2 at scsibus3 targ 1 lun 1: WD, SES Device, 1003 SCSI4 13/enclosure 
 services fixed
 ses2: unable to read enclosure configuration
 umass3 at uhub1 port 4 configuration 1 interface 0 Western Digital My 
 Passport 0748 rev 2.10/10.10 addr 3
 umass3: using SCSI over Bulk-Only
 scsibus4 at umass3: 2 targets, initiator 0
 sd3 at scsibus4 targ 1 lun 0: WD, My Passport 0748, 1010 SCSI4 0/direct 
 fixed
 sd3: 1907697MB, 512 bytes/sector, 3906963456 sectors
 ses3 at scsibus4 targ 1 lun 1: WD, SES Device, 1010 SCSI4 13/enclosure 
 services fixed
 ses3: unable to read enclosure configuration
 umass4 at uhub1 port 5 configuration 1 interface 0 Western Digital My 
 Passport 0730 rev 2.10/10.15 addr 4
 umass4: using SCSI over Bulk-Only
 scsibus5 at umass4: 2 targets, initiator 0
 sd4 at scsibus5 targ 1 lun 0: WD, My Passport 0730, 1015 SCSI4 0/direct 
 fixed
 sd4: 953837MB, 512 bytes/sector, 1953458176 sectors
 ses4 at scsibus5 targ 1 lun 1: WD, SES Device, 1015 SCSI4 13/enclosure 
 services fixed
 ses4: unable to read enclosure configuration
 umass5 at uhub1 port 6 configuration 1 interface 0 Western Digital My 
 Passport 070A rev 2.00/10.32 addr 5
 umass5: using SCSI over Bulk-Only
 scsibus6 at umass5: 2 targets, initiator 0
 sd5 at scsibus6 targ 1 lun 0: WD, My Passport 070A, 1032 SCSI2 0/direct 
 fixed
 sd5: 953199MB, 512 bytes/sector, 1952151552 sectors
 cd1 at scsibus6 targ 1 lun 1: WD, Virtual CD 070A, 1032 SCSI2 5/cdrom 
 removable
 ses5 at scsibus6 targ 1 lun 2: WD, SES Device, 1032 SCSI2 13/enclosure 
 services fixed
 ses5: unable to read enclosure configuration
 
 Paul 'WEiRD' de Weerd
 
 -- 
 [++-]+++.+++[---].+++[+
 +++-].++[-]+.--.[-]
  http://www.weirdnet.nl/ 



Re: OpenBSD hangs when i unplug USB disk

2012-11-15 Thread Paul de Weerd
On Thu, Nov 15, 2012 at 04:18:14PM +0100, Otto Moerbeek wrote:
|  I have no problems whatsoever (mounting, umounting, using the disks,
|  etc) with mine:
| 
| Did you also try unplugging it? If that works and since the OP did not
| state the newest version he tried this on, we can probably conclude
| this is already fixed. 

I did this quite often a couple of weeks ago.  Haven't tried for a
while (no need) and have upgraded to newer snaps a bunch of times
since.  Tonight I'll confirm I can unplug safely on the latest snap.

Cheers,

Paul 'WEiRD' de Weerd

-- 
[++-]+++.+++[---].+++[+
+++-].++[-]+.--.[-]
 http://www.weirdnet.nl/ 



Re: OpenBSD hangs when i unplug USB disk

2012-11-15 Thread Marcos Laufer
Kenneth R Westerback wrote:
 On Wed, Nov 14, 2012 at 04:22:20PM -0300, Marcos Laufer wrote:
   
 Hello, i'd like to inform a problem when dettaching an external 1TB
 USB disk drive , the system just freezes, i can't type anything.
 Also It stops responding to ping.
 If i don't unplug it then i can use the disk normally, i can copy
 and delete files with no problem. But as soon as i unplug the USB
 cord, the machine freezes.
 I've tested it on several machines, different OpenBSD versions
 starting from 4.3, i'm not asking for support, i know old OpenBSD
 versions are no longer supported, but this seemed pretty odd, i
 suppose that plugging and unplugging a USB disk should not cause any
 problems on any OS version.

 These are the lines on dmesg about this disk:


 Nov 14 16:00:31 hq /bsd: umass0 at uhub0
 Nov 14 16:00:31 hq /bsd:  port 5 configuration 1 interface 0
 Western Digital My Passport 0748 rev 2.10/10.15 addr 2
 Nov 14 16:00:31 hq /bsd: umass0: using SCSI over Bulk-Only
 Nov 14 16:00:31 hq /bsd: scsibus0 at umass0: 2 targets, initiator 0
 Nov 14 16:00:31 hq /bsd: sd0 at scsibus0 targ 1 lun 0: WD, My
 Passport 0748, 1015 SCSI4 0/direct fixed
 Nov 14 16:00:38 hq /bsd: sd0: 953837MB, 512 bytes/sec, 1953458176 sec total
 Nov 14 16:00:38 hq /bsd: ses0 at scsibus0 targ 1 lun 1: WD, SES
 Device, 1015 SCSI4 13/enclosure services fixed
 Nov 14 16:00:38 hq /bsd: ses0: unable to read enclosure configuration

 Best regards,
 Marcos

 

 As an experiment, try going into boot's config (-c at the boot) and
 disable ses. Then see if a) the ses device is still present, and b)
 if the absence of the ses device(s) alleviate the symptoms.

  Ken


   

Hello, i've just tried this. The ses device is not present when i 
disable it at boot time, but the problem persists, if i unplug the USB 
cord (no matter if the partition is mounted or not) the OS just freezes. 
So i guess it is not related to the ses driver.

This are the dmesg lines of this experiment:

Nov 15 12:32:52 hq /bsd: umass0 at uhub0
Nov 15 12:32:52 hq /bsd:  port 5 configuration 1 interface 0 Western 
Digital My Passport 0748 rev 2.10/10.15 addr 2
Nov 15 12:32:52 hq /bsd: umass0: using SCSI over Bulk-Only
Nov 15 12:32:52 hq /bsd: scsibus0 at umass0: 2 targets, initiator 0
Nov 15 12:32:52 hq /bsd: sd0 at scsibus0 targ 1 lun 0: WD, My Passport 
0748, 1015 SCSI4 0/direct fixed
Nov 15 12:32:59 hq /bsd: sd0: 953837MB, 512 bytes/sec, 1953458176 sec total
Nov 15 12:32:59 hq /bsd: uk0 at scsibus0 targ 1 lun 1: WD, SES Device, 
1015 SCSI4 13/enclosure services fixed



Re: OpenBSD hangs when i unplug USB disk

2012-11-15 Thread Marcos Laufer
Kevin Chadwick wrote:
 On Thu, 15 Nov 2012 07:45:40 -0300
 Marcos Ariel Laufer mar...@ipversion4.com wrote:

   
 I've been using OpenBSD since 2.6, this never happened to me with any 
 other USB hard disks. This one in particular i bought it a couple of 
 days ago.
 

 I wonder if it freezes other OS or causes problems before even the bios
 boot selection?


   

Hello, i've also just tried this right now. It does not freeze Windows XP.
Also, the machine does not freeze when plugging and unplugging the cord 
if done before boot selection. All my machines are i386.



Re: OpenBSD hangs when i unplug USB disk

2012-11-15 Thread Marcos Laufer

Paul de Weerd wrote:

On Thu, Nov 15, 2012 at 04:18:14PM +0100, Otto Moerbeek wrote:
|  I have no problems whatsoever (mounting, umounting, using the disks,
|  etc) with mine:
| 
| Did you also try unplugging it? If that works and since the OP did not

| state the newest version he tried this on, we can probably conclude
| this is already fixed. 


I did this quite often a couple of weeks ago.  Haven't tried for a
while (no need) and have upgraded to newer snaps a bunch of times
since.  Tonight I'll confirm I can unplug safely on the latest snap.

Cheers,

Paul 'WEiRD' de Weerd

  


Thank you Paul, i look forward for the results of your testing tonight.

Best regards,
Marcos



OpenBSD hangs when i unplug USB disk

2012-11-14 Thread Marcos Laufer
Hello, i'd like to inform a problem when dettaching an external 1TB USB 
disk drive , the system just freezes, i can't type anything. Also It 
stops responding to ping.
If i don't unplug it then i can use the disk normally, i can copy and 
delete files with no problem. But as soon as i unplug the USB cord, the 
machine freezes.
I've tested it on several machines, different OpenBSD versions starting 
from 4.3, i'm not asking for support, i know old OpenBSD versions are no 
longer supported, but this seemed pretty odd, i suppose that plugging 
and unplugging a USB disk should not cause any problems on any OS version.


These are the lines on dmesg about this disk:


Nov 14 16:00:31 hq /bsd: umass0 at uhub0
Nov 14 16:00:31 hq /bsd:  port 5 configuration 1 interface 0 Western 
Digital My Passport 0748 rev 2.10/10.15 addr 2

Nov 14 16:00:31 hq /bsd: umass0: using SCSI over Bulk-Only
Nov 14 16:00:31 hq /bsd: scsibus0 at umass0: 2 targets, initiator 0
Nov 14 16:00:31 hq /bsd: sd0 at scsibus0 targ 1 lun 0: WD, My Passport 
0748, 1015 SCSI4 0/direct fixed

Nov 14 16:00:38 hq /bsd: sd0: 953837MB, 512 bytes/sec, 1953458176 sec total
Nov 14 16:00:38 hq /bsd: ses0 at scsibus0 targ 1 lun 1: WD, SES Device, 
1015 SCSI4 13/enclosure services fixed

Nov 14 16:00:38 hq /bsd: ses0: unable to read enclosure configuration

Best regards,
Marcos



Re: OpenBSD hangs when i unplug USB disk

2012-11-14 Thread Paulm
You *do* know about mount(8)/umount(8), right?


On Wed, Nov 14, 2012 at 04:22:20PM -0300, Marcos Laufer wrote:
 Hello, i'd like to inform a problem when dettaching an external 1TB
 USB disk drive , the system just freezes, i can't type anything.
 Also It stops responding to ping.
 If i don't unplug it then i can use the disk normally, i can copy
 and delete files with no problem. But as soon as i unplug the USB
 cord, the machine freezes.
 I've tested it on several machines, different OpenBSD versions
 starting from 4.3, i'm not asking for support, i know old OpenBSD
 versions are no longer supported, but this seemed pretty odd, i
 suppose that plugging and unplugging a USB disk should not cause any
 problems on any OS version.
 
 These are the lines on dmesg about this disk:
 
 
 Nov 14 16:00:31 hq /bsd: umass0 at uhub0
 Nov 14 16:00:31 hq /bsd:  port 5 configuration 1 interface 0
 Western Digital My Passport 0748 rev 2.10/10.15 addr 2
 Nov 14 16:00:31 hq /bsd: umass0: using SCSI over Bulk-Only
 Nov 14 16:00:31 hq /bsd: scsibus0 at umass0: 2 targets, initiator 0
 Nov 14 16:00:31 hq /bsd: sd0 at scsibus0 targ 1 lun 0: WD, My
 Passport 0748, 1015 SCSI4 0/direct fixed
 Nov 14 16:00:38 hq /bsd: sd0: 953837MB, 512 bytes/sec, 1953458176 sec total
 Nov 14 16:00:38 hq /bsd: ses0 at scsibus0 targ 1 lun 1: WD, SES
 Device, 1015 SCSI4 13/enclosure services fixed
 Nov 14 16:00:38 hq /bsd: ses0: unable to read enclosure configuration
 
 Best regards,
 Marcos