Re: PC Engines APU platform EOL

2023-05-04 Thread Johan Huldtgren
On 2023-05-04  5:18, Stuart Henderson wrote:
> 
> You'll open up many more options if you allow a quiet fan for rackmount,
> or allow using a non-rackmount box on a rack shelf.

I'm in the same boat where I need to replace my current apu4s with a
new rackmounted solution. The research I've done so far brings me to
the same conclusion as Stuart, rackmounted and fanless solutions are
few and far between. One option I did see was that the Protecli
which was mentioned earlier in this thread sells a shelf(1) which you
can use to attach up to two vault devices to.

However I'm leaning towards finding a rack mounted solution with quiet
fans, I have a 4U server(2) I bought years ago with large fans which is
very quiet, but that is obviously overkill to replace my apus with. I'll
finally mention that I have an HP DL360 (few generations old) which is
suprisingly quiet most of the time as well.

thanks,

.jh

(1) https://protectli.com/product/rack-mount-shelf/
(2) https://silentpc.com/servers/



Re: init: single user shell terminated, restarting

2023-01-21 Thread Johan Huldtgren
hello,

On 2023-01-16 14:31, Theo de Raadt wrote:
> kettenis figured out what the problem is.
> 
> There might be a solution tomorrow.

For the archives I can confirm that my net5501
upgraded fine with the latest snapshot. 

$ sysctl kern.version 
kern.version=OpenBSD 7.2-current (GENERIC) #545: Fri Jan 20 15:15:44 MST 2023
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC

thanks,

.jh

> 
> Johan Huldtgren  wrote:
> 
> > hello,
> > 
> > On 2023-01-16 10:23, Stuart Henderson wrote:
> > > On 2023-01-15, Barry Grumbine  wrote:
> > > > In case someone else runs in to this, and bothers to check misc@
> > > >
> > > > In this commit:
> > > > https://marc.info/?l=openbsd-cvs&m=167283731726983&w=2
> > > >
> > > > --execute-only (aka NX bit, aka XD bit, aka Data Execution Prevention)
> > > > was turned on
> > > 
> > > NX ("no execute") is used with kernel protections that can prevent
> > > memory which is mapped as being _writable_ from being executed. That afaik
> > > didn't change recently (at least not on purpose?).
> > > 
> > > execute-only is something else, it relates to mappings which are
> > > protected such that they _can_ be executed but not _read_. It's now used
> > > on aarch64 and riscv64 in snapshots (not everything in ports has been
> > > fixed to work with it yet). There's work towards using it on amd64 but
> > > the necessary cpu feature is only available on fairly new AMD machines
> > > and very (for my version of 'very') new Intel machines.
> > > 
> > > > On my ancient T520 I had to go in to BIOS and set:
> > > > -> Security
> > > > --> Memory Protection
> > > > ---> Execution Prevention [Enable]
> > > >
> > > > Everything works just peachy now.
> > > 
> > > It would be interesting to figure out what is happening with your
> > > system (e.g. which change actually broke things) - there's no way it can
> > > be the commit you point out. That's "restore previous behaviour when
> > > compiling the EFI boot loader on aarch64/riscv64 which had got changed
> > > in a different diff".
> > > 
> > > Any idea whether the problem is just in ramdisk kernels or did it affect
> > > normal boot e.g. GENERIC.MP as well?
> > 
> > I see this issue on my old Soekris net5501s as well. Using Barry's data
> > from above regarding dates I can confirm that the Janusary 6th snapshot
> > on hostserver.de's archive works, but trying to install the January 7th
> > snapshot results in the init message rolling until the system is power
> > cycled:
> > 
> > init: single user shell terminated, restarting
> > 
> > If I boot the January 7th bsd (with the January 6th userland) I see
> > the same behaviour as Barry reported if he upgraded using an older
> > bsd.rd, ie it gets to mounting the drives and then blows up:
> > 
> > root on wd0a (14df1105db104991.a) swap on wd0b dump on wd0b 
> >  
> > init: /bin/sh on /etc/rc terminated abnormally, going to single user mode   
> >  
> > Enter pathname of shell or RETURN for sh:   
> >  
> > # ls
> > .cshrc   boot bsd.rd   home sys 
> > 
> >   
> > .profile bsd  bsd.upgrade  mnt  tmp
> > altroot  bsd.booted   dev  root usr 
> >  
> > bin  bsd.jan7 etc  sbin var 
> > 
> >   
> > init: single user shell terminated, restarting
> > Enter pathname of shell or RETURN for sh:
> > # reboot
> > 
> > Here is dmesg with January 6th snapshot installed (where everything
> > works)
> > 
> > OpenBSD 7.2-current (GENERIC) #509: Thu Jan  5 08:26:46 MST 2023
> > dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
> > real mem  = 536363008 (511MB)
> > avail mem = 509444096 (485MB)
> > random: good seed from bootblocks
> > mpath0 at root
> > scsibus0 at mpath0: 256 targets
> > mainbus0 at root
> > bios0 at mainbus0:

Re: init: single user shell terminated, restarting

2023-01-16 Thread Johan Huldtgren
hello,

On 2023-01-16 10:23, Stuart Henderson wrote:
> On 2023-01-15, Barry Grumbine  wrote:
> > In case someone else runs in to this, and bothers to check misc@
> >
> > In this commit:
> > https://marc.info/?l=openbsd-cvs&m=167283731726983&w=2
> >
> > --execute-only (aka NX bit, aka XD bit, aka Data Execution Prevention)
> > was turned on
> 
> NX ("no execute") is used with kernel protections that can prevent
> memory which is mapped as being _writable_ from being executed. That afaik
> didn't change recently (at least not on purpose?).
> 
> execute-only is something else, it relates to mappings which are
> protected such that they _can_ be executed but not _read_. It's now used
> on aarch64 and riscv64 in snapshots (not everything in ports has been
> fixed to work with it yet). There's work towards using it on amd64 but
> the necessary cpu feature is only available on fairly new AMD machines
> and very (for my version of 'very') new Intel machines.
> 
> > On my ancient T520 I had to go in to BIOS and set:
> > -> Security
> > --> Memory Protection
> > ---> Execution Prevention [Enable]
> >
> > Everything works just peachy now.
> 
> It would be interesting to figure out what is happening with your
> system (e.g. which change actually broke things) - there's no way it can
> be the commit you point out. That's "restore previous behaviour when
> compiling the EFI boot loader on aarch64/riscv64 which had got changed
> in a different diff".
> 
> Any idea whether the problem is just in ramdisk kernels or did it affect
> normal boot e.g. GENERIC.MP as well?

I see this issue on my old Soekris net5501s as well. Using Barry's data
from above regarding dates I can confirm that the Janusary 6th snapshot
on hostserver.de's archive works, but trying to install the January 7th
snapshot results in the init message rolling until the system is power
cycled:

init: single user shell terminated, restarting

If I boot the January 7th bsd (with the January 6th userland) I see
the same behaviour as Barry reported if he upgraded using an older
bsd.rd, ie it gets to mounting the drives and then blows up:

root on wd0a (14df1105db104991.a) swap on wd0b dump on wd0b 
 
init: /bin/sh on /etc/rc terminated abnormally, going to single user mode   
 
Enter pathname of shell or RETURN for sh:   
 
# ls
.cshrc   boot bsd.rd   home sys 

  
.profile bsd  bsd.upgrade  mnt  tmp
altroot  bsd.booted   dev  root usr 
 
bin  bsd.jan7 etc  sbin var 

  
init: single user shell terminated, restarting
Enter pathname of shell or RETURN for sh:
# reboot

Here is dmesg with January 6th snapshot installed (where everything
works)

OpenBSD 7.2-current (GENERIC) #509: Thu Jan  5 08:26:46 MST 2023
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
real mem  = 536363008 (511MB)
avail mem = 509444096 (485MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: date 20/71/05, BIOS32 rev. 0 @ 0xfac40
pcibios0 at bios0: rev 2.0 @ 0xf/0x1
pcibios0: pcibios_get_intr_routing - function not supported
pcibios0: PCI IRQ Routing information unavailable.
pcibios0: PCI bus #0 is the last bus
bios0: ROM list: 0xc8000/0xa800
cpu0 at mainbus0: (uniprocessor)
cpu0: Geode(TM) Integrated Processor by AMD PCS ("AuthenticAMD" 586-class) 500 
MHz, 05-0a-02
cpu0: FPU,DE,PSE,TSC,MSR,CX8,SEP,PGE,CMOV,CFLUSH,MMX,MMXX,3DNOW2,3DNOW
mtrr: K6-family MTRR support (2 registers)
amdmsr0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
0:20:0: io address conflict 0x6100/0x100
0:20:0: io address conflict 0x6200/0x200
pchb0 at pci0 dev 1 function 0 "AMD Geode LX" rev 0x31
glxsb0 at pci0 dev 1 function 2 "AMD Geode LX Crypto" rev 0x00: RNG AES
vr0 at pci0 dev 6 function 0 "VIA VT6105M RhineIII" rev 0x96: irq 11, address 
00:00:24:c9:58:4c
ukphy0 at vr0 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI 0x004063, 
model 0x0034
vr1 at pci0 dev 7 function 0 "VIA VT6105M RhineIII" rev 0x96: irq 5, address 
00:00:24:c9:58:4d
ukphy1 at vr1 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI 0x004063, 
model 0x0034
vr2 at pci0 dev 8 function 0 "VIA VT6105M RhineIII" rev 0x96: irq 9, address 
00:00:24:c9:58:4e
ukphy2 at vr2 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI 0x004063, 
model 0x0034
vr3 at pci0 dev 9 function 0 "VIA VT6105M RhineIII" rev 0x96: irq 12, address 
00:00:24:c9:58:4f
ukphy3 at vr3 phy 1: Generic IEEE 802.3u media interface, r

Re: Large Filesystem

2020-11-14 Thread Johan Huldtgren
hello,

On 2020-11-14 13:50, Mischa wrote:
> Hi All,
> 
> I am currently in the process of building a large filesystem with
> 12 x 6TB 3.5" SAS in raid6, effectively ~55TB of storage, to serve as a
> central, mostly download, platform with around 100 concurrent
> connections.
> 
> The current system is running FreeBSD with ZFS and I would like to
> see if it's possible on OpenBSD, as it's one of the last two systems
> on FreeBSD left. :)
> 
> Has anybody build a large filesystem using FFS2? Is it a good idea?
> How does it perform? What are good tests to run?
> 
> Your help and suggestions are really appriciated!

I have a filesystem about that size on my home file server, (5 x 14TB SAS
in raid5 plus a hot spare) the drives are connected to a RAID card, but
then it's just FFS2 on it. It runs reasonably well for home use. Not
spectacular but not so that anyone has any complaints. fsck does take
quite some time to run, but this filesystem was created quite a long time
ago with the then default settings.

$ dmesg | grep LSI
mfi0: "LSI MegaRAID SAS 9260-8i", firmware 12.15.0-0239, 512MB cache
sd0 at scsibus1 targ 0 lun 0:  naa.

$ df -h /mnt
Filesystem SizeUsed   Avail Capacity  Mounted on
/dev/sd0a 50.5T   14.6T   33.4T30%/mnt

.jh



Re: Good options for SAS HBA or SATA expansion cards?

2019-04-12 Thread Johan Huldtgren
> I have a Dell server that was advertised to support 4x3.5 + 2x2.5
> drives but when I popped it open I found there are only 4 SATA ports on
> the motherboard total. So of the 6 claimed drives, I can actually
> only install 3 drives because the stock DVD drive consumes a mobo port.
> 
> Speaking with Dell, they are recommending their part number PEXSAT32
> which is a rebadged StarTech product based on the Marvell 88SE9123
> chipset. From posts I saw from people running various OS, that chipset
> is flaky on everything but Windows.
> 
> My local shop has several el-cheapo no-brand cards based on the ASMedia
> ASM1061 chipset. From what I could find on the net those cards work ok
> but they can be slow. They also have a card based on the Silicon Image
> SiI3114 chipset. I didn't find much info on this one except for Windows
> victims claiming it was great or sucked.
> 
> Can anybody recommend some good 2 or 4 port SATA (internal) expansion
> cards or a SAS HBA that works well with OpenBSD?

I've got an mfi and an mfii card in two servers, both have worked well,
I do not run softraid on them though.

mfi0 at pci1 dev 0 function 0 "Symbios Logic MegaRAID SAS2108 GEN2" rev 0x05: 
apic 2 int 2
mfi0: "LSI MegaRAID SAS 9260-8i", firmware 12.15.0-0239, 512MB cache


mfii0 at pci3 dev 0 function 0 "Symbios Logic MegaRAID SAS2208" rev 0x05: msi
mfii0: "LSI MegaRAID SAS 9271-8i", firmware 23.34.0-0017, 1024MB cache

.jh



Re: starting i3 with xenodm

2019-03-27 Thread Johan Huldtgren
On 2019/03/27 04:59, Normen Wohner wrote:
> I installed i3 with pkg_add,
> yet don't understand how
> to call it from xenodm.
> 
> I tried replacing the stock 
> ${exec_path}/bin/fvwm
> with /usr/local/bin/i3
> inside xenodm's Xsession,
> but that didn't help much.
> 
> I then wrote the typical
> exec i3
> into .xinitrc in my /root
> nothing.
> 
> Anybody here using i3?

This works for me.

---

$ cat ~/.xsession
# disable system beep
xset b off

# lock display
xidle -timeout 300 &

exec i3

---

.jh



Re: NextCloud: failed integrity checks

2018-07-22 Thread Johan Huldtgren
On 2018/07/22 15:39, Nicolas Schmidt wrote:
> After installation on OpenBSD 6.3 with pkg_add, NextCloud complains about 
> files failing the integrity checks. More specifically:
> 
> - occ
>  * expected hash: 
> 7e3fce0d7b5c20a7775ed1b548cb2e29bed078d3ca77b01a83d438f671b3d473147d4e8217d2084e17b6fe23a18ba258b11ba60106e23381f1e2889ce14971c4
>  * current hash:  
> 7693eb89c0bc218712d68ec58599efa46e5c3729814e2aad16bf2c0079be7ae1909f072ead7889883c0a89b6c51570800d9e8a71f35866cb4e0c47aeaa5a4b2b
> 
> - version.php
>  * expected hash: 
> 4e9046aca4fd8e942ba7bd505374e22ddd500a99b3a46d57d629b99c3132a66206883053f22801894929e51fca307c740062b497d55639bcc9a3154ada3504ff
>  * current hash:  
> 30cd43589fc8ab273fa25e1a477c8cbadb13bac5541daa6d3fa0490a0c2054c2c29a274fd50eec66934a9d9adc541dec8701e7463922d36174478ae3e9a64981
> 
> - apps/updatenotification/appinfo/info.xml
>  * expected hash: 
> bf7983ffe422ba215c04a0069081fab0c78ba81fa40a90cbdd3595182e011fb7f3e0bd1cd14cdea742cafb89f1da001582fe8d560749d98ea540b4ee76dd9898
>  * current hash:  
> d2984fa816b4cea71e7c09f36a4132e7cb88d357f22e1c795778deccdb4066beaef2876b95d849e6eeae37b879c0f63500b0958a6a61bab1c933736bf135c440
> 
> 
> Anybody able to reproduce?

yeah this is known. The port modifies these files to work with OpenBSD
(if you look at the port these files are the ones we patch). You can
work around this by adding this to your config.php

'integrity.check.disabled' => true,

.jh




Re: Getting Dell RAID status via SNMP

2017-07-18 Thread Johan Huldtgren

On 2017-07-18 19:45, Stuart Henderson wrote:

On 2017-07-18, Jibby Jeremiah  wrote:

​Stuart H wrote :

So for now you would need to run bioctl to fetch status for this.


Thanks again Stuart.   But I look at the man page and it is not clear 
to me

how to use this:

[root@myname ~]# bioctl -q sd0
sd0: , serial 
0077a1dc0b3da755200084e6a0a06d86

[root@myname ~]# bioctl -i sd0
sd0: , serial 
0077a1dc0b3da755200084e6a0a06d86

[root@myname ~]# bioctl -i mfii0
bioctl: Can't locate mfii0 device via /dev/bio
[root@myname ~]# bioctl -i mfii
bioctl: Can't locate mfii device via /dev/bio
[root@myname ~]# bioctl -iv sd0
sd0: , serial 
0077a1dc0b3da755200084e6a0a06d86




Oh hmm - perhaps mfii(4) doesn't support reading status at all then,
that's a surprise to me. Normally "bioctl sd0" would be enough.


I can confirm that mfii(4) doesn't support reading status at all. There
was some work last year to improve this, but it ran into some issues.

http://marc.info/?t=14773842861&r=1&w=2

.jh



Re: APCu/Memcached/Redis - OwnCloud/Nextcloud memory caching - which OpenBSD package?

2017-02-25 Thread Johan Huldtgren
hello,

> I'm trying to improve the performance of my freshly installed Nextcloud 
> site.  I'm running on my local 1G network and the performance is less 
> than optimal.
> 
> I've done all the SQL tuning, but from looking at the SQL log files, the 
> SQL isn't the slow part.

make sure your SQL encoding is set to unicode/UTF8, I recently did a fresh
install and the encoding ended up as SQL_ASCII and performance was abysmal.
Switching to UTF-8 and performance was as expected. (this was with postgresql)

> I haven't configured a memory cache yet and am a bit confused about 
> which OpenBSD packages correspond to the recommendations documented in:
> https://docs.nextcloud.com/server/11/admin_manual/configuration_server/caching_configuration.html
> 
> APCu , APCu 4.0.6 and up required.
> Memcached 
> Redis , PHP module 2.2.6 and up required.
> 
> The only "APCu" packages are the UPS ones, not quite what I'm looking for :)
> There is no php package for Memcached (php-memcached).  There is Perl, 
> Python & Python3.
> There is a php-predis package at 1.1.1 level, and a 
> pecl-redis-2.2.7p0.tgz package, but is pecl for php?  I'm rather new to 
> all the php modules stuff...
> 
> Is anyone running any of these applications?  If so, what is the name of 
> the OpenBSD package, or did you do a local install?

I've configured my nextcloud installation with redis. The relevant packages
are:

# pkg_info | grep -i redis
pecl-redis-2.2.7p0  PHP interface to redis
redis-3.2.6 persistent key-value database

.jh



Re: OT? - ownCloud vs NextCloud

2017-02-23 Thread Johan Huldtgren
hello,

> Is there some reason there's no Nextcloud port other than no-one has 
> done one?  (yes, this is a reason, but I'm wondering license, politics, 
> etc).

I've been using owncloud for a few years, but recently switched to nextcloud
when an upgrade broke my calendar; this might have been salvageable but I'd
been thinking about trying out nextcloud so this was the perfect excuse. It
worked well for me, and it seems nextcloud is currently the more active
project consisting of many former owncloud developers. I created a package
which I submitted to ports@ the other week, if deemed worthy it might get
imported (however the trend has been to remove packages which are really
just a tarball to be extracted in /var/www).

http://marc.info/?l=openbsd-ports&m=148744316527349&w=2

.jh



Re: macbook EFI bootloader

2016-12-29 Thread Johan Huldtgren
hello,

> Recently tried to get my intel macbook (circa '08) dual-booting with
> -current amd64 (December 26 snapshot).
> 
> Within OSX I repartitioned the RootDisk and added a MS-DOS (FAT)
> partition for the OpenBSD install/disklabel. I booted from CD and
> installed to wd0 (using the OpenBSD fdisk partition). At this stage if I
> want to boot from wd0, I have to boot from CD and select hd0a:/bsd at
> the second stage boot loader. This works well enough, dmesg of the
> system below.
> 
> When trying to boot directly from wd0 using the native EFI bootloader I
> placed BOOTIA32.EFI and BOOTX64.EFI in the EFI partition of the RootDisk
> so that I can select "EFI Partition" when booting (by holding option
> key).
> 
> /dev/disk0
>#:   TYPE
> NAMESIZE   IDENTIFIER
>0: 
> GUID_partition_scheme*120.0
> GB   disk0
>1:   
> EFI 209.7 MB   disk0s1
>2:  Apple_HFS
> RootDisk118.6 GB   disk0s2
>3:   Microsoft Basic
> Data 1.1 GB disk0s3
> 
> 
> This setup gets as far as shown below and then stops...
> 
> probing: pc0 mem[572K 64K 3039M 11M 60K 48K]
> disk: hd0
>>> OpenBSD/amd64 BOOTIA32 3.32
> boot>
> booting hd0a:/bsd: 6979304+2212872+258624+0+765952
> [72+710280+477696]=0xae2350
> entry point at 0xf001000 [7205c766, 3404, 24448b12, 1240a304]
> 
> 
> I've tried booting with `boot> hd0a:/bsd.rd'. Also tried writing
> install60.tgz and miniroot60.tgz to USB and got similar results there as
> well.
> 
> 
> Curious to know if the native EFI bootloader is designed to work with
> this hardware?

I recently tried to install OpenBSD 6.0 (as well as a snap) on an
2007 iMac and had exactly this issue. jcs suggested I try following
the older (pre-EFI) instructions here:

https://gist.github.com/jcs/5573685/284add9ea2abd6305e940276cc3af6b5f1697dcd

(I was just testing this out and skipped the encryption parts both in OSX
and OpenBSD)

Doing it this way worked, however after the installation OpenBSD (which is
now the default) will not boot. Holding down alt to boot OSX does work and
then after installing rEFInd I can boot both OSs successfully.

.jh

> dmesg output:
> 
> OpenBSD 6.0-current (GENERIC.MP) #73: Mon Dec 26 23:25:48 MST 2016
> bu...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 3171909632 (3024MB)
> avail mem = 3071180800 (2928MB)
> warning: no entropy supplied by boot loader
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe (37 entries)
> bios0: vendor Apple Inc. version "MB21.88Z.00A5.B07.0706270922" date
> 06/27/07
> bios0: Apple Inc. MacBook2,1
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP HPET APIC MCFG ASF! SBST ECDT SSDT SSDT SSDT
> acpi0: wakeup devices ADP1(S3) LID0(S3) PXS1(S4) PXS2(S4) USB1(S3)
> USB2(S3) USB3(S3) USB4(S3) USB7(S3) EC__(S3)
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpihpet0 at acpi0: 14318179 Hz
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Core(TM)2 CPU T7400 @ 2.16GHz, 2161.65 MHz
> cpu0:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
> H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM
> 2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF,SENSOR
> cpu0: 4MB 64b/line 16-way L2 cache
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
> cpu0: apic clock running at 166MHz
> cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2, IBE
> cpu1 at mainbus0: apid 1 (application processor)
> cpu1: Intel(R) Core(TM)2 CPU T7400 @ 2.16GHz, 2161.25 MHz
> cpu1:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
> H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM
> 2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF,SENSOR
> cpu1: 4MB 64b/line 16-way L2 cache
> cpu1: smt 0, core 1, package 0
> ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 24 pins
> acpimcfg0 at acpi0 addr 0xf000, bus 0-255
> acpiec0 at acpi0
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiprt1 at acpi0: bus 1 (RP01)
> acpiprt2 at acpi0: bus 2 (RP02)
> acpiprt3 at acpi0: bus 3 (PCIB)
> acpicpu0 at acpi0: !C3(100@55 mwait@0x31), !C2(500@1 mwait@0x10),
> C1(1000@1 mwait), PSS
> acpicpu1 at acpi0: !C3(100@55 mwait@0x31), !C2(500@1 mwait@0x10),
> C1(1000@1 mwait), PSS
> acpiac0 at acpi0: AC unit online
> acpibtn0 at acpi0: LID0
> "APP0002" at acpi0 not configured
> acpibtn1 at acpi0: PWRB
> acpibtn2 at acpi0: SLPB
> "APP0001" at acpi0 not configured
> "APP0003" at acpi0 not configured
> "ACPI0002" at acpi0 not configured
> acpibat0 at acpi0: BAT0 model "15253732082930497" type 15253732284385612
> oem "15253732284387396"
> acpivideo0 at acpi0: GFX0
> cpu0: Enhanced SpeedStep 2161 MHz: speeds: 2167, 

Re: bringing degraded softraid online

2016-02-16 Thread Johan Huldtgren

On 2/16/16 10:31, Joel Sing wrote:

This is the reason that the volume will not reassemble - two of your chunks
have metadata with version 64, while the rest have version 63. As such, only
chunks 0 and 1 are considered to be online - all others have old metadata and
are marked offline.

This most likely occurred due to the original panic (from another mail in the
same thread):

panic: Non dma-reachable buffer at curaddr 0x81115888(raw)
Stopped at Debugger+0x9: leave
TID PID UID PRFLAGS PFLAGS CPU COMMAND
*25637 25637 0 0x14000 0x200 1 srdis
Debugger() at Debugger+0x9
panic() at panic+0xfe
_bus_dmamap_load_buffer() at _bus_dmamap_load_buffer+0x1b6
_bus_dmamap_load() at _bus_dmamap_load+0x7f
ahci_load_prdt() at ahci_load_prdt+0x97
ahci_ata_cmd() at ahci_ata_cmd+0x69
atascsi_disk_cmd() at atascsis_disk_cmd+0x1b1
scsi_xs_exec() scsi_xs_exec+0x35
sdstart() at sdstart+0x16f
scsi_iopool_run() at scsi_iopool_run+0x5d
scsi_xsh_runqueue() at scsi_xsh_runqueue+0x13d
scsi_xsh_add() at scsi_xsh_add+0x98
sdstrategy() at sdstrategy+0x10f
spec_strategy() at spec_strategy+0x53

My guess is that it was in the process of writing out new metadata (version
64) when it paniced due to the AHCI driver being passed a non dma-reachable
buffer. This is most likely due to a bug in the softraid code - we're likely
using a malloc'd buffer in a place where we need to use a dma_alloc'd one.


I've been running with krw@'s patch from this related thread[1] and copying
and I've not paniced (yet, still have lots of data to copy back), but I'll
gladly test any patches which come out of this.

thanks,

.jh

[1] http://marc.info/?t=14552934247&r=1&w=2



degraded softraid not coming back online

2016-02-06 Thread Johan Huldtgren

hello,

earlier this week a host I have at an offsite location went dark (I
have no remote console), today I drove out to take a look. It had
panicked, I have pictures of the panic, trace and ps here:

http://www.huldtgren.com/panics/

When I tried to bring it back online the softraid volume would not
come back.

softraid0: trying to bring up sd9 degraded
softraid0: sd9 was not shutdown properly
softraid0: sd9 is offline, will not be brought online

softraid0 was created back in day as follows:

bioctl -c 5 -l 
/dev/sd0a,/dev/sd1a,/dev/sd3a,/dev/sd4a,/dev/sd5a,/dev/sd6a,/dev/sd7a,/dev/sd8a 
softraid0


reading through bioctl it seemed -R was what I wanted, however I can't
for the life of me get it to rebuild:

# bioctl -R /dev/sd1a sd9
bioctl: Can't locate sd9 device via /dev/bio

I've tried all other drives as the first one, all give the same error,
as does bioctl -i

# bioctl -i -v sd9
bioctl: Can't locate sd9 device via /dev/bio

I can read with both disklabel and fdisk from all volumes except sd9
which shows not configured (I have no recollection of trying this
before so don't know if that's even supposed to work, just mentioning
it for completness sake)

# fdisk sd9
fdisk: sd9: Device not configured
# disklabel sd9
disklabel: /dev/rsd9c: Device not configured

if some combination of events just destroyed this beyond repair I can
restore backups, but I was hoping there was some way back that I'm
just not seeing.

dmesg is below.

thanks,

.jh


OpenBSD 5.9-beta (GENERIC.MP) #1778: Wed Dec 23 18:23:06 MST 2015
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 16845516800 (16065MB)
avail mem = 16330858496 (15574MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xee8c0 (29 entries)
bios0: vendor American Megatrends Inc. version "P2.10" date 05/12/2015
bios0: ASRock Z97 Extreme4
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT SSDT SSDT SSDT MCFG HPET SSDT SSDT 
AAFT UEFI SSDT
acpi0: wakeup devices PEGP(S4) PEG0(S4) PEGP(S4) PEG1(S4) PEGP(S4) 
PEG2(S4) PS2K(S4) PS2M(S4) UAR1(S4) USB1(S3) PXSX(S4) RP01(S4) PXSX(S4) 
RP02(S4) PXSX(S4) RP03(S4) [...]

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) Pentium(R) CPU G3258 @ 3.20GHz, 3199.45 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,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,MOVBE,POPCNT,DEADLINE,XSAVE,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,ERMS,INVPCID,SENSOR,ARAT

cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Pentium(R) CPU G3258 @ 3.20GHz, 3199.08 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,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,MOVBE,POPCNT,DEADLINE,XSAVE,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,ERMS,INVPCID,SENSOR,ARAT

cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 8 pa 0xfec0, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xf800, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG0)
acpiprt2 at acpi0: bus -1 (PEG1)
acpiprt3 at acpi0: bus -1 (PEG2)
acpiprt4 at acpi0: bus 1 (RP01)
acpiprt5 at acpi0: bus 2 (RP04)
acpiprt6 at acpi0: bus 3 (RP06)
acpiprt7 at acpi0: bus 4 (RP07)
acpiec0 at acpi0: not present
acpicpu0 at acpi0: C2(500@67 mwait.1@0x10), C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: C2(500@67 mwait.1@0x10), C1(1000@1 mwait.1), PSS
acpibat0 at acpi0: BAT0 not present
acpibat1 at acpi0: BAT1 not present
acpibat2 at acpi0: BAT2 not present
acpibtn0 at acpi0: PWRB
acpibtn1 at acpi0: SLPB
acpibtn2 at acpi0: LID0
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: DD1F
cpu0: Enhanced SpeedStep 3199 MHz: speeds: 3201, 3200, 3000, 2900, 2700, 
2500, 2300, 2200, 2000, 1800, 1700, 1500, 1300, 1100, 1000, 800 MHz

pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 4G Host" rev 0x06
inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics" rev 0x06
drm0 at inteldrm0
inteldrm0: msi
inteldrm0: 1280x1024
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
azalia0 at pci0 dev 3 function 0 "Intel Core 4G HD Audio" rev 0x06: msi
azalia0: No codecs found
xhci0 at pci0 dev 20 function 0 "Intel 9 Series xHCI" rev 0x00: msi
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 "Intel xHCI root hub" rev 3.00/1.00 addr 1
"Intel 9 Series MEI" rev 0x00 at pci0 dev 22 function 0 

Re: bringing degraded softraid online

2016-02-06 Thread Johan Huldtgren
Not sure. Perhaps these drives don't have good meta data due to the 
crash?

Can you set sr_debug = SR_D_STATE | SR_D_META and see if that prints
anything informative?


well we now get lots more:

softraid0 at root
scsibus5 at softraid0: 256 targets
softraid0: sr_boot_assembly
softraid0: sr_meta_native_bootprobe
softraid0: sr_meta_native_read(0x400, 0x802e)
softraid0: sr_meta_rw(0x400, 0x802e, 0x8000)
softraid0: sr_meta_getdevname(0x81a6ea30, 32)
softraid0: sr_meta_validate(0x802e)
softraid0: sr_meta_getdevname(0x81a6e7d0, 32)
softraid0: sr_meta_validate valid metadata sd0a
softraid0: sr_meta_native_bootprobe
softraid0: sr_meta_native_read(0x410, 0x802e)
softraid0: sr_meta_rw(0x410, 0x802e, 0x8000)
softraid0: sr_meta_getdevname(0x81a6ea30, 32)
softraid0: sr_meta_validate(0x802e)
softraid0: sr_meta_getdevname(0x81a6e7d0, 32)
softraid0: sr_meta_validate valid metadata sd1a
softraid0: sr_meta_native_bootprobe
softraid0: sr_meta_native_bootprobe
softraid0: sr_meta_native_read(0x430, 0x802e)
softraid0: sr_meta_rw(0x430, 0x802e, 0x8000)
softraid0: sr_meta_getdevname(0x81a6ea30, 32)
softraid0: sr_meta_validate(0x802e)
softraid0: sr_meta_getdevname(0x81a6e7d0, 32)
softraid0: sr_meta_validate valid metadata sd3a
softraid0: sr_meta_native_bootprobe
softraid0: sr_meta_native_read(0x440, 0x802e)
softraid0: sr_meta_rw(0x440, 0x802e, 0x8000)
softraid0: sr_meta_getdevname(0x81a6ea30, 32)
softraid0: sr_meta_validate(0x802e)
softraid0: sr_meta_getdevname(0x81a6e7d0, 32)
softraid0: sr_meta_validate valid metadata sd4a
softraid0: sr_meta_native_bootprobe
softraid0: sr_meta_native_read(0x450, 0x802e)
softraid0: sr_meta_rw(0x450, 0x802e, 0x8000)
softraid0: sr_meta_getdevname(0x81a6ea30, 32)
softraid0: sr_meta_validate(0x802e)
softraid0: sr_meta_getdevname(0x81a6e7d0, 32)
softraid0: sr_meta_validate valid metadata sd5a
softraid0: sr_meta_native_bootprobe
softraid0: sr_meta_native_read(0x460, 0x802e)
softraid0: sr_meta_rw(0x460, 0x802e, 0x8000)
softraid0: sr_meta_getdevname(0x81a6ea30, 32)
softraid0: sr_meta_validate(0x802e)
softraid0: sr_meta_getdevname(0x81a6e7d0, 32)
softraid0: sr_meta_validate valid metadata sd6a
softraid0: sr_meta_native_bootprobe
softraid0: sr_meta_native_read(0x470, 0x802e)
softraid0: sr_meta_rw(0x470, 0x802e, 0x8000)
softraid0: sr_meta_getdevname(0x81a6ea30, 32)
softraid0: sr_meta_validate(0x802e)
softraid0: sr_meta_getdevname(0x81a6e7d0, 32)
softraid0: sr_meta_validate valid metadata sd7a
softraid0: sr_meta_native_bootprobe
softraid0: sr_meta_native_read(0x480, 0x802e)
softraid0: sr_meta_rw(0x480, 0x802e, 0x8000)
softraid0: sr_meta_getdevname(0x81a6ea30, 32)
softraid0: sr_meta_validate(0x802e)
softraid0: sr_meta_getdevname(0x81a6e7d0, 32)
softraid0: sr_meta_validate valid metadata sd8a
softraid0: insert volume 0 at head
softraid0: volume 0 insert chunk 7 at head
softraid0: volume 0 insert chunk 6 at head
softraid0: volume 0 insert chunk 5 at head
softraid0: volume 0 insert chunk 4 at head
softraid0: volume 0 insert chunk 3 at head
softraid0: volume 0 insert chunk 2 at head
softraid0: volume 0 insert chunk 0 at head
softraid0: volume 0 insert chunk 1 after 0
softraid0: assembling volume 05a4f9a1-e533-4e6b-ad0c-7051a541c881 volid 
0 with 8 chunks

softraid0: using ondisk metadata version 64 for chunk 0
softraid0: using ondisk metadata version 64 for chunk 1
softraid0: using ondisk metadata version 63 for chunk 2
softraid0: using ondisk metadata version 63 for chunk 3
softraid0: using ondisk metadata version 63 for chunk 4
softraid0: using ondisk metadata version 63 for chunk 5
softraid0: using ondisk metadata version 63 for chunk 6
softraid0: using ondisk metadata version 63 for chunk 7
softraid0: sr_meta_probe(8)
softraid0: sr_meta_getdevname(0x81a6e9a0, 32)
softraid0: sr_meta_native_probe(sd1a)
softraid0: probe found sd1a size 3907023473
softraid0: sr_meta_getdevname(0x81a6e9a0, 32)
softraid0: sr_meta_native_probe(sd0a)
softraid0: probe found sd0a size 3907023473
softraid0: sr_meta_getdevname(0x81a6e9a0, 32)
softraid0: sr_meta_native_probe(sd3a)
softraid0: probe found sd3a size 3907023473
softraid0: sr_meta_getdevname(0x81a6e9a0, 32)
softraid0: sr_meta_native_probe(sd4a)
softraid0: probe found sd4a size 3907023473
softraid0: sr_meta_getdevname(0x81a6e9a0, 32)
softraid0: sr_meta_native_probe(sd5a)
softraid0: probe found sd5a size 3907023473
softraid0: sr_meta_getdevname(0x81a6e9a0, 32)
softraid0: sr_meta_native_probe(sd6a)
softraid0: probe found sd6a size 3907023473
softraid0: sr_meta_getdevname(0x81a6e9a0, 32)
softraid0: sr_meta_native_pro

Re: bringing degraded softraid online

2016-02-06 Thread Johan Huldtgren
This should show chunk states. To map from number this prints to a 
state,
see the #defines listed at struct bioc_disk.bd_status in 
sys/dev/biovar.h

starting line 92.


scsibus5 at softraid0: 256 targets
softraid0: trying to bring up sd9 degraded
softraid0: sd9 was not shutdown properly
softraid0: sd9: sr_raid_set_vol_state
softraid0: sd9: sd1a: chunk state is 0
softraid0: sd9: sd0a: chunk state is 0
softraid0: sd9: : chunk state is 1
softraid0: sd9: : chunk state is 1
softraid0: sd9: : chunk state is 1
softraid0: sd9: : chunk state is 1
softraid0: sd9: : chunk state is 1
softraid0: sd9: : chunk state is 1
softraid0: sd9: sr_raid5_set_vol_state 0 -> 1
softraid0: sd9 is offline, will not be brought online
softraid0: sr_sensors_delete

So sd0 and sd1 are online and then the remaining are
not only offline but unknown? (or does it not print
the device when it's perceived as offline?). Now I
can clearly see and access the rest of the drives, so
why would softraid think they're offline?

thanks,

.jh


OpenBSD 5.9 (SRDEBUG) #1: Sat Feb  6 14:36:27 EST 2016

r...@mordor.home.huldtgren.net:/usr/src/sys/arch/amd64/compile/SRDEBUG

real mem = 16845516800 (16065MB)
avail mem = 16330809344 (15574MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xee8c0 (29 entries)
bios0: vendor American Megatrends Inc. version "P2.10" date 05/12/2015
bios0: ASRock Z97 Extreme4
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT SSDT SSDT SSDT MCFG HPET SSDT SSDT 
AAFT UEFI SSDT
acpi0: wakeup devices PEGP(S4) PEG0(S4) PEGP(S4) PEG1(S4) PEGP(S4) 
PEG2(S4) PS2K(S4) PS2M(S4) UAR1(S4) USB1(S3) PXSX(S4) RP01(S4) PXSX(S4) 
RP02(S4) PXSX(S4) RP03(S4) [...]

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) Pentium(R) CPU G3258 @ 3.20GHz, 3199.57 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,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,MOVBE,POPCNT,DEADLINE,XSAVE,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,ERMS,INVPCID,SENSOR,ARAT

cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2, IBE
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 8 pa 0xfec0, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xf800, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG0)
acpiprt2 at acpi0: bus -1 (PEG1)
acpiprt3 at acpi0: bus -1 (PEG2)
acpiprt4 at acpi0: bus 1 (RP01)
acpiprt5 at acpi0: bus 2 (RP04)
acpiprt6 at acpi0: bus 3 (RP06)
acpiprt7 at acpi0: bus 4 (RP07)
acpiec0 at acpi0: not present
acpicpu0 at acpi0: C2(500@67 mwait.1@0x10), C1(1000@1 mwait.1), PSS
acpibat0 at acpi0: BAT0 not present
acpibat1 at acpi0: BAT1 not present
acpibat2 at acpi0: BAT2 not present
dwiic at acpi0 not configured
dwiic at acpi0 not configured
acpibtn0 at acpi0: PWRB
acpibtn1 at acpi0: SLPB
acpibtn2 at acpi0: LID0
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: DD1F
cpu0: Enhanced SpeedStep 3199 MHz: speeds: 3201, 3200, 3000, 2900, 2700, 
2500, 2300, 2200, 2000, 1800, 1700, 1500, 1300, 1100, 1000, 800 MHz

pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 4G Host" rev 0x06
inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics" rev 0x06
drm0 at inteldrm0
inteldrm0: msi
inteldrm0: 1280x1024
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
azalia0 at pci0 dev 3 function 0 "Intel Core 4G HD Audio" rev 0x06: msi
azalia0: No codecs found
xhci0 at pci0 dev 20 function 0 "Intel 9 Series xHCI" rev 0x00: msi
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 "Intel xHCI root hub" rev 3.00/1.00 addr 1
"Intel 9 Series MEI" rev 0x00 at pci0 dev 22 function 0 not configured
em0 at pci0 dev 25 function 0 "Intel I218-V" rev 0x00: msi, address 
d0:50:99:5a:09:1c
ehci0 at pci0 dev 26 function 0 "Intel 9 Series USB" rev 0x00: apic 8 
int 16

usb1 at ehci0: USB revision 2.0
uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1
azalia1 at pci0 dev 27 function 0 "Intel 9 Series HD Audio" rev 0x00: 
msi

azalia1: codecs: Realtek ALC1150
audio0 at azalia1
ppb0 at pci0 dev 28 function 0 "Intel 9 Series PCIE" rev 0xd0
pci1 at ppb0 bus 1
ppb1 at pci0 dev 28 function 3 "Intel 9 Series PCIE" rev 0xd0: msi
pci2 at ppb1 bus 2
ahci0 at pci2 dev 0 function 0 "ASMedia ASM1061 AHCI" rev 0x02: msi, 
AHCI 1.2

ahci0: port 0: 6.0Gb/s
ahci0: port 1: 6.0Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0:  SCSI3 
0/direct fixed naa.5000cca36ac10354

sd0: 1907729MB, 512 bytes/sector, 3907029168 sectors
sd1 at scsibus1 targ 1 lun 0:  SCSI3 
0/direct fixed naa.5000cca36ac1b3d2

sd1: 190772

Re: bringing degraded softraid online

2016-02-06 Thread Johan Huldtgren

I would compile a kernel with 'option SR_DEBUG', and with
'uint32_t sr_debug = SR_D_STATE' in sys/dev/softraid.c line 63.

This might shed light on which chunks have a problem.


at boot I now see this:

softraid0 at root
scsibus5 at softraid0: 256 targets
softraid0: trying to bring up sd9 degraded
softraid0: sd9 was not shutdown properly
softraid0: sd9: sr_raid_set_vol_state
softraid0: sd9: sr_raid5_set_vol_state 0 -> 1
softraid0: sd9 is offline, will not be brought online
softraid0: sr_sensors_delete

I don't see anything else different. The bioctl
commands I ran previously show the exact same output
(and nothing in dmesg or console). Anything specific
I should be doing to trigger some output?

full dmesg below

thanks,

.jh


OpenBSD 5.9 (SRDEBUG) #0: Sat Feb  6 13:44:38 EST 2016

r...@mordor.home.huldtgren.net:/usr/src/sys/arch/amd64/compile/SRDEBUG

real mem = 16845516800 (16065MB)
avail mem = 16330809344 (15574MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xee8c0 (29 entries)
bios0: vendor American Megatrends Inc. version "P2.10" date 05/12/2015
bios0: ASRock Z97 Extreme4
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT SSDT SSDT SSDT MCFG HPET SSDT SSDT 
AAFT UEFI SSDT
acpi0: wakeup devices PEGP(S4) PEG0(S4) PEGP(S4) PEG1(S4) PEGP(S4) 
PEG2(S4) PS2K(S4) PS2M(S4) UAR1(S4) USB1(S3) PXSX(S4) RP01(S4) PXSX(S4) 
RP02(S4) PXSX(S4) RP03(S4) [...]

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) Pentium(R) CPU G3258 @ 3.20GHz, 3199.46 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,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,MOVBE,POPCNT,DEADLINE,XSAVE,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,ERMS,INVPCID,SENSOR,ARAT

cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2, IBE
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 8 pa 0xfec0, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xf800, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG0)
acpiprt2 at acpi0: bus -1 (PEG1)
acpiprt3 at acpi0: bus -1 (PEG2)
acpiprt4 at acpi0: bus 1 (RP01)
acpiprt5 at acpi0: bus 2 (RP04)
acpiprt6 at acpi0: bus 3 (RP06)
acpiprt7 at acpi0: bus 4 (RP07)
acpiec0 at acpi0: not present
acpicpu0 at acpi0: C2(500@67 mwait.1@0x10), C1(1000@1 mwait.1), PSS
acpibat0 at acpi0: BAT0 not present
acpibat1 at acpi0: BAT1 not present
acpibat2 at acpi0: BAT2 not present
dwiic at acpi0 not configured
dwiic at acpi0 not configured
acpibtn0 at acpi0: PWRB
acpibtn1 at acpi0: SLPB
acpibtn2 at acpi0: LID0
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: DD1F
cpu0: Enhanced SpeedStep 3199 MHz: speeds: 3201, 3200, 3000, 2900, 2700, 
2500, 2300, 2200, 2000, 1800, 1700, 1500, 1300, 1100, 1000, 800 MHz

pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 4G Host" rev 0x06
inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics" rev 0x06
drm0 at inteldrm0
inteldrm0: msi
inteldrm0: 1280x1024
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
azalia0 at pci0 dev 3 function 0 "Intel Core 4G HD Audio" rev 0x06: msi
azalia0: No codecs found
xhci0 at pci0 dev 20 function 0 "Intel 9 Series xHCI" rev 0x00: msi
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 "Intel xHCI root hub" rev 3.00/1.00 addr 1
"Intel 9 Series MEI" rev 0x00 at pci0 dev 22 function 0 not configured
em0 at pci0 dev 25 function 0 "Intel I218-V" rev 0x00: msi, address 
d0:50:99:5a:09:1c
ehci0 at pci0 dev 26 function 0 "Intel 9 Series USB" rev 0x00: apic 8 
int 16

usb1 at ehci0: USB revision 2.0
uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1
azalia1 at pci0 dev 27 function 0 "Intel 9 Series HD Audio" rev 0x00: 
msi

azalia1: codecs: Realtek ALC1150
audio0 at azalia1
ppb0 at pci0 dev 28 function 0 "Intel 9 Series PCIE" rev 0xd0
pci1 at ppb0 bus 1
ppb1 at pci0 dev 28 function 3 "Intel 9 Series PCIE" rev 0xd0: msi
pci2 at ppb1 bus 2
ahci0 at pci2 dev 0 function 0 "ASMedia ASM1061 AHCI" rev 0x02: msi, 
AHCI 1.2

ahci0: port 0: 6.0Gb/s
ahci0: port 1: 6.0Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0:  SCSI3 
0/direct fixed naa.5000cca36ac10354

sd0: 1907729MB, 512 bytes/sector, 3907029168 sectors
sd1 at scsibus1 targ 1 lun 0:  SCSI3 
0/direct fixed naa.5000cca36ac1b3d2

sd1: 1907729MB, 512 bytes/sector, 3907029168 sectors
ppb2 at pci0 dev 28 function 5 "Intel 9 Series PCIE" rev 0xd0: msi
pci3 at ppb2 bus 3
ahci1 at pci3 dev 0 function 0 "ASMedia ASM1061 AHCI" rev 0x01: msi, 
AHCI 1.2

ahci1: port 0: 6.0Gb/s
scsibus2 at ahci1: 32 targets
sd2 at scsibu

Re: bringing degraded softraid online

2016-02-06 Thread Johan Huldtgren

I think transcribing these images yourself improves likelyhood of them
being read...


ok, here goes:

panic: Non dma-reachable buffer at curaddr 0x81115888(raw)
Stopped at Debugger+0x9: leave
TID PID UID PRFLAGS PFLAGS CPU COMMAND
*25637 25637 0 0x14000 0x200 1 srdis
Debugger() at Debugger+0x9
panic() at panic+0xfe
_bus_dmamap_load_buffer() at _bus_dmamap_load_buffer+0x1b6
_bus_dmamap_load() at _bus_dmamap_load+0x7f
ahci_load_prdt() at ahci_load_prdt+0x97
ahci_ata_cmd() at ahci_ata_cmd+0x69
atascsi_disk_cmd() at atascsis_disk_cmd+0x1b1
scsi_xs_exec() scsi_xs_exec+0x35
sdstart() at sdstart+0x16f
scsi_iopool_run() at scsi_iopool_run+0x5d
scsi_xsh_runqueue() at scsi_xsh_runqueue+0x13d
scsi_xsh_add() at scsi_xsh_add+0x98
sdstrategy() at sdstrategy+0x10f
spec_strategy() at spec_strategy+0x53
end trace frame: 0x800032ca1e40, count: 0
http://www.openbsd.org/ddb.html describes the minimum info required in 
bug

reports. Insufficient info makes it difficult to find and fix bugs
ddb{1}> trace
Debugger() at Debugger+0x9
panic() at panic+0xfe
_bus_dmamap_load_buffer() at _bus_dmamap_load_buffer+0x1b6
_bus_dmamap_load() at _bus_dmamap_load+0x7f
ahci_load_prdt() at ahci_load_prdt+0x97
ahci_ata_cmd() at ahci_ata_cmd+0x69
atascsi_disk_cmd() at atascsis_disk_cmd+0x1b1
scsi_xs_exec() scsi_xs_exec+0x35
sdstart() at sdstart+0x16f
scsi_iopool_run() at scsi_iopool_run+0x5d
scsi_xsh_runqueue() at scsi_xsh_runqueue+0x13d
scsi_xsh_add() at scsi_xsh_add+0x98
sdstrategy() at sdstrategy+0x10f
spec_strategy() at spec_strategy+0x53
VOP_STRATEGY() at VOP_STRATEGY+0x46
sr_raid_startwu() at sr_raid_startwu+0x98
sr_wu_done_callback() at sr_wu_done_callback+0xdc
taskq_thread() at taskq_thread+0x6c
end trace frame: 0x0, count: -18
ddb{1}> mach ddbcpu 0
Stopped at Debugger+0x9: leave
Debugger() at Debugger+0x9
x86_ipi_handler() at x86_ipi_handler+0x76
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x1c
--- interrupt ---
__mp_lock() at __mp_lock+0x48
intr_handler() at intr_handler+0xac
Xintr_ioapic_edge21() at Xintr_ioapic_edge21+0xc9
--- interrupt ---
acpicpu_idle() at acpicpu_idle+0x22d
cpu_idle_cyclw() at cpu_idle_cycle+0x10
end trace frame: 0x0, count: 7
ddb{0}> trace
Debugger() at Debugger+0x9
x86_ipi_handler() at x86_ipi_handler+0x76
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x1c
--- interrupt ---
__mp_lock() at __mp_lock+0x48
intr_handler() at intr_handler+0xac
Xintr_ioapic_edge21() at Xintr_ioapic_edge21+0xc9
--- interrupt ---
acpicpu_idle() at acpicpu_idle+0x22d
cpu_idle_cyclw() at cpu_idle_cycle+0x10
end trace frame: 0x0, count: -8
ddb{0}> ps
TID PPID PGRP UID S FLAGS WAIT COMMAND
28373 10364 28373 0 3 0x100083 kqread tail
16021 31167 26618 0 3 0 biowait rsync
25893 31167 26618 0 3 0x100082 select ssh
31167 18246 26618 0 3 0x82 select rsync
18246 26618 26618 0 3 0x10008a pause sh
26618 25696 26618 0 3 0x10008a pause sh
25696 16740 16740 0 3 0x100090 piperd cron
4622 9167 8447 83 3 0x10090 poll ntpd
9167 8447 8447 83 3 0x10090 poll ntpd
8447 1 8447 0 3 0x10080 poll ntpd
10364 16940 10364 0 3 0x1008b pause ksh
7233 23829 7233 1000 3 0x1008b pause ksh
23829 25478 25478 1000 3 0x90 select sshd
25478 7613 25478 0 3 0x92 poll sshd
30448 16940 30448 0 3 0x100083 ttyin ksh
16940 1 16490 0 3 0x100080 kqread tmux
14292 1 14292 0 3 0x100083 ttyin getty
21081 1 21081 0 3 0x100083 ttyin getty
26454 1 26454 0 3 0x100083 ttyin getty
23532 1 23532 0 3 0x100083 ttyin getty
6613 1 6613 0 3 0x100083 ttyin getty
16740 1 16740 0 3 0x100098 poll cron
5344 1 5344 0 3 0x80 select apcupsd
17288 1 5344 0 3 0x488 sigwait apcupsd
9946 1 5344 0 3 0x480 select apcupsd
15101 1 26467 0 3 0x80 nanosleep smartd
18761 1 18761 99 3 0x10090 poll sndiod
20525 1 20525 110 3 0x10090 poll sndiod
651 28135 28135 95 3 0x10090 kqread smtpd
26772 28135 28135 95 3 0x10090 kqread smtpd
6226 28135 28135 95 3 0x10090 kqread smtpd
17319 28135 28135 95 3 0x10090 kqread smtpd
1380 28135 28135 95 3 0x10090 kqread smtpd
24898 28135 28135 103 3 0x10090 kqread smtpd
28135 1 28135 0 3 0x10080 kqread smtpd
7613 1 7613 0 3 0x80 select sshd
25203 0 0 0 3 0x14200 acct acct
32076 7661 7661 74 3 0x10090 bpf pflogd
7661 1 7661 0 3 0x80 netio pflogd
1442 5224 5224 73 3 0x100090 kqread syslogd
5224 1 5224 0 3 0x100080 netio syslogd
21944 0 0 0 3 0x14200 pgzero zerothread
25632 0 0 0 3 0x14200 aiodoned aiodoned
12835 0 0 0 3 0x14200 syncer update
31224 0 0 0 3 0x14200 cleaner cleaner
1874 0 0 0 3 0x14200 reaper reaper
26377 0 0 0 3 0x14200 pgdaemon pagedaemon
25637 0 0 0 7 0x14200 srdis
1440 0 0 0 3 0x14200 bored crypto
15128 0 0 0 3 0x14200 pftm pfpurge
19016 0 0 0 3 0x14200 usbtsk usbtask
28387 0 0 0 3 0x14200 usbatsk usbatsk
14544 0 0 0 3 0x14200 bored i915
3867 0 0 0 3 0x40014200 acpi0 acpi0
6675 0 0 0 3 0x40014200 idle1
765 0 0 0 3 0x14200 bored sensors
5899 0 0 0 3 0x14200 bored softnet
3924 0 0 0 3 0x14200 bored systqmp
1013 0 0 0 3 0x14200 biowait systq
*23137 0 0 0 7 0x40014200 idle0
23952 0 0 0 3 0x14200 bored sbar
1 0 1 0 3 0x82 wait init
0 -1 0 0 3 0x10200 scheduler swappe

Re: bringing degraded softraid online

2016-02-06 Thread Johan Huldtgren

Looking at the raid5 code, it looks like you get into this state if
more than 2 chunks in the RAID5 volume fail.
Are you sure all the disks are OK?


As far as I can tell yes, I don't see anything in dmesg, S.M.A.R.T
isn't reporting any errors (but I've been told that means little).
Anything in particular you think would be useful to test?

.jh



bringing degraded softraid online

2016-02-06 Thread Johan Huldtgren

(apologies if this comes through more than once, I tried
unsuccessfully to send this yesterday)

hello,

earlier this week a host I have at an offsite location went dark (I
have no remote console), today I drove out to take a look. It had
panicked, I have pictures of the panic, trace and ps here:

http://www.huldtgren.com/panics/

When I tried to bring it back online the softraid volume would not
come back.

softraid0: trying to bring up sd9 degraded
softraid0: sd9 was not shutdown properly
softraid0: sd9 is offline, will not be brought online

softraid0 was created back in day as follows:

bioctl -c 5 -l 
/dev/sd0a,/dev/sd1a,/dev/sd3a,/dev/sd4a,/dev/sd5a,/dev/sd6a,/dev/sd7a,/dev/sd8a 
softraid0


reading through bioctl it seemed -R was what I wanted, however I can't
for the life of me get it to rebuild:

# bioctl -R /dev/sd1a sd9
bioctl: Can't locate sd9 device via /dev/bio

I've tried all other drives as the first one, all give the same error,
as does bioctl -i

# bioctl -i -v sd9
bioctl: Can't locate sd9 device via /dev/bio

I can read with both disklabel and fdisk from all volumes except sd9
which shows not configured (I have no recollection of trying this
before so don't know if that's even supposed to work, just mentioning
it for completness sake)

# fdisk sd9
fdisk: sd9: Device not configured
# disklabel sd9
disklabel: /dev/rsd9c: Device not configured

if some combination of events just destroyed this beyond repair I can
restore backups, but I was hoping there was some way back that I'm
just not seeing.

dmesg is below.

thanks,

.jh


OpenBSD 5.9-beta (GENERIC.MP) #1778: Wed Dec 23 18:23:06 MST 2015
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 16845516800 (16065MB)
avail mem = 16330858496 (15574MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xee8c0 (29 entries)
bios0: vendor American Megatrends Inc. version "P2.10" date 05/12/2015
bios0: ASRock Z97 Extreme4
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT SSDT SSDT SSDT MCFG HPET SSDT SSDT 
AAFT UEFI SSDT
acpi0: wakeup devices PEGP(S4) PEG0(S4) PEGP(S4) PEG1(S4) PEGP(S4) 
PEG2(S4) PS2K(S4) PS2M(S4) UAR1(S4) USB1(S3) PXSX(S4) RP01(S4) PXSX(S4) 
RP02(S4) PXSX(S4) RP03(S4) [...]

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) Pentium(R) CPU G3258 @ 3.20GHz, 3199.45 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,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,MOVBE,POPCNT,DEADLINE,XSAVE,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,ERMS,INVPCID,SENSOR,ARAT

cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Pentium(R) CPU G3258 @ 3.20GHz, 3199.08 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,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,MOVBE,POPCNT,DEADLINE,XSAVE,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,ERMS,INVPCID,SENSOR,ARAT

cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 8 pa 0xfec0, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xf800, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG0)
acpiprt2 at acpi0: bus -1 (PEG1)
acpiprt3 at acpi0: bus -1 (PEG2)
acpiprt4 at acpi0: bus 1 (RP01)
acpiprt5 at acpi0: bus 2 (RP04)
acpiprt6 at acpi0: bus 3 (RP06)
acpiprt7 at acpi0: bus 4 (RP07)
acpiec0 at acpi0: not present
acpicpu0 at acpi0: C2(500@67 mwait.1@0x10), C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: C2(500@67 mwait.1@0x10), C1(1000@1 mwait.1), PSS
acpibat0 at acpi0: BAT0 not present
acpibat1 at acpi0: BAT1 not present
acpibat2 at acpi0: BAT2 not present
acpibtn0 at acpi0: PWRB
acpibtn1 at acpi0: SLPB
acpibtn2 at acpi0: LID0
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: DD1F
cpu0: Enhanced SpeedStep 3199 MHz: speeds: 3201, 3200, 3000, 2900, 2700, 
2500, 2300, 2200, 2000, 1800, 1700, 1500, 1300, 1100, 1000, 800 MHz

pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 4G Host" rev 0x06
inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics" rev 0x06
drm0 at inteldrm0
inteldrm0: msi
inteldrm0: 1280x1024
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
azalia0 at pci0 dev 3 function 0 "Intel Core 4G HD Audio" rev 0x06: msi
azalia0: No codecs found
xhci0 at pci0 dev 20 function 0 "Intel 9 Series xHCI" rev 0x00: msi
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 "I

Re: owncloud and php5-libsmbclient / occ

2015-12-29 Thread Johan Huldtgren

Also, if one would like to use occ utility from CLI, considering that the
whole owncloud runs chrooted under /var/www/ and that occ therefore looks
for /owncloud/apps folder (which is obviously /var/www/owncloud/apps) and
that www user is a nologin one, trying to run the following command:

# doas -u www /var/www/owncloud/occ

provides the following result:

PHP Notice:  Undefined index: SERVER_PROTOCOL in
/var/www/owncloud/lib/private/response.php on line 77
App directory "/owncloud/apps" not found! Please put the ownCloud apps
folder in the ownCloud folder or the folder above. You can also configure
the location in the config.php file.

How can occ then be run?


I solved this by temporarily symlinking the directory it asked for
to the root, which let me run occ, and then I removed the symlink.
I'm sure there is a better solution, but I needed something which
worked quickly. so something like this:

ln -s /var/www/owncloud/apps /owncloud/apps
doas -u www /usr/local/bin/php-5.6 /var/www/owncloud/occ

.jh



Re: 'newer' Qlogic HBA support on amd64

2014-05-16 Thread Johan Huldtgren

Quoting Pete Vickers :


# dmesg | egrep -i "qle|scsibus1"
qle0 at pci8 dev 0 function 0 "QLogic ISP2432" rev 0x02: msi
qle0: bad startup mboxes: 0 0
qle0: firmware rev 4.0.20, attrs 0x2
scsibus1 at qle0: 2048 targets, WWPN 50060b66644e, WWNN 50060b66644f
sd1 at scsibus1 targ 130 lun 0:  SCSI2 0/direct  
fixed naa.600601601b662700d837603da8efe011
sd2 at scsibus1 targ 131 lun 0:  SCSI2 0/direct  
fixed naa.600601601b662700d837603da8efe011



sd1 & sd2 : Are these duplicates due to redundant paths in SAN fabric ?


yes, the naa.60... number is the uid of the volume, same uid, same volume. an
easy way to confirm is if you assign another volume from your frame (looks
like a CX or VNX) you should get two new devices with different uids.

.jh



Re: icalendar support on openbsd 5.5 - mod_dav removed

2014-05-12 Thread Johan Huldtgren

Quoting Stuart Henderson :


On 2014-05-12, Steve Fairhead  wrote:

Hi folks,

I'm aware that mod_dav has been removed from 5.5. I was supporting a
group of icalendar files under 5.3 with mod_dav. Do I have options for
doing the same (read/write access) under 5.5, maybe using a different
method or package? Or is there a way of using mod_dav, despite its
antiquity, on 5.5?

(Again I've searched with no success... I seem to be an edge case again...)

Steve




Either apache2 (www/apache-httpd) which has a maintained mod_dav,
or one of the other programs that can handle icalendar files
(possibly productivity/baikal?)


I think both productivity/davical and www/owncloud can handle
icalendar files as well.

.jh



Re: no audio with aucat

2013-09-20 Thread Johan Huldtgren

This is a virtual machine, isn't it? AFAICS, virtual machines can't
do full duplex, while eap(4) cards claim they are full-duplex.


Correct, it's a virtual machine.


Could you add "-mplay" to the sndiod_flags variable in
/etc/rc.conf.local (or whatever you use) and see how this works?


that works too, so seems options are either using the "-mplay"
flag or disabling sndiod.

Thank you all,

.jh



Re: no audio with aucat

2013-09-20 Thread Johan Huldtgren

On 9/20/13 6:05 PM, Alexey E. Suslikov wrote:

Johan Huldtgren  huldtgren.com> writes:


[johan  omgla ~]$ aucat -i 06-Inward_Burst.wav
aucat_open: host= unit=0 devnum=0 opt=default
/tmp/aucat-1000/aucat0: No such file or directory
/tmp/aucat/aucat0: connected


have you tried to kill sndiod first?


thanks, that did it.

.jh



no audio with aucat

2013-09-20 Thread Johan Huldtgren
hello,

I installed a new system today from the latest snap (September 14th). 
After installing it, I
tried to get some audio and video going, however I've been (mostly) 
unsuccessful. My first
attempts were to watch some videos, when I got neither audio or video I 
figured I'd step back
and try just some audio, using either xine or mplayer to play a file 
results in no audio, I
took a further step back and tried aucat, also to no avail, finally I tried:

cat 06-Inward_Burst.wav > /dev/sound

and music plays from the speakers, so partial victory. I'm thinking that 
getting aucat to
work is the first step, so here are the debug steps I took (mostly from 
FAQ, but sthen@ pointed
me to SNDIO_DEBUG), hoping somebody can make some sense of this:

[johan@omgla ~]$ file 06-Inward_Burst.wav
06-Inward_Burst.wav: RIFF (little-endian) data, WAVE audio, Microsoft 
PCM, 16 bit, stereo 44100 Hz

[johan@omgla ~]$ aucat -i 06-Inward_Burst.wav

without setting DEBUG this exits quickly without playing anything.

[johan@omgla ~]$ export SNDIO_DEBUG=2

[johan@omgla ~]$ aucat -i 06-Inward_Burst.wav
aucat_open: host= unit=0 devnum=0 opt=default
/tmp/aucat-1000/aucat0: No such file or directory
/tmp/aucat/aucat0: connected
sio_aucat_revents: 0
aucat: start, maxwrite = 0
aucat: flowctl = 7938, maxwrite = 31752
sio_aucat_revents: 0
sio_aucat_revents: 4
aucat_wdata: write: n = 3528
aucat_wdata: write: n = 3528
aucat_wdata: write: n = 3528
aucat_wdata: write: n = 3528
aucat_wdata: write: n = 3528
aucat_wdata: write: n = 3528
aucat_wdata: write: n = 3528
aucat_wdata: write: n = 3528
aucat_wdata: write: n = 3528
aucat_rmsg: eof

[johan@omgla ~]$ mixerctl -v
outputs.master=255,255 volume
outputs.master.mute=off  [ off on ]
outputs.mono=255 volume
outputs.mono.mute=off  [ off on ]
outputs.mono.source=mixerout  [ mixerout mic ]
inputs.spkr=255 volume
inputs.spkr.mute=off  [ off on ]
inputs.phone=191 volume
inputs.phone.mute=on  [ off on ]
inputs.mic=191 volume
inputs.mic.mute=on  [ off on ]
inputs.mic.preamp=off  [ off on ]
inputs.mic.source=mic0  [ mic0 mic1 ]
inputs.line=191,191 volume
inputs.line.mute=on  [ off on ]
inputs.cd=191,191 volume
inputs.cd.mute=on  [ off on ]
inputs.video=191,191 volume
inputs.video.mute=on  [ off on ]
inputs.aux=191,191 volume
inputs.aux.mute=on  [ off on ]
inputs.dac=191,191 volume
inputs.dac.mute=off  [ off on ]
record.source=mic  [ mic cd video aux line mixerout mixeroutmono phone ]
record.volume=255,255 volume
record.volume.mute=off  [ off on ]
outputs.extamp=off  [ off on ]

[johan@omgla ~]$ cat > /dev/audio < /dev/zero &
[1] 30600
[johan@omgla ~]$ audioctl play.{seek,samples,errors}
play.seek=57600
play.samples=2918400
play.errors=0
[johan@omgla ~]$ audioctl play.{seek,samples,errors}
play.seek=48000
play.samples=600
play.errors=0
[johan@omgla ~]$ audioctl play.{seek,samples,errors}
play.seek=57600
play.samples=8697600
play.errors=0
[johan@omgla ~]$ kill %1
[johan@omgla ~]$ fg %1
cat > /dev/audio < /dev/zero
Terminated

thanks,

.jh
OpenBSD 5.4-current (GENERIC.MP) #58: Sat Sep 14 13:27:19 MDT 2013
t...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4278124544 (4079MB)
avail mem = 4156133376 (3963MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0010 (364 entries)
bios0: vendor Phoenix Technologies LTD version "6.00" date 07/02/2012
bios0: VMware, Inc. VMware Virtual Platform
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP BOOT APIC MCFG SRAT HPET WAET
acpi0: wakeup devices PCI0(S3) USB_(S1) P2P0(S3) S1F0(S3) S2F0(S3) S3F0(S3) 
S4F0(S3) S5F0(S3) S6F0(S3) S7F0(S3) S8F0(S3) S9F0(S3) S10F(S3) S11F(S3) 
S12F(S3) S13F(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 Duo CPU T9800 @ 2.93GHz, 2919.06 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,MMX,FXSR,SSE,SSE2,SS,SSE3,SSSE3,CX16,SSE4.1,x2APIC,XSAVE,NXE,LONG,LAHF,PERF,ITSC
cpu0: 6MB 64b/line 16-way L2 cache
cpu0: smt 0, core 0, package 0
cpu0: apic clock running at 65MHz
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM)2 Duo CPU T9800 @ 2.93GHz, 2918.89 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,MMX,FXSR,SSE,SSE2,SS,SSE3,SSSE3,CX16,SSE4.1,x2APIC,XSAVE,NXE,LONG,LAHF,PERF,ITSC
cpu1: 6MB 64b/line 16-way L2 cache
cpu1: smt 0, core 0, package 2
ioapic0 at mainbus0: apid 1 pa 0xfec0, version 11, 24 pins
acpimcfg0 at acpi0 addr 0xe000, bus 0-255
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpicpu0 at acpi0
acpicpu1 at acpi0
acpibat0 at acpi0: BAT1 not present
acpibat1 at acpi0: BAT2 not present
acpiac0 at acpi0: AC unit online
acpibtn0 at acpi0: SLPB
acpibtn1 at acpi0: LID_
vmt0 at mainbus0
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel 82443BX AGP" rev 0x01
ppb0 at pci0 dev 1 function 0 "Intel 82443BX AGP" rev 0x0

Re: panic: pool_do_get(mcl2k): free list modified

2013-07-01 Thread Johan Huldtgren
Following up on my previous report, I've had this panic again,
this time on the June 27th snap. Customary information and
dmesg below.

thanks,

.jh

ddb> show panic
pool_do_get(mcl2k): free list modified: page 0xfe80cbcc8000; item 
addr 0xfe80cbcc8000; offset 0x0=0x100e
ddb> trace
Debugger() at Debugger+0x5
panic() at panic+0xe4
pool_do_get() at pool_do_get+0x3e9
pool_get() at pool_get+0x4a
m_clget() at m_clget+0x95
em_get_buf() at em_get_buf+0x8b
em_rxfill() at em_rxfill+0x68
em_intr() at em_intr+0xc8
end of kernel
end trace frame: 0xcfb2fc330d0, count: -8
ddb> ps
PID   PPID   PGRPUID  S   FLAGS  WAIT  COMMAND
  32645  1   2458539  3   0x4100080  thrsleep  clamd
   1130448448507  30x80  poll  smtp
   9685  15239   9685503  30x80  netio postgres
  28729448448507  2   0cleanup
   5410  15239   5410503  30x80  netio postgres
  11611  15239  11611503  30x80  netio postgres
   1132448448507  30x80  kqreadtrivial-rewrite
   1529448448507  30x80  kqreadproxymap
  25236448448507  30x80  poll  smtpd
  19017  21933  21933  0  30x80  kqreadssl-params
   4404  21933  21933507  30x80  kqreadimap
   4315  21933  21933518  30x80  kqreadimap-login
  24644  21933  21933   1000  30x80  kqreadimap
  17218  21933  21933518  30x80  kqreadimap-login
  20633448448507  30x80  kqreadanvil
  29389  15239  29389503  30x80  netio postgres
  27474  21933  21933  0  30x80  kqreadauth
  31665  21933  21933   1000  30x80  kqreadimap
  24280  21933  21933518  30x80  kqreadimap-login
  14393  21933  21933507  30x80  kqreadimap
  24285  21933  21933518  30x80  kqreadimap-login
  32245448448507  30x80  kqreadpickup
  26051  21933  21933518  30x80  kqreadimap-login
  12221  21933  21933518  30x80  kqreadimap-login
   5918  21933  21933518  30x80  kqreadimap-login
  26812  21933  21933518  30x80  kqreadimap-login
  23207   5599   5599 67  30x80  netconphp-fpm-5.3
  29448  21933  21933   1000  30x80  kqreadimap
  28123  21933  21933518  30x80  kqreadimap-login
  24213  21933  21933   1000  30x80  kqreadimap
  28952  21933  21933518  30x80  kqreadimap-login
  24585   5599   5599 67  30x80  netconphp-fpm-5.3
  26631  21933  21933518  30x80  kqreadimap-login
  10243  21933  21933518  30x80  kqreadimap-login
   4377  21933  21933518  30x80  kqreadimap-login
  20261  21933  21933518  30x80  kqreadimap-login
  21739  21933  21933518  30x80  kqreadimap-login
   5161  21933  21933507  30x80  kqreadimap
  11947  21933  21933518  30x80  kqreadimap-login
   3332  13948  13948530  30x80  lockf perl
   7533  21933  21933507  30x80  kqreadimap
  18485  21933  21933518  30x80  kqreadimap-login
  30004  25962  25962506  30x80  selectperl
*27515  13948  13948530  7   0perl
   5059  13948  13948530  30x80  selectperl
  20636  21933  21933507  30x80  kqreadimap
  12706  21933  21933518  30x80  kqreadimap-login
   7776  19304   7776   1000  30x80  selectssh
  19304   7175  19304   1000  30x88  pause ksh
  29765  18087  29765   1000  30x80  selectssh
  18087   7175  18087   1000  30x88  pause ksh
  17325  15967  15967 67  30x80  netconhttpd
   5757   6203   5757  0  30x80  ttyin ksh
  32182448448507  30x80  kqreadtlsmgr
  10974  20518  20518   1000  3   0x4100080  poll  irssi
   1125  20518  20518   1000  30x80  poll  irssi
   5524   7175   5524   1000  30x80  ttyin ksh
  23596   7175  23596   1000  30x80  ttyin ksh
   6203   7175   6203   1000  30x88  pause ksh
  20518   7175  20518   1000  30x88  pause ksh
   7175  1   7175   1000  30x80  kqreadtmux
  26395  1  26395  0  30x80  ttyin getty
   2715  1   2715  0  30x80  ttyin getty
   5890  1   5890  0  30x80  ttyin getty
  26968  1  26968  0  30x80  ttyin getty
  25086  1  25086

panic: kernel diagnostic assertion on June 27th amd64 snap

2013-06-29 Thread Johan Huldtgren
hello,

while updating my server today it panics on boot. I can work around
the issue and get it up by doing bsd -c and then a 'disable viomb'

Details follows and dmsg is attached.

panic: kernel diagnostic assertion "level <= IPL_TTY || level >= 
IPL_CLOCK || flags & IPL_MPSAFE" failed: file 
"../../../../arch/amd64/amd64/intr.c", line 359
Stopped at  Debugger+0x5:   leave
Debugger() at Debugger+0x5
panic() at panic+0xe4
__assert() at __assert+0x21
intr_establish() at intr_establish+0x2dd
pci_intr_establish() at pci_intr_establish+0xfd
virtio_pci_attach() at virtio_pci_attach+0x1e8
config_attach() at config_attach+0x1d4
pci_probe_device() at pci_probe_device+0x3e2
pci_enumerate_bus() at pci_enumerate_bus+0xe9
config_attach() at config_attach+0x1d4
end trace frame: 0x81de6e30, count: 0
RUN AT LEAST 'trace' AND 'ps' AND INCLUDE OUTPUT WHEN REPORTING THIS PANIC!
DO NOT EVEN BOTHER REPORTING THIS WITHOUT INCLUDING THAT INFORMATION!
ddb> trace
Debugger() at Debugger+0x5
panic() at panic+0xe4
__assert() at __assert+0x21
intr_establish() at intr_establish+0x2dd
pci_intr_establish() at pci_intr_establish+0xfd
virtio_pci_attach() at virtio_pci_attach+0x1e8
config_attach() at config_attach+0x1d4
pci_probe_device() at pci_probe_device+0x3e2
pci_enumerate_bus() at pci_enumerate_bus+0xe9
config_attach() at config_attach+0x1d4
mainbus_attach() at mainbus_attach+0x163
config_attach() at config_attach+0x1d4
cpu_configure() at cpu_configure+0x17
main() at main+0x3d5
end trace frame: 0x0, count: -14
ddb> ps
PID   PPID   PGRPUID  S   FLAGS  WAIT  COMMAND
*0 -1  0  0  7   0x200swapper
ddb> show registers
ds0xec00acpi_pdirpa+0xa6a0
es0x6940acpi_pdirpa+0x23e0
fs0x6940acpi_pdirpa+0x23e0
gs 0
rdi  0x1
rsi  0x5
rbp   0x81de6930end+0xe5b50
rbx   0x8175ec00addrmask+0x2f60
rdx   0x8178471f_length_code+0xb1f
rcx0
rax  0x1
r80x81de6850end+0xe5a70
r9 0
r10   0x
r11   0x810fe2c0comcnputc
r120x100
r13   0x81de6940end+0xe5b60
r14   0x814ee470virtio_pci_intr
r15   0x81984de0i8259_pic
rip   0x813a1225Debugger+0x5
cs   0x8
rflags 0x202
rsp   0x81de6930end+0xe5b50
ss  0x10
Debugger+0x5:   leave
ddb>
OpenBSD 5.3-current (GENERIC) #9: Thu Jun 27 16:28:53 MDT 2013
t...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC
real mem = 4278124544 (4079MB)
avail mem = 4156547072 (3963MB)
User Kernel Config
UKC> disable viomb
203 viomb* disabled
UKC> quit
Continuing...
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xfbd3f (10 entries)
bios0: vendor QEMU version "QEMU" date 01/01/2007
acpi0 at bios0: rev 0
acpi0: sleep states S3 S4 S5
acpi0: tables DSDT FACP APIC
acpi0: wakeup devices
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
acpiprt0 at acpi0: bus 0 (PCI0)
acpicpu0 at acpi0
mpbios at bios0 not configured
cpu0 at mainbus0: (uniprocessor)
cpu0: QEMU Virtual CPU version 0.9.1, 2667.31 MHz
cpu0: 
FPU,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,NXE,LONG,PERF
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 
16-way L2 cache
cpu0: ITLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
cpu0: DTLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel 82441FX" rev 0x02
pcib0 at pci0 dev 1 function 0 "Intel 82371SB ISA" rev 0x00
pciide0 at pci0 dev 1 function 1 "Intel 82371SB IDE" rev 0x00: DMA, channel 0 
wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: 
wd0: 16-sector PIO, LBA48, 122880MB, 251658240 sectors
atapiscsi0 at pciide0 channel 0 drive 1
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0:  ATAPI 5/cdrom removable
wd0(pciide0:0:0): using PIO mode 0, DMA mode 2
cd0(pciide0:0:1): using PIO mode 0
atapiscsi1 at pciide0 channel 1 drive 0
scsibus1 at atapiscsi1: 2 targets
cd1 at scsibus1 targ 0 lun 0:  ATAPI 5/cdrom removable
cd1(pciide0:1:0): using PIO mode 0
uhci0 at pci0 dev 1 function 2 "Intel 82371SB USB" rev 0x01: irq 11
piixpm0 at pci0 dev 1 function 3 "Intel 82371AB Power" rev 0x03: irq 10
iic0 at piixpm0
iic0: addr 0x4c 48=00 words 00= 01= 02= 03= 04= 05= 
06= 07=
iic0: addr 0x4e 48=00 words 00= 01= 02= 03= 04= 05

panic: pool_do_get(mcl2k): free list modified on May 20th snapshot

2013-05-22 Thread Johan Huldtgren

hello,

got this panic on the latest amd64 snapshot (May 20th). It looks
suspiciously like the one I reported about a month ago
http://marc.info/?l=openbsd-misc&m=136745094101686, as last time I've
included just a minimal 'ps' output, and the rest can be seen as
screenshots at the below URL:

http://www.huldtgren.com/panics/2013-05-22-panic/

Thanks,

.jh


panic: pool_do_get(mcl2k): free list modified: page 0xfe80a3344000; 
item addr 0xfe80a3344000; offset 0x0=0xdead000

Stopped at Debugger+0x5; leave
RUN AT LEAST 'trace' AND 'ps' AND INCLUDE OUTPUT WHEN REPORTING THIS PANIC!
DO NOT EVEN BOTHER REPORTING THIS WITHOUT INCLUDING THAT INFORMATION!
ddb> trace
Debugger() at Debugger+0x5
panic() at panic+0xe4
pool_do_get() at pool_do_get+0x3e9
pool_get() at pool_get+0x4a
m_clget at m_clget+0x95
em_get_buf() at em_get_buf+0x8b
em_rxfill() at em_rxfill+0x68
em_intr() at em_intr+0xc8
Xintr_legacy11() at Xintr_legacy11+0xf4
--- interrupt ---
Bad Frame pointer: 0x8000221afe90
end trace frame: 0x8000221afe90, count: -9
Xspllower+0xe:
ddb> ps
 PID PPID   PGRPUIDSFLAGS  WAIT   COMMAND
*   170732258   322587570 bgpd
ddb> boot reboot
panic: mtx_enter: locking against myself
Stopped at Debugger+0x5; leave
RUN AT LEAST 'trace' AND 'ps' AND INCLUDE OUTPUT WHEN REPORTING THIS PANIC!
DO NOT EVEN BOTHER REPORTING THIS WITHOUT INCLUDING THAT INFORMATION!
ddb> trace
Debugger at Debugger+0x5
panic() at panic+0xe4
mtx_enter() at mtx_enter+0x60
m_clget() at m_clget+0x95
rt_msg1() at rt_msg1+0x73
rt_ifmsg() at rt_ifmsg+0x3d
if_down() at if_down+0xb6
if_downall() at if_downall+0x5a
boot() at boot+0xf2
db_boot_reboot_cmd() at db_boot_reboot_cmd+0xe
db_command() at db_command+0x13a
db_command_loop() at db_command_loop+0x80
db_trap() at db_trap+0xc9
kdb_trap() at kdb_trap+0xc8
trap() at trap+0x11d
--- trap (number 1) ---
Debugger() at Debugger+0x5
panic() at panic+0xe4
pool_do_get() at pool_do_get+0x3e9
pool_get() at pool_get+0x4a
m_clget() at m_clget+0x95
em_get_buf() at em_get_buf+0x8b
em_rxfill() at em_rxfill+0x68
em_intr() at em_intr+0xc8
Xintr_legacy11() at Xintr_legacy11+0xf4
--- interrupt ---
Bad Frame pointer: 0x8000221afe90
end trace frame: 0x8000221afe90, count: -9
Xspllower+0xe:


dmesg:

OpenBSD 5.3-current (GENERIC) #166: Mon May 20 12:57:01 MDT 2013
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC
real mem = 4278124544 (4079MB)
avail mem = 4156563456 (3964MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xfbd3f (10 entries)
bios0: vendor QEMU version "QEMU" date 01/01/2007
acpi0 at bios0: rev 0
acpi0: sleep states S3 S4 S5
acpi0: tables DSDT FACP APIC
acpi0: wakeup devices
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
acpiprt0 at acpi0: bus 0 (PCI0)
acpicpu0 at acpi0
mpbios at bios0 not configured
cpu0 at mainbus0: (uniprocessor)
cpu0: QEMU Virtual CPU version 0.9.1, 2667.32 MHz
cpu0: 
FPU,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,NXE,LONG,PERF
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 
64b/line 16-way L2 cache

cpu0: ITLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
cpu0: DTLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel 82441FX" rev 0x02
pcib0 at pci0 dev 1 function 0 "Intel 82371SB ISA" rev 0x00
pciide0 at pci0 dev 1 function 1 "Intel 82371SB IDE" rev 0x00: DMA, 
channel 0 wired to compatibility, channel 1 wired to compatibility

wd0 at pciide0 channel 0 drive 0: 
wd0: 16-sector PIO, LBA48, 122880MB, 251658240 sectors
atapiscsi0 at pciide0 channel 0 drive 1
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0:  ATAPI 5/cdrom 
removable

wd0(pciide0:0:0): using PIO mode 0, DMA mode 2
cd0(pciide0:0:1): using PIO mode 0
atapiscsi1 at pciide0 channel 1 drive 0
scsibus1 at atapiscsi1: 2 targets
cd1 at scsibus1 targ 0 lun 0:  ATAPI 5/cdrom 
removable

cd1(pciide0:1:0): using PIO mode 0
uhci0 at pci0 dev 1 function 2 "Intel 82371SB USB" rev 0x01: irq 11
piixpm0 at pci0 dev 1 function 3 "Intel 82371AB Power" rev 0x03: irq 10
iic0 at piixpm0
iic0: addr 0x4c 48=00 words 00= 01= 02= 03= 04= 
05= 06= 07=
iic0: addr 0x4e 48=00 words 00= 01= 02= 03= 04= 
05= 06= 07=

vga1 at pci0 dev 2 function 0 "Cirrus Logic CL-GD5446" rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
em0 at pci0 dev 3 function 0 "Intel PRO/1000MT (82540EM)" rev 0x03: irq 
11, address 52:54:00:4e:22:85
virtio0 at pci0 dev 4 function 0 "Qumranet Virtio Memory" rev 0x00: 
Virtio Memory Balloon Device

viomb0 at virtio0
virtio0: irq 11
virtio1 at pci0 dev 5 function 0 "Qumranet Virtio Console" rev 0x00: 
Virtio Console Device

virtio1: no matching child driver; not configured
isa0 at pcib0
isadma0 at isa0
c

panic: pool_do_get(mcl2k): free list modified

2013-05-01 Thread Johan Huldtgren
hello,

woke up this morning to the following panic, upon reboot the machine
almost immediately (~5 mins) panicked again, but with a slightly
different message.  My server is a hosted VPS, so my only console is
over VNC which means there is no copy / paste functionality.  After
talking to sthen@ he suggested I just include the running process from
the 'ps' output as it's very long, and I've captured the rest as
screenshots available here:

http://www.huldtgren.com/panics/

I'll note that doing a 'boot reboot' in ddb incurs another panic for
which I've included the information as well in case it's of any use.

Thanks,

.jh


panic #1:

panic: pool_do_get(mcl2k): free list modified: page
0xfe80b2e7a000; item addr 0xfe80b2e7a000; offset
0x0=0xdeadbe57
Stopped at  Debugger+0x5; leave
RUN AT LEAST 'trace' AND 'ps' AND INCLUDE OUTPUT WHEN REPORTING THIS PANIC!
DO NOT EVEN BOTHER REPORTING THIS WITHOUT INCLUDING THAT INFORMATION!
ddb> trace
Debugger () at Debugger+0x5
panic() at panic+0xe4
pool_do_get() at pool_do_get+0x3d6
pool_get() at pool_get+0x4a
m_clget() at m_clget+0x95
sosend() at sosend+0x386
dofilewritev() at dofilewritev+0x18b
sys_write() at sys_write+0x8f
syscall() at syscall+0x162
--- sys call (number 4) ---
end of kernel
end trace frame: 0x5ac4d9580, count: -9
0x5ad1d450a:
ddb> ps
PID  PPID   PGRP   UID  S  FLAGS WAIT COMMAND
*14372   28203  28203  518  7  0 imap-login

panic #2

panic: pool_do_get(mcl2k): free list modified: page
0xfe80de507000; item addr 0xfe80de507800; offset
0x0=0x9e6f4bb4
Stopped at Debugger+0x5: leave
RUN AT LEAST 'trace' AND 'ps' AND INCLUDE OUTPUT WHEN REPORTING THIS PANIC!
DO NOT EVEN BOTHER REPORTING THIS WITHOUT INCLUDING THAT INFORMATION!
ddb>  trace
Debugger() at Debugger+0x5
panic at panic+0xe4
pool_do_get() at pool_do_get+0x3d6
pool_get() at pool_get+0x4a
m_clget() at m_cget+0x8b
em_get_buf() at em_get_buf+0x8b
em_rxfill() at em_rxfill+0x68
em_intr() at em_intr+0xc8
Xintr_legacy11() at Xintr_legacy11+0xf8
--- interrupt ---
Bad frame pointer: 0x80002219b410
end trace frame: 0x80002219b410, count: -9
x86_bus_space_io_read_4+0x8:
ddb>  ps
PIDPPID   PGRP  UID  S  FLAGS  WAIT COMMAND
*162255103   5103 707  0named

panic on reboot:

ddb> boot reboot
panic: mtx_enter: locking against myself
Stopped at Debugger+0x5: leave
RUN AT LEAST 'trace' AND 'ps' AND INCLUDE OUTPUT WHEN REPORTING THIS PANIC!
DO NOT EVEN BOTHER REPORTING THIS WITHOUT INCLUDING THAT INFORMATION!
ddb> Debugger() at Debugger+0x5
panic() at panic+0xe4
mtx_enter() at mtx_enter+0x60
m_clget() at m_clget+0x95
rt_msg1() at rt_msg1+0x73
rt_ifmesg() at rt_ifmesg+0x3d
if_down() at if_down+0xb6
if_downall() at if_downall+0x5a
boot() at boot+0xf2
db_boot_reboot_cmd() at db_boot_reboot_cmd+0xe
db_command() at db_command+0x13a
db_command_loop() at db_command_loop+0x80
db_trap() at db+trap+0xc9
kdb_trap() at kdb_trap+0xc3
trap() at trap+0x11d
--- trap (number 1) ---
Debugger() at Debugger+0x5
panic() at panic+0xe4
pool_do_get() at pool_do_get+0x3d6
pool_get() at pool_get+0x4a
m_clget() at m_clget+0x95
em_get_buf() at em_get_bug+0x8b
em_rxfill() at em_rxfill+0x68
em_intr() at em_intr+0xc8
Xintr_legacy11() at Xintr_legacy11+0xf8
--- interrupt ---
Bad frame pointer: 0x80002219b410
end trace frame: 0x80002219b410, count: -24
x86_bus_space_io_read_4+0x8:
ddb> ps
PIDPPID   PGRP UID S  FLAGS WAIT COMMAND
*162255103   510370   7  0named

dmesg:

OpenBSD 5.3-current (GENERIC) #144: Sat Apr 20 16:50:59 MDT 2013
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC
real mem = 4278124544 (4079MB)
avail mem = 4156567552 (3964MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xfbd3f (10 entries)
bios0: vendor QEMU version "QEMU" date 01/01/2007
acpi0 at bios0: rev 0
acpi0: sleep states S3 S4 S5
acpi0: tables DSDT FACP APIC
acpi0: wakeup devices
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
acpiprt0 at acpi0: bus 0 (PCI0)
acpicpu0 at acpi0
mpbios at bios0 not configured
cpu0 at mainbus0: (uniprocessor)
cpu0: QEMU Virtual CPU version 0.9.1, 2667.40 MHz
cpu0: 
FPU,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,NXE,LONG,PERF
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB
64b/line 16-way L2 cache
cpu0: ITLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
cpu0: DTLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel 82441FX" rev 0x02
pcib0 at pci0 dev 1 function 0 "Intel 82371SB ISA" rev 0x00
pciide0 at pci0 dev 1 function 1 "Intel 82371SB IDE" rev 0x00: DMA,
channel 0 wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: 
wd0: 16-sector PIO, LBA48, 122880MB, 251658240 sectors
atapiscsi0 at pciide0 channel 0 drive 1
scsibus0 at atapiscsi0: 2 targets

Re: viomb0 at virtio0panic: Non dma-reachable buffer at curaddr 0x11f7c0a14(raw)

2013-02-23 Thread Johan Huldtgren

On 2/23/13 6:51 AM, Stuart Henderson wrote:

On 2013-02-23, Johan Huldtgren  wrote:

On 2/22/13 8:21 PM, Johan Huldtgren wrote:

hello,

upgraded to the latest amd64 snapshot today (dated Feb 21st) and
server panics on boot. This is a KVM guest at a hosted facility, as I
can't boot I am unable to get a dmesg, but here is the text from the
panic (with the last few lines)


Did the previous version have viomb(4) in the kernel, i.e. did this work
successfully with viomb in the past or did it not use viomb before?


I did not have viomb(4) before, my previous snapshot was:

OpenBSD 5.2-current (GENERIC) #103: Tue Dec  4 03:56:18 MST 2012


It might be prudent to disable viomb in GENERIC for release.


not sure if I hit a corner case or not, but perhaps a good idea.

.jh



Re: viomb0 at virtio0panic: Non dma-reachable buffer at curaddr 0x11f7c0a14(raw)

2013-02-22 Thread Johan Huldtgren
On 2/22/13 8:21 PM, Johan Huldtgren wrote:
> hello,
>
> upgraded to the latest amd64 snapshot today (dated Feb 21st) and
> server panics on boot. This is a KVM guest at a hosted facility, as I
> can't boot I am unable to get a dmesg, but here is the text from the
> panic (with the last few lines)
>
> vga1 at pci0 dev 2 function 0 "Cirrus Logic CL-GD5446" rev 0x00
> wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
> wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
> em0 at pci0 dev 3 function 0 "Intel PRO/1000MT (82540EM)" rev 0x03:
> apic 1 int 11, address 52:54:00:4e:22:85
> virtio0 at pci0 dev 4 function 0 "Qumranet Virtio Memory" rev 0x00:
> Virtio Memory Balloon Device
> viomb0 at virtio0panic: Non dma-reachable buffer at curaddr 0x11f7c0a14(raw)
> Stopped at   Debugger+0x5:   leave
> Debugger() at Debugger+0x5
> panic() at panic+0xe4
> _bus_dmamap_load_buffer() at _bus_dmamap_load_buffer+0x198
> _bus_dmamap_load() at _bus_dmamap_load+0x68
> viomb_attach() at viomb_attach+0x219
> config_attach() at config_attach+0x1d4
> virtio_pci_attach() at virtio_pci_attach+0x144
> config_attach() at config_attach+0x1d4
> pci_probe_device() at pci_probe_device+0x3e2
> pci_enumerate_bus() at pci_enumerate_bus+0xe9
> end trace frame: 0x80e64d80, count: 0
> RUN AT LEAST 'trace' AND 'ps' AND INCLUDE OUTPUT WHEN REPORTING THIS PANIC!
> DO NOT EVEN BOTHER REPORTING THIS WITHOUT INCLUDING THAT INFORMATION!
> ddb> trace
> Debugger() at Debugger+0x5
> panic() at panic+0xe4
> _bus_dmamap_load_buffer() at _bus_dmamap_load_buffer+0x198
> _bus_dmamap_load() at _bus_dmamap_load+0x68
> viomb_attach() at viomb_attach+0x219
> config_attach() at config_attach+0x1d4
> virtio_pci_attach() at virtio_pci_attach+0x1d4
> pci_probe_device() at pci_probe_device+0x3e2
> pci_enumerate_bus() at pci_enumerate_bus+0xe9
> config_attach() at config_attach_0x1d4
> mainbus_attach() at mainbus_attach+0x163
> config_attach() at config_attach+0x1d4
> cpu_configure() at cpu_configure+0x17
> main() at main+0x3d5
> end trace frame: 0x0, count: -15
> ddb> ps
>   PID   PPID PGRPUIDS   FLAGS  WAIT
>   COMMAND
> *0   -10 07
> 0x200   swapper
> ddb> show registers
> ds  0x2bd0
> es  0x48f0 acpi_pdirpa+0x3e8
> fs   0x1
> gs  0
> rdi  0x1
> rsi  0x5
> rbp 0x80e648e0end+0xd6540
> rbx 0x80822bd0   x86_bus_space_mem_ops+0x250
> rdx 0x8082093f_length_code+0xb1f
> rcx0
> rax 0x1
> r8   0x80e64800end+0xd6460
> r9   0x1
> r100
> r110x20
> r12  0x100
> r13  0x80e648f0end+0xd6550
> r14   0x8013d280
> r150
> rip  0x80459475Debugger+0x5
> cs   0x8
> rflags   0x202
> rsp 0x80e648e0end+0xd6540
> ss0x10
> Debugger+0x5: leave
> ddb>

bsd -c
disable viomb

got me back up and running at least. dmesg is attached for completeness.

.jh
OpenBSD 5.3 (GENERIC) #41: Thu Feb 21 20:31:41 MST 2013
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC
real mem = 4293853184 (4094MB)
avail mem = 4157087744 (3964MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xfbd3f (10 entries)
bios0: vendor QEMU version "QEMU" date 01/01/2007
acpi0 at bios0: rev 0
acpi0: sleep states S3 S4 S5
acpi0: tables DSDT FACP APIC
acpi0: wakeup devices
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
acpiprt0 at acpi0: bus 0 (PCI0)
acpicpu0 at acpi0
mpbios at bios0 not configured
cpu0 at mainbus0: (uniprocessor)
cpu0: QEMU Virtual CPU version 0.9.1, 2667.29 MHz
cpu0: 
FPU,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,NXE,LONG,PERF
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 
16-way L2 cache
cpu0: ITLB 255 4KB entries direct-mapped, 255 4MB entries dire

panic: pool_do_get(mcl2k) on Aug 20th snapshot

2010-08-27 Thread Johan Huldtgren

hello,

I have a Soekris 5501 as my home firewall, vr0 is connected to my ISP,
vr1 is my internal lan and vr2 is connected to a wireless AP. When
copying data (example copying three directories of mp3s each directory
100MB) from a laptop connected to the AP to a server in the lan, I will get a
panic. It only seems to happen when there is a larger amount of data at
the same time, just surfing, reading e-mail or downloading from the
internet does not trigger a panic.

trace, ps, show registers and dmesg follows:

panic: pool_do_get(mcl2k): free list modified: page 0xd5c03000; item addr 0xd5c03800; offset 
0xc=0x7004d58

Stopped at  Debugger+0x4:   popl%ebp
RUN AT LEAST 'trace' AND 'ps' AND INCLUDE OUTPUT WHEN REPORTING THIS PANIC!
DO NOT EVEN BOTHER REPORTING THIS WITHOUT INCLUDING THAT INFORMATION!
ddb> trace
Debugger(d08bbfdc,d977bb98,d089ae94,d977bb98,1) at Debugger+0x4
panic(d089ae94,d09bed60,d5c03000,d5c03800,c) at panic+0x5d
pool_do_get(d0a0d320,0,1,d5bd0d00,0) at pool_do_get+0x2aa
pool_get(d0a0d320,0,87f,d5c71e00,0) at pool_get+0x54
m_clget(0,1,d1513034,800,1c) at m_clget+0x6c
vr_alloc_mbuf(d1513000,d1513398,60,d1513370,5ee) at vr_alloc_mbuf+0x41
vr_fill_rx_ring(d1513000,0,d5bcfc00,d1553f38,d977bce4) at vr_fill_rx_ring+0x51
vr_rxeof(d1513000,e300,c,3,d150cc40) at vr_rxeof+0x18e
vr_intr(d1513000) at vr_intr+0xfd
Xrecurse_legacy9() at Xrecurse_legacy9+0xb7
--- interrupt ---
m_pullup(d5c71000,44,44,1,d5bc1020) at m_pullup+0x9
ip_forward(d5c71e00,0,d977bdec,0,8) at ip_forward+0x128
ipv4_input(d5c71e00,30,d977bdf4,d0202089,d1410058) at ipv4_input+0x655
ipintr(d1410058,d0a30010,b4390010,2390010,d0a052a0) at ipintr+0x49
Bad frame pointer: 0xd977bdf4
ddb> ps
   PID   PPID   PGRPUID  S   FLAGS  WAIT  COMMAND
 32239  1  32239  0  3  0x4080  ttyin getty
 23011   4509  23011  0  3  0x4080  ttyin ksh
  4509   2173   4509   1000  3  0x4080  pause ksh
  2173  28739  28739   1000  3   0x180  selectsshd
 28739   2362  28739  0  3  0x4180  netio sshd
 2   7153  2   1000  3  0x4080  ttyin ksh
  7153  20893  20893   1000  3   0x180  selectsshd
 20893   2362  20893  0  3  0x4180  netio sshd
 31554  1  31554  0  30x80  selectcron
 17489  1  17489 71  3   0x180  kqreadftp-proxy
 19509  30231  30231 95  3   0x180  kqreadsmtpd
 20367  30231  30231 95  3   0x180  kqreadsmtpd
 12639  30231  30231 95  3   0x180  kqreadsmtpd
 26705  30231  30231 95  3   0x180  kqreadsmtpd
 24219  30231  30231 95  3   0x180  kqreadsmtpd
 18960  30231  30231 95  3   0x180  kqreadsmtpd
 20991  30231  30231 95  3   0x180  kqreadsmtpd
 30231  1  30231  0  30x80  kqreadsmtpd
 28037  1  28037 77  3   0x180  poll  dhcpd
  2362  1   2362  0  30x80  selectsshd
 21149  0  0  0  30x100200  acct  acct
  9471  1   9471  0  30x80  poll  ntpd
 22197  28373  22197 83  3   0x180  poll  ntpd
 28373  1  28373 83  3   0x180  poll  ntpd
 30813   7519   7519 70  3   0x180  selectnamed
  7519  1   7519  0  3   0x180  netio named
  8108  27894  27894 74  3   0x180  bpf   pflogd
 27894  1  27894  0  30x80  netio pflogd
  8329  24290  24290 73  3   0x180  poll  syslogd
 24290  1  24290  0  30x88  netio syslogd
 13634  1  13634  0  30x80  poll  openvpn
 11783  1  11783 77  3   0x180  poll  dhclient
 28175  1   6563  0  30x80  poll  dhclient
  8583  1   8583  0  30x80  mfsidlmount_mfs
14  0  0  0  30x100200  bored crypto
13  0  0  0  30x100200  aiodoned  aiodoned
12  0  0  0  30x100200  syncerupdate
11  0  0  0  30x100200  cleaner   cleaner
10  0  0  0  30x100200  reaperreaper
 9  0  0  0  30x100200  pgdaemon  pagedaemon
 8  0  0  0  30x100200  pftm  pfpurge
 7  0  0  0  30x100200  usbevtusb1
 6  0  0  0  30x100200  usbtskusbtask
 5  0  0  0  30x100200  usbevtusb0
 4  0  0  0  30x100200  bored syswq
*3  0  0  0  7  0x40100200idle0
 2  0  0  0  30x100200  kmalloc   kmthread
 1  0  1  0  3  0x4080  wait  init
 0 -1  0  0  3 0x80200  scheduler swapper
ddb> show registers
ds  0x10
es0xd0200010ke