Re: providing users with equal bandwidth

2016-02-04 Thread Gregory Edigarov

On 04.02.16 01:09, Tarkan Açan wrote:

hello misc,

i am using openbsd 5.8 amd64 on my apu 1d4 with success but i have one big
problem. the queue mechanism in pf allows some traffic shaping but what i
really need is to give users their share of the bandwidth. for this i need
some connection based algorithm like sfq (linux) or cbq (mikrotik - routeros).
i have read and searched around a lot but it seems not possible to do such a
thing with pf. is it possible to arrange this kind of bandwith sharing with a
proxy like relayd? does anybody have suggestions? all feedback is sincerely
appreciated.

that's what queues are there for...



Re: iwn WiFi slow in CURRENT

2016-02-04 Thread Henrik Friedrichsen
Hey,

manually setting the mode helps with the speed problems, thanks!

On Wed, Feb 03, 2016 at 08:54:51PM +0100, Stefan Sperling wrote:
> Does this diff help?

This diff + the one you posted in tech@ this morning does not seem to
help with the 11n mode, though.

Anything I can provide to help?

dmesg shows nothing extraordinary, but I have attached it anyway.
OpenBSD 5.9 (GENERIC.MP) #1868: Mon Feb  1 20:02:36 MST 2016
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8335577088 (7949MB)
avail mem = 8078757888 (7704MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xdae9c000 (66 entries)
bios0: vendor LENOVO version "8DET70WW (1.40 )" date 05/14/2015
bios0: LENOVO 4290W1A
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SLIC SSDT SSDT SSDT HPET APIC MCFG ECDT ASF! TCPA SSDT 
SSDT UEFI UEFI UEFI
acpi0: wakeup devices LID_(S3) SLPB(S3) IGBE(S4) EXP4(S4) EXP7(S4) EHC1(S3) 
EHC2(S3) HDEF(S4)
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) i3-2310M CPU @ 2.10GHz, 2093.51 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,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,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.1.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz, 2093.20 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,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz, 2093.20 MHz
cpu2: 
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,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 1, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz, 2093.20 MHz
cpu3: 
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,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xf800, bus 0-63
acpiec0 at acpi0
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG_)
acpiprt2 at acpi0: bus 2 (EXP1)
acpiprt3 at acpi0: bus 3 (EXP2)
acpiprt4 at acpi0: bus 5 (EXP4)
acpiprt5 at acpi0: bus 13 (EXP5)
acpiprt6 at acpi0: bus -1 (EXP7)
acpicpu0 at acpi0: C3(350@104 io@0x415), C1(1000@1 halt), PSS
acpicpu1 at acpi0: C3(350@104 io@0x415), C1(1000@1 halt), PSS
acpicpu2 at acpi0: C3(350@104 io@0x415), C1(1000@1 halt), PSS
acpicpu3 at acpi0: C3(350@104 io@0x415), C1(1000@1 halt), PSS
acpipwrres0 at acpi0: PUBS, resource for EHC1, EHC2
acpitz0 at acpi0: critical temperature is 99 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibat0 at acpi0: BAT0 model "42T4861" serial  5714 type LION oem "SANYO"
acpibat1 at acpi0: BAT1 not present
acpiac0 at acpi0: AC unit online
acpithinkpad0 at acpi0
acpidock0 at acpi0: GDCK not docked (0)
cpu0: Enhanced SpeedStep 2093 MHz: speeds: 2100, 2000, 1900, 1800, 1700, 1600, 
1500, 1400, 1300, 1200, 1100, 1000, 900, 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 2G Host" rev 0x09
inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics 3000" rev 0x09
drm0 at inteldrm0
inteldrm0: msi
inteldrm0: 1366x768
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
"Intel 6 Series MEI" rev 0x04 at pci0 dev 22 function 0 not configured
em0 at pci0 dev 25 function 0 "Intel 82579LM" rev 0x04: msi, address 
f0:de:f1:5a:e0:f6
ehci0 at pci0 dev 26 function 0 "Intel 6 Series USB" rev 0x04: apic 2 int 16
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 6 Series HD Audio" rev 0x04: msi
azalia0: codecs: Conexant CX20590, Intel/0x2805, using Conexant CX20590
audio0 at 

Re: providing users with equal bandwidth

2016-02-04 Thread Marko Cupać
On Thu, 4 Feb 2016 12:45:23 +0100
"Peter N. M. Hansteen"  wrote:

> On 02/04/16 12:19, Marko Cupać wrote:
>
> > If you need something more advanced, like granting minimum bandwidth
> > with the ability to borrow from other queues up to maximum bandwidth
> > when other queues are empty, I am afraid you won't be able to do it
> > with current queueing system. However, I'm still hoping one of
> > these days someone will prove me wrong.
>
> I'm a little curious about what you're basing this assertion on?
>
> As in, can you point us to benchmarks or other tests that indicate
> that hfsc queueing (which is the algorithm underlying the post-5.5
> traffic shaping) with variable allocations does not work?
>
> Child queues with variable allocations (min and bandwith not equal to
> max or burst) can never exceed the parent queue's allocation, but
> using the min, max and burst parameters as documented in the queueing
> section of pf.conf(5) should indeed influence observed results /when
> one or more queues approach a threshold that triggers shaping/.
>
> If you can come up with measurements that show the mechanism is
> defective, I'm sure a bug report would be appreciated.

Let's say I have the following setup:

---cut-here---
queue download on $int_ifbandwidth 10M min 10M max 10M
   queue host1   parent download bandwidth  5M min  5M max 10M
   queue host2   parent download bandwidth  5M min  5M max 10M default

match out on $int_if to $host1 set queue host1
match out on $int_if to $host2 set queue host2

pass  out on $int_if
---cut-here---

I guess it should be obvious what I want to achieve: If both hosts
request max bandwidth at the same time, throttle them both to 5M. While
host2 sits idle, give host1 10M. If host2 requests max bandwidth while
host1 downloads at 10M, throttle host1 to 5M and give host2 5M.

Would getting the different outcome (such as not throttling active
host1's active transfer from 10M to 5M, and grant host2 5M when it
requests max bandwidth) count as proof for defective mechanism?

Regards,
--
Before enlightenment - chop wood, draw water.
After  enlightenment - chop wood, draw water.

Marko Cupać
https://www.mimar.rs/



Re: panic: mtx_enter: locking against myself

2016-02-04 Thread mxb
I was able to re-produce this panic with similar stack trace.
Unfortunately 'trace/show regs/ps' are not in txt format, but are
screenshots.

//mxb

> On 4 feb. 2016, at 12:42, mxb  wrote:
>
>
> Hey,
> see those again on 5.8-STABLE.
>
> This is a 2-node CARP setup within VMWare ESX.
> Both machines are rebooting after this and it happens quite often.
>
> Any ideas?
>
> panic: mtx_enter: locking against myself
> Starting stack trace...
> panic() at panic+0x10b
> mtx_enter() at mtx_enter+0x60
> sofree() at sofree+0xa0
> in_pcbdetach() at in_pcbdetach+0x40
> tcp_close() at tcp_close+0xad
> tcp_timer_2msl() at tcp_timer_2msl+0x90
> softclock() at softclock+0x315
> softintr_dispatch() at softintr_dispatch+0x8b
> Xsoftclock() at Xsoftclock+0x1f
> --- interrupt ---
> (null)() at 0x8
> (null)() at 0xff0118c50f90
> end trace frame: 0x0, count: 246
> End of stack trace.
> syncing disks... panic: assertwaitok: non-zero mutex count: 1
> Starting stack trace...
> panic() at panic+0x10b
> assertwaitok() at assertwaitok+0x52
> bufq_wait() at bufq_wait+0x2d
> bwrite() at bwrite+0xfe
> VOP_BWRITE() at VOP_BWRITE+0x38
> ffs_fsync() at ffs_fsync+0x13f
> VOP_FSYNC() at VOP_FSYNC+0x3c
> ffs_sync() at ffs_sync+0xc4
> sys_sync() at sys_sync+0x87
> vfs_syncwait() at vfs_syncwait+0x50
> vfs_shutdown() at panic: mtx_enter: locking against myself
> Faulted in traceback, aborting…
>
> OpenBSD 5.8-stable (GENERIC.MP) #0: Thu Oct 22 18:52:06 CEST 2015
>root@prdlba0001:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 4278124544 (4079MB)
> avail mem = 4144574464 (3952MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0010 (364 entries)
> bios0: vendor Phoenix Technologies LTD version "6.00" date 04/14/2014
> 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) Xeon(R) CPU E5-2620 v3 @ 2.40GHz, 2400.20 MHz
> cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,
x2APIC,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,LONG,LAHF,PERF,I
TSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
> cpu0: 256KB 64b/line 8-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 65MHz
> cpu1 at mainbus0: apid 1 (application processor)
> cpu1: Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz, 2399.74 MHz
> cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,
x2APIC,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,LONG,LAHF,PERF,I
TSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
> cpu1: 256KB 64b/line 8-way L2 cache
> cpu1: smt 0, core 1, package 0
> ioapic0 at mainbus0: apid 2 pa 0xfec0, version 11, 24 pins
> acpimcfg0 at acpi0 addr 0xf000, bus 0-127
> acpihpet0 at acpi0: 14318179 Hz
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpicpu0 at acpi0: C1(@1 halt!)
> acpicpu1 at acpi0: C1(@1 halt!)
> 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_
> pvbus0 at mainbus0: VMware
> vmt0 at pvbus0
> 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 0x01
> pci1 at ppb0 bus 1
> pcib0 at pci0 dev 7 function 0 "Intel 82371AB PIIX4 ISA" rev 0x08
> pciide0 at pci0 dev 7 function 1 "Intel 82371AB IDE" rev 0x01: DMA, channel
0 configured to compatibility, channel 1 configured to compatibility
> pciide0: channel 0 disabled (no drives)
> pciide0: channel 1 disabled (no drives)
> piixpm0 at pci0 dev 7 function 3 "Intel 82371AB Power" rev 0x08: SMBus
disabled
> "VMware VMCI" rev 0x10 at pci0 dev 7 function 7 not configured
> vga1 at pci0 dev 15 function 0 "VMware SVGA II" rev 0x00
> wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
> wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
> ppb1 at pci0 dev 17 function 0 "VMware PCI" rev 0x02
> pci2 at ppb1 bus 2
> ahci0 at pci2 dev 1 function 0 "VMware AHCI" rev 0x00: apic 2 int 19, AHCI
1.3
> ahci0: port 0: 6.0Gb/s
> scsibus1 at ahci0: 32 targets
> cd0 at scsibus1 targ 0 lun 0:  ATAPI
5/cdrom removable
> ppb2 at pci0 dev 21 function 0 "VMware PCIE" rev 0x01
> pci3 at ppb2 bus 3
> vmwpvs0 at pci3 dev 0 function 0 "VMware PVSCSI" rev 0x02: apic 2 int 18
> scsibus2 at vmwpvs0: 16 targets
> 

Re: providing users with equal bandwidth

2016-02-04 Thread Marko Cupać
On Wed, 3 Feb 2016 23:09:39 +
Tarkan Açan  wrote:

> hello misc,
>
> i am using openbsd 5.8 amd64 on my apu 1d4 with success but i have
> one big problem. the queue mechanism in pf allows some traffic
> shaping but what i really need is to give users their share of the
> bandwidth. for this i need some connection based algorithm like sfq
> (linux) or cbq (mikrotik - routeros). i have read and searched around
> a lot but it seems not possible to do such a thing with pf. is it
> possible to arrange this kind of bandwith sharing with a proxy like
> relayd? does anybody have suggestions? all feedback is sincerely
> appreciated.

>From my experience with queueing in 5.8 amd64 on APU, there shouldn't be
a problem if you use fixed bandwidth allocation where target bandwidth
and max bandwidth are the same, similar to:

---cut-here---
queue dowload on $int_if  bandwidth 20M max 20M
   queue user1   parent download  bandwidth  5M max  5M
   queue user2   parent download  bandwidth  5M max  5M
   queue user3   parent download  bandwidth  5M max  5M
   queue default parent download  bandwidth  5M max  5M default

match to $user1 set queue user1
match to $user2 set queue user2
match to $user2 set queue user2
---cut-here---

If you need something more advanced, like granting minimum bandwidth
with the ability to borrow from other queues up to maximum bandwidth
when other queues are empty, I am afraid you won't be able to do it
with current queueing system. However, I'm still hoping one of
these days someone will prove me wrong.

Regards,
--
Before enlightenment - chop wood, draw water.
After  enlightenment - chop wood, draw water.

Marko Cupać
https://www.mimar.rs/



Re: iwn WiFi slow in CURRENT

2016-02-04 Thread Stefan Sperling
On Thu, Feb 04, 2016 at 11:40:30AM +0100, Henrik Friedrichsen wrote:
> Hey,
> 
> manually setting the mode helps with the speed problems, thanks!

That's good. At least there's a workaround.

> On Wed, Feb 03, 2016 at 08:54:51PM +0100, Stefan Sperling wrote:
> > Does this diff help?
> 
> This diff + the one you posted in tech@ this morning does not seem to
> help with the 11n mode, though.

Bummer.

> Anything I can provide to help?

For starters, beacons from this AP.

While associated: tcpdump -n -i iwn0 -y IEEE802_11_RADIO -vvv subtype beacon

Send me one of the lines this prints.



Re: iwn WiFi slow in CURRENT

2016-02-04 Thread Henrik Friedrichsen
Sorry, wrong dmesg.
OpenBSD 5.9 (GENERIC.MP) #0: Thu Feb  4 11:31:35 CET 2016
r...@kobol.lan:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8335577088 (7949MB)
avail mem = 8078761984 (7704MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xdae9c000 (66 entries)
bios0: vendor LENOVO version "8DET70WW (1.40 )" date 05/14/2015
bios0: LENOVO 4290W1A
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SLIC SSDT SSDT SSDT HPET APIC MCFG ECDT ASF! TCPA SSDT 
SSDT UEFI UEFI UEFI
acpi0: wakeup devices LID_(S3) SLPB(S3) IGBE(S4) EXP4(S4) EXP7(S4) EHC1(S3) 
EHC2(S3) HDEF(S4)
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) i3-2310M CPU @ 2.10GHz, 2093.51 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,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,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.1.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz, 2093.20 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,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz, 2093.20 MHz
cpu2: 
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,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 1, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz, 2093.20 MHz
cpu3: 
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,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xf800, bus 0-63
acpiec0 at acpi0
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG_)
acpiprt2 at acpi0: bus 2 (EXP1)
acpiprt3 at acpi0: bus 3 (EXP2)
acpiprt4 at acpi0: bus 5 (EXP4)
acpiprt5 at acpi0: bus 13 (EXP5)
acpiprt6 at acpi0: bus -1 (EXP7)
acpicpu0 at acpi0: C3(350@104 io@0x415), C1(1000@1 halt), PSS
acpicpu1 at acpi0: C3(350@104 io@0x415), C1(1000@1 halt), PSS
acpicpu2 at acpi0: C3(350@104 io@0x415), C1(1000@1 halt), PSS
acpicpu3 at acpi0: C3(350@104 io@0x415), C1(1000@1 halt), PSS
acpipwrres0 at acpi0: PUBS, resource for EHC1, EHC2
acpitz0 at acpi0: critical temperature is 99 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibat0 at acpi0: BAT0 model "42T4861" serial  5714 type LION oem "SANYO"
acpibat1 at acpi0: BAT1 not present
acpiac0 at acpi0: AC unit online
acpithinkpad0 at acpi0
acpidock0 at acpi0: GDCK not docked (0)
cpu0: Enhanced SpeedStep 2093 MHz: speeds: 2100, 2000, 1900, 1800, 1700, 1600, 
1500, 1400, 1300, 1200, 1100, 1000, 900, 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 2G Host" rev 0x09
inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics 3000" rev 0x09
drm0 at inteldrm0
inteldrm0: msi
inteldrm0: 1366x768
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
"Intel 6 Series MEI" rev 0x04 at pci0 dev 22 function 0 not configured
em0 at pci0 dev 25 function 0 "Intel 82579LM" rev 0x04: msi, address 
f0:de:f1:5a:e0:f6
ehci0 at pci0 dev 26 function 0 "Intel 6 Series USB" rev 0x04: apic 2 int 16
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 6 Series HD Audio" rev 0x04: msi
azalia0: codecs: Conexant CX20590, Intel/0x2805, using Conexant CX20590
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 6 Series PCIE" rev 0xb4: msi
pci1 at ppb0 bus 2
ppb1 at pci0 dev 28 function 1 "Intel 6 Series PCIE" rev 0xb4: msi
pci2 at ppb1 bus 3
iwn0 at pci2 dev 0 function 0 "Intel Centrino Advanced-N 6205" rev 0x34: msi, 
MIMO 2T2R, MoW, address a0:88:b4:40:98:3c
ppb2 at pci0 dev 28 function 3 "Intel 6 Series PCIE" rev 

panic: mtx_enter: locking against myself

2016-02-04 Thread mxb
Hey,
see those again on 5.8-STABLE.

This is a 2-node CARP setup within VMWare ESX.
Both machines are rebooting after this and it happens quite often.

Any ideas?

panic: mtx_enter: locking against myself
Starting stack trace...
panic() at panic+0x10b
mtx_enter() at mtx_enter+0x60
sofree() at sofree+0xa0
in_pcbdetach() at in_pcbdetach+0x40
tcp_close() at tcp_close+0xad
tcp_timer_2msl() at tcp_timer_2msl+0x90
softclock() at softclock+0x315
softintr_dispatch() at softintr_dispatch+0x8b
Xsoftclock() at Xsoftclock+0x1f
--- interrupt ---
(null)() at 0x8
(null)() at 0xff0118c50f90
end trace frame: 0x0, count: 246
End of stack trace.
syncing disks... panic: assertwaitok: non-zero mutex count: 1
Starting stack trace...
panic() at panic+0x10b
assertwaitok() at assertwaitok+0x52
bufq_wait() at bufq_wait+0x2d
bwrite() at bwrite+0xfe
VOP_BWRITE() at VOP_BWRITE+0x38
ffs_fsync() at ffs_fsync+0x13f
VOP_FSYNC() at VOP_FSYNC+0x3c
ffs_sync() at ffs_sync+0xc4
sys_sync() at sys_sync+0x87
vfs_syncwait() at vfs_syncwait+0x50
vfs_shutdown() at panic: mtx_enter: locking against myself
Faulted in traceback, aborting…

OpenBSD 5.8-stable (GENERIC.MP) #0: Thu Oct 22 18:52:06 CEST 2015
root@prdlba0001:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4278124544 (4079MB)
avail mem = 4144574464 (3952MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0010 (364 entries)
bios0: vendor Phoenix Technologies LTD version "6.00" date 04/14/2014
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) Xeon(R) CPU E5-2620 v3 @ 2.40GHz, 2400.20 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,
x2APIC,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,LONG,LAHF,PERF,I
TSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
cpu0: 256KB 64b/line 8-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 65MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz, 2399.74 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,
x2APIC,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,LONG,LAHF,PERF,I
TSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 11, 24 pins
acpimcfg0 at acpi0 addr 0xf000, bus 0-127
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpicpu0 at acpi0: C1(@1 halt!)
acpicpu1 at acpi0: C1(@1 halt!)
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_
pvbus0 at mainbus0: VMware
vmt0 at pvbus0
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 0x01
pci1 at ppb0 bus 1
pcib0 at pci0 dev 7 function 0 "Intel 82371AB PIIX4 ISA" rev 0x08
pciide0 at pci0 dev 7 function 1 "Intel 82371AB IDE" rev 0x01: DMA, channel 0
configured to compatibility, channel 1 configured to compatibility
pciide0: channel 0 disabled (no drives)
pciide0: channel 1 disabled (no drives)
piixpm0 at pci0 dev 7 function 3 "Intel 82371AB Power" rev 0x08: SMBus
disabled
"VMware VMCI" rev 0x10 at pci0 dev 7 function 7 not configured
vga1 at pci0 dev 15 function 0 "VMware SVGA II" rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
ppb1 at pci0 dev 17 function 0 "VMware PCI" rev 0x02
pci2 at ppb1 bus 2
ahci0 at pci2 dev 1 function 0 "VMware AHCI" rev 0x00: apic 2 int 19, AHCI
1.3
ahci0: port 0: 6.0Gb/s
scsibus1 at ahci0: 32 targets
cd0 at scsibus1 targ 0 lun 0:  ATAPI 5/cdrom
removable
ppb2 at pci0 dev 21 function 0 "VMware PCIE" rev 0x01
pci3 at ppb2 bus 3
vmwpvs0 at pci3 dev 0 function 0 "VMware PVSCSI" rev 0x02: apic 2 int 18
scsibus2 at vmwpvs0: 16 targets
sd0 at scsibus2 targ 0 lun 0:  SCSI2 0/direct
fixed
sd0: 16384MB, 512 bytes/sector, 33554432 sectors
ppb3 at pci0 dev 21 function 1 "VMware PCIE" rev 0x01
pci4 at ppb3 bus 4
ppb4 at pci0 dev 21 function 2 "VMware PCIE" rev 0x01
pci5 at ppb4 bus 5
ppb5 at pci0 dev 21 function 3 "VMware PCIE" rev 0x01
pci6 at ppb5 bus 6
ppb6 at pci0 dev 21 function 4 "VMware PCIE" rev 0x01
pci7 at ppb6 bus 7

Re: providing users with equal bandwidth

2016-02-04 Thread Peter N. M. Hansteen

On 02/04/16 12:19, Marko Cupać wrote:


If you need something more advanced, like granting minimum bandwidth
with the ability to borrow from other queues up to maximum bandwidth
when other queues are empty, I am afraid you won't be able to do it
with current queueing system. However, I'm still hoping one of
these days someone will prove me wrong.


I'm a little curious about what you're basing this assertion on?

As in, can you point us to benchmarks or other tests that indicate that 
hfsc queueing (which is the algorithm underlying the post-5.5 traffic 
shaping) with variable allocations does not work?


Child queues with variable allocations (min and bandwith not equal to 
max or burst) can never exceed the parent queue's allocation, but using 
the min, max and burst parameters as documented in the queueing section 
of pf.conf(5) should indeed influence observed results /when one or more 
queues approach a threshold that triggers shaping/.


If you can come up with measurements that show the mechanism is 
defective, I'm sure a bug report would be appreciated.


--
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
"Remember to set the evil bit on all malicious network traffic"
delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.



Re: providing users with equal bandwidth

2016-02-04 Thread Peter N. M. Hansteen

On 02/04/16 13:37, Marko Cupać wrote:

On Thu, 4 Feb 2016 12:45:23 +0100
I guess it should be obvious what I want to achieve: If both hosts
request max bandwidth at the same time, throttle them both to 5M. While
host2 sits idle, give host1 10M. If host2 requests max bandwidth while
host1 downloads at 10M, throttle host1 to 5M and give host2 5M.


It doesn't work that way. They will both be allocated whatever is the 
'fair share', within the bounds set by the rules you have specified.



Would getting the different outcome (such as not throttling active
host1's active transfer from 10M to 5M, and grant host2 5M when it
requests max bandwidth) count as proof for defective mechanism?


You would need to come up with a credible measurement regime. Not 
forgetting to compensate for whatever the relevant sampling rate for 
evaluation is (the number escapes me at the moment, but do take a peek 
at the relevant source files while preparing to measure anything).


--
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
"Remember to set the evil bit on all malicious network traffic"
delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.



Re: providing users with equal bandwidth

2016-02-04 Thread Peter N. M. Hansteen

On 02/04/16 15:41, Tarkan Açan wrote:

Thank you for your replies. i realised that i did not explain my issue clearly.


No worries, I hope you found the replies useful anyway.


what i want to achieve is, say we have a parent queue of 10M. when 5 users 
connect, they should all receive 2M bandwidth each. when 5 more users connect, 
i want to bog down their bandwidth to 1M each. when the connected users drop 
down to 8, i want to give them 1.25M each. i do not have a certain number of 
users. the number constantly changes.


The queueing syntax doesn't support this directly, but I imagine you 
could come fairly close to that regime with some state tracking and 
overload tables trickery to match a finer-grained set of queues.


--
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
"Remember to set the evil bit on all malicious network traffic"
delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.



Re: Cannot Cleanly Exit FVWM / X Windows System

2016-02-04 Thread Samir Parikh
Hi Marcus -- Thank you for the quick reply.  I'll try to provide some 
additional details and answers to your questions below:


On 02/04/16 03:12, Marcus MERIGHI wrote:

Hello Samir,

spytho...@gmail.com (Samir Parikh), 2016.02.03 (Wed) 21:29 (CET):

Hi Everyone!  This is my first post to the mailing list as I am new to
OpenBSD.
I am running version 5.8 (amd64) on a Lenovo Thinkpad T450s with a
fairly default installation.
I have a few issues to sort out but my first concern is that I cannot exit
out of FVWM.  I launch it via the command startx while logged in as root.


https://en.wikipedia.org/wiki/Principle_of_least_privilege
TL;DR: don't run as root. Use doas(1).


Point noted.  Right now, my main goal is to get OpenBSD working on this 
laptop as quickly as possible.  Once I do, I will create additional 
users for day-to-day use but do understand your advice.





When I go to exit (left mouse click on the desktop > Exit), the system just
hangs which requires me to forcefully power down the laptop.


Did you try 'ctrl+alt+backspace'? This should end X.


Yes, that was another method I had used which I should have pointed out. 
 Unfortunately, I got the same result in that FVWM just froze.



Did you try a short power button press followed by some waiting for a
clean shutdown?


Yes.  I waited for about 10 seconds, quickly pressed the laptop power 
button, and then waited for another 10 seconds but the system was still 
hung.



Did you try to switch the tty back to ttyC0 (ctrl+alt+F1) when X/fvwm
are making you wait?

Yes.  I tried pressing CTRL-ALT-F1 as well but with the same results, 
unfortunately.



I am not using
a login or display manager such as xdm(1) so I do not have an ~/.xinitrc or
/etc/rc.conf.local file.  During installation, I answered Yes to "Do you
expect to run the X Window System?" and No to "Do you want the X Window
System to be started by xdm(1)?"


When you have restarted, the /var/log/Xorg.0.log file should still be
there. Maybe that gives some clues.


Please see my Xorg.0.log file below at the end of the email.


And, from http://www.openbsd.org/mail.html:

Include important information
Don't waste everyone's time with a hopelessly incomplete question. No
one other than you has the information needed to resolve your problem,
it is better to provide more information than needed than not enough
detail.


Maybe someone already knew what you problem is if he/she only saw your
dmesg?

Bye, Marcus


I will include that in the future.  Thanks for keeping me honest!

Here is the output of my Xorg.log.  (The output of dmesg follows 
immediately after.)  If the standard practice on this list is to use 
something like pastebin instead of email, please let me know as well.

[40.874] (--) checkDevMem: using aperture driver /dev/xf86
[40.880] (--) Using wscons driver on /dev/ttyC4 in pcvt 
compatibility mode (version 3.32)

[40.894]
X.Org X Server 1.16.4
Release Date: 2014-12-20
[40.894] X Protocol Version 11, Revision 0
[40.894] Build Operating System: OpenBSD 5.8 amd64
[40.894] Current Operating System: OpenBSD t450s.home 5.8 
GENERIC.MP#1236 amd64

[40.894] Build Date: 16 August 2015  03:14:12AM
[40.894]
[40.894] Current version of pixman: 0.32.6
[40.894]Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[40.894] Markers: (--) probed, (**) from config file, (==) default 
setting,

(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[40.894] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Feb  4 
16:09:46 2016
[40.896] (==) Using system config directory 
"/usr/X11R6/share/X11/xorg.conf.d"

[40.896] (==) No Layout section.  Using the first Screen section.
[40.897] (==) No screen section available. Using defaults.
[40.897] (**) |-->Screen "Default Screen Section" (0)
[40.897] (**) |   |-->Monitor ""
[40.897] (==) No monitor specified for screen "Default Screen Section".
Using a default monitor configuration.
[40.897] (==) Disabling SIGIO handlers for input devices
[40.897] (==) Automatically adding devices
[40.897] (==) Automatically enabling devices
[40.897] (==) Not automatically adding GPU devices
[40.902] (==) FontPath set to:
/usr/X11R6/lib/X11/fonts/misc/,
/usr/X11R6/lib/X11/fonts/TTF/,
/usr/X11R6/lib/X11/fonts/OTF/,
/usr/X11R6/lib/X11/fonts/Type1/,
/usr/X11R6/lib/X11/fonts/100dpi/,
/usr/X11R6/lib/X11/fonts/75dpi/
[40.902] (==) ModulePath set to "/usr/X11R6/lib/modules"
[40.902] (II) The server relies on wscons to provide the list of 
input devices.
	If no devices become available, reconfigure wscons or disable 
AutoAddDevices.

[40.902] (II) Loader magic: 0x1964859356a0
[40.902] (II) Module ABI versions:
[40.902]X.Org ANSI C Emulation: 0.4
[40.902]X.Org Video 

Re: pfctl: DIOCGETQSTATS: Bad file descriptor

2016-02-04 Thread lists
I found out what the issue was.

As an example, this is valid with "pfctl -f /etc/pf.conf" but will throw
"pfctl: DIOCGETQSTATS: Bad file descriptor" with "pfctl -s queue":

queue test on egress bandwidth 1M default

This works properly with "pfctl -s queue" as well:

queue test on em0 bandwidth 1M default


I sent a copy to bugs@ since I doubt this is desired behavior.



Re: Cannot Cleanly Exit FVWM / X Windows System

2016-02-04 Thread Samir Parikh

Hi David -- Thanks for your reply!

On 02/04/16 03:39, David Dahlberg wrote:

Am Mittwoch, den 03.02.2016, 15:29 -0500 schrieb Samir Parikh:

  I am running version 5.8 (amd64) on a Lenovo Thinkpad T450s
with a fairly default installation.


The T405s is a Broadwell.


I have a few issues to sort out but my first concern is that I cannot
exit out of FVWM.  I launch it via the command startx while logged in
as
root.  When I go to exit (left mouse click on the desktop > Exit),
the
system just hangs which requires me to forcefully power down the
laptop.


If you investigate more closely, you will probably find out, that the
system still works, just the graphics is fscked up: Try logging in via
ssh, or shutting down the system by blindly typing into ttyC0.

I know this is a stupid question but should I try logging into ttyC0 via 
CRTL-ALT-F1 while FVWM/X.org is still running or when I am in the 
original shell at login?



Broadwell graphics support was added a while ago. IIRC 5.8 should have
some basic support, but still a few bugs. By now (-current) it is petty
stable though.


Any ideas or suggestions?


1) Use modesetting(4) in xorg.conf and wait for 5.9
2) Avoid the vulnerable code paths (e.g. "shutdown" in wm)
and wait for 5.9
3) Update to a recent snapshot.

Ok.  Thank you for the ideas.  Perhaps I'll look into a recent snapshot 
if not other methods work (I also have to get my wireless working so 
maybe OpenBSD is not the right OS for my skills and laptop.  I hope that 
is not the case though!)




puppet and cross-platform password hashes

2016-02-04 Thread Peter N. M. Hansteen
I'm assuming I'm not the first to encounter this -

the scenario is a group of admins who have so far run mainly Linux and some 
Solaris,
and who have a fairly well developed Puppet setup for maintaining among other 
things
local users for admins to log in and fix, running sudo as required. For 
non-admin role
users, LDAP (AD) is considered good enough, but that's out of scope here.

The interesting part is when we start introducing OpenBSD machines to the mix, 
and
creating users with the password hashes from Linux or Solaris fails, apparently 
because 
the hashes are not bcrypt hashes.

I see two obvious solutions to this. Either

1) skip password logins, require key logins for all local users (they're
   admins after all), tackle any extra privilege needs via specific sudo or
   doas config, or

2) maintain a separate set of user definitions with bcrypt hashes for the 
OpenBSD
   boxes in the puppet setup. Then supplement as before with sudo or doas 
tricks.

My next question is, what other workable options are there? When you found 
yourself
in a similar situation, introducing OpenBSD to an existing environment of other
unixes, what did you do? Are there other solutions out there, possibly with more
sophisticated approaches than the ones I've mentioned here?

Good suggestions may merit a beverage of choice (within reason) at the first
possible opportunity.
-- 
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
"Remember to set the evil bit on all malicious network traffic"
delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.



Re: iwn WiFi slow in CURRENT

2016-02-04 Thread Henrik Friedrichsen
On Thu, Feb 04, 2016 at 03:15:25PM +0100, Stefan Sperling wrote:
> Sorry, this capture is incomplete. Can you please add the -s 1500 option?

No problem:

15:57:46.601094 802.11 flags=0<>: beacon, timestamp 164743741446,
interval 102, caps=10021, ssid (eduroam),
rates 18M 24M 36M 48M 54M, tim 0x00010c0840, country 'DE ', channels
36-43 limit 23dB, channels 100-104 limit 23dB, channels 132-134 limit
30dB, 53 stations, 17% utilization, admission capacity 732us/s,
htcaps=<20/40MHz,SGI@20MHz,SGI@40MHz,TXSTBC,RXSTBC 1 stream,A-MSDU
7935,DSSS/CCK@40MHz,A-MPDU max 65535,A-MPDU spacing 8.00us,RxMCS
0xfc00>, rsn
0x010fac04010fac04020fac01004096002800, htop=<40MHz chan
48:44,RIFS,protect 20MHz,non-greenfield STA,basic MCS set
0x>, 127:8 0x001000400040, 133:30
0x06008f000f00ff0359005548482d5355422d484731333400354d, 150:6
0x004096001200, 191:12 0xb259820feaffeaff, 192:5 0x00,
195:3 0x010202, vendor
0x0050f202010183a427a442435e0062322f00, vendor
0x004096010104, vendor 0x0040960305, vendor 0x0040960b09, vendor
0x004096134000, vendor 0x0040961401, vendor
0x0040960c0361205731f8a25201c7260c002585d2394001bf78, 



Re: panic: mtx_enter: locking against myself

2016-02-04 Thread mxb
Found it in dmesg buffer:

Stopped at  Debugger+0x9:   leave
RUN AT LEAST 'trace' AND 'ps' AND INCLUDE OUTPUT WHEN REPORTING THIS PANIC!
IF RUNNING SMP, USE 'mach ddbcpu <#>' AND 'trace' ON OTHER PROCESSORS, TOO.
DO NOT EVEN BOTHER REPORTING THIS WITHOUT INCLUDING THAT INFORMATION!

ddb{0}> trace
Debugger() at Debugger+0x9
panic() at panic+0xfe
mtx_enter() at mtx_enter+0x60
sofree() at sofree+0xa0
in_pcbdetach() at in_pcbdetach+0x40
tcp_close() at tcp_close+0xad
tcp_timer_2msl() at tcp_timer_2msl+0x90
softclock() at softclock+0x315
softintr_dispatch() at softintr_dispatch+0x8b
Xsoftclock() at Xsoftclock+0x1f
--- interrupt ---
(null)() at 0x8
end of kernel
end trace frame: 0x11020001, count: -11

ddb{0}>  show registers
rdi  0x1
rsi0x282
rbp   0x8000221c68f8
rbx   0x813285e0mtx_enter+0x60
rdx0
rcx   0x8188c640cpu_info_primary
rax  0x1
r80x8000221c6818
r9   0x1
r100
r11   0x8000221c66b0
r120x100
r13   0x8000221c6908
r14   0xff011d088010
r150
rip   0x81343b09Debugger+0x9
cs   0x8
rflags 0x286
rsp   0x8000221c68e8
ss  0x10
Debugger+0x9:   leave

ddb{0}> ps
PID   PPID   PGRPUID  S   FLAGS  WAIT  COMMAND
 19921  12801  19921  0  30x83  poll  systat
 12801569  12801  0  30x8b  pause ksh
   569  23137569  0  30x92  selectsshd
 13678  1  13678  0  30x83  ttyin getty
  9776  1   9776  0  30x83  ttyin getty
  3392  1   3392  0  30x83  ttyin getty
 24230  1  24230  0  30x83  ttyin getty
 14469  1  14469  0  30x83  ttyin getty
 29209  1  29209  0  30x80  poll  cron
  4796   4087   4087 95  30x90  kqreadsmtpd
   269   4087   4087 95  30x90  kqreadsmtpd
 28144   4087   4087 95  30x90  kqreadsmtpd
 13626   4087   4087 95  30x90  kqreadsmtpd
  4756   4087   4087 95  30x90  kqreadsmtpd
 23276   4087   4087103  30x90  kqreadsmtpd
  4087  1   4087  0  30x80  kqreadsmtpd
 29277  28344  28344 89  30x90  kqreadrelayd
 15361  28344  28344 89  30x90  kqreadrelayd
 28344  26987  28344 89  30x90  kqreadrelayd
*18801   1528   1528 89  70x10relayd
 15066   1528   1528 89  30x90  kqreadrelayd
  1528  26987   1528 89  30x90  kqreadrelayd
 14013  26987  14013 89  30x90  kqreadrelayd
 25397  26987  25397 89  30x90  kqreadrelayd
 26987  1  26987  0  30x80  kqreadrelayd
 23945  0  0 85  30x90  kqreadospfd
 12948  0  0 85  30x90  kqreadospfd
 0  1  0  0  30x80  kqreadospfd
 23137  1  23137  0  30x80  selectsshd
 10031  27507981 83  30x90  poll  ntpd
 27507981981 83  30x90  poll  ntpd
   981  1981  0  30x80  poll  ntpd
 12220  25415  25415 74  30x90  bpf   pflogd
 25415  1  25415  0  30x80  netio pflogd
  3275  32486  32486 73  30x90  kqreadsyslogd
 32486  1  32486  0  30x80  netio syslogd
 14861  0  0  0  3 0x14200  pgzerozerothread
 24670  0  0  0  3 0x14200  aiodoned  aiodoned
 29165  0  0  0  3 0x14200  syncerupdate
 27875  0  0  0  3 0x14200  cleaner   cleaner
   645  0  0  0  3 0x14200  reaperreaper
 17692  0  0  0  3 0x14200  pgdaemon  pagedaemon
   766  0  0  0  3 0x14200  bored crypto
  4241  0  0  0  3 0x14200  pftm  pfpurge
  9257  0  0  0  3  0x40014200  acpi0 acpi0
 25569  0  0  0  7  0x40014200idle1
  7980  0  0  0  3 0x14200  bored sensors
  3321  0  0  0  3 0x14200  bored softnet
  4749  0  0  0  3 0x14200  bored systqmp
 16058  0  0  0  3 0x14200  bored systq
 15954  0  0  0  3  0x40014200idle0
 1  0  1  0  30x82  wait  init
 

Re: iwn WiFi slow in CURRENT

2016-02-04 Thread Stefan Sperling
On Thu, Feb 04, 2016 at 02:55:06PM +0100, Henrik Friedrichsen wrote:
> Hey,
> 
> On Thu, Feb 04, 2016 at 11:56:30AM +0100, Stefan Sperling wrote:
> > For starters, beacons from this AP.
> > 
> > While associated: tcpdump -n -i iwn0 -y IEEE802_11_RADIO -vvv subtype beacon
> > 
> > Send me one of the lines this prints.
> 
> Here you go:
> 
> 14:52:00.658304 802.11 flags=0<>: beacon, timestamp 160798114825,
> interval 102, caps=10021, ssid (eduroam),
> rates 18M 24M 36M 48M 54M, tim 0x0001188000, country 'DE ', channels
> 36-43 limit 23dB, channels 100-104 limit 23dB, channels 132-134 limit
> 30dB, 41 stations, 24% utilization, admission capacity 732us/s,
> htcaps=<20/40MHz,SGI@20MHz,SGI@40MHz,TXSTBC,RXSTBC 1 stream,A-MSDU
> 7935,DSSS/CCK@40MHz,A-MPDU max 65535,A-MPDU spacing 8.00us,RxMCS
> 0xfc00>, rsn
> 0x010fac04010fac04020fac01004096002800,  160798114799, 24Mbit/s, chan 48, 11a, sig -72dBm, noise -92dBm>
> 
> Henrik

Sorry, this capture is incomplete. Can you please add the -s 1500 option?



Re: providing users with equal bandwidth

2016-02-04 Thread Tarkan Açan
hi everyone,

Thank you for your replies. i realised that i did not explain my issue clearly.

what i want to achieve is, say we have a parent queue of 10M. when 5 users 
connect, they should all receive 2M bandwidth each. when 5 more users connect, 
i want to bog down their bandwidth to 1M each. when the connected users drop 
down to 8, i want to give them 1.25M each. i do not have a certain number of 
users. the number constantly changes.

the config set of pf does not change until you load pf.conf again so adding and 
removing queues dynamically seems not possible to me. i was wondering if some 
mechanism is in place or can be constructed aiding pf in order to distribute 
available bandwidth equally.

i hope this version is clearer. regards.

On 04 Feb 2016, at 14:37, Marko Cupać 
> wrote:

On Thu, 4 Feb 2016 12:45:23 +0100
"Peter N. M. Hansteen" > wrote:

On 02/04/16 12:19, Marko Cupać wrote:

If you need something more advanced, like granting minimum bandwidth
with the ability to borrow from other queues up to maximum bandwidth
when other queues are empty, I am afraid you won't be able to do it
with current queueing system. However, I'm still hoping one of
these days someone will prove me wrong.

I'm a little curious about what you're basing this assertion on?

As in, can you point us to benchmarks or other tests that indicate
that hfsc queueing (which is the algorithm underlying the post-5.5
traffic shaping) with variable allocations does not work?

Child queues with variable allocations (min and bandwith not equal to
max or burst) can never exceed the parent queue's allocation, but
using the min, max and burst parameters as documented in the queueing
section of pf.conf(5) should indeed influence observed results /when
one or more queues approach a threshold that triggers shaping/.

If you can come up with measurements that show the mechanism is
defective, I'm sure a bug report would be appreciated.

Let's say I have the following setup:

---cut-here---
queue download on $int_ifbandwidth 10M min 10M max 10M
  queue host1   parent download bandwidth  5M min  5M max 10M
  queue host2   parent download bandwidth  5M min  5M max 10M default

match out on $int_if to $host1 set queue host1
match out on $int_if to $host2 set queue host2

pass  out on $int_if
---cut-here---

I guess it should be obvious what I want to achieve: If both hosts
request max bandwidth at the same time, throttle them both to 5M. While
host2 sits idle, give host1 10M. If host2 requests max bandwidth while
host1 downloads at 10M, throttle host1 to 5M and give host2 5M.

Would getting the different outcome (such as not throttling active
host1's active transfer from 10M to 5M, and grant host2 5M when it
requests max bandwidth) count as proof for defective mechanism?

Regards,
--
Before enlightenment - chop wood, draw water.
After  enlightenment - chop wood, draw water.

Marko Cupać
https://www.mimar.rs/

Tarkan Açan
sodiumcc
Beyoğlu – İstanbul
Tel: 0212 293 2002
Fax:0212 293 2001
www.sodium.com.tr



Re: Cannot Cleanly Exit FVWM / X Windows System

2016-02-04 Thread Jonathan Gray
On Thu, Feb 04, 2016 at 08:39:43AM +, David Dahlberg wrote:
> Am Mittwoch, den 03.02.2016, 15:29 -0500 schrieb Samir Parikh:
> >  I am running version 5.8 (amd64) on a Lenovo Thinkpad T450s 
> > with a fairly default installation.
> 
> The T405s is a Broadwell.
> 
> > I have a few issues to sort out but my first concern is that I cannot 
> > exit out of FVWM.  I launch it via the command startx while logged in
> > as 
> > root.  When I go to exit (left mouse click on the desktop > Exit),
> > the 
> > system just hangs which requires me to forcefully power down the
> > laptop. 
> 
> If you investigate more closely, you will probably find out, that the
> system still works, just the graphics is fscked up: Try logging in via
> ssh, or shutting down the system by blindly typing into ttyC0.
> 
> Broadwell graphics support was added a while ago. IIRC 5.8 should have
> some basic support, but still a few bugs. By now (-current) it is petty
> stable though.
> 
> > Any ideas or suggestions?
> 
> 1) Use modesetting(4) in xorg.conf and wait for 5.9

The update that added Broadwell related parts to inteldrm went in after
5.8.  The modesetting driver requires kms support.  So yes, use snapshots.

> 2) Avoid the vulnerable code paths (e.g. "shutdown" in wm)
>    and wait for 5.9   
> 3) Update to a recent snapshot.



Re: chromium 48 (64-bit) crashes on 5.9-beta and xfce-4.12

2016-02-04 Thread Stuart Henderson
On 2016-02-03, Mariano Baragiola  wrote:
> Have you tried opening them without uBlock Origin?
>
> There was a known error in 5.8 amd64 with Chromium and uBlock Origin, 
> but the crash victim was the extension and not the browser, at least on 
> my case (I found some people saying the entire browser was crashing). 
> Maybe it is related in some way.

That wasn't an OpenBSD-specific problem, it affected any build with
WebRTC disabled - it has been fixed in uBlock Origin.



Re: iwn WiFi slow in CURRENT

2016-02-04 Thread Henrik Friedrichsen
Hey,

On Thu, Feb 04, 2016 at 06:24:42PM +0100, Stefan Sperling wrote:
> This AP does not comply with the 11n standard I'm reading (802.11 2012)
> because it does not support all of MCS 0-7.
> 
> We currently require RxMCS starting with 0xff (MCS 0 to 7 supported).
> Looks like we need a better strategy to cope with the real world...

Ow, sounds like a painful "standard" to implement. If you need any more
data or a patch tested, let me know.

Here's another interesting tidbid: With the patches you posted I can
still associate with my WiFi AP at home (TP-Link WDR4900 running
OpenWRT), but DHCP does not work and if I set the IP statically, I
can't get to the router either. The media mode with these patches is
HT-MCS2. Reverting to the older modes (e.g. 11a) works. So this appears
to cause a regression with my setup.

If I boot the snapshot kernel the modulation used is HT-MCS1 and
internet traffic works fine.

Henrik



Re: iwn WiFi slow in CURRENT

2016-02-04 Thread Henrik Friedrichsen
Beacon from my home AP in case it helps:

20:29:53.785848 802.11 flags=0<>: beacon, timestamp 6134271936059,
interval 100, caps=21, ssid (DATENMOPED), rates 6M 9M 12M
18M 24M 36M 48M 54M, ds (chan 36), tim 0x0002, country 'US ',
channels 36-39 limit 17dB, channels 52-55 limit 23dB, channels 149-153
limit 30dB, rsn 0x010fac04010fac04010fac020c00,
htcaps=<20MHz,LDPC,SGI@20MHz,SGI@40MHz,TXSTBC,RXSTBC 1 stream,A-MSDU
3839,DSSS/CCK@40MHz,A-MPDU max 65535,A-MPDU spacing 8.00us,RxMCS
0xff00>, htop=<20MHz chan 36,STA chanw 20MHz,protect
non-HT,non-greenfield STA,non-HT STA,basic MCS set 0x>,
127:8 0x0040, vendor
0x0050f202010183a427a442435e0062322f00, 



Re: iwn WiFi slow in CURRENT

2016-02-04 Thread Henrik Friedrichsen
Hey,

On Thu, Feb 04, 2016 at 11:56:30AM +0100, Stefan Sperling wrote:
> For starters, beacons from this AP.
> 
> While associated: tcpdump -n -i iwn0 -y IEEE802_11_RADIO -vvv subtype beacon
> 
> Send me one of the lines this prints.

Here you go:

14:52:00.658304 802.11 flags=0<>: beacon, timestamp 160798114825,
interval 102, caps=10021, ssid (eduroam),
rates 18M 24M 36M 48M 54M, tim 0x0001188000, country 'DE ', channels
36-43 limit 23dB, channels 100-104 limit 23dB, channels 132-134 limit
30dB, 41 stations, 24% utilization, admission capacity 732us/s,
htcaps=<20/40MHz,SGI@20MHz,SGI@40MHz,TXSTBC,RXSTBC 1 stream,A-MSDU
7935,DSSS/CCK@40MHz,A-MPDU max 65535,A-MPDU spacing 8.00us,RxMCS
0xfc00>, rsn
0x010fac04010fac04020fac01004096002800, 

Henrik



Re: iwn WiFi slow in CURRENT

2016-02-04 Thread Stefan Sperling
On Thu, Feb 04, 2016 at 03:59:09PM +0100, Henrik Friedrichsen wrote:
> RxMCS 0xfc00>

This AP does not comply with the 11n standard I'm reading (802.11 2012)
because it does not support all of MCS 0-7.

We currently require RxMCS starting with 0xff (MCS 0 to 7 supported).
Looks like we need a better strategy to cope with the real world...



Re: iwn WiFi slow in CURRENT

2016-02-04 Thread Mike Larkin
On Thu, Feb 04, 2016 at 06:24:42PM +0100, Stefan Sperling wrote:
> On Thu, Feb 04, 2016 at 03:59:09PM +0100, Henrik Friedrichsen wrote:
> > RxMCS 0xfc00>
> 
> This AP does not comply with the 11n standard I'm reading (802.11 2012)
> because it does not support all of MCS 0-7.
> 
> We currently require RxMCS starting with 0xff (MCS 0 to 7 supported).
> Looks like we need a better strategy to cope with the real world...
> 

As stsp and I have been chatting about offline, I too am having problems 
connecting
to an AP which advertises RxMCS 0xfe.

-ml



Re: iwn WiFi slow in CURRENT

2016-02-04 Thread Stefan Sperling
On Thu, Feb 04, 2016 at 08:27:32PM +0100, Henrik Friedrichsen wrote:
> Hey,
> 
> On Thu, Feb 04, 2016 at 06:24:42PM +0100, Stefan Sperling wrote:
> > This AP does not comply with the 11n standard I'm reading (802.11 2012)
> > because it does not support all of MCS 0-7.
> > 
> > We currently require RxMCS starting with 0xff (MCS 0 to 7 supported).
> > Looks like we need a better strategy to cope with the real world...
> 
> Ow, sounds like a painful "standard" to implement. If you need any more
> data or a patch tested, let me know.
> 
> Here's another interesting tidbid: With the patches you posted I can
> still associate with my WiFi AP at home (TP-Link WDR4900 running
> OpenWRT), but DHCP does not work and if I set the IP statically, I
> can't get to the router either. The media mode with these patches is
> HT-MCS2. Reverting to the older modes (e.g. 11a) works. So this appears
> to cause a regression with my setup.

Yes, that iwn driver patch has a problem.

Please try -current. 11n is a moving target so if you watch for
changes and keep testing that helps us a great deal. Thanks!



Re: Cannot Cleanly Exit FVWM / X Windows System

2016-02-04 Thread Marcus MERIGHI
Hello Samir, 

spytho...@gmail.com (Samir Parikh), 2016.02.03 (Wed) 21:29 (CET):
> Hi Everyone!  This is my first post to the mailing list as I am new to
> OpenBSD.  
> I am running version 5.8 (amd64) on a Lenovo Thinkpad T450s with a
> fairly default installation.
> I have a few issues to sort out but my first concern is that I cannot exit
> out of FVWM.  I launch it via the command startx while logged in as root.

https://en.wikipedia.org/wiki/Principle_of_least_privilege
TL;DR: don't run as root. Use doas(1).

> When I go to exit (left mouse click on the desktop > Exit), the system just
> hangs which requires me to forcefully power down the laptop.  

Did you try 'ctrl+alt+backspace'? This should end X.
Did you try a short power button press followed by some waiting for a
clean shutdown?
Did you try to switch the tty back to ttyC0 (ctrl+alt+F1) when X/fvwm
are making you wait?

> I am not using
> a login or display manager such as xdm(1) so I do not have an ~/.xinitrc or
> /etc/rc.conf.local file.  During installation, I answered Yes to "Do you
> expect to run the X Window System?" and No to "Do you want the X Window
> System to be started by xdm(1)?"

When you have restarted, the /var/log/Xorg.0.log file should still be
there. Maybe that gives some clues. 

And, from http://www.openbsd.org/mail.html:

Include important information
Don't waste everyone's time with a hopelessly incomplete question. No
one other than you has the information needed to resolve your problem,
it is better to provide more information than needed than not enough
detail. 


Maybe someone already knew what you problem is if he/she only saw your
dmesg?

Bye, Marcus

> !DSPAM:56b26471126511186110957!



Re: Cannot Cleanly Exit FVWM / X Windows System

2016-02-04 Thread David Dahlberg
Am Mittwoch, den 03.02.2016, 15:29 -0500 schrieb Samir Parikh:
>  I am running version 5.8 (amd64) on a Lenovo Thinkpad T450s 
> with a fairly default installation.

The T405s is a Broadwell.

> I have a few issues to sort out but my first concern is that I cannot 
> exit out of FVWM.  I launch it via the command startx while logged in
> as 
> root.  When I go to exit (left mouse click on the desktop > Exit),
> the 
> system just hangs which requires me to forcefully power down the
> laptop. 

If you investigate more closely, you will probably find out, that the
system still works, just the graphics is fscked up: Try logging in via
ssh, or shutting down the system by blindly typing into ttyC0.

Broadwell graphics support was added a while ago. IIRC 5.8 should have
some basic support, but still a few bugs. By now (-current) it is petty
stable though.

> Any ideas or suggestions?

1) Use modesetting(4) in xorg.conf and wait for 5.9
2) Avoid the vulnerable code paths (e.g. "shutdown" in wm)
   and wait for 5.9   
3) Update to a recent snapshot.