Re: Software RAID5 write performance

2023-01-25 Thread Atanas Vladimirov

On 2023-01-24 17:40, Tom Smyth wrote:

Hi Atanas,
in general (not specific to RAID5 Softraid in OpenBSD... )
I would advise the following based on my own experience...
Raid5 in hardware raid generally has poor write performance due the
number of actual writes to disk per
write operation to the raid controller ( parity reads and rewrites
once you write to disks) see
https://www.arcserve.com/blog/understanding-raid-performance-various-levels#:~:text=This%20means%20that%20a%20RAID,write%20performance%20is%20NX%2F4.

becuase of the number of physical writes per  raid device write...
Raid5 and SSDs dont really go together... ... unless you like
replacing SSD Disks in your arrays...
suggest meet and potatoes RAID 1 or Raid 10 ... for ssd ...  and you
then dont suffer write penalties... associated with Raid 5...



Thanks for your reply!
It really makes sense, and it looks like I'll switch to RAID1.

Best wishes,
Atanas



Re: Software RAID5 write performance

2023-01-25 Thread Atanas Vladimirov

On 2023-01-24 23:49, Tobias Fiebig wrote:

Heho,

So, do you use RAID5 and how it behaves on your side?

Well, you found my reddit post. ;-) Since then, it kind-of became a
non-issue (got a somewhat different infrastructure where OpenBSD is
mostly in VMs). Still, the yolo-colo raid-10 (don't do that. seriously.
At least not if you feel attached to your data or are not that much
into restoring full offsite backups) had kind of OK performance.

In any case, i'd like to take a look at that again $somewhen; I have an
SSD-Only box sitting around which should make it into a rack in the
next couple of weeks/months, and then i can give the raid5 on SSD (just
to see where the bottlenecks are) a shot (well, r5-on-virt; But for a
test setup, that should be ok-ish)

With best regards,
Tobias


Thanks, Tobias!

I'm really curious about the performance of SSDs, but I can wait.
Please take your time, and I hope that you will share some results when 
the time comes :)


Best wishes,
Atanas



Software RAID5 write performance

2023-01-24 Thread Atanas Vladimirov

Hi Guys,

I wonder if someone here is using RAID5 with HDD drives and what write 
performance on such discipline is expected?

I have 4x 1T HDDs and can't get more than 10~12 MBps on writing.

I found a Reddit post [1] where the user observed a similar write speed, 
of course, he was using other drives (Model and Size).
My curiosity (and the reason I'm asking here) comes from the fact that 
we are observing very similar speeds.


So, do you use RAID5 and how it behaves on your side?


[1]  
https://www.reddit.com/r/openbsd/comments/srru20/raid5_write_performance/


P.S.: Anyone using RAID5 with SSD drives? How is the write speed there?

Best wishes,
Atanas



Re: OpenSMTPd + Dovecot + Roundcube and sqlite database for credentials

2023-01-14 Thread Atanas Vladimirov

On 2023-01-15 00:31, Maksym Sheremet wrote:

On Sat, Jan 14, 2023 at 05:16:12PM +0200, Atanas Vladimirov wrote:

On 2023-01-14 15:51, Stuart Henderson wrote:
> On 2023-01-14, Atanas Vladimirov  wrote:
> > The problem - I recently found that the Roundcube password plugin
> > starts
> > using $2y$ for blowfish-crypt, which plays well with dovecot but not
> > with opensmtpd.
>
> I've just patched the roundcubemail port (in -current and 7.2-stable) to
> use $2b$.

Thank you so much. I have applied the patch locally and it works like 
a

charm :)

All the best,
Atanas



Might be a little bit late, but I'd like to share an alternative
solution. There is submission protocol support in Dovecot. So one can
have Dovecot listen on port 587 and authenticate submission requests.
Then Dovecot can just pass mail to smtpd for sending from localhost.
Thus smtpd won't need to participate in authentication (unless you use
authentication even for mail sent from localhost).


Hi Maksym,

Thanks for mentioning this option.



Re: OpenSMTPd + Dovecot + Roundcube and sqlite database for credentials

2023-01-14 Thread Atanas Vladimirov

On 2023-01-14 15:51, Stuart Henderson wrote:

On 2023-01-14, Atanas Vladimirov  wrote:
The problem - I recently found that the Roundcube password plugin 
starts

using $2y$ for blowfish-crypt, which plays well with dovecot but not
with opensmtpd.


I've just patched the roundcubemail port (in -current and 7.2-stable) 
to use $2b$.


Thank you so much. I have applied the patch locally and it works like a 
charm :)


All the best,
Atanas



OpenSMTPd + Dovecot + Roundcube and sqlite database for credentials

2023-01-14 Thread Atanas Vladimirov

Hi,

I have the following setup running for a couple of years:

- OpenBSD -current (I have updated to the latest build last night), 
always run -current on my machines


- OpenSMTPd responsive for a few domains and evan less users, nothing 
special in the config - I'm using an sqlite3 database for credentials


```
from /etc/mail/smtpd.conf
table credentials sqlite:/etc/mail/sqlite.conf
listen on all port submission tls-require pki hodor.bsdbg.net auth 
 filter rspamd


/etc/mail/sqlite.conf
dbpath /var/www/etc/mail/mail.sqlite
query_credentials SELECT email, password FROM credentials WHERE email=?;
```

The `mail.sqlite` is in /var/www because of the chroot so that 
roundcubemail can use it, and the users can change their passwords with

roundcube plugin `password`.

- Dovecot is also configured to use that database.
- Roundcubemail as a webmail client.

The problem - I recently found that the Roundcube password plugin starts 
using $2y$ for blowfish-crypt, which plays well with dovecot but not 
with opensmtpd.
Now, if a user changes its password, it won't be able to send emails 
because smtpd can't check the password. Maybe it doesn't know about 
$2y$?


If I update the database and replace the $2y$ with $2b$, everything will 
return to normal.


So, any thoughts or help on this will be appreciated.
Let me know if you need more details from my end.



Re: NAT from LAN to public network from another rdomain

2022-06-22 Thread Atanas Vladimirov

On 2022-06-15 14:42, Atanas Vladimirov wrote:

Hello,

I need advice on how to NAT one subnet (LAN), which is in rdomain 0 to
the public network from rdomain 5.



Hi,

JFTR, I managed to figure it out thanks to more reading :)
What I did was adding the following rules:

```
# move traffic from rdomain 5 to rdomain 0
 match in on rdomain 5 to $IntIf:network rtable 0

# move traffic from rdomain 0 to rdomain 5
 match in on rdomain 0 from $IntIf:network to !172.16.1.0/16 rtable 5

# NAT
  match out log on $ExtIf5 inet from $IntIf:network \
 nat-to ($ExtIf5)
```

Best wishes,
Atanas



NAT from LAN to public network from another rdomain

2022-06-15 Thread Atanas Vladimirov

Hello,

I need advice on how to NAT one subnet (LAN), which is in rdomain 0 to 
the public network from rdomain 5.


I'm in a transition period between migrating from one ISP to another, 
and the setup is as simple as:


- I have one Ethernet port for the public network - this is where my old 
ISP still leaves. The configuration is via DHCP. This is in rdomain 0.


```
[hodor]~$ cat /etc/hostname.em0
inet autoconf
```

from pf.conf, it is the standard match rule

```
# NAT
  match out log on $ExtIf from $IntIf:network \
 nat-to ($ExtIf)
```

- The LAN ($IntIf) is on a bridge with a few Ethernet ports and a 
vether0 interface for the server IP. This is in rdomain 0.


```
[hodor]~$ cat /etc/hostname.bridge0
add vether0
add em1
add em2
up

[hodor]~$ cat /etc/hostname.vether0
up
inet 172.16.1.1/24
```

- Now, I have attached the new ISP (also using DHCP) to one of the free 
Ethernet ports (em5) with disabled DNS, so it doesn't touch the 
/etc/resolv.conf. This is in rdomain 5


```
[hodor]~$ cat /etc/hostname.em5
rdomain 5
inet autoconf

[hodor]~$ cat /etc/dhcpleased.conf
interface em5 {
 ignore dns
}
```

I've put some rules in pf.conf regarding this rdomain

```
## $ExtIf5 inbound
# NTP
  pass in log on $ExtIf5 inet proto {tcp, udp} from any \
 to ($ExtIf5) port ntp
  pass in log on gif4 inet6 proto {tcp, udp} from any \
 to ($IntIf) port ntp

## $ExtIf5 outbound
  pass out log on $ExtIf5 inet proto {tcp, udp, icmp} from ($ExtIf) \
 to any
```

And the public IP is working fine there - you can reach the NTP server, 
or if I execute a command from that rdomain, it works as it should.


- My LAN still uses the old ISP for Internet access and what I want to 
do is to make it use the new one from rdomain 5 and the new ISP.


I spend a few hours reading some examples and trying some configs but 
without any luck.

Could you please point me in the right direction?

This is on OpenBSD-current (not very resent snapshot, but -current :)

Thanks in advance,
Atanas



Re: hw.perfpolicy behavior on desktop/server

2022-05-09 Thread Atanas Vladimirov

On 2022-05-09 20:17, Stuart Henderson wrote:


Currently, you can either set it manually to low speed 
(hw.perfpolicy=manual,

hw.setperf=0), modify the kernel (e.g. with the diff below), or use
obsdfreqd from
packages. The latter is only in -current packages not 7.1, but it could 
be built

from ports.



Thanks, Stuart!

`obsdfreqd` is what I was looking for. It works very well!

Best wishes,
Atanas



hw.perfpolicy behavior on desktop/server

2022-05-09 Thread Atanas Vladimirov

Hi Guys,

I'm running -current.
Recently I noticed (not sure when it changed) that my CPU is not 
throttling anymore. The `hw.perfpolicy` is set to auto and `hw.setperf` 
is always at 100%. I red that there was a change in 7.1:


- Changed the power management sysctl(8) hw.perfpolicy to "auto" at 
startup, defaulting to 100% performance with AC power connected and 
using the auto algorithm when on battery.


So, my question is how I can change that behavior so the throttling is 
working again?

Thanks in advance,
Atanas

~$ sysctl hw
hw.machine=amd64
hw.model=Intel(R) Xeon(R) CPU E3-1270 v3 @ 3.50GHz
hw.ncpu=8
...
hw.cpuspeed=3501
hw.setperf=100
hw.vendor=Supermicro
hw.product=X10SLH-F/X10SLM+-F
hw.version=0123456789
hw.serialno=0123456789
hw.uuid=----0cc47a0b76d4
hw.physmem=34300481536
hw.usermem=34300465152
hw.ncpufound=8
hw.allowpowerdown=1
hw.perfpolicy=auto
hw.smt=0
hw.ncpuonline=4
hw.power=1

Here is a dmesg:

OpenBSD 7.1-current (GENERIC.MP) #502: Sat May  7 21:46:16 MDT 2022
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 34300481536 (32711MB)
avail mem = 33243611136 (31703MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xec280 (37 entries)
bios0: vendor American Megatrends Inc. version "3.4" date 01/21/2021
bios0: Supermicro X10SLH-F/X10SLM+-F
acpi0 at bios0: ACPI 5.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT FIDT SSDT SSDT SSDT SSDT SSDT MCFG 
PRAD HPET SSDT SSDT SPMI DMAR EINJ ERST HEST BERT
acpi0: wakeup devices PEG0(S4) PEGP(S4) PEG1(S4) PEGP(S4) PEG2(S4) 
PEGP(S4) RP01(S4) PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) RP04(S4) 
PXSX(S4) RP05(S4) PXSX(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) Xeon(R) CPU E3-1270 v3 @ 3.50GHz, 3500.70 MHz, 06-3c-03
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,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SRBDS_CTRL,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN

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.4, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Xeon(R) CPU E3-1270 v3 @ 3.50GHz, 3500.00 MHz, 06-3c-03
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,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SRBDS_CTRL,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN

cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Xeon(R) CPU E3-1270 v3 @ 3.50GHz, 3500.00 MHz, 06-3c-03
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,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SRBDS_CTRL,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN

cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Xeon(R) CPU E3-1270 v3 @ 3.50GHz, 3500.00 MHz, 06-3c-03
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,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SRBDS_CTRL,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN

cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 0, core 3, package 0
cpu4 at mainbus0: apid 1 (application processor)
cpu4: Intel(R) Xeon(R) CPU E3-1270 v3 @ 3.50GHz, 3500.00 MHz, 06-3c-03
cpu4: 

Re: Virtual machine and dhcp

2019-12-07 Thread Atanas Vladimirov

Hi Stuart,

Thank you so much for pointing it to me. I have to re-read manual pages 
before asking questions here :)


On 2019-12-07 16:32, Stuart Henderson wrote:

On 2019-12-07, Atanas Vladimirov  wrote:

Bridge0 is my primary lan network where the VMs are connected and the
only interface that is configured with dhclient is em0 which is not 
part

of any bridge.


The dhclient caveat doesn't apply to you then.


Yes, I was almost sure that the dhclient should not affect my setup.

If you change to a standard "pass" rule that will evaluate the 
interface

group at runtime rather than load time, which is what you want here.
Things can get complicated with PF and bridges, but I think something 
like
"pass quick on tap flags any no state" near the start of your rules 
will

probably do what you want.


Thanks, now it works as I wanted.

Best regards,
Atanas



Virtual machine and dhcp

2019-12-07 Thread Atanas Vladimirov

Hi,

I red the FAQ about Virtualization and tried to set up "Option 4 - VMs 
as real hosts on the same network" with DHCP for VM

My question is if the final note:

```
Note: If the host interface (em0 in the above example) is also 
configured using DHCP, dhclient(8) running on that interface may block 
DHCP requests from reaching guest VMs. In this case, you should select a 
different host interface not using DHCP, or terminate any dhclient(8) 
processes assigned to that interface before starting VMs, or use static 
IP addresses for the VMs.

```

is valid for any interface on the host, that is configured to use 
dhclient or only for the interface that is part of the bridge?


My network setup looks like:

[hodor]~$ grep . /etc/hostname.*
/etc/hostname.bridge0:add vether0
/etc/hostname.bridge0:add em1
/etc/hostname.bridge0:add em5
/etc/hostname.bridge0:up

/etc/hostname.bridge1:add vether1
/etc/hostname.bridge1:add em2
/etc/hostname.bridge1:add em3
/etc/hostname.bridge1:add em4
/etc/hostname.bridge1:up

/etc/hostname.em0:description "to the ISP"
/etc/hostname.em0:dhcp

/etc/hostname.em1:up
/etc/hostname.em2:up
/etc/hostname.em3:up
/etc/hostname.em4:up
/etc/hostname.em5:up

/etc/hostname.pflog1:up
/etc/hostname.pflog1:description "spamlogd logging interface"

/etc/hostname.vether0:up
/etc/hostname.vether0:inet 172.16.1.1/24

/etc/hostname.vether1:up
/etc/hostname.vether1:inet 172.16.255.254/24

Bridge0 is my primary lan network where the VMs are connected and the 
only interface that is configured with dhclient is em0 which is not part 
of any bridge. I have the following in /etc/vm.conf


```
[hodor]~$ doas cat /etc/vm.conf
switch "uplink" {
interface bridge0
}

ROOT="/home/vlado/vm"

vm "dvm" {
disable
memory 4G
disk $ROOT/debian.qcow2 format "qcow2"
interface { switch "uplink" }
owner vlado:vlado
}
```

And in /etc/pf.conf

```
 set skip on { lo, enc0, em1, em2, em3, em4, em5, gif0, tap }
```
i.e. the filtering is happening only on the em0 and vether interfaces.

The problem is that the VM doesn't lease anything from the DHCP server 
(dhcpd_flags=vether0) until I reload the pf rules with `pfctl -f 
/etc/pf.conf`.
If I set the IP address on the guest manually - it works without 
reloading the pf.


Please confirm if this behavior is expected because it's not getting 
very clear from the FAQ.

Thanks in advance,

P.S.: This is on -current:

  OpenBSD 6.6-current (GENERIC.MP) #505: Tue Dec  3 02:25:26 MST 2019
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 34300661760 (32711MB)
avail mem = 33248731136 (31708MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xec280 (37 entries)
bios0: vendor American Megatrends Inc. version "3.2a" date 05/31/2019



Re: tmux: How to create a new window with the same path (from the current pane)

2019-12-07 Thread Atanas Vladimirov

On 2019-11-26 17:38, Anders Damsgaard wrote:

* Atanas Vladimirov  [2019-11-26 17:10:14 +0200]:

So, if I understand your example right, I need to do something like 
`bind c new-window -c "$PWD"` in my .tmux.conf.
The problem is that it works partially - if I'm in 
`/home//` and start tmux there,
the $PWD is correct, but when I change the directory and create a new 
window with `C-b c` it moves me to the initial $PWD (when the tmux was 
started)

instead of the current directory.


I don't bind in .tmux.conf, but you could do:

bind c send-keys "tmux new-window -c \"$(pwd)\"" C-m
bind C send-keys "tmux split-pane -c \"$(pwd)\"" C-m

but it needs a shell prompt in the currently active pane.

Cheers, Anders


Thanks Anders,
That works as it should :)



Re: tmux: How to create a new window with the same path (from the current pane)

2019-11-26 Thread Atanas Vladimirov

On 2019-11-26 16:27, Anders Damsgaard wrote:

* Atanas Vladimirov  [2019-11-26 14:27:33 +0200]:


Hello,

The following works on Linux:

```
bind c new-window -c "#{pane_current_path}"

```

but the `pane_current_path` variable does not exists on OpenBSD.
Does anyone now how can I achieve the same behavior on OpenBSD?


Hi Atanas,

I recently asked Nicolas Marriott the same question on Freenode/#tmux. 
The

pane_current_path functionality is disabled on OpenBSD because of
security reasons.

For that reason I added the following function to my ~/.profile.  
However,

it does not enable splitting without sending current processes to
background:

tsplit() {
if [ -z "$TMUX" ]; then
echo "error: not in tmux session" >&2
return 1
fi
if [ $# -gt 0 ]; then
if [ "$1" = "v" ]; then
tmux split-pane -v -c "$PWD"
elif [ "$1" = "h" ]; then
tmux split-pane -h -c "$PWD"
elif [ "$1" = "w" ]; then
tmux new-window -c "$PWD"
else
echo "error: split direction not understood" >&2
return 2
fi
else
tmux split-pane -h -c $PWD
fi
}

Best, Anders


Hi Anders,

Thanks for your reply.
So, if I understand your example right, I need to do something like 
`bind c new-window -c "$PWD"` in my .tmux.conf.
The problem is that it works partially - if I'm in 
`/home//` and start tmux there,
the $PWD is correct, but when I change the directory and create a new 
window with `C-b c` it moves me to the initial $PWD (when the tmux was 
started)

instead of the current directory.

Does anyone know how to make it work as I desire, or it's not possible?
Thanks in advance,
Atanas






tmux: How to create a new window with the same path (from the current pane)

2019-11-26 Thread Atanas Vladimirov

Hello,

The following works on Linux:

```
bind c new-window -c "#{pane_current_path}"

```

but the `pane_current_path` variable does not exists on OpenBSD.
Does anyone now how can I achieve the same behavior on OpenBSD?

Many thanks,
Atanas



Re: OpenSMTPd: "mail.lmtp: connect: Connection refused"

2018-10-21 Thread Atanas Vladimirov

On 2018-10-21 21:17, Gilles Chehade wrote:

On Wed, Oct 17, 2018 at 10:44:19PM +0300, Atanas Vladimirov wrote:

Hi misc,

Please, let me know if this mailing list is not the right place for 
this

question.

I'm following -current and I found that maybe something is wrong with 
my

setup.
When the server boots the first time after an upgrade the emails from 
the

installer are lost because of `result=PermFail stat=Error ("mail.lmtp:
connect: Connection refused")`.
I did a few tests and the problem appears when the dovecot is not 
running

(or before it's been started during the boot cycle).



hi,

for the record, the mail.lmtp mda was being too strict about the 
connect

failures.

this was not an issue before because smtpd was being extremely 
cautious,
handling all MDA failures as TempFail but this came with other issues 
so
in 6.4 we aligned with Postfix handling only some exit codes as 
tempfail

and all others as permfail.

diff going to the tree in a minute, tested by Atanas ;-)


Thanks for your fast reaction! Case closed :)



OpenSMTPd: "mail.lmtp: connect: Connection refused"

2018-10-17 Thread Atanas Vladimirov

Hi misc,

Please, let me know if this mailing list is not the right place for this 
question.


I'm following -current and I found that maybe something is wrong with my 
setup.
When the server boots the first time after an upgrade the emails from 
the installer are lost because of `result=PermFail stat=Error 
("mail.lmtp: connect: Connection refused")`.
I did a few tests and the problem appears when the dovecot is not 
running (or before it's been started during the boot cycle).


Here is an example from maillog:

Oct 17 22:22:31 hodor smtpd[78869]: a7712b562c43b7b1 smtp connected 
address=local host=hodor.bsdbg.net
Oct 17 22:22:32 hodor smtpd[78869]: a7712b562c43b7b1 smtp message 
address=local host=hodor.bsdbg.net msgid=704c1aab 
from= to= size=328 ndest=1 
proto=ESMTP
Oct 17 22:22:32 hodor smtpd[78869]: a7712b562c43b7b1 smtp disconnected 
address=local host=hodor.bsdbg.net reason=quit
Oct 17 22:22:32 hodor smtpd[78869]:  mda delivery 
evpid=704c1aabd946b708 from= to= 
rcpt= user=vmail delay=0s result=PermFail stat=Error 
("mail.lmtp: connect: Connection refused")
Oct 17 22:22:33 hodor smtpd[78869]: a7712b5a30d2accc smtp connected 
address=local host=hodor.bsdbg.net
Oct 17 22:22:33 hodor smtpd[78869]: a7712b5a30d2accc smtp message 
address=local host=hodor.bsdbg.net msgid=65c0ef95 from=<> 
to= size=1634 ndest=1 proto=ESMTP
Oct 17 22:22:33 hodor smtpd[78869]: a7712b5a30d2accc smtp disconnected 
address=local host=hodor.bsdbg.net reason=quit
Oct 17 22:22:33 hodor smtpd[78869]:  mda delivery 
evpid=65c0ef9534eb622c from=<> to= 
rcpt= user=vmail delay=0s result=PermFail 
stat=Error ("mail.lmtp: connect: Connection refused")

Oct 17 22:22:33 hodor smtpd[10845]: warn: queue: no return path!

The smtpd.conf follows:

pki hodor.bsdbg.net cert "/etc/ssl/bsdbg.fullchain.pem"
pki hodor.bsdbg.net key "/etc/ssl/private/bsdbg.key"
table aliases file:/etc/mail/aliases
table domains file:/etc/mail/domains
table virtuals file:/etc/mail/virtuals
table credentials sqlite:/etc/mail/sqlite.conf
listen on lo0
listen on vether0 port submission tls pki hodor.bsdbg.net auth 


listen on egress tls pki hodor.bsdbg.net
listen on egress port submission tls-require pki hodor.bsdbg.net auth 


action "local" lmtp "/var/dovecot/lmtp" rcpt-to alias 
action "virtual" lmtp "/var/dovecot/lmtp" rcpt-to virtual 
action "relay" relay
match from local for local action "local"
match from any for domain  action "virtual"
match from local for any action "relay"

Do you know what has been changed in smtpd so my setup is not working as 
expected anymore?

Thanks in advance!
Atanas

dmesg:

OpenBSD 6.4 (GENERIC.MP) #364: Thu Oct 11 13:30:23 MDT 2018
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 1713408 (16340MB)
avail mem = 16605519872 (15836MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xeb5a0 (56 entries)
bios0: vendor American Megatrends Inc. version "2.3" date 06/12/2018
bios0: Supermicro X9SCL/X9SCM
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP APIC FPDT MCFG HPET SSDT SPMI SSDT SSDT DMAR 
EINJ ERST HEST BERT
acpi0: wakeup devices PS2K(S4) UAR1(S4) UAR2(S4) P0P1(S4) USB1(S4) 
USB2(S4) USB3(S4) USB4(S4) USB5(S4) USB6(S4) USB7(S4) PXSX(S4) RP01(S4) 
PXSX(S4) RP02(S4) PXSX(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) Xeon(R) CPU E3-1230 V2 @ 3.30GHz, 3293.17 MHz, 06-3a-09
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,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN

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, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Xeon(R) CPU E3-1230 V2 @ 3.30GHz, 3292.53 MHz, 06-3a-09
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,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN

cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Xeon(R) CPU E3-1230 V2 @ 3.30GHz, 3292.52 MHz, 06-3a-09
cpu2: 

Re: OSPF over gif on top of IPsec transport -current

2018-03-10 Thread Atanas Vladimirov

On 2018-03-10 00:01, Remi Locherer wrote:

On Fri, Mar 09, 2018 at 06:13:10PM +0100, Remi Locherer wrote:

On Sun, Mar 04, 2018 at 01:08:21PM +0200, Atanas Vladimirov wrote:
> Hi,
>
> I can't make OSPF to work on gif over IPsec.
> With tcpdump on gif I see the OSPFv2-hello only from localhost:
>
> # R1
> [ns]~$ tcpdump -nei gif0
> tcpdump: listening on gif0, link-type LOOP
> 23:19:29.181685 10.255.255.2 > 224.0.0.5: OSPFv2-hello  44: rtrid
> 192.168.1.1 area 0.0.0.1 [tos 0xc0] [ttl 1]
> 23:19:39.192025 10.255.255.2 > 224.0.0.5: OSPFv2-hello  44: rtrid
> 192.168.1.1 area 0.0.0.1 [tos 0xc0] [ttl 1]
> 23:19:49.202372 10.255.255.2 > 224.0.0.5: OSPFv2-hello  44: rtrid
> 192.168.1.1 area 0.0.0.1 [tos 0xc0] [ttl 1]
> 23:19:59.212730 10.255.255.2 > 224.0.0.5: OSPFv2-hello  44: rtrid
> 192.168.1.1 area 0.0.0.1 [tos 0xc0] [ttl 1]
> 23:20:09.223064 10.255.255.2 > 224.0.0.5: OSPFv2-hello  44: rtrid
> 192.168.1.1 area 0.0.0.1 [tos 0xc0] [ttl 1]
> 23:20:19.233393 10.255.255.2 > 224.0.0.5: OSPFv2-hello  44: rtrid
> 192.168.1.1 area 0.0.0.1 [tos 0xc0] [ttl 1]
>
> # R2
> [hodor]~$ tcpdump -nei gif0
> tcpdump: listening on gif0, link-type LOOP
> 12:51:59.316704 10.255.255.1 > 224.0.0.5: OSPFv2-hello  44: rtrid 172.16.1.1
> backbone [tos 0xc0] [ttl 1]
> 12:52:09.327002 10.255.255.1 > 224.0.0.5: OSPFv2-hello  44: rtrid 172.16.1.1
> backbone [tos 0xc0] [ttl 1]
> 12:52:19.337314 10.255.255.1 > 224.0.0.5: OSPFv2-hello  44: rtrid 172.16.1.1
> backbone [tos 0xc0] [ttl 1]
>
> While on enc0 both hello's appears (not sure if `bad ip cksum` is the reason
> for my issues):
>
> # R1
> [ns]~$ tcpdump -nvi enc0
> tcpdump: listening on enc0, link-type ENC
> 12:24:37.625873 (authentic,confidential): SPI 0x11af4dae: 93.123.39.67 >
> 95.87.227.232: 10.255.255.1 > 224.0.0.5: OSPFv2-hello  44: rtrid 172.16.1.1
> backbone E mask 255.255.255.255 int 10 pri 1 dead 40 nbrs [tos 0xc0] [ttl 1]
> (id 25841, len 64) (ttl 60, id 37752, len 84)
> 12:24:41.882173 (authentic,confidential): SPI 0x1a3fbc6d: 95.87.227.232 >
> 93.123.39.67: 10.255.255.2 > 224.0.0.5: OSPFv2-hello  44: rtrid 192.168.1.1
> backbone E mask 255.255.255.255 int 10 pri 1 dead 40 nbrs [tos 0xc0] [ttl 1]
> (id 27818, len 64) (ttl 64, id 60563, len 84, bad ip cksum 32d7! -> c614)
> 12:24:47.636188 (authentic,confidential): SPI 0x11af4dae: 93.123.39.67 >
> 95.87.227.232: 10.255.255.1 > 224.0.0.5: OSPFv2-hello  44: rtrid 172.16.1.1
> backbone E mask 255.255.255.255 int 10 pri 1 dead 40 nbrs [tos 0xc0] [ttl 1]
> (id 36067, len 64) (ttl 60, id 65348, len 84)
> 12:24:51.892467 (authentic,confidential): SPI 0x1a3fbc6d: 95.87.227.232 >
> 93.123.39.67: 10.255.255.2 > 224.0.0.5: OSPFv2-hello  44: rtrid 192.168.1.1
> backbone E mask 255.255.255.255 int 10 pri 1 dead 40 nbrs [tos 0xc0] [ttl 1]
> (id 5127, len 64) (ttl 64, id 12476, len 84, bad ip cksum 201! -> 81ec)
> 12:24:57.646535 (authentic,confidential): SPI 0x11af4dae: 93.123.39.67 >
> 95.87.227.232: 10.255.255.1 > 224.0.0.5: OSPFv2-hello  44: rtrid 172.16.1.1
> backbone E mask 255.255.255.255 int 10 pri 1 dead 40 nbrs [tos 0xc0] [ttl 1]
> (id 39220, len 64) (ttl 60, id 1938, len 84)
>
> # R2
> [hodor]~$ tcpdump -nvi enc0 | grep OSPF
> tcpdump: listening on enc0, link-type ENC
> 12:28:57.894007 (authentic,confidential): SPI 0x11af4dae: 93.123.39.67 >
> 95.87.227.232: 10.255.255.1 > 224.0.0.5: OSPFv2-hello  44: rtrid 172.16.1.1
> backbone E mask 255.255.255.255 int 10 pri 1 dead 40 nbrs [tos 0xc0] [ttl 1]
> (id 3667, len 64) (ttl 64, id 14037, len 84, bad ip cksum 2b6d! -> 7bd3)
> 12:29:02.151763 (authentic,confidential): SPI 0x1a3fbc6d: 95.87.227.232 >
> 93.123.39.67: 10.255.255.2 > 224.0.0.5: OSPFv2-hello  44: rtrid 192.168.1.1
> backbone E mask 25
> 5.255.255.255 int 10 pri 1 dead 40 nbrs [tos 0xc0] [ttl 1] (id 16974, len
> 64) (ttl 60, id 21648, len 84)
> 12:29:07.904315 (authentic,confidential): SPI 0x11af4dae: 93.123.39.67 >
> 95.87.227.232: 10.255.255.1 > 224.0.0.5: OSPFv2-hello  44: rtrid 172.16.1.1
> backbone E mask 255
> .255.255.255 int 10 pri 1 dead 40 nbrs [tos 0xc0] [ttl 1] (id 45590, len 64)
> (ttl 64, id 35262, len 84, bad ip cksum 2743! -> 28ea)
> 12:29:12.162049 (authentic,confidential): SPI 0x1a3fbc6d: 95.87.227.232 >
> 93.123.39.67: 10.255.255.2 > 224.0.0.5: OSPFv2-hello  44: rtrid 192.168.1.1
> backbone E mask 25
> 5.255.255.255 int 10 pri 1 dead 40 nbrs [tos 0xc0] [ttl 1] (id 19966, len
> 64) (ttl 60, id 3134, len 84)
> 12:29:17.914621 (authentic,confidential): SPI 0x11af4dae: 93.123.39.67 >
> 95.87.227.232: 10.255.255.1 > 224.0.0.5: OSPFv2-hello  44: rtrid 172.16.1.1
> backbone E mask 255
> .255.255.255 int 10 pri 1 dead 40 nbrs [tos 0xc0] [ttl 1] (id 36161, len 64)
&g

Re: ld.so: openvpn: can't load library 'liblzo2.so.1.0'

2018-03-05 Thread Atanas Vladimirov

On 2018-03-05 13:35, Stuart Henderson wrote:

On 2018-03-05, Atanas Vladimirov <vl...@bsdbg.net> wrote:

Hi,

Bringing up an old thread to let you know that the problem is still
present in -current snapshot.


Did you try jca's suggestion?

!env LD_LIBRARY_PATH=/usr/lib:/usr/local/lib /usr/local/sbin/openvpn
--daemon --config /etc/dn42-w0h.ovpn


Yes, with jca's suggestion it's working as it should.



Re: ld.so: openvpn: can't load library 'liblzo2.so.1.0'

2018-03-05 Thread Atanas Vladimirov

Hi,

Bringing up an old thread to let you know that the problem is still 
present in -current snapshot.

Shall I send a proper bug report to bugs@?
Thanks.

starting network
em0: bound to 95.87.227.232 from 95.87.227.225 (64:87:88:58:b2:b8)
ld.so loading: 'openvpn'
exe load offset:  0x1288d030
 flags /usr/local/sbin/openvpn = 0x0
head /usr/local/sbin/openvpn
obj /usr/local/sbin/openvpn has /usr/local/sbin/openvpn as head
examining: '/usr/local/sbin/openvpn'
loading: libc.so.92.3 required by /usr/local/sbin/openvpn
 flags /usr/lib/libc.so.92.3 = 0x0
obj /usr/lib/libc.so.92.3 has /usr/local/sbin/openvpn as head
loading: libcrypto.so.42.7 required by /usr/local/sbin/openvpn
 flags /usr/lib/libcrypto.so.42.7 = 0x0
obj /usr/lib/libcrypto.so.42.7 has /usr/local/sbin/openvpn as head
loading: libssl.so.44.8 required by /usr/local/sbin/openvpn
 flags /usr/lib/libssl.so.44.8 = 0x0
obj /usr/lib/libssl.so.44.8 has /usr/local/sbin/openvpn as head
loading: liblz4.so.2.0 required by /usr/local/sbin/openvpn
ld.so: openvpn: can't load library 'liblz4.so.2.0'
Killed
reordering libraries: done.

# dmesg

OpenBSD 6.3-beta (GENERIC.MP) #26: Fri Mar  2 22:56:04 MST 2018
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8544153600 (8148MB)
avail mem = 8278175744 (7894MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xeb5a0 (56 entries)
bios0: vendor American Megatrends Inc. version "2.2" date 02/20/2015
bios0: Supermicro X9SCL/X9SCM
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP APIC FPDT MCFG HPET SSDT SPMI SSDT SSDT EINJ 
ERST HEST BERT
acpi0: wakeup devices UAR1(S4) UAR2(S4) P0P1(S4) USB1(S4) USB2(S4) 
USB3(S4) USB4(S4) USB5(S4) USB6(S4) USB7(S4) 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) Celeron(R) CPU G1620T @ 2.40GHz, 2400.33 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,POPCNT,DEADLINE,XSAVE,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT,MELTDOWN

cpu0: 256KB 64b/line 8-way L2 cache
acpitimer0: recalibrated TSC frequency 2400013797 Hz
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 100MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Celeron(R) CPU G1620T @ 2.40GHz, 2400.03 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,POPCNT,DEADLINE,XSAVE,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT,MELTDOWN

cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xe000, bus 0-255
acpihpet0 at acpi0: 14318179 Hz
acpihpet0: recalibrated TSC frequency 2400017759 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 3 (P0P1)
acpiprt2 at acpi0: bus 1 (RP01)
acpiprt3 at acpi0: bus -1 (RP02)
acpiprt4 at acpi0: bus -1 (RP03)
acpiprt5 at acpi0: bus -1 (RP04)
acpiprt6 at acpi0: bus 2 (RP05)
acpiprt7 at acpi0: bus -1 (RP06)
acpiprt8 at acpi0: bus -1 (RP07)
acpiprt9 at acpi0: bus -1 (RP08)
acpiprt10 at acpi0: bus -1 (PEG0)
acpiprt11 at acpi0: bus -1 (PEG1)
acpiprt12 at acpi0: bus -1 (PEG2)
acpiprt13 at acpi0: bus -1 (PEG3)
acpiec0 at acpi0: not present
acpicpu0 at acpi0: C3(350@80 mwait.1@0x20), C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: C3(350@80 mwait.1@0x20), C1(1000@1 mwait.1), PSS
acpipwrres0 at acpi0: FN00, resource for FAN0
acpipwrres1 at acpi0: FN01, resource for FAN1
acpipwrres2 at acpi0: FN02, resource for FAN2
acpipwrres3 at acpi0: FN03, resource for FAN3
acpipwrres4 at acpi0: FN04, resource for FAN4
acpitz0 at acpi0: critical temperature is 92 degC
acpitz1 at acpi0: critical temperature is 92 degC
"INT3F0D" at acpi0 not configured
"IPI0001" at acpi0 not configured
acpibtn0 at acpi0: PWRB
"PNP0C0B" at acpi0 not configured
"PNP0C0B" at acpi0 not configured
"PNP0C0B" at acpi0 not configured
"PNP0C0B" at acpi0 not configured
"PNP0C0B" at acpi0 not configured
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: DD01
acpivout at acpivideo0 not configured
acpivout at acpivideo0 not configured
acpivout at acpivideo0 not configured
acpivout at acpivideo0 not configured
acpivout at acpivideo0 not configured
acpivout at acpivideo0 not configured
acpivout at acpivideo0 not configured
ipmi at mainbus0 not configured
cpu0: Enhanced SpeedStep 2400 MHz: speeds: 2400, 2300, 2200, 2100, 2000, 
1900, 1800, 1700, 1600 MHz

pci0 at mainbus0 bus 0
pchb0 at pci0 

Re: OSPF over gif on top of IPsec transport -current

2018-03-04 Thread Atanas Vladimirov

On 2018-03-04 13:31, Stefan Sperling wrote:

On Sun, Mar 04, 2018 at 01:08:21PM +0200, Atanas Vladimirov wrote:

Please, let me know if I'm doing something wrong/stupid or this is bug
somewhere in the stack.


I can't spot anything wrong in what you've shown but it seems you're
not looking at all the data you could be looking at.

What might help with diagnosing the issue is monitoring the output of:

netstat -I gif0
netstat -I enc0

and:
netstat -s

Look closely at how the counters change, and find the ones which
could relate to an OSPF packet being dropped.

Also, check if pf is dropping related packets by logging any blocking
rules and checking pflog0 with tcpdump as well.


Hi Stefan,

I forgot to mention that both gif0 and enc0 are disable in pf.conf (set 
skip on {...}).

Also I have a `pass quick log proto ospf` rule.

With `netstat` I observe the same behavior, packets going out on gif0 - 
no packets in.


ns]~$ netstat -I gif0
NameMtu   Network Address  Ipkts IerrsOpkts 
Oerrs Colls
gif01400 0 0 8142 
0 0
gif01400  10.255.255. 10.255.255.2 0 0 8142 
0 0

[ns]~$ netstat -I enc0
NameMtu   Network Address  Ipkts IerrsOpkts 
Oerrs Colls
enc0*   0 8820 0 8870 
0 0


I'll try to take a deeper look on this.
Thanks for your time and effort,
Atanas



OSPF over gif on top of IPsec transport -current

2018-03-04 Thread Atanas Vladimirov

Hi,

I can't make OSPF to work on gif over IPsec.
With tcpdump on gif I see the OSPFv2-hello only from localhost:

# R1
[ns]~$ tcpdump -nei gif0
tcpdump: listening on gif0, link-type LOOP
23:19:29.181685 10.255.255.2 > 224.0.0.5: OSPFv2-hello  44: rtrid 
192.168.1.1 area 0.0.0.1 [tos 0xc0] [ttl 1]
23:19:39.192025 10.255.255.2 > 224.0.0.5: OSPFv2-hello  44: rtrid 
192.168.1.1 area 0.0.0.1 [tos 0xc0] [ttl 1]
23:19:49.202372 10.255.255.2 > 224.0.0.5: OSPFv2-hello  44: rtrid 
192.168.1.1 area 0.0.0.1 [tos 0xc0] [ttl 1]
23:19:59.212730 10.255.255.2 > 224.0.0.5: OSPFv2-hello  44: rtrid 
192.168.1.1 area 0.0.0.1 [tos 0xc0] [ttl 1]
23:20:09.223064 10.255.255.2 > 224.0.0.5: OSPFv2-hello  44: rtrid 
192.168.1.1 area 0.0.0.1 [tos 0xc0] [ttl 1]
23:20:19.233393 10.255.255.2 > 224.0.0.5: OSPFv2-hello  44: rtrid 
192.168.1.1 area 0.0.0.1 [tos 0xc0] [ttl 1]


# R2
[hodor]~$ tcpdump -nei gif0
tcpdump: listening on gif0, link-type LOOP
12:51:59.316704 10.255.255.1 > 224.0.0.5: OSPFv2-hello  44: rtrid 
172.16.1.1 backbone [tos 0xc0] [ttl 1]
12:52:09.327002 10.255.255.1 > 224.0.0.5: OSPFv2-hello  44: rtrid 
172.16.1.1 backbone [tos 0xc0] [ttl 1]
12:52:19.337314 10.255.255.1 > 224.0.0.5: OSPFv2-hello  44: rtrid 
172.16.1.1 backbone [tos 0xc0] [ttl 1]


While on enc0 both hello's appears (not sure if `bad ip cksum` is the 
reason for my issues):


# R1
[ns]~$ tcpdump -nvi enc0
tcpdump: listening on enc0, link-type ENC
12:24:37.625873 (authentic,confidential): SPI 0x11af4dae: 93.123.39.67 > 
95.87.227.232: 10.255.255.1 > 224.0.0.5: OSPFv2-hello  44: rtrid 
172.16.1.1 backbone E mask 255.255.255.255 int 10 pri 1 dead 40 nbrs 
[tos 0xc0] [ttl 1] (id 25841, len 64) (ttl 60, id 37752, len 84)
12:24:41.882173 (authentic,confidential): SPI 0x1a3fbc6d: 95.87.227.232 
> 93.123.39.67: 10.255.255.2 > 224.0.0.5: OSPFv2-hello  44: rtrid 192.168.1.1 backbone E mask 255.255.255.255 int 10 pri 1 dead 40 nbrs [tos 0xc0] [ttl 1] (id 27818, len 64) (ttl 64, id 60563, len 84, bad ip cksum 32d7! -> c614)
12:24:47.636188 (authentic,confidential): SPI 0x11af4dae: 93.123.39.67 > 
95.87.227.232: 10.255.255.1 > 224.0.0.5: OSPFv2-hello  44: rtrid 
172.16.1.1 backbone E mask 255.255.255.255 int 10 pri 1 dead 40 nbrs 
[tos 0xc0] [ttl 1] (id 36067, len 64) (ttl 60, id 65348, len 84)
12:24:51.892467 (authentic,confidential): SPI 0x1a3fbc6d: 95.87.227.232 
> 93.123.39.67: 10.255.255.2 > 224.0.0.5: OSPFv2-hello  44: rtrid 192.168.1.1 backbone E mask 255.255.255.255 int 10 pri 1 dead 40 nbrs [tos 0xc0] [ttl 1] (id 5127, len 64) (ttl 64, id 12476, len 84, bad ip cksum 201! -> 81ec)
12:24:57.646535 (authentic,confidential): SPI 0x11af4dae: 93.123.39.67 > 
95.87.227.232: 10.255.255.1 > 224.0.0.5: OSPFv2-hello  44: rtrid 
172.16.1.1 backbone E mask 255.255.255.255 int 10 pri 1 dead 40 nbrs 
[tos 0xc0] [ttl 1] (id 39220, len 64) (ttl 60, id 1938, len 84)


# R2
[hodor]~$ tcpdump -nvi enc0 | grep OSPF
tcpdump: listening on enc0, link-type ENC
12:28:57.894007 (authentic,confidential): SPI 0x11af4dae: 93.123.39.67 > 
95.87.227.232: 10.255.255.1 > 224.0.0.5: OSPFv2-hello  44: rtrid 
172.16.1.1 backbone E mask 255.255.255.255 int 10 pri 1 dead 40 nbrs 
[tos 0xc0] [ttl 1] (id 3667, len 64) (ttl 64, id 14037, len 84, bad ip 
cksum 2b6d! -> 7bd3)
12:29:02.151763 (authentic,confidential): SPI 0x1a3fbc6d: 95.87.227.232 
> 93.123.39.67: 10.255.255.2 > 224.0.0.5: OSPFv2-hello  44: rtrid 192.168.1.1 backbone E mask 25
5.255.255.255 int 10 pri 1 dead 40 nbrs [tos 0xc0] [ttl 1] (id 16974, 
len 64) (ttl 60, id 21648, len 84)
12:29:07.904315 (authentic,confidential): SPI 0x11af4dae: 93.123.39.67 > 
95.87.227.232: 10.255.255.1 > 224.0.0.5: OSPFv2-hello  44: rtrid 
172.16.1.1 backbone E mask 255
.255.255.255 int 10 pri 1 dead 40 nbrs [tos 0xc0] [ttl 1] (id 45590, len 
64) (ttl 64, id 35262, len 84, bad ip cksum 2743! -> 28ea)
12:29:12.162049 (authentic,confidential): SPI 0x1a3fbc6d: 95.87.227.232 
> 93.123.39.67: 10.255.255.2 > 224.0.0.5: OSPFv2-hello  44: rtrid 192.168.1.1 backbone E mask 25
5.255.255.255 int 10 pri 1 dead 40 nbrs [tos 0xc0] [ttl 1] (id 19966, 
len 64) (ttl 60, id 3134, len 84)
12:29:17.914621 (authentic,confidential): SPI 0x11af4dae: 93.123.39.67 > 
95.87.227.232: 10.255.255.1 > 224.0.0.5: OSPFv2-hello  44: rtrid 
172.16.1.1 backbone E mask 255
.255.255.255 int 10 pri 1 dead 40 nbrs [tos 0xc0] [ttl 1] (id 36161, len 
64) (ttl 64, id 53105, len 84, bad ip cksum fcb8! -> e336)
12:29:22.172468 (authentic,confidential): SPI 0x1a3fbc6d: 95.87.227.232 
> 93.123.39.67: 10.255.255.2 > 224.0.0.5: OSPFv2-hello  44: rtrid 192.168.1.1 backbone E mask 25
5.255.255.255 int 10 pri 1 dead 40 nbrs [tos 0xc0] [ttl 1] (id 36221, 
len 64) (ttl 60, id 29514, len 84)


If I set a static routes the regular traffic flows as it should.

The configs are the same on both routers:

# R1
[ns]~$ doas cat /etc/ipsec.conf
local_ip="95.87.227.232"
remote_ip="93.123.39.67"
ike esp transport from $local_ip to $remote_ip

# R2
[hodor]~$ doas cat /etc/ipsec.conf
local_ip="93.123.39.67"

Re: OpenSMTPd error "io-error: No SSL error"

2017-12-20 Thread Atanas Vladimirov

On 2017-11-06 23:22, Gabriel Kihlman wrote:

Atanas Vladimirov <vl...@bsdbg.net> writes:


First, sorry that I'm reporting this issue so late, but I spotted it
before a few days.
It seems that my surveillance webcam stopped to notify me via email
with the following messages in maillog:


Nov  5 15:59:34 hodor smtpd[59494]: 2847e02c4337309e smtp
event=connected address=172.16.1.8 host=attic.bsdbg.net
Nov  5 15:59:35 hodor smtpd[59494]: 2847e02c4337309e smtp event=closed
address=172.16.1.8 host=attic.bsdbg.net reason="io-error: No SSL
error"



I am also seeing this after upgrading to 6.2.

# grep -c "io-error: No SSL error" maillog
82
# zgrep -c "io-error: No SSL error" maillog.0.gz
999
# zgrep -c "io-error: No SSL error" maillog.1.gz
1152



Hi,

After upgrade to:

OpenBSD 6.2-current (GENERIC.MP) #241: Sat Dec  2 12:41:37 MST 2017
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP

the problem seems to be fixed. I'm receiving the emails again.
Thanks,
Atanas



OpenSMTPd error "io-error: No SSL error"

2017-11-05 Thread Atanas Vladimirov

Hello misc,

First, sorry that I'm reporting this issue so late, but I spotted it 
before a few days.
It seems that my surveillance webcam stopped to notify me via email with 
the following messages in maillog:



Nov  5 15:59:34 hodor smtpd[59494]: 2847e02c4337309e smtp 
event=connected address=172.16.1.8 host=attic.bsdbg.net
Nov  5 15:59:35 hodor smtpd[59494]: 2847e02c4337309e smtp event=closed 
address=172.16.1.8 host=attic.bsdbg.net reason="io-error: No SSL error"



The webcam logs the following:


Nov  5 14:12:30 attic.bsdbg.net sSMTP[31831]: Set Root="at...@bsdbg.net"
Nov  5 14:12:30 attic.bsdbg.net sSMTP[31831]: Set MailHub="172.16.1.1"
Nov  5 14:12:30 attic.bsdbg.net sSMTP[31831]: Set RemotePort="587"
Nov  5 14:12:30 attic.bsdbg.net sSMTP[31831]: Set RewriteDomain=""
Nov  5 14:12:30 attic.bsdbg.net sSMTP[31831]: Set HostName="172.16.1.1"
Nov  5 14:12:30 attic.bsdbg.net sSMTP[31831]: Set 
AuthUser="u...@bsdbg.net"

Nov  5 14:12:30 attic.bsdbg.net sSMTP[31831]: Set AuthPass="Password"
Nov  5 14:12:30 attic.bsdbg.net sSMTP[31831]: Set 
FromLineOverride="True"

Nov  5 14:12:30 attic.bsdbg.net sSMTP[31831]: Set UseSTARTTLS="True"
Nov  5 14:12:30 attic.bsdbg.net sSMTP[31831]: Set MailHub="172.16.1.1"
Nov  5 14:12:30 attic.bsdbg.net sSMTP[31831]: via SMTP Port Number="587"
Nov  5 14:12:31 attic.bsdbg.net sSMTP[31831]: Creating SSL connection to 
host
Nov  5 14:12:31 attic.bsdbg.net sSMTP[31831]: 220 hodor.bsdbg.net ESMTP 
OpenSMTPD

Nov  5 14:12:31 attic.bsdbg.net sSMTP[31831]: EHLO 172.16.1.1
Nov  5 14:12:31 attic.bsdbg.net sSMTP[31831]: 250 HELP
Nov  5 14:12:31 attic.bsdbg.net sSMTP[31831]: STARTTLS
Nov  5 14:12:31 attic.bsdbg.net sSMTP[31831]: 220 2.0.0: Ready to start 
TLS

Nov  5 14:12:32 attic.bsdbg.net sSMTP[31831]: Cannot open 172.16.1.1:587
Nov  5 14:12:32 attic.bsdbg.net sSMTP[31831]: Can't open //dead.letter 
failing horribly!



When I checked the logs on the server, last successfully sent message 
was on September 10,

just before I moved to a newer snapshot (from Aug 26 to Sep 9):

==
/etc/motd diffs (-OLD  +NEW)
==
--- /var/backups/etc_motd.currentMon Aug 28 01:30:39 2017
+++ /etc/motdSun Sep 10 09:53:39 2017
@@ -1,4 +1,4 @@
-OpenBSD 6.2-beta (GENERIC.MP) #46: Sat Aug 26 12:14:12 MDT 2017
+OpenBSD 6.2-beta (GENERIC.MP) #85: Sat Sep  9 17:44:54 MDT 2017

Here is how a successful delivery looks like:


Sep 10 06:56:54 hodor smtpd[41890]: cf24b009186225a0 smtp 
event=connected address=172.16.1.8 host=attic.bsdbg.net
Sep 10 06:57:01 hodor smtpd[41890]: cf24b009186225a0 smtp event=starttls 
address=172.16.1.8 host=attic.bsdbg.net ciphers="version=TLSv1, 
cipher=AES256-SHA, bits=256"
Sep 10 06:57:02 hodor smtpd[41890]: cf24b009186225a0 smtp 
event=authentication user=u...@bsdbg.net address=172.16.1.8 
host=attic.bsdbg.net result=ok
Sep 10 06:57:07 hodor smtpd[41890]: cf24b009186225a0 smtp event=message 
address=172.16.1.8 host=attic.bsdbg.net msgid=987a89ab 
from= to= size=47232 ndest=1 
proto=ESMTP
Sep 10 06:57:07 hodor smtpd[41890]: cf24b009186225a0 smtp event=closed 
address=172.16.1.8 host=attic.bsdbg.net reason=quit

Sep 10 06:57:07 hodor dovecot: lmtp(14906): Connect from local
Sep 10 06:57:07 hodor dovecot: lmtp(u...@bsdbg.net): msgid=unspecified: 
saved mail to INBOX
Sep 10 06:57:07 hodor dovecot: lmtp(14906): Disconnect from local: 
Successful quit
Sep 10 06:57:07 hodor smtpd[41890]:  mda event=delivery 
evpid=987a89ab9622c6e0 from= to= 
user=vmail method=lmtp delay=5s result=Ok stat=Delivered



#
### smtpd.conf
#
~$ cat /etc/mail/smtpd.conf
#   $OpenBSD: smtpd.conf,v 1.9 2016/05/03 18:43:45 jung Exp $

# This is the smtpd server system-wide configuration file.
# See smtpd.conf(5) for more information.

# pki
pki hodor.bsdbg.net certificate "/etc/ssl/bsdbg.fullchain.pem"
pki hodor.bsdbg.net key "/etc/ssl/private/bsdbg.key"

# tables setup
table aliases file:/etc/mail/aliases
table domains file:/etc/mail/domains
table passwd passwd:/etc/mail/passwd
table virtuals file:/etc/mail/virtuals

# To accept external mail, replace with: listen on all
#
listen on lo0
listen on vether0 port submission tls pki hodor.bsdbg.net auth 
listen on egress  port smtp tls pki hodor.bsdbg.net
listen on egress  port submission tls-require pki hodor.bsdbg.net auth 



# allow local messages
accept from local for local alias  deliver to lmtp 
"/var/dovecot/lmtp" rcpt-to


# allow virtual domains
accept from any for domain  virtual  deliver to lmtp 
"/var/dovecot/lmtp" rcpt-to


# allow outgoing mails
accept from local for any relay

Please, let me know if you need more details.

#
### dmesg - Please note that I'm running with this patch [0], that's why 
the running kernel was build by me.

#

OpenBSD 6.2-current (GENERIC.MP) #0: Sun Oct 15 18:29:37 EEST 2017
vl...@hodor.bsdbg.net:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 17132367872 (16338MB)

Re: ld.so: openvpn: can't load library 'liblzo2.so.1.0'

2017-10-06 Thread Atanas Vladimirov

Hi,
This is the output after upgrading to the newest snapshot (03.10.2017)

rtld loading: 'openvpn'
exe load offset:  0x1023ea70
 flags /usr/local/sbin/openvpn = 0x0
head /usr/local/sbin/openvpn
obj /usr/local/sbin/openvpn has /usr/local/sbin/openvpn as head
examining: '/usr/local/sbin/openvpn'
loading: libc.so.90.0 required by /usr/local/sbin/openvpn
 flags /usr/lib/libc.so.90.0 = 0x0
obj /usr/lib/libc.so.90.0 has /usr/local/sbin/openvpn as head
loading: libcrypto.so.42.0 required by /usr/local/sbin/openvpn
 flags /usr/lib/libcrypto.so.42.0 = 0x0
obj /usr/lib/libcrypto.so.42.0 has /usr/local/sbin/openvpn as head
loading: libssl.so.44.1 required by /usr/local/sbin/openvpn
 flags /usr/lib/libssl.so.44.1 = 0x0
obj /usr/lib/libssl.so.44.1 has /usr/local/sbin/openvpn as head
loading: liblzo2.so.1.0 required by /usr/local/sbin/openvpn
ld.so: openvpn: can't load library 'liblzo2.so.1.0'
Killed


And on next reboot everything is fine:

rtld loading: 'openvpn'
exe load offset:  0xce50950
 flags /usr/local/sbin/openvpn = 0x0
head /usr/local/sbin/openvpn
obj /usr/local/sbin/openvpn has /usr/local/sbin/openvpn as head
examining: '/usr/local/sbin/openvpn'
loading: libcrypto.so.42.0 required by /usr/local/sbin/openvpn
 flags /usr/lib/libcrypto.so.42.0 = 0x0
obj /usr/lib/libcrypto.so.42.0 has /usr/local/sbin/openvpn as head
loading: liblzo2.so.1.0 required by /usr/local/sbin/openvpn
 flags /usr/local/lib/liblzo2.so.1.0 = 0x0
obj /usr/local/lib/liblzo2.so.1.0 has /usr/local/sbin/openvpn as head
loading: libc.so.90.0 required by /usr/local/sbin/openvpn
 flags /usr/lib/libc.so.90.0 = 0x0
obj /usr/lib/libc.so.90.0 has /usr/local/sbin/openvpn as head
loading: liblz4.so.2.0 required by /usr/local/sbin/openvpn
 flags /usr/local/lib/liblz4.so.2.0 = 0x0
obj /usr/local/lib/liblz4.so.2.0 has /usr/local/sbin/openvpn as head
loading: libssl.so.44.1 required by /usr/local/sbin/openvpn
 flags /usr/lib/libssl.so.44.1 = 0x0
obj /usr/lib/libssl.so.44.1 has /usr/local/sbin/openvpn as head
linking dep /usr/local/lib/liblzo2.so.1.0 as child of 
/usr/local/sbin/openvpn
linking dep /usr/local/lib/liblz4.so.2.0 as child of 
/usr/local/sbin/openvpn

linking dep /usr/lib/libssl.so.44.1 as child of /usr/local/sbin/openvpn
linking dep /usr/lib/libcrypto.so.42.0 as child of 
/usr/local/sbin/openvpn

linking dep /usr/lib/libc.so.90.0 as child of /usr/local/sbin/openvpn
examining: '/usr/local/lib/liblzo2.so.1.0'
examining: '/usr/local/lib/liblz4.so.2.0'
examining: '/usr/lib/libssl.so.44.1'
loading: libcrypto.so.42.0 required by /usr/lib/libssl.so.44.1
linking dep /usr/lib/libcrypto.so.42.0 as child of 
/usr/lib/libssl.so.44.1

examining: '/usr/lib/libcrypto.so.42.0'
examining: '/usr/lib/libc.so.90.0'
 flags /usr/libexec/ld.so = 0x0
obj /usr/libexec/ld.so has /usr/local/sbin/openvpn as head
protect start RELRO = 0xce741923f78 in /usr/lib/libc.so.90.0
protect end RELRO = 0xce741926000 in /usr/lib/libc.so.90.0
protect start RELRO = 0xce7c455fbb8 in /usr/lib/libcrypto.so.42.0
protect end RELRO = 0xce7c457b000 in /usr/lib/libcrypto.so.42.0
protect start RELRO = 0xce7e7530048 in /usr/lib/libssl.so.44.1
protect end RELRO = 0xce7e7533000 in /usr/lib/libssl.so.44.1
protect start RELRO = 0xce7af2e8cb0 in /usr/local/lib/liblz4.so.2.0
protect end RELRO = 0xce7af2e9000 in /usr/local/lib/liblz4.so.2.0
protect start RELRO = 0xce7b6059c78 in /usr/local/lib/liblzo2.so.1.0
protect end RELRO = 0xce7b605a000 in /usr/local/lib/liblzo2.so.1.0
protect start RELRO = 0xce5097b0348 in /usr/local/sbin/openvpn
protect end RELRO = 0xce5097b1ff0 in /usr/local/sbin/openvpn
StartEnd  Type Open Ref GrpRef Name
0ce50950 0ce5097b3000 exe  10   0  
/usr/local/sbin/openvpn
0ce7b5e2c000 0ce7b605b000 rlib 01   0  
/usr/local/lib/liblzo2.so.1.0
0ce7af0d2000 0ce7af2ea000 rlib 01   0  
/usr/local/lib/liblz4.so.2.0
0ce7e72e2000 0ce7e7537000 rlib 01   0  
/usr/lib/libssl.so.44.1
0ce7c41af000 0ce7c4583000 rlib 02   0  
/usr/lib/libcrypto.so.42.0
0ce74165a000 0ce741939000 rlib 01   0  
/usr/lib/libc.so.90.0
0ce78300 0ce78300 rtld 01   0  
/usr/libexec/ld.so

symcache lookups 342 hits 0 ratio 0% hits
dynamic loading done, success.
tib new=0xce7c954cd00
setting environ 0xce783212000@/usr/libexec/ld.so[0xce771dfc800] from 
0xce783212000
setting __progname 0xce783212008@/usr/libexec/ld.so[0xce771dfc800] from 
0xce783212008
doing ctors obj 0xce7622e4c00 @0xce7b5e2c2e0: 
[/usr/local/lib/liblzo2.so.1.0]
doing ctors obj 0xce7951d1c00 @0xce7af0d22e0: 
[/usr/local/lib/liblz4.so.2.0]
doing ctors obj 0xce7622e4400 @0xce7c41af2e0: 
[/usr/lib/libcrypto.so.42.0]

doing ctors obj 0xce7622e4800 @0xce7e72e22e0: [/usr/lib/libssl.so.44.1]
entry point: 0xce509501870

# dmesg
OpenBSD 6.2 (GENERIC.MP) #134: Tue Oct  3 21:22:29 MDT 2017

Re: ld.so: openvpn: can't load library 'liblzo2.so.1.0'

2017-10-03 Thread Atanas Vladimirov

On 2017-10-03 02:35, Stuart Henderson wrote:

The error is missing when I do a reboot


Oh, I missed this bit before... That's rather unexpected. Please set
LD_DEBUG= in the environment as well (or instead?) and see if you get
anything useful from the output there (there will be a couple of 
screens

full, but should fit within the dmesg -s buffer).

You might be out of luck for new snapshots for a little while..


Hello Stuart,
Here is the relevant output (regular reboot) of `dmesg -s` with the 
following in /etc/hostname.tun4


---
up
description dn42-w0h
!env LD_DEBUG= /usr/local/sbin/openvpn --daemon --config 
/etc/dn42-w0h.ovpn

---

After the reboot `tun4` is up and running. Is there a way to "simulate" 
or force a reboot as when I do an upgrade and boot for "first time" the 
new snapshot.

Thanks.

rtld loading: 'openvpn'
exe load offset:  0x13aa4720
 flags /usr/local/sbin/openvpn = 0x0
head /usr/local/sbin/openvpn
obj /usr/local/sbin/openvpn has /usr/local/sbin/openvpn as head
examining: '/usr/local/sbin/openvpn'
loading: liblz4.so.2.0 required by /usr/local/sbin/openvpn
 flags /usr/local/lib/liblz4.so.2.0 = 0x0
obj /usr/local/lib/liblz4.so.2.0 has /usr/local/sbin/openvpn as head
loading: libcrypto.so.42.0 required by /usr/local/sbin/openvpn
 flags /usr/lib/libcrypto.so.42.0 = 0x0
obj /usr/lib/libcrypto.so.42.0 has /usr/local/sbin/openvpn as head
loading: libc.so.90.0 required by /usr/local/sbin/openvpn
 flags /usr/lib/libc.so.90.0 = 0x0
obj /usr/lib/libc.so.90.0 has /usr/local/sbin/openvpn as head
loading: liblzo2.so.1.0 required by /usr/local/sbin/openvpn
 flags /usr/local/lib/liblzo2.so.1.0 = 0x0
obj /usr/local/lib/liblzo2.so.1.0 has /usr/local/sbin/openvpn as head
loading: libssl.so.44.1 required by /usr/local/sbin/openvpn
 flags /usr/lib/libssl.so.44.1 = 0x0
obj /usr/lib/libssl.so.44.1 has /usr/local/sbin/openvpn as head
linking dep /usr/local/lib/liblzo2.so.1.0 as child of 
/usr/local/sbin/openvpn
linking dep /usr/local/lib/liblz4.so.2.0 as child of 
/usr/local/sbin/openvpn

linking dep /usr/lib/libssl.so.44.1 as child of /usr/local/sbin/openvpn
linking dep /usr/lib/libcrypto.so.42.0 as child of 
/usr/local/sbin/openvpn

linking dep /usr/lib/libc.so.90.0 as child of /usr/local/sbin/openvpn
examining: '/usr/local/lib/liblzo2.so.1.0'
examining: '/usr/local/lib/liblz4.so.2.0'
examining: '/usr/lib/libssl.so.44.1'
loading: libcrypto.so.42.0 required by /usr/lib/libssl.so.44.1
linking dep /usr/lib/libcrypto.so.42.0 as child of 
/usr/lib/libssl.so.44.1

examining: '/usr/lib/libcrypto.so.42.0'
examining: '/usr/lib/libc.so.90.0'
 flags /usr/libexec/ld.so = 0x0
obj /usr/libexec/ld.so has /usr/local/sbin/openvpn as head
protect start RELRO = 0x13ad41183f78 in /usr/lib/libc.so.90.0
protect end RELRO = 0x13ad41186000 in /usr/lib/libc.so.90.0
protect start RELRO = 0x13acf6e24bb8 in /usr/lib/libcrypto.so.42.0
protect end RELRO = 0x13acf6e4 in /usr/lib/libcrypto.so.42.0
protect start RELRO = 0x13aca9cae048 in /usr/lib/libssl.so.44.1
protect end RELRO = 0x13aca9cb1000 in /usr/lib/libssl.so.44.1
protect start RELRO = 0x13ace69e3cb0 in /usr/local/lib/liblz4.so.2.0
protect end RELRO = 0x13ace69e4000 in /usr/local/lib/liblz4.so.2.0
protect start RELRO = 0x13acf7ddbc78 in /usr/local/lib/liblzo2.so.1.0
protect end RELRO = 0x13acf7ddc000 in /usr/local/lib/liblzo2.so.1.0
protect start RELRO = 0x13aa474b0348 in /usr/local/sbin/openvpn
protect end RELRO = 0x13aa474b1ff0 in /usr/local/sbin/openvpn
StartEnd  Type Open Ref GrpRef Name
13aa4720 13aa474b3000 exe  10   0  
/usr/local/sbin/openvpn
13acf7bae000 13acf7ddd000 rlib 01   0  
/usr/local/lib/liblzo2.so.1.0
13ace67cd000 13ace69e5000 rlib 01   0  
/usr/local/lib/liblz4.so.2.0
13aca9a6 13aca9cb5000 rlib 01   0  
/usr/lib/libssl.so.44.1
13acf6a74000 13acf6e48000 rlib 02   0  
/usr/lib/libcrypto.so.42.0
13ad40eba000 13ad41199000 rlib 01   0  
/usr/lib/libc.so.90.0
13ad2400 13ad2400 rtld 01   0  
/usr/libexec/ld.so

symcache lookups 342 hits 0 ratio 0% hits
dynamic loading done, success.
tib new=0x13ac4d612a00
setting environ 0x13ad24212530@/usr/libexec/ld.so[0x13ac72660800] from 
0x13ad24212530
setting __progname 0x13ad24212538@/usr/libexec/ld.so[0x13ac72660800] 
from 0x13ad24212538
doing ctors obj 0x13acd564b000 @0x13acf7bae2e0: 
[/usr/local/lib/liblzo2.so.1.0]
doing ctors obj 0x13acd564b400 @0x13ace67cd2e0: 
[/usr/local/lib/liblz4.so.2.0]
doing ctors obj 0x13ac72660c00 @0x13acf6a742e0: 
[/usr/lib/libcrypto.so.42.0]
doing ctors obj 0x13ac72660400 @0x13aca9a602e0: 
[/usr/lib/libssl.so.44.1]

entry point: 0x13aa47201870



Re: ld.so: openvpn: can't load library 'liblzo2.so.1.0'

2017-10-02 Thread Atanas Vladimirov

On 2017-10-02 21:54, Jeremie Courreges-Anglas wrote:

On Mon, Oct 02 2017, Atanas Vladimirov <vl...@bsdbg.net> wrote:

On 2017-10-02 18:47, Stuart Henderson wrote:

On 2017-10-01, Atanas Vladimirov <vl...@bsdbg.net> wrote:

I'm running -current and I'm seeing that error on first boot when
upgrading to a newer snapshot:


..

em0: DHCPACK from 95.87.227.225 (64:87:88:58:b2:b8)
em0: bound to 95.87.227.232 -- renewal in 300 seconds
ld.so: openvpn: can't load library 'liblzo2.so.1.0'
Killed


OpenVPN started here ^^


reordering libraries: done.
starting early daemons: syslogd pflogd nsd unbound ntpd isakmpd 
npppd.

starting RPC daemons:.
savecore: no core dump
checking quotas: done.
clearing /tmp
kern.securelevel: 0 -> 1
creating runtime link editor directory cache.


but ldconfig runs here ^^

liblzo2.so.1.0 isn't reachable until the above is run.

Try something like "env LD_LIBRARY_PATH=/usr/lib:/usr/local/lib" when
starting openvpn from hostname.if.

If this used to work, there is a chance that maybe this changed in
libexec/ld.so/path.c r1.7.


I'm not sure that I did it in the right way:

~$ cat /etc/hostname.tun4
up
description dn42-w0h
!env LD_LIBRARY_PATH=/usr/lib:/usr/local/lib
!/usr/local/sbin/openvpn --daemon --config /etc/dn42-w0h.ovpn


This should rather be

!env LD_LIBRARY_PATH=/usr/lib:/usr/local/lib /usr/local/sbin/openvpn
--daemon --config /etc/dn42-w0h.ovpn


Thank you. I'll wait for a newer snapshot and will let you know the 
result.




Re: ld.so: openvpn: can't load library 'liblzo2.so.1.0'

2017-10-02 Thread Atanas Vladimirov

On 2017-10-02 18:47, Stuart Henderson wrote:

On 2017-10-01, Atanas Vladimirov <vl...@bsdbg.net> wrote:

I'm running -current and I'm seeing that error on first boot when
upgrading to a newer snapshot:


..

em0: DHCPACK from 95.87.227.225 (64:87:88:58:b2:b8)
em0: bound to 95.87.227.232 -- renewal in 300 seconds
ld.so: openvpn: can't load library 'liblzo2.so.1.0'
Killed


OpenVPN started here ^^


reordering libraries: done.
starting early daemons: syslogd pflogd nsd unbound ntpd isakmpd npppd.
starting RPC daemons:.
savecore: no core dump
checking quotas: done.
clearing /tmp
kern.securelevel: 0 -> 1
creating runtime link editor directory cache.


but ldconfig runs here ^^

liblzo2.so.1.0 isn't reachable until the above is run.

Try something like "env LD_LIBRARY_PATH=/usr/lib:/usr/local/lib" when
starting openvpn from hostname.if.

If this used to work, there is a chance that maybe this changed in
libexec/ld.so/path.c r1.7.


I'm not sure that I did it in the right way:

~$ cat /etc/hostname.tun4
up
description dn42-w0h
!env LD_LIBRARY_PATH=/usr/lib:/usr/local/lib
!/usr/local/sbin/openvpn --daemon --config /etc/dn42-w0h.ovpn

And after upgrade to the newest snap:
...
_=/usr/bin/env
INRC=1
HOME=/
PATH=/sbin:/bin:/usr/sbin:/usr/bin
LD_LIBRARY_PATH=/usr/lib:/usr/local/lib
ld.so: openvpn: can't load library 'liblz4.so.2.0'
Killed
...

Thanks.



ld.so: openvpn: can't load library 'liblzo2.so.1.0'

2017-10-01 Thread Atanas Vladimirov

Hi,

I'm running -current and I'm seeing that error on first boot when 
upgrading to a newer snapshot:


$ doas dmesg -s
Automatic boot in progress: starting file system checks.
/dev/sd2a (4f0020f200943c3c.a): file system is clean; not checking
/dev/sd2d (4f0020f200943c3c.d): file system is clean; not checking
/dev/sd2e (4f0020f200943c3c.e): file system is clean; not checking
/dev/sd2f (4f0020f200943c3c.f): file system is clean; not checking
/dev/sd2g (4f0020f200943c3c.g): file system is clean; not checking
/dev/sd2h (4f0020f200943c3c.h): file system is clean; not checking
/dev/sd2i (4f0020f200943c3c.i): file system is clean; not checking
setting tty flags
pf enabled
net.inet.ip.forwarding: 0 -> 1
net.pipex.enable: 0 -> 1
hw.perfpolicy: manual -> auto
net.inet.ip.ifq.maxlen: 2048 -> 1024
net.inet.tcp.mssdflt: 512 -> 1440
kern.nosuidcoredump: 1 -> 3
kern.seminfo.semmni: 10 -> 60
kern.seminfo.semmns: 60 -> 1024
starting network
em0: DHCPDISCOVER - interval 1
em0: DHCPOFFER from 95.87.227.225 (64:87:88:58:b2:b8)
em0: DHCPREQUEST to 255.255.255.255
em0: DHCPACK from 95.87.227.225 (64:87:88:58:b2:b8)
em0: bound to 95.87.227.232 -- renewal in 300 seconds
ld.so: openvpn: can't load library 'liblzo2.so.1.0'
Killed
reordering libraries: done.
starting early daemons: syslogd pflogd nsd unbound ntpd isakmpd npppd.
starting RPC daemons:.
savecore: no core dump
checking quotas: done.
clearing /tmp
kern.securelevel: 0 -> 1
creating runtime link editor directory cache.
preserving editor files.
running rc.sysmerge
starting network daemons: sshd bgpd ifstated dhcpd smtpd slowcgi httpd 
ftpproxy tftpd spamd spamlogd.

running rc.firsttime
Path to firmware: http://firmware.openbsd.org/firmware/6.2/
Updating: vmm-firmware-1.10.2p4
Checking for available binary patches... done.
starting package daemons: postgresql mysqld php56_fpm squid cvsyncd 
symon symux smokeping smokeping_fcgi clamd freshclam upsd upsmon.

starting local daemons: cron.
Sun Oct  1 12:44:46 EEST 2017

If I execute `doas sh /etc/netstart tun4` the tunnel starts normally. 
The error is missing when I do a reboot, but if I upgrade to a newer 
snapshot it appears once on first boot.

If you need more info just ask.
Thanks.

$ cat /etc/hostname.tun4
up
description dn42-w0h
!/usr/local/sbin/openvpn --daemon --config /etc/dn42-w0h.ovpn

$ doas cat /etc/dn42-w0h.ovpn
mode p2p
remote de-fra1.netrik.de
lport 50108
rport 50108
proto udp
dev-type tun
dev tun4
tun-ipv6
.
comp-lzo
persist-key
#persist-tun
cipher aes-256-cbc
user _openvpn
group _openvpn
ifconfig 172.20.3.1 172.22.232.1
ifconfig-ipv6 fe80::d524/64 fe80::6472
status /tmp/dn42-openvpn-w0h.status
log-append /tmp/dn42-openvpn-w0h.log

$ mount
/dev/sd2a on / type ffs (local, softdep)
/dev/sd2d on /var type ffs (local, nodev, nosuid)
/dev/sd2e on /usr type ffs (local, nodev, softdep)
/dev/sd2f on /usr/X11R6 type ffs (local, nodev, softdep)
/dev/sd2g on /usr/local type ffs (local, nodev, wxallowed, softdep)
/dev/sd2h on /usr/src type ffs (local, nodev, nosuid, softdep)
/dev/sd2i on /home type ffs (local, nodev, nosuid, softdep)
mfs:84122 on /tmp type mfs (asynchronous, local, nodev, nosuid, 
size=4194304 512-blocks)
mfs:48256 on /usr/obj type mfs (asynchronous, local, nodev, nosuid, 
size=4194304 512-blocks)
mfs:58559 on /usr/xobj type mfs (asynchronous, local, nodev, nosuid, 
size=4194304 512-blocks)


$ dmesg
OpenBSD 6.2 (GENERIC.MP) #123: Sat Sep 30 22:51:56 MDT 2017
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8544153600 (8148MB)
avail mem = 8278192128 (7894MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xeb5a0 (56 entries)
bios0: vendor American Megatrends Inc. version "2.2" date 02/20/2015
bios0: Supermicro X9SCL/X9SCM
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP APIC FPDT MCFG HPET SSDT SPMI SSDT SSDT EINJ 
ERST HEST BERT
acpi0: wakeup devices UAR1(S4) UAR2(S4) P0P1(S4) USB1(S4) USB2(S4) 
USB3(S4) USB4(S4) USB5(S4) USB6(S4) USB7(S4) PXSX(S4) RP0$

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) Celeron(R) CPU G1620T @ 2.40GHz, 2400.36 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$

cpu0: 256KB 64b/line 8-way L2 cache
cpu0: TSC frequency 2400363240 Hz
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 100MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Celeron(R) CPU G1620T @ 2.40GHz, 2400.02 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$

cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins

Re: Installing openbsd on MacBook air 2014

2017-05-16 Thread Atanas Vladimirov

On 2017-05-16 10:49, flipchan wrote:

Hi I am trying to install openbsd on my MacBook air 2014. I have tried
burning the  6.1 intel install61.iso to a USB and tried to boot from
that but I have got zero success (burned it with dd like a normal os
install). Does anyone know how to install openbsd on a MacBook air?
The MacBook air don't detect the USB as a bootable device.


Take care and have a good day

Hi,
Try with install61.fs.
Regards.



May I use switch(4) instead of bridge(4) ?

2017-03-23 Thread Atanas Vladimirov

Hi,
Does any one use switch(4) to merge two or more Ethernet ports?
Can you share a working example?

I have the following config:

em0: flags=8b43 
mtu 1500

lladdr 00:15:17:bc:a9:65
index 1 priority 0 llprio 3
media: Ethernet autoselect (100baseTX full-duplex)
status: active
em1: flags=8b43 
mtu 1500

lladdr 00:15:17:bc:a9:64
index 2 priority 0 llprio 3
media: Ethernet autoselect (100baseTX full-duplex)
status: active
vether0: flags=141 mtu 1500
lladdr fe:e1:ba:d6:0d:cc
index 27 priority 0 llprio 3
groups: vether
media: Ethernet autoselect
status: active
inet 172.16.2.1 netmask 0xff00
switch0: flags=41
index 28 llprio 3
groups: switch
datapath 0x60d948957e032d5f maxflow 1 maxgroup 1000
em0 flags=0<>
port 1 ifpriority 0 ifcost 0
em1 flags=0<>
port 2 ifpriority 0 ifcost 0
vether0 flags=0<>
port 27 ifpriority 0 ifcost 0

There are two directly attached devices to em0 and em1 with IP 
172.16.2.31 and 172.16.2.32
In pf.conf I have skip on {em0, em1, vether, switch}. But when I try to 
ping:


[hodor]~$ ping 172.16.2.32
PING 172.16.2.32 (172.16.2.32): 56 data bytes
ping: sendmsg: No route to host
ping: wrote 172.16.2.32 64 chars, ret=-1
ping: sendmsg: No route to host
ping: wrote 172.16.2.32 64 chars, ret=-1
^C
--- 172.16.2.32 ping statistics ---
2 packets transmitted, 0 packets received, 100.0% packet loss
[hodor]~$ ping 172.16.2.31
PING 172.16.2.31 (172.16.2.31): 56 data bytes
ping: sendmsg: No route to host
ping: wrote 172.16.2.31 64 chars, ret=-1
ping: sendmsg: No route to host
ping: wrote 172.16.2.31 64 chars, ret=-1
^C
--- 172.16.2.31 ping statistics ---
2 packets transmitted, 0 packets received, 100.0% packet loss

[hodor]~$ arp -an
Host Ethernet AddressNetif Expire
Flags
172.16.2.1   fe:e1:ba:d6:0d:cc vether0 permanent 
l

172.16.2.31  (incomplete)  vether0 expired
172.16.2.32  (incomplete)  vether0 expired

Thanks for your time,
Atanas

OpenBSD 6.1-beta (GENERIC.MP) #20: Wed Mar 15 01:49:05 MDT 2017
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 34313936896 (32724MB)
avail mem = 33269313536 (31728MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xeb5a0 (56 entries)
bios0: vendor American Megatrends Inc. version "2.2" date 02/20/2015
bios0: Supermicro X9SCL/X9SCM
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP APIC FPDT MCFG HPET SSDT SPMI SSDT SSDT DMAR 
EINJ ERST HEST BERT
acpi0: wakeup devices UAR1(S4) UAR2(S4) P0P1(S4) USB1(S4) USB2(S4) 
USB3(S4) USB4(S4) USB5(S4) USB6(S4) USB7(S4) 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) Xeon(R) CPU E3-1230 V2 @ 3.30GHz, 3300.50 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,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,
F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: TSC frequency 3300502120 Hz
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 100MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Xeon(R) CPU E3-1230 V2 @ 3.30GHz, 3300.02 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,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,
F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Xeon(R) CPU E3-1230 V2 @ 3.30GHz, 3300.02 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,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,
F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Xeon(R) CPU E3-1230 V2 @ 3.30GHz, 3300.02 MHz
cpu3: 

Re: Using "Pretty" permalinks with httpd in wordpress

2017-01-06 Thread Atanas Vladimirov

On 06.01.2017 13:35, Jiri B wrote:

On Fri, Jan 06, 2017 at 01:32:10PM +0200, Atanas Vladimirov wrote:

Hi,

I can't figure it out.
Is it possible to use Wordpress with OpenBSD httpd and configure both
for "Pretty" permalinks.
Does anyone have a working setup?
Thanks for your time,
Atanas


Help testing this diff 
http://marc.info/?l=openbsd-tech=148370177214134=2


j.

I know about the diff and I'm testing it right now.
The problem is that I really don't know what to put in
httpd.conf.
I try to "translate" Wordpress .htaccess with no luck:

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
^^^ this rule doesn't rewrite index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
^^^ this rule rewrites any single character to /index.php
if %{REQUEST_FILENAME} is not a real file or directory

# END WordPress

Do I read/understand the .htaccess file correctly?
In my httpd.conf:
.
# art-katerina.com
server "art-katerina.com" {
listen on * tls port 443
alias www.art-katerina.com
directory index index.php
root "/domains/art-katerina.com/"
hsts
log {
access "art-katerina-access.log",
error "art-katerina-error.log",
style combined
}
location "/.well-known/acme-challenge/*" {
root "/acme"
root strip 2
}
tls {
certificate 
"/etc/ssl/acme/art-katerina.com/fullchain.pem"

key "/etc/ssl/acme/private/art-katerina.com/privkey.pem"
}
location "*.php" {
fastcgi socket "/run/php-fpm.sock"
}
location match "(.)" {
pass rewrite "/index.php"
fastcgi socket "/run/php-fpm.sock"
}
.



Using "Pretty" permalinks with httpd in wordpress

2017-01-06 Thread Atanas Vladimirov

Hi,

I can't figure it out.
Is it possible to use Wordpress with OpenBSD httpd and configure both
for "Pretty" permalinks.
Does anyone have a working setup?
Thanks for your time,
Atanas



kernel: protection fault trap, code=0

2016-05-09 Thread Atanas Vladimirov

Hi,
I got a "kernel: protection fault trap, code=0" on OpenBSD 5.9-current
(GENERIC.MP) #2008: Sat May  7 08:16:29 MDT 2016 snapshot.
It seems that this is not a kernel panic:
ddb{2}> show panic
the kernel did not panic
If you need more info just ask.

kernel: protection fault trap, code=0
Stopped at  rtisvalid+0x59: testb   
$0x2,mptramp_gdt32_desc+0x3a(%rdx)


ddb{0}> ps
   TID   PPID   PGRPUID  S   FLAGS  WAIT  COMMAND
 77614  72948  45849  0  30x1000b2  poll  ping
 72948  45849  45849  0  30x10008a  pause sh
 16140  48265  48265518  30x92  kqreadauth
 21498  48265  48265  0  30x92  kqreadconfig
 35620  42242  35620   1000  30x100083  ttyin more
 42242  93172  42242   1000  30x100083  wait  man
 18260  60693  18260   1000  30x100083  kqreadtmux
 60693  43846  60693   1000  30x10008b  pause ksh
 43846   4619   4619   1000  30x90  selectsshd
  4619  64071   4619  0  30x92  poll  sshd
 60800  17751  60800   1000  30x100083  kqreadtail
 28106  82380  51669 95  30x92  kqread
filter-spamassas

 49488  82380  51669 95  30x92  kqreadfilter-regex
 45904  82380  51669 95  30x92  kqreadfilter-pause
 41200  82380  51669 95  30x92  kqreadfilter-dnsbl
 66585  82380  51669 95  30x92  kqreadfilter-dnsbl
 52012  82380  51669 95  30x92  kqreadfilter-dnsbl
 57249  82380  51669 95  30x92  kqreadfilter-clamav
 89008  51669  51669 95  30x100090  kqreadsmtpd
 82380  51669  51669 95  30x100090  kqreadsmtpd
 56714  51669  51669 95  30x100090  kqreadsmtpd
 86769  51669  51669 95  30x100090  kqreadsmtpd
 30104  51669  51669 95  30x100090  kqreadsmtpd
 40810  51669  51669103  30x100090  kqreadsmtpd
 51669  1  51669  0  30x100080  kqreadsmtpd
  2453  28186  28186 67  30x90  netconphp-fpm-5.6
 93172   9678  93172   1000  30x10008b  pause ksh
 52489  97510  97510506  30x90  selectperl
 63318  97510  97510506  30x90  selectperl
 97510  1  97510  0  30x80  selectperl
 26203  1  26203539  30x90  poll  clamd
 59058  1  26203539  3   0x490  poll  clamd
 78110  1  26203539  3   0x490  thrsleep  clamd
 17751   9678  17751   1000  30x10008b  pause ksh
 63217  1  63217577  30x90  poll  openvpn
  3246  48265  48265  0  30x92  kqreadlog
 84044  48265  48265518  30x92  kqreadanvil
 48265  1  48265  0  30x80  kqreaddovecot
 94685   9678  94685   1000  30x100083  ttyin ksh
  9678  1   9678   1000  30x100080  kqreadtmux
 60655  1  60655  0  30x100083  ttyin getty
 43560  1  1  0  30x8a  pause ldattach
 45643  1  45643  0  30x100083  ttyin getty
 90081  1  90081  0  30x100083  ttyin getty
 44894  1  44894  0  30x100083  ttyin getty
 52716  1  52716  0  30x100083  ttyin getty
 77261  1  77261  0  30x100083  ttyin getty
 30777  1  30777  0  30x100098  poll  cron
 91021  1  91021562  30x82  netconperl
 93287  1  93287529  30x90  poll  upsd
 99640  1  99640529  30x90  selectpowercom
 99471  98271  99471550  30x90  poll  nagios
 22929  98271  22929550  30x82  poll  nagios
 50322  98271  50322550  30x82  poll  nagios
 43604  98271  43604550  30x82  poll  nagios
 53216  98271  53216550  30x82  poll  nagios
 22362  98271  22362550  30x82  poll  nagios
 89569  98271  89569550  30x82  poll  nagios
 98271  1  98271550  30x90  poll  nagios
  3330  1   3330562  30x80  nanosleep perl
 70355   3562  70355503  30x80  netio postgres
 42194  1  94080 67  30x83  nanosleep php-5.6
 60435  1  60435  0  30x80  selectsymux
 57128  1  57128535  30x90  nanosleep symon
 60385  1  22802697  30x80  poll  cvsyncd
 57549  79829  18199515  30x82  netio 
log_file_daemon

 79829  18199  18199515  30xb2  kqreadsquid
 18199  1  18199515  30x90  wait  squid
 22859  69480  69480 67  30x90  kqreadnginx
 69480  1  69480  0  30x88  pause 

Re: Supermicro AOC-SG-I2 (two ports Intel 82575EB) hwfeatures

2016-03-06 Thread Atanas Vladimirov

Hi,
Here is the output from Linux[0] and FreeBSD[1].
It seems that hwfeatures (CSUM_TCPv4,CSUM_UDPv4,VLAN_HWTAGGING and even 
more) are working.

My doubt for hardware problem is no more.
Do you have any thoughts? Shall I send a report to bugs@?

[0] Linux ubuntu 4.2.0-16-generic #19-Ubuntu SMP Thu Oct 8 15:35:06 UTC 
2015 x86_64 x86_64 x86_64 GNU/Linux


# ethtool enp2s0f0
Settings for enp2s0f0:
Supported ports: [ TP ]
Supported link modes:   10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Advertised link modes:  10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
MDI-X: on (auto)
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x0007 (7)
   drv probe link
Link detected: yes

# ethtool -k enp2s0f0
Features for enp2s0f0:
rx-checksumming: on
tx-checksumming: on
tx-checksum-ipv4: on
tx-checksum-ip-generic: off [fixed]
tx-checksum-ipv6: on
tx-checksum-fcoe-crc: off [fixed]
tx-checksum-sctp: off [fixed]
scatter-gather: on
tx-scatter-gather: on
tx-scatter-gather-fraglist: off [fixed]
tcp-segmentation-offload: on
tx-tcp-segmentation: on
tx-tcp-ecn-segmentation: off [fixed]
tx-tcp6-segmentation: on
udp-fragmentation-offload: off [fixed]
generic-segmentation-offload: on
generic-receive-offload: on
large-receive-offload: off [fixed]
rx-vlan-offload: on
tx-vlan-offload: on
ntuple-filters: off [fixed]
receive-hashing: on
highdma: on [fixed]
rx-vlan-filter: on [fixed]
vlan-challenged: off [fixed]
tx-lockless: off [fixed]
netns-local: off [fixed]
tx-gso-robust: off [fixed]
tx-fcoe-segmentation: off [fixed]
tx-gre-segmentation: off [fixed]
tx-ipip-segmentation: off [fixed]
tx-sit-segmentation: off [fixed]
tx-udp_tnl-segmentation: off [fixed]
fcoe-mtu: off [fixed]
tx-nocache-copy: off
loopback: off [fixed]
rx-fcs: off [fixed]
rx-all: off
tx-vlan-stag-hw-insert: off [fixed]
rx-vlan-stag-hw-parse: off [fixed]
rx-vlan-stag-filter: off [fixed]
l2-fwd-offload: off [fixed]
busy-poll: off [fixed]

NIC statistics:
 rx_packets: 2794435
 tx_packets: 2794311
 rx_bytes: 285057480
 tx_bytes: 285025784
 rx_broadcast: 289
 tx_broadcast: 17
 rx_multicast: 300
 tx_multicast: 196
 multicast: 300
 collisions: 0
 rx_crc_errors: 196
 rx_no_buffer_count: 0
 rx_missed_errors: 0
 tx_aborted_errors: 0
 tx_carrier_errors: 0
 tx_window_errors: 0
 tx_abort_late_coll: 0
 tx_deferred_ok: 0
 tx_single_coll_ok: 0
 tx_multi_coll_ok: 0
 tx_timeout_count: 0
 rx_long_length_errors: 0
 rx_short_length_errors: 0
 rx_align_errors: 0
 tx_tcp_seg_good: 0
 tx_tcp_seg_failed: 0
 rx_flow_control_xon: 0
 rx_flow_control_xoff: 0
 tx_flow_control_xon: 0
 tx_flow_control_xoff: 0
 rx_long_byte_count: 285057480
 tx_dma_out_of_sync: 0
 tx_smbus: 0
 rx_smbus: 0
 dropped_smbus: 0
 os2bmc_rx_by_bmc: 0
 os2bmc_tx_by_bmc: 0
 os2bmc_tx_by_host: 0
 os2bmc_rx_by_host: 0
 tx_hwtstamp_timeouts: 0
 rx_hwtstamp_cleared: 0
 rx_errors: 357
 tx_errors: 0
 tx_dropped: 0
 rx_length_errors: 0
 rx_over_errors: 0
 rx_frame_errors: 0
 rx_fifo_errors: 0
 tx_fifo_errors: 0
 tx_heartbeat_errors: 0
 tx_queue_0_packets: 69
 tx_queue_0_bytes: 5189
 tx_queue_0_restart: 0
 tx_queue_1_packets: 2794091
 tx_queue_1_bytes: 273827770
 tx_queue_1_restart: 0
 tx_queue_2_packets: 118
 tx_queue_2_bytes: 12713
 tx_queue_2_restart: 0
 tx_queue_3_packets: 33
 tx_queue_3_bytes: 1900
 tx_queue_3_restart: 0
 rx_queue_0_packets: 412
 rx_queue_0_bytes: 47167
 rx_queue_0_drops: 0
 rx_queue_0_csum_err: 0
 rx_queue_0_alloc_failed: 0
 rx_queue_1_packets: 191
 rx_queue_1_bytes: 26850
 rx_queue_1_drops: 0
 rx_queue_1_csum_err: 0
 rx_queue_1_alloc_failed: 0
 rx_queue_2_packets: 2793730
 rx_queue_2_bytes: 273785540
 rx_queue_2_drops: 0
 rx_queue_2_csum_err: 0
 rx_queue_2_alloc_failed: 0
 rx_queue_3_packets: 102
 rx_queue_3_bytes: 20387
 rx_queue_3_drops: 0
 rx_queue_3_csum_err: 0
 rx_queue_3_alloc_failed: 0

[1] FreeBSD-current

# ifconfig
igb0: flags=8843 metric 0 mtu 
1500


options=403bb
ether 

Re: Supermicro AOC-SG-I2 (two ports Intel 82575EB) hwfeatures

2016-03-04 Thread Atanas Vladimirov

On 4 март 2016 г. 22:47:47 "torsten"  wrote:


Here is the output in 5.8
This is a multipath gateway setup - very stable - and connected to DELL 1xxx
managed switches

Dec 20 12:50:20 gate01 /bsd: em0 at pci2 dev 0 function 0 "Intel 82571EB"


Thanks but yours Intel 82571EB is not the same as mine Intel 82575EB.
Also all of yours em support hwfeatures as em(4) manual page claims to be.


rev 0x06: apic 2 int 17, address 00:15:17:48:7b:22
Dec 20 12:50:20 gate01 /bsd: em1 at pci2 dev 0 function 1 "Intel 82571EB"
rev 0x06: apic 2 int 18, address 00:15:17:48:7b:23
Dec 20 12:50:20 gate01 /bsd: em2 at pci0 dev 25 function 0 "Intel 82579LM"
rev 0x05: msi, address 00:25:90:d0:17:11
Dec 20 12:50:20 gate01 /bsd: em3 at pci4 dev 0 function 0 "Intel 82574L" rev
0x00: msi, address 00:25:90:d0:17:10

em0: flags=8843 mtu 1500
hwfeatures=36 hardmtu
9216
lladdr 00:15:17:48:7b:22
priority: 0
groups: egress
media: Ethernet autoselect (1000baseT full-duplex)
status: active
em1: flags=8843 mtu 1500
hwfeatures=36 hardmtu
9216
lladdr 00:15:17:48:7b:23
priority: 0
groups: egress
media: Ethernet autoselect (1000baseT full-duplex)
status: active
em2: flags=8802 mtu 1500
hwfeatures=36 hardmtu
9216
lladdr 00:25:90:d0:17:11
priority: 0
media: Ethernet autoselect (none)
status: no carrier
em3: flags=8843 mtu 1500
hwfeatures=36 hardmtu
9216
lladdr 00:25:90:d0:17:10
priority: 0
media: Ethernet autoselect (1000baseT full-duplex)
status: active
inet 192.168.0.238 netmask 0xfc00 broadcast 192.168.3.255




Sent with AquaMail for Android
http://www.aqua-mail.com



Re: Supermicro AOC-SG-I2 (two ports Intel 82575EB) hwfeatures

2016-03-04 Thread Atanas Vladimirov

On 04.03.2016 19:55, torsten wrote:

Hi Atanas,
It looks like a link speed negotiation error.
can you set the link speed to 100MB/s and see what happens. I don't 
think it

is a driver or server hard ware issue but more and switch issue.
Have you tried another switch or hub
I use the same board in Servers and Gateways with FreeBSD and OpenBSD
without any issues.


Hi Torsten,
Yes, I tried with three switches.
I'm not sure that the problem is link negotiation because on-board Intel 
NICs are OK.
Can you send me the output of `ifconfig em hwfeatures` from a server 
which is running OpenBSD

and has AOC-SG-I2?
Thanks,
Atanas



Re: Supermicro AOC-SG-I2 (two ports Intel 82575EB) hwfeatures

2016-03-04 Thread Atanas Vladimirov

On 27.02.2016 11:42, Atanas Vladimirov wrote:

Hi,
I'm running -current on Supermicro X9SCL-F with two on-board Gigabit
Intel (82579LM and 82574L)
and one PCI-e 4x Supermicro AOC-SG-I2 [0] (two ports Intel 82575EB).
The question is why 82575EB doesn't support hwfeatures
(CSUM_TCPv4,CSUM_UDPv4 and VLAN_HWTAGGING) as 82579LM and 82574L.
Thanks.
..
[0] http://www.supermicro.com/products/accessories/addon/AOC-SG-I2.cfm


Hi,
Before my previous email I had a strange issue but back then I didn't 
know that it

was related to the NIC.
I have a basic ifstated config [1] to monitor my WAN connection (first 
port on AOC-SG-I2 was my uplink to my ISP).
At some time ifstated sent me two emails - the link was DOWN and after 9 
(nine) seconds was back ON-Line.
I had a few phone calls with my IPS and they checked the switch a few 
times.
I started to wonder if the problem was on my side. I plugged the second 
port of AOC-SG-I2 to an tp-link wdr4900 which I use
as 5 port gigabit switch for my home LAN and began to observe two ports 
with a `while` loop:


[ns]~$ while true; do date; ifconfig emp[1-0] | grep -e "media:" -e 
"status:"; sleep 1; done > mon_if_em[1-0]


Both ports had 2-3 seconds disconnects at the same time (two different 
switches).
Here's the question - Could this be a hardware related problem or it's a 
driver issue?

Is anyone out there also using Intel 82575EB?

That's why I asked for hwfeatures in first email because that's the only 
difference I saw.
Now I moved the NIC to another (test) server (dmesg and pcdump at the 
end [2]) to test the same way.


em(4) says:
"The em driver supports IPv4 receive IP/TCP/UDP checksum offload and
 transmit TCP/UDP checksum offload on all but 82542-based adapters, 
VLAN

 tag insertion and stripping, and jumbo frames on all but 82562V,
 82566DC/82566DM and 82573E/82573L/82573V-based adapters."

..
Tue Mar  1 15:52:43 EET 2016
media: Ethernet autoselect (1000baseT 
full-duplex,master,rxpause,txpause)

status: active
Tue Mar  1 15:52:44 EET 2016
media: Ethernet autoselect (none)
status: no carrier
Tue Mar  1 15:52:45 EET 2016
media: Ethernet autoselect (none)
status: no carrier
Tue Mar  1 15:52:46 EET 2016
media: Ethernet autoselect (1000baseT 
full-duplex,master,rxpause,txpause)

status: active
..
Wed Mar  2 08:03:17 EET 2016
media: Ethernet autoselect (1000baseT 
full-duplex,master,rxpause,txpause)

status: active
Wed Mar  2 08:03:18 EET 2016
media: Ethernet autoselect (none)
status: no carrier
Wed Mar  2 08:03:19 EET 2016
media: Ethernet autoselect (none)
status: no carrier
Wed Mar  2 08:03:21 EET 2016
media: Ethernet autoselect (1000baseT 
full-duplex,rxpause,txpause)

status: active
..

[1] 

[ns]~$ cat /etc/ifstated.conf
# $OpenBSD: ifstated.conf,v 1.6 2005/02/07 06:08:10 david Exp $
# This is a sample config for a pair of firewalls with two interfaces
#
init-state auto
peer_up = '( "ping -q -c 4 -i 3 -w 4 XX.87.YY.ZZ > /dev/null" every 20 
)'

em0_up = "em0.link.up"
em0_down = "em0.link.down"

state auto {
   if $em0_up {
set-state extif_up
   }
   if $em0_up && $peer_up {
set-state extif_online
   }
   if $em0_down {
set-state extif_down
   }
}

state extif_up {
   init {
run "echo External interface UP @ `date +%H:%M:%S` | mail -s 
'External Interface UP' vl...@bsdbg.net"

   }
   if $em0_down {
set-state extif_down
   }
   if $em0_up && $peer_up {
set-state extif_online
   }
}

state extif_online {
   init {
run "echo External interface ON-line @ `date +%H:%M:%S` | mail 
-s 'External Interface ON-line' vl...@bsdbg.net"

   }
   if $em0_up && ! $peer_up {
set-state extif_up
   }
   if $em0_down {
set-state extif_down
   }
}

state extif_down {
   init {
run "echo External interface DOWN @ `date +%H:%M:%S` | mail -s 
'External Interface DOWN' vl...@bsdbg.net"

   }
   if $em0_up {
set-state extif_up
   }
   if $em0_up && $peer_up {
set-state extif_online
   }
}

[2] 

# dmesg
OpenBSD 5.9-current (GENERIC.MP) #1896: Fri Mar  4 00:36:21 MST 2016
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4269342720 (4071MB)
avail mem = 4135755776 (3944MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0x9f000 (70 entries)
bios0: vendor American Megatrends Inc. version "1.2a" date 06/27/2012
bios0: Supermicro X8SIL
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP APIC MCFG OEMB 

Supermicro AOC-SG-I2 (two port Intel 82575EB) hwfeatures

2016-02-27 Thread Atanas Vladimirov

Hi,
I'm running -current on Supermicro X9SCL-F with two on-board Gigabit 
Intel (82579LM and 82574L)

and one PCI-e 4x Supermicro AOC-SG-I2 [0] (two port Intel 82575EB).
The question is why 82575EB doesn't support hwfeatures 
(CSUM_TCPv4,CSUM_UDPv4 and VLAN_HWTAGGING) as 82579LM and 82574L.

Thanks.

[ns]~$ ifconfig em hwfeatures
em0: flags=18843 mtu 1500
hwfeatures=10 hardmtu 9216
lladdr 00:25:90:38:f4:a0
priority: 0
groups: egress
media: Ethernet autoselect (100baseTX 
full-duplex,rxpause,txpause)

status: active
inet XX.87.YY.ZZ netmask 0xffe0 broadcast XX.87.YY.255
em1: 
flags=18b43 
mtu 1500

hwfeatures=10 hardmtu 9216
lladdr 00:25:90:38:f4:a1
priority: 0
media: Ethernet autoselect (1000baseT 
full-duplex,rxpause,txpause)

status: active
em2: 
flags=18b43 
mtu 1500
hwfeatures=36 
hardmtu 9216

lladdr 00:25:90:d2:ab:3f
priority: 0
media: Ethernet autoselect (1000baseT 
full-duplex,master,rxpause,txpause)

status: active
em3: flags=18802 mtu 1500
hwfeatures=36 
hardmtu 9216

lladdr 00:25:90:d2:ab:3e
priority: 0
media: Ethernet autoselect (none)
status: no carrier

[0] http://www.supermicro.com/products/accessories/addon/AOC-SG-I2.cfm


[ns]~$ dmesg
OpenBSD 5.9 (GENERIC.MP) #1888: Fri Feb 26 01:20:19 MST 2016
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8544149504 (8148MB)
avail mem = 8281006080 (7897MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xeb5a0 (55 entries)
bios0: vendor American Megatrends Inc. version "2.2" date 02/20/2015
bios0: TAROX Parx T100s G4
acpi0 at bios0: rev 2
acpi0: sleep states S0 S4 S5
acpi0: tables DSDT FACP APIC FPDT MCFG HPET SSDT SPMI SSDT SSDT DMAR 
EINJ ERST HEST BERT
acpi0: wakeup devices PS2K(S4) PS2M(S4) UAR1(S4) UAR2(S4) P0P1(S4) 
USB1(S4) USB2(S4) USB3(S4) USB4(S4) USB5(S4) USB6(S4) USB7

(S4) PXSX(S4) RP01(S4) PXSX(S4) RP02(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) Xeon(R) CPU E31225 @ 3.10GHz, 3100.50 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,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,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 100MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Xeon(R) CPU E31225 @ 3.10GHz, 3100.02 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,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,
NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Xeon(R) CPU E31225 @ 3.10GHz, 3100.02 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,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,
NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Xeon(R) CPU E31225 @ 3.10GHz, 3100.02 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,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,
NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 0, core 3, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xe000, bus 0-255
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 5 (P0P1)
acpiprt2 at acpi0: bus 3 (RP01)
acpiprt3 at acpi0: bus -1 (RP02)
acpiprt4 at acpi0: bus -1 (RP03)
acpiprt5 at acpi0: bus -1 (RP04)
acpiprt6 at acpi0: bus 4 (RP05)
acpiprt7 at acpi0: bus -1 (RP06)
acpiprt8 at acpi0: bus -1 (RP07)
acpiprt9 at acpi0: bus -1 (RP08)
acpiprt10 at acpi0: bus 1 (PEG0)
acpiprt11 at acpi0: bus 2 

Re: PF: can't make queueing and priority work as expected

2016-01-08 Thread Atanas Vladimirov

On 8 януари 2016 г. 17:51:21 Marko Cupać  wrote:


I am completely confused. It seems that everything I've known about
queueing in PF does not apply any more, while at the same time there are
no reliable sources to learn new stuff.

Let's follow this paragraph from 'Book of PF':

---quote---
Shaping by Setting Traffic Priorities
If you’re mainly interested in pushing certain kinds of traffic ahead
of others, you may be able to achieve what you want by simply setting
priorities: assigning a higher priority to some items so that they
receive attention before others.
---quote---

This is _exactly_ what I'm mainly interested in. As I want to throttle
just p2p traffic, I should be able to accomplish my goal with the
following relevant lines:

p2p = "{ 1:65535 }"
match proto { tcp udp } to port $p2p set prio 0
pass in  on $if_int inet proto { tcp udp }  from $if_int:network \
 to any port $p2p
pass out on $if_ext inet proto { tcp udp }  from $if_int:network \
 to any port $p2p

But, at least on my hardware, this does nothing. Torrents are still
being downloaded at max speed (~8Mbit/s), while simultaneous
download of install59.fs from ftp.obenbsd.org goes at at ~6Kbit/s.

Any comment? Suggestion? Instruction how to troubleshoot?

Thank you in advance.


http://marc.info/?l=openbsd-misc=141085207225887=2

Please read the whole thread. You have to set both min and max bw for every 
queue.

I think that this is a bug in amd64 - i386 works as it should.


Sent with AquaMail for Android
http://www.aqua-mail.com



Re: serious watchdog timeout issues with em driver

2015-12-02 Thread Atanas Vladimirov

On 30.11.2015 14:08, Atanas Vladimirov wrote:

Hi,
I'm not sure if this is related to resent em(4) changes, but after 
upgrade from:




Hi,
Just ignore my previous assumptions. I thinks that I found the real 
cause for
this upload speed problem. I'm using ifstated to inform me when 
something goes

wrong with my egress interface.

snip from ifstated.conf
...
state extif_online {
   init {
run "echo External interface ON-line @ `date +%H:%M:%S` | mail 
-s 'External Interface ON-line' t...@example.com"

run "/usr/sbin/arp -Ff /etc/ether.mac"
   }
   if $em2_up && ! $peer_up {
set-state extif_up
   }
   if $em2_down {
set-state extif_down
   }
}
...
/snip

[ns]~$ cat /etc/ether.mac
95.YY.XXX.225 64:87:88:58:b2:41 permanent
  ^^^
this is the ip of my default gateway

If I have a permanent arp entry for my gateway, then I observe 1-2mbps 
upload speed.

After I clear the arp I get 30-40mbps as it should be.

Meanwhile I updated to more resent snapshot #1696: Wed Dec  2 10:13:03 
MST 2015

and the problem persist.
If you need more info just ask.
Best regard,
Atanas

dmesg:

OpenBSD 5.8-current (GENERIC.MP) #1696: Wed Dec  2 10:13:03 MST 2015
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4269342720 (4071MB)
avail mem = 4135833600 (3944MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0x9f000 (70 entries)
bios0: vendor American Megatrends Inc. version "1.2a" date 06/27/2012
bios0: Supermicro X8SIL
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP APIC MCFG OEMB HPET GSCI SSDT EINJ BERT ERST 
HEST
acpi0: wakeup devices P0P1(S4) P0P3(S4) P0P4(S4) P0P5(S4) P0P6(S4) 
BR1E(S4) PS2K(S4) PS2M(S4) USB0(S4) USB1(S4) USB2(S4) USB3(S4) USB4(S4) 
USB5(S4) USB6(S4) GBE_(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) Xeon(R) CPU X3430 @ 2.40GHz, 2400.38 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC,SENSOR

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 133MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Xeon(R) CPU X3430 @ 2.40GHz, 2400.00 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC,SENSOR

cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Xeon(R) CPU X3430 @ 2.40GHz, 2400.00 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,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC,SENSOR

cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Xeon(R) CPU X3430 @ 2.40GHz, 2400.00 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,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC,SENSOR

cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 0, core 3, package 0
ioapic0 at mainbus0: apid 7 pa 0xfec0, version 20, 24 pins
ioapic0: misconfigured as apic 1, remapped to apid 7
acpimcfg0 at acpi0 addr 0xe000, bus 0-255
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (P0P1)
acpiprt2 at acpi0: bus 1 (P0P3)
acpiprt3 at acpi0: bus 2 (P0P5)
acpiprt4 at acpi0: bus -1 (P0P6)
acpiprt5 at acpi0: bus 6 (BR1E)
acpiprt6 at acpi0: bus 3 (BR20)
acpiprt7 at acpi0: bus 4 (BR24)
acpiprt8 at acpi0: bus 5 (BR25)
acpicpu0 at acpi0: !C3(350@17 mwait.1@0x20), !C2(500@17 mwait.1@0x10), 
C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: !C3(350@17 mwait.1@0x20), !C2(500@17 mwait.1@0x10), 
C1(1000@1 mwait.1), PSS
acpicpu2 at acpi0: !C3(350@17 mwait.1@0x20), !C2(500@17 mwait.1@0x10), 
C1(1000@1 mwait.1), PSS
acpicpu3 at acpi0: !C3(350@17 mwait.1@0x20), !C2(500@17 mwait.1@0x10), 
C1(1000@1 mwait.1), PSS

acpibtn0 at acpi0: SLPB
acpibtn1 at acpi0: PWRB
ipmi at mainbus0 not configured
cpu0: Enhanced SpeedStep 2400 MHz: speeds: 2401, 2400, 2267, 2133, 2000, 
1867, 1733, 1600, 1467, 1333, 1200 MHz

pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core DMI" rev 0x11
ppb0 at pci0 dev 3 function 0 "Intel Core PCIE" rev 0x11: msi
pc

Re: serious watchdog timeout issues with em driver

2015-12-02 Thread Atanas Vladimirov

On 02.12.2015 22:25, Atanas Vladimirov wrote:

On 30.11.2015 14:08, Atanas Vladimirov wrote:

Hi,
I'm not sure if this is related to resent em(4) changes, but after 
upgrade from:




Hi,
Just ignore my previous assumptions.


Hi,
Sorry for the noise! Please ignore all of my previous emails.
It seems that my ISP changed a NIC port on the router which
served as my default gateway and I used a wrong MAC address.
I'm really sorry.
Best wishes,
Atanas



Re: serious watchdog timeout issues with em driver

2015-11-30 Thread Atanas Vladimirov

On 20.11.2015 21:10, Sonic wrote:
On Fri, Nov 20, 2015 at 12:37 PM, Mark Kettenis 
 wrote:

Thanks Martin.


All is fine now. System booted with no errors and no watchdog timeouts.

Thanks to all.

Chris


Hi,
I'm not sure if this is related to resent em(4) changes, but after 
upgrade from:


-OpenBSD 5.8-current (GENERIC.MP) #1597: Thu Nov 12 07:33:59 MST 2015
+OpenBSD 5.8-current (GENERIC.MP) #1671: Thu Nov 26 20:36:24 MST 2015

my upload throughput can't reach more than 2mbps.
I also tried Nov 27 22:50:35 snapshot with same result.

-OpenBSD 5.8-current (GENERIC.MP) #1671: Thu Nov 26 20:36:24 MST 2015
+OpenBSD 5.8-current (GENERIC.MP) #1675: Fri Nov 27 22:50:35 MST 2015

I tried to build an older em(4) revisions, but all exept if_em.c -r 
1.312 failed to build.
Kernel with if_em.c -r 1.312, if_em.h -r 1.60 and if_em_hw.c -r 1.88 
boot normally but

same upload throughput.

Does anyone observe such a behavior? If you need more info just ask.
Thanks for your time.

P.S.: When I plug the cable from my ISP in Windows 7 laptop I have 35-40 
mbps.


full dmesg:
OpenBSD 5.8-current (GENERIC.MP) #1675: Fri Nov 27 22:50:35 MST 2015
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4269342720 (4071MB)
avail mem = 4135833600 (3944MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0x9f000 (70 entries)
bios0: vendor American Megatrends Inc. version "1.2a" date 06/27/2012
bios0: Supermicro X8SIL
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP APIC MCFG OEMB HPET GSCI SSDT EINJ BERT ERST 
HEST
acpi0: wakeup devices P0P1(S4) P0P3(S4) P0P4(S4) P0P5(S4) P0P6(S4) 
BR1E(S4) PS2K(S4) PS2M(S4) USB0(S4) USB1(S4) USB2(S4) USB3(S4) USB4(S4) 
USB5(S4) USB6(S4) GBE_(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) Xeon(R) CPU X3430 @ 2.40GHz, 2400.32 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC,SENSOR

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 133MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Xeon(R) CPU X3430 @ 2.40GHz, 2400.00 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC,SENSOR

cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Xeon(R) CPU X3430 @ 2.40GHz, 2400.00 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,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC,SENSOR

cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Xeon(R) CPU X3430 @ 2.40GHz, 2400.01 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,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC,SENSOR

cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 0, core 3, package 0
ioapic0 at mainbus0: apid 7 pa 0xfec0, version 20, 24 pins
ioapic0: misconfigured as apic 1, remapped to apid 7
acpimcfg0 at acpi0 addr 0xe000, bus 0-255
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (P0P1)
acpiprt2 at acpi0: bus 1 (P0P3)
acpiprt3 at acpi0: bus 2 (P0P5)
acpiprt4 at acpi0: bus -1 (P0P6)
acpiprt5 at acpi0: bus 6 (BR1E)
acpiprt6 at acpi0: bus 3 (BR20)
acpiprt7 at acpi0: bus 4 (BR24)
acpiprt8 at acpi0: bus 5 (BR25)
acpicpu0 at acpi0: !C3(350@17 mwait.1@0x20), !C2(500@17 mwait.1@0x10), 
C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: !C3(350@17 mwait.1@0x20), !C2(500@17 mwait.1@0x10), 
C1(1000@1 mwait.1), PSS
acpicpu2 at acpi0: !C3(350@17 mwait.1@0x20), !C2(500@17 mwait.1@0x10), 
C1(1000@1 mwait.1), PSS
acpicpu3 at acpi0: !C3(350@17 mwait.1@0x20), !C2(500@17 mwait.1@0x10), 
C1(1000@1 mwait.1), PSS

acpibtn0 at acpi0: SLPB
acpibtn1 at acpi0: PWRB
ipmi at mainbus0 not configured
cpu0: Enhanced SpeedStep 2400 MHz: speeds: 2401, 2400, 2267, 2133, 2000, 
1867, 1733, 1600, 1467, 1333, 1200 MHz

pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core DMI" rev 0x11
ppb0 at pci0 dev 3 function 0 "Intel Core PCIE" rev 0x11: msi
pci1 at ppb0 bus 1
ppb1 at pci0 dev 5 function 0 "Intel Core PCIE" rev 0x11: msi

Re: Ethernet not working

2015-11-04 Thread Atanas Vladimirov

On 04.11.2015 11:44, Jonathan Gray wrote:

On Wed, Nov 04, 2015 at 10:15:11AM +0100, Stefan Sperling wrote:

On Wed, Nov 04, 2015 at 01:53:33PM +0530, Jay Patel wrote:
> "Attansic Technology AR8172" rev 0x10 at pci1 dev 0 function 0 not configured

That's your ethernet device. The 'not configured' message means
there is no driver support in OpenBSD for this device yet.

It looks like Linux has a driver for it, called alx.

FreeBSD does not have a driver for this device either.


FreeBSD and NetBSD had sizable patches to alc(4) to support
that and related variants.  Anyone interested in making
these parts work should look at those patches.


Someone with good skills in programming can make better patch (as 
Jonathan

suggested from the following thread [0]).

[0] http://marc.info/?l=openbsd-tech=142774177502625=2



Supermicro X8SIL-F ipmi and lm issue

2015-10-13 Thread Atanas Vladimirov

Hi,
I observe strange behavior with Supermicro X8SIL-F. Latest BIOS and IPMI 
firmware.

Only one FAN is present (CPU FAN).
After some time of normal work IPMI start to report errors with one (or 
more) fans (low speed or not present).

'systat sensors' shows wrong or missing data for same fan.
I tryed to disable lm after reading [0] and it works for me.
Can this be ACPI related?

Also sometimes 'spdmem' is not configured:

-"eeprom" at iic0 addr 0x50 not configured
-"eeprom" at iic0 addr 0x52 not configured
+spdmem0 at iic0 addr 0x50: 2GB DDR3 SDRAM ECC PC3-10600 with thermal 
sensor
+spdmem1 at iic0 addr 0x52: 2GB DDR3 SDRAM ECC PC3-10600 with thermal 
sensor


[0] http://marc.info/?l=openbsd-misc=144433700723961=2

 ~$ systat se
1 usersLoad 1.06 1.06 0.82 Tue Oct 13 
12:56:25 2015


SENSOR  VALUE  STATUS  
DESCRIPTION

cpu0.temp0 38.00 degC
sdtemp0.temp0  34.12 degC
sdtemp1.temp0  34.12 degC
softraid0.drive0   onlineOKsd2
nmea0.indicator0   OnOKSignal
nmea0.timedelta0   601.000 usOKGPS
nmea0.angle0  42.6884 degreesOKLatitude
nmea0.angle1  23.3281 degreesOKLongitude

diff:

--- dmesg_with_lm   Fri Oct  9 22:15:02 2015
+++ dmesg_without_lmSat Oct 10 04:13:34 2015
@@ -1,4 +1,4 @@
-OpenBSD 5.8-current (GENERIC.MP) #1447: Fri Oct  9 06:33:19 MDT 2015
+OpenBSD 5.8-current (GENERIC.MP) #1448: Fri Oct  9 12:53:17 MDT 2015
 
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP

 real mem = 4269342720 (4071MB)
 avail mem = 4135829504 (3944MB)
@@ -15,7 +15,7 @@
 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 X3430 @ 2.40GHz, 2400.31 MHz
+cpu0: Intel(R) Xeon(R) CPU X3430 @ 2.40GHz, 2400.29 MHz
 cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC,SENSOR

 cpu0: 256KB 64b/line 8-way L2 cache
 cpu0: smt 0, core 0, package 0
@@ -103,8 +103,8 @@
 iic0 at ichiic0
 sdtemp0 at iic0 addr 0x18: cat34ts02
 sdtemp1 at iic0 addr 0x1a: cat34ts02
-"eeprom" at iic0 addr 0x50 not configured
-"eeprom" at iic0 addr 0x52 not configured
+spdmem0 at iic0 addr 0x50: 2GB DDR3 SDRAM ECC PC3-10600 with thermal 
sensor
+spdmem1 at iic0 addr 0x52: 2GB DDR3 SDRAM ECC PC3-10600 with thermal 
sensor

 isa0 at pcib0
 isadma0 at isa0
 com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
@@ -117,7 +117,7 @@
 pcppi0 at isa0 port 0x61
 spkr0 at pcppi0
 wbsio0 at isa0 port 0x2e/2: W83627DHG rev 0x25
-lm1 at wbsio0 port 0xa10/8: W83627DHG
+wbsio0 port 0xa10/2 not configured
 uhub2 at uhub0 port 1 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2
 uhidev0 at uhub2 port 2 configuration 1 interface 0 "Winbond 
Electronics Corp Hermon USB hidmouse Device" rev 1.10/0.01 addr 3

 uhidev0: iclass 3/1


dmesg with lm enabled:

OpenBSD 5.8-current (GENERIC.MP) #1447: Fri Oct  9 06:33:19 MDT 2015
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4269342720 (4071MB)
avail mem = 4135829504 (3944MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0x9f000 (70 entries)
bios0: vendor American Megatrends Inc. version "1.2a" date 06/27/2012
bios0: Supermicro X8SIL
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP APIC MCFG OEMB HPET GSCI SSDT EINJ BERT ERST 
HEST
acpi0: wakeup devices P0P1(S4) P0P3(S4) P0P4(S4) P0P5(S4) P0P6(S4) 
BR1E(S4) PS2K(S4) PS2M(S4) USB0(S4) USB1(S4) USB2(S4) USB3(S4) USB4(S4) 
USB5(S4) USB6(S4) GBE_(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) Xeon(R) CPU X3430 @ 2.40GHz, 2400.31 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC,SENSOR

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 133MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Xeon(R) CPU X3430 @ 2.40GHz, 2400.00 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC,SENSOR

cpu1: 

Re: who(XXXXX): syscall 54 in the last few snapshots

2015-10-12 Thread Atanas Vladimirov

On 12.10.2015 09:41, Sebastien Marie wrote:

On Mon, Oct 12, 2015 at 08:02:11AM +0300, Liviu Daia wrote:


I get something similar without nagios:

$ grep syscall /var/log/messages
Oct 10 07:50:26 router /bsd: tty(2446): syscall 54
Oct 10 07:50:33 router /bsd: tty(29826): syscall 54
Oct 10 07:54:15 router /bsd: tty(10733): syscall 54
Oct 10 07:54:15 router /bsd: tty(19344): syscall 54
Oct 10 07:58:59 router /bsd: tty(5574): syscall 54
Oct 10 07:59:05 router /bsd: tty(14634): syscall 54
Oct 10 08:02:47 router /bsd: tty(12313): syscall 54
Oct 10 08:02:47 router /bsd: tty(5281): syscall 54
Oct 10 08:06:23 router /bsd: tty(9186): syscall 54
Oct 10 08:06:23 router /bsd: tty(9710): syscall 54
Oct 11 01:30:01 router /bsd: tty(6080): syscall 54
Oct 12 01:30:01 router /bsd: tty(15518): syscall 54

$ uname -a
OpenBSD router.lcd047.linkpc.net 5.8 GENERIC.MP#1449 amd64


I'd tentatively correlate most of them with login(1) run in a 
serial

console.  But the last two entries seem to be triggered by /etc/daily.

Regards,

Liviu Daia



It should have been fixed by deraadt@ commit on
src/sys/kern/sys_generic.c (rev 1.107)

Please rebuild a new kernel (or wait for snapshots) for testing.

Thanks.


Yes, the problem was solved in OpenBSD 5.8-current (GENERIC.MP) #1462: 
Sun Oct 11 18:22:22 MDT 2015.

Thanks!



who(XXXXX): syscall 54 in the last few snapshots

2015-10-11 Thread Atanas Vladimirov

Hi,
I got *who(X): syscall 54* in the last few snapshots.
If you need more info just ask.

~$ ktrace -i who
~$ kdump
 
 16759 who  RET   read 2819/0xb03
 16759 who  CALL  close(4)
 16759 who  RET   close 0
 16759 who  CALL  kbind(0x7f7dcd58,0x18,0x962191a9ce60cd08)
 16759 who  RET   kbind 0
 16759 who  CALL  kbind(0x7f7dccc8,0x18,0x962191a9ce60cd08)
 16759 who  RET   kbind 0
 16759 who  CALL  write(1,0x1d987d241000,0x2f)
 16759 who  GIO   fd 1 wrote 47 bytes
   "vladottyp0Oct 11 11:37   (192.168.1.2)
   "
 16759 who  RET   write 47/0x2f
 16759 who  CALL  read(3,0x1d98baae1000,0x4000)
 16759 who  RET   read 0
 16759 who  CALL  kbind(0x7f7dce28,0x18,0x962191a9ce60cd08)
 16759 who  RET   kbind 0
 16759 who  CALL  kbind(0x7f7dce08,0x18,0x962191a9ce60cd08)
 16759 who  RET   kbind 0
 16759 who  CALL  
mprotect(0x1d98aa7a1000,0x1000,0x3)

 16759 who  RET   mprotect 0
 16759 who  CALL  mprotect(0x1d98aa7a1000,0x1000,0x1)
 16759 who  RET   mprotect 0
 16759 who  CALL  
mprotect(0x1d98aa7a1000,0x1000,0x3)

 16759 who  RET   mprotect 0
 16759 who  CALL  mprotect(0x1d98aa7a1000,0x1000,0x1)
 16759 who  RET   mprotect 0
 16759 who  CALL  
mprotect(0x1d98aa7a1000,0x1000,0x3)

 16759 who  RET   mprotect 0
 16759 who  CALL  mprotect(0x1d98aa7a1000,0x1000,0x1)
 16759 who  RET   mprotect 0
 16759 who  CALL  munmap(0x1d98aa7a1000,0x1000)
 16759 who  RET   munmap 0
 16759 who  CALL  exit(0)

~$ dmesg
OpenBSD 5.8-current (GENERIC.MP) #1456: Sat Oct 10 21:51:05 MDT 2015
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4269342720 (4071MB)
avail mem = 4135829504 (3944MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0x9f000 (70 entries)
bios0: vendor American Megatrends Inc. version "1.2a" date 06/27/2012
bios0: Supermicro X8SIL
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP APIC MCFG OEMB HPET GSCI SSDT EINJ BERT ERST 
HEST
acpi0: wakeup devices P0P1(S4) P0P3(S4) P0P4(S4) P0P5(S4) P0P6(S4) 
BR1E(S4) PS2K(S4) PS2M(S4) USB0(S4) USB1(S4) USB2(S4) USB3(S4) USB4(S4) 
USB5(S4) USB6(S4) GBE_(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) Xeon(R) CPU X3430 @ 2.40GHz, 2400.29 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC,SENSOR

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 133MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Xeon(R) CPU X3430 @ 2.40GHz, 2400.00 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC,SENSOR

cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Xeon(R) CPU X3430 @ 2.40GHz, 2400.00 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,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC,SENSOR

cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Xeon(R) CPU X3430 @ 2.40GHz, 2400.00 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,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC,SENSOR

cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 0, core 3, package 0
ioapic0 at mainbus0: apid 7 pa 0xfec0, version 20, 24 pins
ioapic0: misconfigured as apic 1, remapped to apid 7
acpimcfg0 at acpi0 addr 0xe000, bus 0-255
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (P0P1)
acpiprt2 at acpi0: bus 1 (P0P3)
acpiprt3 at acpi0: bus 2 (P0P5)
acpiprt4 at acpi0: bus -1 (P0P6)
acpiprt5 at acpi0: bus 6 (BR1E)
acpiprt6 at acpi0: bus 3 (BR20)
acpiprt7 at acpi0: bus 4 (BR24)
acpiprt8 at acpi0: bus 5 (BR25)
acpicpu0 at acpi0: !C3(350@17 mwait.1@0x20), !C2(500@17 mwait.1@0x10), 
C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: !C3(350@17 mwait.1@0x20), !C2(500@17 mwait.1@0x10), 
C1(1000@1 mwait.1), PSS
acpicpu2 at acpi0: !C3(350@17 

Re: who(XXXXX): syscall 54 in the last few snapshots

2015-10-11 Thread Atanas Vladimirov

On 11.10.2015 18:54, Sebastien Marie wrote:

On Sun, Oct 11, 2015 at 11:53:10AM +0300, Atanas Vladimirov wrote:

Hi,
I got *who(X): syscall 54* in the last few snapshots.
If you need more info just ask.


syscall 54 is for ioctl syscall.


~$ ktrace -i who
~$ kdump
 
 16759 who  RET   read 2819/0xb03
 16759 who  CALL  close(4)
 16759 who  RET   close 0
 16759 who  CALL  kbind(0x7f7dcd58,0x18,0x962191a9ce60cd08)
 16759 who  RET   kbind 0
 16759 who  CALL  kbind(0x7f7dccc8,0x18,0x962191a9ce60cd08)
 16759 who  RET   kbind 0
 16759 who  CALL  write(1,0x1d987d241000,0x2f)
 16759 who  GIO   fd 1 wrote 47 bytes
   "vladottyp0Oct 11 11:37   (192.168.1.2)
   "
 16759 who  RET   write 47/0x2f
 16759 who  CALL  read(3,0x1d98baae1000,0x4000)
 16759 who  RET   read 0
 16759 who  CALL  kbind(0x7f7dce28,0x18,0x962191a9ce60cd08)
 16759 who  RET   kbind 0
 16759 who  CALL  kbind(0x7f7dce08,0x18,0x962191a9ce60cd08)
 16759 who  RET   kbind 0
 16759 who  CALL
mprotect(0x1d98aa7a1000,0x1000,0x3<PROT_READ|PROT_WRITE>)
 16759 who  RET   mprotect 0
 16759 who  CALL  mprotect(0x1d98aa7a1000,0x1000,0x1)
 16759 who  RET   mprotect 0
 16759 who  CALL
mprotect(0x1d98aa7a1000,0x1000,0x3<PROT_READ|PROT_WRITE>)
 16759 who  RET   mprotect 0
 16759 who  CALL  mprotect(0x1d98aa7a1000,0x1000,0x1)
 16759 who  RET   mprotect 0
 16759 who  CALL
mprotect(0x1d98aa7a1000,0x1000,0x3<PROT_READ|PROT_WRITE>)
 16759 who  RET   mprotect 0
 16759 who  CALL  mprotect(0x1d98aa7a1000,0x1000,0x1)
 16759 who  RET   mprotect 0
 16759 who  CALL  munmap(0x1d98aa7a1000,0x1000)
 16759 who  RET   munmap 0
 16759 who  CALL  exit(0)


This ktrace showed a process that exit(0). This process wasn't killed
by pledge(2).


~$ dmesg
OpenBSD 5.8-current (GENERIC.MP) #1456: Sat Oct 10 21:51:05 MDT 2015

dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP


Could you try to rebuild who(1) ? You will need to add `abort' in all
pledge calls in order to generate a coredump, and obtain a
fullbacktrace.

$ grep -FRn 'pledge(' /usr/src/usr.bin/who/
/usr/src/usr.bin/who/who.c:77:  if (pledge("stdio rpath getpw tty", 
NULL) == -1)

/usr/src/usr.bin/who/who.c:293: if (pledge("stdio rpath
getpw", NULL) == -1)
/usr/src/usr.bin/who/who.c:296: if (pledge("stdio getpw", NULL) 
== -1)


For example, line 77: if (pledge("stdio rpath getpw tty abort", NULL) 
== -1)


When you get a who.core, you can use gdb to extract the backtrace:
$ gdb who who.core
(gdb) bt

Thanks.


I rebuild who(1) with DEBUG and add 'abort' in all pledge calls.
Also I changed kern.nosuidcoredump=3 and made /var/crash/who but I can't 
find who.core.
Meanwhile I got syscall 54 every 5 min. Is it possible another 
process/daemon to generate this errors?

How can I find it?

~$ tail /var/log/messages
Oct 11 19:54:37 ns /bsd: who(5929): syscall 54
Oct 11 19:59:37 ns /bsd: who(6769): syscall 54
Oct 11 20:04:37 ns /bsd: who(13907): syscall 54
Oct 11 20:09:37 ns /bsd: who(27822): syscall 54
Oct 11 20:14:37 ns /bsd: who(25574): syscall 54
Oct 11 20:19:37 ns /bsd: who(8480): syscall 54
Oct 11 20:24:37 ns /bsd: who(28849): syscall 54
Oct 11 20:29:37 ns /bsd: who(11423): syscall 54
Oct 11 20:34:37 ns /bsd: who(20946): syscall 54



Re: who(XXXXX): syscall 54 in the last few snapshots

2015-10-11 Thread Atanas Vladimirov

On 11.10.2015 21:18, Theo de Raadt wrote:

I rebuild who(1) with DEBUG and add 'abort' in all pledge calls.
Also I changed kern.nosuidcoredump=3 and made /var/crash/who but I 
can't

find who.core.
Meanwhile I got syscall 54 every 5 min. Is it possible another
process/daemon to generate this errors?
How can I find it?

~$ tail /var/log/messages
Oct 11 19:54:37 ns /bsd: who(5929): syscall 54
Oct 11 19:59:37 ns /bsd: who(6769): syscall 54
Oct 11 20:04:37 ns /bsd: who(13907): syscall 54
Oct 11 20:09:37 ns /bsd: who(27822): syscall 54
Oct 11 20:14:37 ns /bsd: who(25574): syscall 54
Oct 11 20:19:37 ns /bsd: who(8480): syscall 54
Oct 11 20:24:37 ns /bsd: who(28849): syscall 54
Oct 11 20:29:37 ns /bsd: who(11423): syscall 54
Oct 11 20:34:37 ns /bsd: who(20946): syscall 54


I have no explanation for this.  You'll have to keep digging to find
it.
I think that I found it - Nagios. Now the question is how to debug it 
further?




Re: OpenBGPd error /bsd: bgpd(): syscall 105

2015-10-06 Thread Atanas Vladimirov

On 02.10.2015 10:40, Atanas Vladimirov wrote:

On 01.10.2015 20:00, Sebastien Marie wrote:

On Thu, Oct 01, 2015 at 12:21:33PM -0400, Michael McConville wrote:

Atanas Vladimirov wrote:
> Snapshot from sep 30 bgpd didn't startup:
> Oct  1 08:32:28 ns /bsd: bgpd(28055): syscall 105
> Oct  1 08:32:28 ns bgpd[29697]: handle_pollfd: poll fd: Undefined error: 0
> Oct  1 08:32:28 ns bgpd[29697]: RDE: Lost connection to SE
> Oct  1 08:32:28 ns bgpd[27739]: handle_pollfd: poll fd: No such file or
> directory
> Oct  1 08:32:28 ns bgpd[29697]: handle_pollfd: poll fd: Undefined error: 0
> Oct  1 08:32:28 ns bgpd[29697]: RDE: Lost connection to SE control
> Oct  1 08:32:28 ns bgpd[27739]: main: Lost connection to SE
> Oct  1 08:32:28 ns bgpd[27739]: Lost child: session engine terminated;
> signal 9

This looks like a result of the new tame(2)ing. Below are the tame 
calls

that were just added to bgpd, according to Theo's diff.



the revision 1.46 of src/sys/kern/kern_tame.c should have corrected 
the

problem.

bgpd use IPv6 setsockopts that weren't allowed.


Snapshot Thu Oct  1 20:58:20 MDT 2015



This commit [1] fixed the problem. Thanks.

[1] http://marc.info/?l=openbsd-cvs=144406193609770=2



/bsd: em0: watchdog timeout -- resetting

2015-10-02 Thread Atanas Vladimirov

Hi,
I'm following -current and the last *good* snapshots was from Sep 25.
I made a few updates including the snapshot from Oct 02 and today was 
the third

time I get:

/bsd: em0: watchdog timeout -- resetting

ifconfig down; ifconfig up corrects the problem.

OpenBSD 5.8-current (GENERIC.MP) #1405: Thu Oct  1 20:58:20 MDT 2015
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4261285888 (4063MB)
avail mem = 4128014336 (3936MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xe9510 (23 entries)
bios0: vendor American Megatrends Inc. version "1.1" date 04/29/2014
bios0: Supermicro X9SBAA
acpi0 at bios0: rev 2
acpi0: sleep states S0 S5
acpi0: tables DSDT FACP APIC FPDT MCFG HPET SPMI EINJ ERST HEST BERT
acpi0: wakeup devices PRP4(S1)
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) Atom(TM) CPU S1260 @ 2.00GHz, 1995.22 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-

CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu0: 512KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 7 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.0.2.0.3, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Atom(TM) CPU S1260 @ 2.00GHz, 1995.00 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-

CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu1: 512KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Atom(TM) CPU S1260 @ 2.00GHz, 1995.00 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,DTES64,MWAIT,DS-

CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu2: 512KB 64b/line 8-way L2 cache
cpu2: smt 0, core 1, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Atom(TM) CPU S1260 @ 2.00GHz, 1995.00 MHz 

[57/1904]
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,DTES64,MWAIT,DS-

CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu3: 512KB 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 0xc000, bus 0-255
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (PRP1)
acpiprt2 at acpi0: bus 2 (PRP2)
acpiprt3 at acpi0: bus 4 (P3P4)
acpicpu0 at acpi0: C1(1000@20 halt), PSS
acpicpu1 at acpi0: C1(1000@20 halt), PSS
acpicpu2 at acpi0: C1(1000@20 halt), PSS
acpicpu3 at acpi0: C1(1000@20 halt), PSS
acpitz0 at acpi0: critical temperature is 127 degC
acpitz1 at acpi0: critical temperature is 175 degC
acpibtn0 at acpi0: SLPB
acpibtn1 at acpi0: PWRB
ipmi at mainbus0 not configured
cpu0: Enhanced SpeedStep 1995 MHz: speeds: 2000, 1900, 1800, 1700, 1600, 
1500, 1400, 1300, 1200, 1100, 1000, 900, 800, 700, 600 MHz

pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Atom S1260 Host" rev 0x01
ppb0 at pci0 dev 1 function 0 "Intel Atom S1200 PCIE" rev 0x01
pci1 at ppb0 bus 1
ahci0 at pci1 dev 0 function 0 "Marvell 88SE9230 AHCI" rev 0x10: msi, 
AHCI 1.2

ahci0: port 0: 6.0Gb/s
ahci0: port 2: 1.5Gb/s
ahci0: port 7: 1.5Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0:  SCSI3 0/direct 
fixed naa.5000c50040390431

sd0: 152627MB, 512 bytes/sector, 312581808 sectors
sd1 at scsibus1 targ 2 lun 0:  SCSI3 
0/direct fixed naa.5000cca205d8de7f

sd1: 157066MB, 512 bytes/sector, 321672960 sectors
uk0 at scsibus1 targ 7 lun 0:  ATAPI 3/processor 
removable

ppb1 at pci0 dev 2 function 0 "Intel Atom S1200 PCIE" rev 0x01
pci2 at ppb1 bus 2
xhci0 at pci2 dev 0 function 0 "Renesas uPD720201 xHCI" rev 0x03: msi
xhci0: reset timeout
xhci0: init failed, error=5
ppb2 at pci0 dev 3 function 0 "Intel Atom S1200 PCIE" rev 0x01
pci3 at ppb2 bus 3
ppb3 at pci3 dev 0 function 0 "Newbridge PEB383 PCIE-PCI" rev 0x01
pci4 at ppb3 bus 4
em0 at pci4 dev 0 function 0 "Intel 82540EM" rev 0x02: apic 2 int 21, 
address 00:07:e9:10:32:a8

vga1 at pci4 dev 3 function 0 "Matrox MGA G200eW" rev 0x0a
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
ppb4 at pci0 dev 4 function 0 "Intel Atom S1200 PCIE" rev 0x01
pci5 at ppb4 bus 5
em1 at pci5 dev 0 

Re: /bsd: em0: watchdog timeout -- resetting

2015-10-02 Thread Atanas Vladimirov

On 02.10.2015 16:58, Atanas Vladimirov wrote:

Hi,
I'm following -current and the last *good* snapshots was from Sep 25.
I made a few updates including the snapshot from Oct 02 and today was 
the third

time I get:  ^^

 It's Oct 01



/bsd: em0: watchdog timeout -- resetting

ifconfig down; ifconfig up corrects the problem.

OpenBSD 5.8-current (GENERIC.MP) #1405: Thu Oct  1 20:58:20 MDT 2015

dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP

real mem = 4261285888 (4063MB)
avail mem = 4128014336 (3936MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xe9510 (23 entries)
bios0: vendor American Megatrends Inc. version "1.1" date 04/29/2014
bios0: Supermicro X9SBAA
acpi0 at bios0: rev 2
acpi0: sleep states S0 S5
acpi0: tables DSDT FACP APIC FPDT MCFG HPET SPMI EINJ ERST HEST BERT
acpi0: wakeup devices PRP4(S1)
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) Atom(TM) CPU S1260 @ 2.00GHz, 1995.22 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-
CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu0: 512KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 7 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.0.2.0.3, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Atom(TM) CPU S1260 @ 2.00GHz, 1995.00 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-
CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu1: 512KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Atom(TM) CPU S1260 @ 2.00GHz, 1995.00 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,DTES64,MWAIT,DS-
CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu2: 512KB 64b/line 8-way L2 cache
cpu2: smt 0, core 1, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Atom(TM) CPU S1260 @ 2.00GHz, 1995.00 MHz

[57/1904]
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,DTES64,MWAIT,DS-
CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu3: 512KB 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 0xc000, bus 0-255
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (PRP1)
acpiprt2 at acpi0: bus 2 (PRP2)
acpiprt3 at acpi0: bus 4 (P3P4)
acpicpu0 at acpi0: C1(1000@20 halt), PSS
acpicpu1 at acpi0: C1(1000@20 halt), PSS
acpicpu2 at acpi0: C1(1000@20 halt), PSS
acpicpu3 at acpi0: C1(1000@20 halt), PSS
acpitz0 at acpi0: critical temperature is 127 degC
acpitz1 at acpi0: critical temperature is 175 degC
acpibtn0 at acpi0: SLPB
acpibtn1 at acpi0: PWRB
ipmi at mainbus0 not configured
cpu0: Enhanced SpeedStep 1995 MHz: speeds: 2000, 1900, 1800, 1700,
1600, 1500, 1400, 1300, 1200, 1100, 1000, 900, 800, 700, 600 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Atom S1260 Host" rev 0x01
ppb0 at pci0 dev 1 function 0 "Intel Atom S1200 PCIE" rev 0x01
pci1 at ppb0 bus 1
ahci0 at pci1 dev 0 function 0 "Marvell 88SE9230 AHCI" rev 0x10: msi, 
AHCI 1.2

ahci0: port 0: 6.0Gb/s
ahci0: port 2: 1.5Gb/s
ahci0: port 7: 1.5Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, ST3160316AS, JC4B> SCSI3 0/direct
fixed naa.5000c50040390431
sd0: 152627MB, 512 bytes/sector, 312581808 sectors
sd1 at scsibus1 targ 2 lun 0: <ATA, HDT722516DLA380, V43O> SCSI3
0/direct fixed naa.5000cca205d8de7f
sd1: 157066MB, 512 bytes/sector, 321672960 sectors
uk0 at scsibus1 targ 7 lun 0: <Marvell, Console, 1.01> ATAPI
3/processor removable
ppb1 at pci0 dev 2 function 0 "Intel Atom S1200 PCIE" rev 0x01
pci2 at ppb1 bus 2
xhci0 at pci2 dev 0 function 0 "Renesas uPD720201 xHCI" rev 0x03: msi
xhci0: reset timeout
xhci0: init failed, error=5
ppb2 at pci0 dev 3 function 0 "Intel Atom S1200 PCIE" rev 0x01
pci3 at ppb2 bus 3
ppb3 at pci3 dev 0 function 0 "Newbridge PEB383 PCIE-PCI" rev 0x01
pci4 at ppb3 bus 4
em0 at pci4 dev 0 function 0 "Intel 82540EM" rev 0x02: apic 2 int 21,
address 00:07:e9:10:32:a8
vga1 at pci4 dev 3 function 0 "Matrox MGA G200eW" rev 0x0a
wsdisplay0 at vga1 mux 1: console (80x25, 

Re: OpenBGPd error /bsd: bgpd(): syscall 105

2015-10-02 Thread Atanas Vladimirov

On 01.10.2015 20:00, Sebastien Marie wrote:

On Thu, Oct 01, 2015 at 12:21:33PM -0400, Michael McConville wrote:

Atanas Vladimirov wrote:
> Snapshot from sep 30 bgpd didn't startup:
> Oct  1 08:32:28 ns /bsd: bgpd(28055): syscall 105
> Oct  1 08:32:28 ns bgpd[29697]: handle_pollfd: poll fd: Undefined error: 0
> Oct  1 08:32:28 ns bgpd[29697]: RDE: Lost connection to SE
> Oct  1 08:32:28 ns bgpd[27739]: handle_pollfd: poll fd: No such file or
> directory
> Oct  1 08:32:28 ns bgpd[29697]: handle_pollfd: poll fd: Undefined error: 0
> Oct  1 08:32:28 ns bgpd[29697]: RDE: Lost connection to SE control
> Oct  1 08:32:28 ns bgpd[27739]: main: Lost connection to SE
> Oct  1 08:32:28 ns bgpd[27739]: Lost child: session engine terminated;
> signal 9

This looks like a result of the new tame(2)ing. Below are the tame 
calls

that were just added to bgpd, according to Theo's diff.



the revision 1.46 of src/sys/kern/kern_tame.c should have corrected the
problem.

bgpd use IPv6 setsockopts that weren't allowed.


Snapshot Thu Oct  1 20:58:20 MDT 2015

Oct  2 10:34:42 ns /bsd: bgpd(20063): sysctl 6: 4 17 0 0 3 0
Oct  2 10:34:42 ns /bsd: bgpd(20063): syscall 202
Oct  2 10:34:42 ns bgpd[23914]: handle_pollfd: poll fd: No such file or 
directory

Oct  2 10:34:42 ns bgpd[23914]: main: Lost connection to RDE
Oct  2 10:34:42 ns bgpd[23914]: Lost child: route decision engine 
terminated; signal 9



15629 bgpd GIO   fd 2 wrote 84 bytes
   "neighbor 64.142.121.62: state change Connect -> OpenSent, 
reason: Connection opened

   "
 15629 bgpd RET   write 84/0x54
 15629 bgpd CALL  write(2,0x7f7bc240,0x4b)
 15629 bgpd GIO   fd 2 wrote 75 bytes
   "neighbor 217.31.80.170: sending notification: Cease, 
administratively down

   "
 15629 bgpd RET   write 75/0x4b
 15629 bgpd CALL  sendmsg(10,0x7f7bc840,0)
 15629 bgpd STRU  struct msghdr { name=0x0, namelen=0, 
iov=0x7f7b8840, iovlen=1, control=0x0, controllen=0, flags=0 }

 15629 bgpd STRU  struct iovec { base=0xc19f3bab0c0, len=21 }
 15629 bgpd GIO   fd 10 wrote 21 bytes
   
"\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\0\^U\^C\^F\^B"

 15629 bgpd RET   sendmsg 21/0x15
 15629 bgpd CALL  close(10)
 15629 bgpd RET   close 0
 15629 bgpd CALL  gettimeofday(0x7f7bc860,0)
 15629 bgpd STRU  struct timeval { 1443771283<"Oct  2 10:34:43 
2015">.044866 }

 15629 bgpd RET   gettimeofday 0
 15629 bgpd PSIG  SIGSEGV SIG_DFL code SEGV_MAPERR<1> addr=0x1003c 
trapno=6

 23914 bgpd RET   wait4 -1 errno 10 No child processes
 23914 bgpd PSIG  SIGSEGV SIG_DFL code SEGV_MAPERR<1> addr=0x10020 
trapno=6

 23914 bgpd NAMI  "bgpd.core"


OpenBSD 5.8-current (GENERIC.MP) #1405: Thu Oct  1 20:58:20 MDT 2015
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4261285888 (4063MB)
avail mem = 4128014336 (3936MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xe9510 (23 entries)
bios0: vendor American Megatrends Inc. version "1.1" date 04/29/2014
bios0: Supermicro X9SBAA
acpi0 at bios0: rev 2
acpi0: sleep states S0 S5
acpi0: tables DSDT FACP APIC FPDT MCFG HPET SPMI EINJ ERST HEST BERT
acpi0: wakeup devices PRP4(S1)
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) Atom(TM) CPU S1260 @ 2.00GHz, 1995.22 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-C

PL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu0: 512KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 7 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.0.2.0.3, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Atom(TM) CPU S1260 @ 2.00GHz, 1995.00 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-C

PL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu1: 512KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Atom(TM) CPU S1260 @ 2.00GHz, 1995.00 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,DTES64,MWAIT,DS-C

PL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu2: 512KB 64b/line 8-way L2 cache
cpu2: smt 0, core 1, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Atom(TM) CPU S1260 @ 2.00GHz, 1995.00 MHz 
  

OpenBGPd error /bsd: bgpd(): syscall 105

2015-10-01 Thread Atanas Vladimirov

Snapshot from sep 30 bgpd didn't startup:
Oct  1 08:32:28 ns /bsd: bgpd(28055): syscall 105
Oct  1 08:32:28 ns bgpd[29697]: handle_pollfd: poll fd: Undefined error: 
0

Oct  1 08:32:28 ns bgpd[29697]: RDE: Lost connection to SE
Oct  1 08:32:28 ns bgpd[27739]: handle_pollfd: poll fd: No such file or 
directory
Oct  1 08:32:28 ns bgpd[29697]: handle_pollfd: poll fd: Undefined error: 
0

Oct  1 08:32:28 ns bgpd[29697]: RDE: Lost connection to SE control
Oct  1 08:32:28 ns bgpd[27739]: main: Lost connection to SE
Oct  1 08:32:28 ns bgpd[27739]: Lost child: session engine terminated; 
signal 9


[ns]~/upgrade$ dmesg
OpenBSD 5.8-current (GENERIC.MP) #1397: Wed Sep 30 10:10:03 MDT 2015
   dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4261285888 (4063MB)
avail mem = 4128014336 (3936MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xe9510 (23 entries)
bios0: vendor American Megatrends Inc. version "1.1" date 04/29/2014
bios0: Supermicro X9SBAA
acpi0 at bios0: rev 2
acpi0: sleep states S0 S5
acpi0: tables DSDT FACP APIC FPDT MCFG HPET SPMI EINJ ERST HEST BERT
acpi0: wakeup devices PRP4(S1)
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) Atom(TM) CPU S1260 @ 2.00GHz, 1995.22 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT

cpu0: 512KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 7 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.0.2.0.3, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Atom(TM) CPU S1260 @ 2.00GHz, 1995.00 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT

cpu1: 512KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Atom(TM) CPU S1260 @ 2.00GHz, 1995.00 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,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT

cpu2: 512KB 64b/line 8-way L2 cache
cpu2: smt 0, core 1, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Atom(TM) CPU S1260 @ 2.00GHz, 1995.00 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,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT

cpu3: 512KB 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 0xc000, bus 0-255
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (PRP1)
acpiprt2 at acpi0: bus 2 (PRP2)
acpiprt3 at acpi0: bus 4 (P3P4)
acpicpu0 at acpi0: C1(1000@20 halt), PSS
acpicpu1 at acpi0: C1(1000@20 halt), PSS
acpicpu2 at acpi0: C1(1000@20 halt), PSS
acpicpu3 at acpi0: C1(1000@20 halt), PSS
acpitz0 at acpi0: critical temperature is 127 degC
acpitz1 at acpi0: critical temperature is 175 degC
acpibtn0 at acpi0: SLPB
acpibtn1 at acpi0: PWRB
ipmi at mainbus0 not configured
cpu0: Enhanced SpeedStep 1995 MHz: speeds: 2000, 1900, 1800, 1700, 1600, 
1500, 1400, 1300, 1200, 1100, 1000, 900, 800, 700, 600 MHz

pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Atom S1260 Host" rev 0x01
ppb0 at pci0 dev 1 function 0 "Intel Atom S1200 PCIE" rev 0x01
pci1 at ppb0 bus 1
ahci0 at pci1 dev 0 function 0 "Marvell 88SE9230 AHCI" rev 0x10: msi, 
AHCI 1.2

ahci0: port 0: 6.0Gb/s
ahci0: port 2: 1.5Gb/s
ahci0: port 7: 1.5Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0:  SCSI3 0/direct 
fixed naa.5000c50040390431

sd0: 152627MB, 512 bytes/sector, 312581808 sectors
sd1 at scsibus1 targ 2 lun 0:  SCSI3 
0/direct fixed naa.5000cca205d8de7f

sd1: 157066MB, 512 bytes/sector, 321672960 sectors
uk0 at scsibus1 targ 7 lun 0:  ATAPI 3/processor 
removable

ppb1 at pci0 dev 2 function 0 "Intel Atom S1200 PCIE" rev 0x01
pci2 at ppb1 bus 2
xhci0 at pci2 dev 0 function 0 "Renesas uPD720201 xHCI" rev 0x03: msi
xhci0: reset timeout
xhci0: init failed, error=5
ppb2 at pci0 dev 3 function 0 "Intel Atom S1200 PCIE" rev 0x01
pci3 at ppb2 bus 3
ppb3 at pci3 dev 0 function 0 "Newbridge PEB383 PCIE-PCI" rev 0x01
pci4 at ppb3 bus 4
em0 at pci4 dev 0 function 0 "Intel 82540EM" rev 0x02: apic 2 int 21, 
address 00:07:e9:10:32:a8

vga1 at pci4 dev 3 

Re: missing mailing list message(s)?

2015-09-01 Thread Atanas Vladimirov

On 01.09.2015 22:05, Todd C. Miller wrote:

The mailing list server has been hitting a kernel bug that may have
caused some outgoing messages to be lost.

 - todd


Some incoming messages as well. My first message about "ddb.html typo" 
got lost too:



   Hi!

   This is the MAILER-DAEMON, please DO NOT REPLY to this e-mail.

   A message is delayed for more than 4 hours for the following
   list of recipients:

misc@openbsd.org: Network error on destination MXs

   Please note that this is only a temporary failure report.
   The message is kept in the queue for up to 4 days.
   You DO NOT NEED to re-send the message to these recipients.

   Below is a copy of the original message:

Received: from smtp.bsdbg.net (ns.bsdbg.net [94.26.7.48])
   by cvs.openbsd.org (OpenSMTPD) with ESMTPS id f4761491
   TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256 
verify=FAIL

   for <misc@openbsd.org>;
   Mon, 31 Aug 2015 01:57:55 -0600 (MDT)
Received: from localhost (bsdbg.net [local])
   by bsdbg.net (OpenSMTPD) with ESMTPA id 1e6e4fd0
   for <misc@openbsd.org>;
   Mon, 31 Aug 2015 10:56:36 +0300 (EEST)
Date: Mon, 31 Aug 2015 10:56:36 +0300
From: Atanas Vladimirov <vl...@ns.bsdbg.net>
To: misc@openbsd.org
Subject: ddb.html typo
Message-ID: <20150831075636.ga12...@ns.bsdbg.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.23 (2014-03-12)




Re: pf vs mp

2015-09-01 Thread Atanas Vladimirov

On 01.09.2015 22:06, Quartz wrote:

but the short answer is to use the
multi-processor system. The single core will perform better when you 
care
nothing about your performance, the multi-core system will perform 
better

the only time you care at all about performance.


I think some information is getting lost here. I'm not comparing
single vs multi core operation in a purely mathematical sense on
identical hardware. I'm trying to decide between a setup that uses a
relatively fast single core vs a setup that uses slower multi cores.
In aggregate the multiple cores have more processing power than the
fast single, but in isolation are notably slower. The workload is
mainly pf, and given that pf is currently single threaded, I'm trying
to figure out if the other stuff on the box causes enough overhead
that going with slower multi cores will end up being faster in the end
or not.


 I red all thoughts till now and my advice is if you are going to buy
 a new hardware now (year 2015) take multi core CPU.
 The OpenBSD just get better every day and if you follow tech@, 
source-changes@
 and misc@ you already know that our beloved OS soon or later will 
spread load

 on all CPU/CORES (device drivers, TCP/IP stack, pf and so on).



ddb.html typo

2015-08-31 Thread Atanas Vladimirov

Index: ddb.html
===
RCS file: /home/vlado/cvsync/cvsroot/www/ddb.html,v
retrieving revision 1.3
diff -u -p -r1.3 ddb.html
--- ddb.html30 Aug 2015 17:32:13 -  1.3
+++ ddb.html31 Aug 2015 07:50:13 -
@@ -16,7 +16,7 @@

Minimum information for kernel problems

-Familiarize yourself with the general bug reporting 
procedures
+Familiarize yourself with the general bug reporting 
procedures

 first. All of that will apply.

When reporting a kernel panic or crash, please remember:


Sent with AquaMail for Android
http://www.aqua-mail.com



Supermicro X9SBAA-F COM2 not working

2015-08-23 Thread Atanas Vladimirov

Hi,

This motherboard has 3 serial pors:
COM0 as header from WPCM450
COM1 which is internally connected as SOL (Serial-Over-LAN)
COM2 Fast 16550 UART COM port on the I/O back panel from S1260 as a PCI 
device.


COM0/1 are working:
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
com1: console

COM2 is not working:
Intel Atom S1200 UART rev 0x01 at pci0 dev 20 function 0 not 
configured


 # pcidump -v
 0:20:0: Intel Atom S1200 UART
0x: Vendor ID: 8086 Product ID: 0c5f
0x0004: Command: 0107 Status: 0010
0x0008: Class: 07 Subclass: 00 Interface: 02 Revision: 01
0x000c: BIST: 00 Header Type: 00 Latency Timer: 00 Cache Line 
Size: 00

0x0010: BAR io addr: 0xf000/0x0008
0x0014: BAR mem 32bit addr: 0xfe48/0x0100
0x0018: BAR empty ()
0x001c: BAR empty ()
0x0020: BAR empty ()
0x0024: BAR empty ()
0x0028: Cardbus CIS: 
0x002c: Subsystem Vendor ID: 15d9 Product ID: 0651
0x0030: Expansion ROM Base Address: 
0x0038: 
0x003c: Interrupt Pin: 01 Line: 07 Min Gnt: 00 Max Lat: 00
0x0040: Capability 0x05: Message Signaled Interrupts (MSI)
0x0050: Capability 0x01: Power Management

I found a dmesg from NetBSD[1]:

puc0 at pci0 dev 20 function 0: Intel S1200 UART (com)
com2 at puc0 port 0 (16550-compatible): ioaddr 0xf000, interrupting at 
ioapic0 pin 16

com2: ns16550a, working fifo
com2: console

If it would help I can boot FreeBSD or Linux(Debian?).

[1] http://dmesgd.nycbug.org/index.cgi?action=dmesgddo=viewid=2549

 dmesg is from GENERIC.MP with option XHCI_DEBUG because of a problem 
with usb3


OpenBSD 5.8-current (XHCI_DEBUG.MP) #0: Fri Aug 21 22:26:33 EEST 2015
vl...@ns.bsdbg.net:/sys/arch/amd64/compile/XHCI_DEBUG.MP
real mem = 4261285888 (4063MB)
avail mem = 4128247808 (3937MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xe9510 (23 entries)
bios0: vendor American Megatrends Inc. version 1.1 date 04/29/2014
bios0: Supermicro X9SBAA
acpi0 at bios0: rev 2
acpi0: sleep states S0 S5
acpi0: tables DSDT FACP APIC FPDT MCFG HPET SPMI EINJ ERST HEST BERT
acpi0: wakeup devices PRP4(S1)
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) Atom(TM) CPU S1260 @ 2.00GHz, 1995.22 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,

SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu0: 512KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 7 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.0.2.0.3, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Atom(TM) CPU S1260 @ 2.00GHz, 1995.00 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,

SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu1: 512KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xc000, bus 0-255
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (PRP1)
acpiprt2 at acpi0: bus 2 (PRP2)
acpiprt3 at acpi0: bus 4 (P3P4)
acpicpu0 at acpi0: C1(1000@20 halt), PSS
acpicpu1 at acpi0: C1(1000@20 halt), PSS
acpitz0 at acpi0: critical temperature is 127 degC
acpitz1 at acpi0: critical temperature is 175 degC
acpibtn0 at acpi0: SLPB
acpibtn1 at acpi0: PWRB
ipmi at mainbus0 not configured
cpu0: Enhanced SpeedStep 1995 MHz: speeds: 2000, 1900, 1800, 1700, 1600, 
1500, 1400, 1300, 1200, 1100, 1000, 900, 800, 700, 6

00 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 Intel Atom S1260 Host rev 0x01
ppb0 at pci0 dev 1 function 0 Intel Atom S1200 PCIE rev 0x01
pci1 at ppb0 bus 1
ahci0 at pci1 dev 0 function 0 Marvell 88SE9230 AHCI rev 0x10: msi, 
AHCI 1.2

ahci0: port 0: 6.0Gb/s
ahci0: port 2: 3.0Gb/s
ahci0: port 7: 1.5Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: ATA, ST3160316AS, JC4B SCSI3 0/direct 
fixed naa.5000c50040390431

sd0: 152627MB, 512 bytes/sector, 312581808 sectors
sd1 at scsibus1 targ 2 lun 0: ATA, HDT722516DLA380, V43O SCSI3 
0/direct fixed naa.5000cca205ddd62d

sd1: 157066MB, 512 bytes/sector, 321672960 sectors
uk0 at scsibus1 targ 7 lun 0: Marvell, Console, 1.01 ATAPI 3/processor 
removable

ppb1 at pci0 dev 2 function 0 Intel Atom S1200 PCIE rev 0x01
pci2 at ppb1 bus 2
xhci0 at pci2 dev 0 function 0 Renesas uPD720201 xHCI rev 0x03: msi
xhci0: xHCI version 1.0
xhci0: CAPLENGTH=0x20
xhci0: DOORBELL=0x800
xhci0: 

Re: Supermicro X9SBAA-F COM2 not working

2015-08-23 Thread Atanas Vladimirov

On 24.08.2015 01:22, Atanas Vladimirov wrote:

Hi,

This motherboard has 3 serial pors:
COM0 as header from WPCM450
COM1 which is internally connected as SOL (Serial-Over-LAN)
COM2 Fast 16550 UART COM port on the I/O back panel from S1260 as a PCI 
device.


COM0/1 are working:
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
com1: console

COM2 is not working:
Intel Atom S1200 UART rev 0x01 at pci0 dev 20 function 0 not 
configured


 Theo made me happy :)
 Thanks.
 http://marc.info/?l=openbsd-cvsm=144037187832235w=2



Re: per-vlan traffic control

2015-08-20 Thread Atanas Vladimirov

On 20.08.2015 16:35, Paulo Coimbra wrote:
Well, considering that only outbound packets can be queued, I've 
changed

some rules at pf.conf. Packets that are outgoing at $if_Internet, is
upload. Packets that are outgoing at vlan100 is download, all right? 
My
changed pf.conf below: (but even with these changes, doesn´t work for 
me, I

getting 300Mb+ each direction.). Am I a dumb? (LMFAO).

#
# [0x01] Macros
#
$if_Internet=em1

#
# [0x05] Queueing
#
queue Internet on $if_Internet bandwidth 10M
queue vlan100_upload parent Internet bandwidth 5M max 5M default

queue v100 on vlan100 bandwidth 10M
queue vlan100_download parent v100 bandwidth 5M max 5M default

#
# [0x07] Packet Filtering
#

pass out quick on vlan100 set queue vlan100_download no state
pass out quick on $if_Internet set queue vlan100_upload no state


br,

Paulo Coimbra



http://marc.info/?l=openbsd-miscm=141085207225887w=2



Re: SuperMicro thin mini itx?

2015-08-20 Thread Atanas Vladimirov

On 20.08.2015 04:46, Quartz wrote:

Try the X10SBA


Doesn't appear to fit the bill, unfortunately. That hdmi+displayport
stack is too high, and while it has onboard DC12V it's missing the
standardized plug on the back.

Given that no one else has responded, I'm assuming that SuperMicro
just doesn't make boards in this form factor, which is disappointing
given how many other embedded solutions they offer. We'll probably
have to go with an Intel model or something. Oh well.


From Supermicro website:
http://www.supermicro.nl/products/motherboard/ATOM/
http://www.supermicro.nl/products/embedded/embedded_motherboard.cfm

Recently I bought a X9SBAA-F on ebay and except this bug[1] everything
is working as it should.

[1] http://marc.info/?l=openbsd-bugsm=144001965023035w=2



Re: per-vlan traffic control

2015-08-20 Thread Atanas Vladimirov

On 20.08.2015 17:31, Paulo Coimbra wrote:

Hi Atanas,

Thanks for your response. I follow some configurations in that link you
send, but nothing had effect. Packets is not going to queues.

br,

Paulo Coimbra

2015-08-20 10:55 GMT-03:00 Atanas Vladimirov vl...@bsdbg.net:


On 20.08.2015 16:35, Paulo Coimbra wrote:

Well, considering that only outbound packets can be queued, I've 
changed
some rules at pf.conf. Packets that are outgoing at $if_Internet, 
is
upload. Packets that are outgoing at vlan100 is download, all 
right? My
changed pf.conf below: (but even with these changes, doesn´t work 
for

me, I
getting 300Mb+ each direction.). Am I a dumb? (LMFAO).

#
# [0x01] Macros
#
$if_Internet=em1

#
# [0x05] Queueing
#
queue Internet on $if_Internet bandwidth 10M
queue vlan100_upload parent Internet bandwidth 5M max 5M default

queue v100 on vlan100 bandwidth 10M
queue vlan100_download parent v100 bandwidth 5M max 5M default



Did you try to set the min bw as well:

 #
 # [0x05] Queueing
 #
 queue Internet on $if_Internet bandwidth 10M, min 9M max 10M
 queue vlan100_upload parent Internet bandwidth 5M, min 4M max 5M 
default


 queue v100 on vlan100 bandwidth 10M, min 9M max 10M
 queue vlan100_download parent v100 bandwidth 5M, min 4M max 5M default



Re: Collect logs with syslog +hostname

2015-07-29 Thread Atanas Vladimirov

On 29.07.2015 16:31, Gregory Edigarov wrote:

On 07/29/2015 03:46 PM, Atanas Vladimirov wrote:

Thanks for the hint.
Actually I modified syslog.conf to begin with

++wdr4900
*.* /var/log/w4900
+*

because I wanted all records from OpenWRT router to be in one place 
(/var/log/w4900).


It seems that the real problem/misunderstanding was the part with 
/etc/hosts.

Why syslogd doesn't use /etc/resolve.conf?

Because at the time of developing the patch (I was developing it for
myself) I wanted it to be as small and as less invasive as possible.
I could have made it work with the resolver, but that was:
1. more invasive
2. less secure
3. it wouldn't be accepted

I got it. Thanks for your work.



If you need more complex log processing, you _should_ look at
different projects like rsyslog, syslog-ng or nxlog.

I don't need anything more complex. That's why I use OpenBSD.
I think that it *may* be a good idea to add a note in SYSLOG.CONF(5) 
about /etc/hosts.




Re: Collect logs with syslog +hostname

2015-07-29 Thread Atanas Vladimirov

On 28.07.2015 15:24, Gregory Edigarov wrote:

On 07/28/2015 03:20 PM, Gregory Edigarov wrote:

On 07/28/2015 02:41 PM, Atanas Vladimirov wrote:

Hi,
I tried the new feature of syslogd to collect log messages from other 
syslog capable devices (in this case an OpenWRT router).
I red syslog.conf many times, but I can't figure it why it doesn't 
work.


[ns]~$ cat /etc/syslog.conf
#   $OpenBSD: syslog.conf,v 1.17 2005/05/25 07:35:38 david Exp $
#

+wdr4900.bsdbg.net
*.* /var/log/w4900

move the above 2 lines to the end of your file.
remove next line:

+*


next,  add

192.168.1.18 wdr4900
to /etc/hosts


also, change the syslog rule as:
+ wdr4900
*.* /var/log/w4900


and things will work


Thanks for the hint.
Actually I modified syslog.conf to begin with

++wdr4900
*.* /var/log/w4900
+*

because I wanted all records from OpenWRT router to be in one place 
(/var/log/w4900).


It seems that the real problem/misunderstanding was the part with 
/etc/hosts.

Why syslogd doesn't use /etc/resolve.conf?
This box is configured as recursive dns server (unbound).



Collect logs with syslog +hostname

2015-07-28 Thread Atanas Vladimirov

Hi,
I tried the new feature of syslogd to collect log messages from other 
syslog capable devices (in this case an OpenWRT router).

I red syslog.conf many times, but I can't figure it why it doesn't work.

[ns]~$ cat /etc/syslog.conf
#   $OpenBSD: syslog.conf,v 1.17 2005/05/25 07:35:38 david Exp $
#

+wdr4900.bsdbg.net
*.* /var/log/w4900
+*

!!spamd
daemon.err;daemon.warn;daemon.info  /var/log/spamd
!*

!!ppp
daemon.err;daemon.warn;daemon.info  /var/log/ppp.log
!*

!!pptp
daemon.err;daemon.warn;daemon.info  /var/log/ppp.log
!*

*.notice;auth,authpriv,cron,ftp,kern,lpr,mail,user.none 
/var/log/messages
kern.debug;syslog,user.info 
/var/log/messages

auth.info   /var/log/authlog
authpriv.debug  /var/log/secure
cron.info   /var/cron/log
daemon.info /var/log/daemon
ftp.info/var/log/xferlog
lpr.debug   
/var/log/lpd-errs

mail.info   /var/log/maillog
#uucp.info  /var/log/uucp

[ns]~$ ping wdr4900.bsdbg.net
PING wdr4900.bsdbg.net (192.168.1.18): 56 data bytes
64 bytes from 192.168.1.18: icmp_seq=0 ttl=64 time=0.267 ms
64 bytes from 192.168.1.18: icmp_seq=1 ttl=64 time=0.220 ms
64 bytes from 192.168.1.18: icmp_seq=2 ttl=64 time=0.228 ms
--- wdr4900.bsdbg.net ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 0.220/0.238/0.267/0.024 ms


OpenBSD 5.8-beta (GENERIC.MP) #1152: Tue Jul 14 12:08:52 MDT 2015
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4008378368 (3822MB)
avail mem = 3883024384 (3703MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root




Re: OpenNTPD - no constraint reply - no time sync

2015-07-04 Thread Atanas Vladimirov

On 29.05.2015 02:24, Mikolaj Kucharski wrote:

Hi,

I've initially reported this problem a while ago and I thought problem
was related to IPv6. Now I belive it is not. I did some research and
this is what I've found. I contacted Reyk couple of days ago, but 
didn't

get any reply from him yet, so decided to post here.

I'm using OpenNTPD's constraint from the time it was introduced. 
However

I found that ntpd(8) often is getting stuck at the very beginning when
it starts and never recovers from that scenario. Usually it looks as
follows when you hit the problem:

# ntpctl -sa
0/4 peers valid, clock unsynced

peer
   wt tl st  next  poll  offset   delay  jitter
87.232.1.41 0.pool.ntp.org
1  2  -0s0s  peer not valid 
54.171.104.100 1.pool.ntp.org
1  2  -0s0s  peer not valid 
193.1.193.157 2.pool.ntp.org
1  2  -0s0s  peer not valid 
85.91.1.180 3.pool.ntp.org
1  2  -0s0s  peer not valid 


Hi,
I observed this problem too. I'm following -current and after every 
reboot OpenNTPd stuck as

you describe. Only my NMEA sensor is working.

[ns]~$ ntpctl -sa
0/13 peers valid, 1/1 sensors valid, clock synced, stratum 1

peer
   wt tl st  next  poll  offset   delay  jitter
not resolved from pool 1.bg.pool.ntp.org
1  2  -0s   15s  peer not valid 
2001:470:1f0a:98e::2 from pool 2.bg.pool.ntp.org
1  2  -0s0s  peer not valid 
2a01:8740::fffd::123 from pool 2.bg.pool.ntp.org
1  2  -0s0s  peer not valid 
2a02:80e0:0:2::123 from pool 2.bg.pool.ntp.org
1  2  -0s0s  peer not valid 
2a02:6800:0:99::2 from pool 2.bg.pool.ntp.org
1  2  -0s0s  peer not valid 
77.70.121.24 from pool 2.bg.pool.ntp.org
1  2  -0s0s  peer not valid 
92.247.168.103 from pool 2.bg.pool.ntp.org
1  2  -0s0s  peer not valid 
87.97.157.120 from pool 2.bg.pool.ntp.org
1  2  -0s0s  peer not valid 
176.12.47.129 from pool 2.bg.pool.ntp.org
1  2  -0s0s  peer not valid 
213.154.229.24 from pool 3.europe.pool.ntp.org
1  2  -0s0s  peer not valid 
79.175.127.142 from pool 3.europe.pool.ntp.org
1  2  -0s0s  peer not valid 
91.235.212.22 from pool 3.europe.pool.ntp.org
1  2  -0s0s  peer not valid 
82.197.164.46 from pool 3.europe.pool.ntp.org
1  2  -0s0s  peer not valid 

sensor
   wt gd st  next  poll  offset  correction
nmea0  GPS
 * 10  1  0   12s   15s-0.003ms 0.600ms

[ns]~$ uptime
12:08PM  up 12:18, 1 user, load averages: 0.47, 0.71, 0.55



All counters are zero and all peers are not valid. For me it usually
stays like that and never recovers until rcctl restart ntpd. Then often
it fails like above again. Multiple restarts in a row solve the 
problem.


Only rcctl restart ntpd helps.

[ns]~$ cat /etc/ntpd.conf
# $OpenBSD: ntpd.conf,v 1.13 2015/05/18 13:48:38 deraadt Exp $

# Addresses to listen on (ntpd does not listen by default)
listen on *

servers 1.bg.pool.ntp.org
servers 2.bg.pool.ntp.org
servers 3.europe.pool.ntp.org

server ntp.rootshells.eu weight 7

# use a specific local timedelta sensor (radio clock, etc)
sensor nmea0 correction 600 weight 10 refid GPS

# get the time constraint from a well-known HTTPS site
constraints from https://www.google.com;


OpenBSD 5.8-beta (GENERIC) #1059: Fri Jul  3 12:47:22 MDT 2015
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC
real mem = 2130575360 (2031MB)
avail mem = 2062237696 (1966MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xfb7f0 (50 entries)
bios0: vendor American Megatrends Inc. version 080011 date 02/20/2009
bios0: Supermicro H8SSL
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP APIC OEMB
acpi0: wakeup devices P1P2(S4) USB0(S1) USB1(S1) USB2(S1) PS2K(S4) 
PS2M(S4) SLPB(S1)

acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD Opteron(tm) Processor 146, 1995.33 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,NXE,M

MXX,FFXSR,LONG,3DNOW2,3DNOW,LAHF
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 1MB 
64b/line 16-way L2 cache
cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully 
associative
cpu0: DTLB 32 4KB entries fully associative, 8 4MB entries fully 
associative

cpu0: AMD erratum 89 present, BIOS upgrade may be required
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 199MHz
ioapic0 at 

Re: Update OpenBSD Remotely

2015-05-17 Thread Atanas Vladimirov

On 17.05.2015 17:08, Peter Leber wrote:

I want to build a test system based on OpenBSD 5.7 which updates
in an automated fashion.
The goal is to have a remotely located machine which runs OpenBSD 5.7
and is constantly updated. While restarting the machine remotely via 
SSH

is perfectly fine to me, I do not want to access the machine locally in
order to interrupt the automatic reboot in order to trigger the manual
upgrading process. I'm fine with following -stable and -current alike.

I recognize that there's m:tier's binary patching service
(https://stable.mtier.org), but the packages are signed
by m:tier rather than the OpenBSD project. While following m:tier's
binary patches is a good compromise to me, it's not a perfect solution.
I'm perfectly fine with running the -current flavour of OpenBSD 
feature-
and stability-wise, but I did not have the success of remotely 
triggering

a script, rebooting the machine and have an up and running updated
machine.
While I did find the autoinstall(8) feature, which, since 5.7, should 
be

able to trigger an automatic upgrade if the file /auto_upgrade.conf is
present, I did not see an effect in the bootup messages on the virtual
machine I'm using for testing things out.
Furthermore, I did find a tool named snap, aiming at making running
-current more enjoyable (see https://github.com/qbit/snap), but it does
also seem to be relying on the user to manually start the upgrading
process on system reboot, if I got everything correctly.

Is there someone aware of a procedure which could help me solving my
problem?
I thank you very much in advance.

Peter


Hi,
autoinstall(8) is your friend:

[ns]~/upgrade$ cat download
#!/bin/sh
rd=bsd.rd

#URL=http://mirror.telepoint.bg/OpenBSD/snapshots/amd64/
#URL=http://ftp.openbsd.org/pub/OpenBSD/snapshots/amd64/
URL=http://ftp5.eu.openbsd.org/ftp/pub/OpenBSD/snapshots/amd64/
#URL=http://ftp2.eu.openbsd.org/pub/OpenBSD/snapshots/amd64/

wget -r -N -l1 -nd -R.gif,.html -Abs*,.tgz,index.txt,SHA*,INS* $URL
sudo cp $rd /tmp

# build rdsetroot
( cd /usr/src/distrib/common  cc -o /tmp/rdsetroot elf32.c elf64.c 
elfrdsetroot.c )


# extract ramdisk from bsd.rd
/tmp/rdsetroot -x /tmp/bsd.rd /tmp/ramdisk.img

# mount ramdisk
sudo vnconfig vnd0 /tmp/ramdisk.img
sudo mount /dev/vnd0a /mnt

# copy config file
sudo cp /auto_upgrade.conf /mnt/auto_upgrade.conf

# umount ramdisk
sudo umount /dev/vnd0a
sudo vnconfig -u vnd0

# put modified ramdisk in bsd.rd
sudo /tmp/rdsetroot /tmp/bsd.rd /tmp/ramdisk.img

# backup /bsd to /obsd
sudo mv /bsd /obsd

# cleanup
sudo rm /tmp/ramdisk.img
sudo mv /tmp/bsd.rd /bsd

#EOF

[ns]~/upgrade$ cat /auto_upgrade.conf
Which disk is the root disk = sd2
Root filesystem = sd2a
Force checking of clean non-root filesystems = no
Location of sets = disk
Is the disk partition already mounted = yes
Pathname to the sets = /mnt/home/vlado/upgrade

#EOF

Run download script, reboot and you are up-to-date!



Re: isakmpd with strongswan nat-t problems, possible rfc incompatible isakmpd

2015-04-04 Thread Atanas Vladimirov

On 04.04.2015 00:41, Martin Larsson wrote:

Its been fixed now in strongswan 5.3. Was more curious if anyone
though isakmpd made something wrong here :)

Best regards
Martin



Thank you. Today I have built new OpenWRT firmware with strongSwan 5.3.0 
and the same configuration. Now reauthentication and rekeying work as 
they should but if I stop or restart isakmpd strongSwan doesn't restart 
the connection. Do you have a working configuration for this case or I 
have to use my monitoring script?




Re: isakmpd with strongswan nat-t problems, possible rfc incompatible isakmpd

2015-04-03 Thread Atanas Vladimirov

On 20.03.2015 16:17, Martin Larsson wrote:

Hello!

I've been struggeling alot lately with isakmpd net to net to a 
strongswan

(nat-t) client.
Isakmpd tells strongswan to delete the SA after a while.

I've gotten great help from one of the strongswan developers which came 
up

with this.

isakmpd sends deletes for expired IKE_SAs over the latest active SA 
with a
specific peer. In strongSwan there is currently no check that the SPIs 
in

the DELETE payload with protocol ISAKMP actually matches those of the
current SA, it simply assumes a DELETE on the current SA is to delete 
that

SA.

But according to RFC 2408 what isakmpd does is not really compliant:
Deletion which is concerned with an ISAKMP SA will contain a 
Protocol-Id

of ISAKMP and the SPIs are the initiator and responder cookies from the
ISAKMP Header., so no other SPIs are allowed than those of the current 
SA.


Any ideas?

Best regards
Martin


Hi,
I have the same problem (if I understand you correctly). After the 
configured ike lifetime expires strongSwan delete the SA and no trafic 
flow between two networks. Only  `ipsec down $CONN_NAME; ipsec up 
$CONN_NAME;' restore the connection. As a workaround I'm running a 
script (on OpenWRT) which check the other side of the tunnel.


StrongSwan on OpenWRT BarrierBreaker 14.07:
root@go:~# uname -a
Linux go 3.10.49 #1 Sun Mar 8 16:52:48 EET 2015 mips GNU/Linux
root@go:~# ipsec version
Linux strongSwan U5.2.2/K3.10.49
Institute for Internet Technologies and Applications
University of Applied Sciences Rapperswil, Switzerland
See 'ipsec --copyright' for copyright information.

root@go:~# cat /etc/ipsec.conf
# ipsec.conf - strongSwan IPsec configuration file

# basic configuration

config setup

conn %default
keyingtries=%forever
dpdaction=none
auto=start
authby=pubkey

conn example.com
keyexchange=ikev1
# phase 1 parameters
ike=aes-sha-modp1024!
ikelifetime=3h
# peers
left=%defaultroute
leftsubnet=172.16.1.0/24
leftrsasigkey=/etc/ipsec.d/public/local.pub
leftid=@go.example.com
leftfirewall=yes
right=example.com
rightsubnet=192.168.1.0/27
rightrsasigkey=/etc/ipsec.d/public/ns.example.com
# phase 2
esp=aes-sha-modp1024!
lifetime=1h

root@go:~# cat /usr/sbin/monitor-ipsec.sh
#!/bin/ash

main()
{
local SLEEP_SECONDS=60
while [[ 0 == 0 ]]; do
monitor_vpn_ip_port example.com 192.168.1.1 22
sleep $SLEEP_SECONDS
done
}

monitor_vpn_ip_port()
{
local CONN_NAME=$1
local IP=$2
local PORT=$3

nc -w 10 -z $IP $PORT || ( \
echo $IP $PORT did not respond, resetting connection 
$CONN_NAME; \

ipsec down $CONN_NAME; ipsec up $CONN_NAME; )
}

# now start running the script by calling main() with all parameters.
main $*



OpenBSD site:
[ns]~$ sudo cat /etc/ipsec.conf.go

local_network=192.168.1.0/27
remote_network=172.16.1.0/24
go_ip=go.example.com

# Between the networks
ike passive esp from $local_network to $remote_network peer $go_ip\
main auth hmac-sha enc aes group modp1024 lifetime 3h \
quick auth hmac-sha enc aes group modp1024 lifetime 1h \
srcid example.com dstid go.example.com

dmesg:
OpenBSD 5.7-current (GENERIC.MP) #903: Thu Apr  2 13:47:34 MDT 2015
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 6416760832 (6119MB)
avail mem = 6218432512 (5930MB)
mpath0 at root




Re: Atheros AR816X Ethernet Support

2015-03-30 Thread Atanas Vladimirov

On 30.03.2015 21:08, Alexey Suslikov wrote:

Atanas Vladimirov vlado at bsdbg.net writes:


https://www.marc.info/?t=14148214521r=1w=2


Earlier statement still applies: unified diff against -current
to tech@ with cc to usual networking suspects.


Hi,
I didn't ignore your previous statement but my programming skills are 
limited and this was made by o...@openbsd.se ole.hellqv...@openbsd.se.

If you want I could send a diff to tech@ but nothing more.



Re: Atheros AR816X Ethernet Support

2015-03-30 Thread Atanas Vladimirov

On 30.03.2015 21:35, Alexey Suslikov wrote:
On Mon, Mar 30, 2015 at 9:28 PM, Atanas Vladimirov vl...@bsdbg.net 
wrote:

On 30.03.2015 21:08, Alexey Suslikov wrote:


Atanas Vladimirov vlado at bsdbg.net writes:


https://www.marc.info/?t=14148214521r=1w=2



Earlier statement still applies: unified diff against -current
to tech@ with cc to usual networking suspects.



Hi,
I didn't ignore your previous statement but my programming skills are
limited and this was made by o...@openbsd.se 
ole.hellqv...@openbsd.se.

If you want I could send a diff to tech@ but nothing more.


yes, please. it is how things work: you post diff to tech@, people test 
and give

feedback.


Job done.
https://www.marc.info/?l=openbsd-techm=142774177502625w=2



Re: Atheros AR816X Ethernet Support

2015-03-29 Thread Atanas Vladimirov

On 29.03.2015 10:30, Chad Richards wrote:
I just noticed that OpenBSD does not support the Atheros AR816X 
Ethernet

Chip on a new system I recently got.

It look's like FreeBSD just recently added support:
http://svnweb.freebsd.org/base/stable/10/sys/dev/alc/if_alcreg.h?r1=273357r2=273366

Is anyone working on this yet?

Thanks!


https://www.marc.info/?t=14148214521r=1w=2



Kernel panic with March 14 snapshot

2015-03-16 Thread Atanas Vladimirov

I got the following kernel panic:

panic: kernel diagnostic assertion sotoinpcb(inp-inp_socket) == inp 
failed: file ../../../../netinet/tcp_input.c, line 640

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} ps
   PID   PPID   PGRPUID  S   FLAGS  WAIT  COMMAND
 25844   4688   4688  0  30x92  kqreadconfig
  3104  17226  17226 67  30x90  netconphp-fpm-5.5
   416  17226  17226 67  30x90  netconphp-fpm-5.5
 12414  17226  17226 67  30x90  netconphp-fpm-5.5
 31482  1  1  0  30x8a  pause ldattach
 23586  32001  23586   1000  30x83  ttyin ksh
  1710   7813  23726 97  30x90  kqreadnsd
  7813  23726  23726 97  30x90  selectnsd
 23726  1  23726 97  30x90  kqreadnsd
 30381  1  30381  0  30x83  ttyin getty
 19650  1  19650  0  30x83  ttyin getty
 12928  1  12928  0  30x83  ttyin getty
 14105  1  14105  0  30x83  ttyin getty
   147  1147  0  30x83  ttyin getty
 19867  1  19867  0  30x83  ttyin getty
 29235  1  29235  0  30x80  poll  cron
 19098   5527  19098550  30x90  poll  nagios
 18164  32001  18164   1000  30x83  ttyin ksh
 15599  1  15599 67  30x90  kqreadthttpd
 30263  1  30263529  30x90  poll  upsd
 32001  1  32001   1000  30x80  kqreadtmux
 18452  1  18452529  30x90  selectpowercom
 21181   5527  21181550  30x82  poll  nagios
  6210   5527   6210550  30x82  poll  nagios
  3895   5527   3895550  30x82  poll  nagios
  9421   5527   9421550  30x82  poll  nagios
 21084   5527  21084550  30x82  poll  nagios
  5437   5527   5437550  30x82  poll  nagios
 26683   5527  26683550  30x82  poll  nagios
 30426   5527  30426550  30x82  poll  nagios
 21071   5527  21071550  30x82  poll  nagios
 20686   5527  20686550  30x82  poll  nagios
  8756   5527   8756550  30x82  poll  nagios
  1828   5527   1828550  30x82  poll  nagios
  5527  1   5527550  30x90  poll  nagios
  4088  1   4088562  30x80  nanosleep perl
 25781  31954  25781503  30x80  netio postgres
 25008  1  19724 67  30x83  nanosleep php-5.5
 15432  1  15432  0  30x80  selectsymux
  6099  1   6099535  30x90  nanosleep symon
 19161  11913   6792515  30x82  netio 
log_file_daemon

  9807  1   6329697  30x80  poll  cvsyncd
 11913   6792   6792515  30xb2  kqreadsquid
  6792  1   6792515  30x90  wait  squid
 18439986986 67  30x90  kqreadnginx
   986  1986  0  30x88  pause nginx
 17226  1  17226  0  30x80  kqreadphp-fpm-5.5
  6447  10935  19724502  30x93  poll  mysqld
 13892  10935  19724502  3   0x493  thrsleep  mysqld
  2599  10935  19724502  3   0x493  thrsleep  mysqld
  2365  10935  19724502  3   0x493  thrsleep  mysqld
  9495  10935  19724502  3   0x493  thrsleep  mysqld
 30057  10935  19724502  3   0x493  thrsleep  mysqld
 13697  10935  19724502  3   0x493  thrsleep  mysqld
 11472  10935  19724502  3   0x493  thrsleep  mysqld
 18058  10935  19724502  3   0x493  thrsleep  mysqld
  6385  10935  19724502  3   0x493  thrsleep  mysqld
 19189  10935  19724502  3   0x493  thrsleep  mysqld
  5453  10935  19724502  3   0x493  thrsleep  mysqld
 15563  10935  19724502  3   0x493  thrsleep  mysqld
  2229  10935  19724502  3   0x493  thrsleep  mysqld
 20504  10935  19724502  3   0x493  selectmysqld
 16127  10935  19724502  3   0x493  thrsleep  mysqld
 19813  10935  19724502  3   0x493  selectmysqld
 11315  10935  19724502  3   0x493  selectmysqld
  8037  10935  19724502  3   0x493  thrsleep  mysqld
  3956  10935  19724502  3   0x493  thrsleep  mysqld
 10568  10935  19724502  3   0x493  thrsleep  mysqld
  4284  10935  19724502  3   0x493  thrsleep  mysqld
 20092  

I need an advice how to debug livelock

2015-02-28 Thread Atanas Vladimirov

Hi,
Let me explain what my observations are and I hope that with your help 
I'll go further to resolve my issue.

From time to time I got many errors in messages:

[ns]~$ tail /var/log/messages
Feb 28 23:23:27 ns /bsd: com1: 25 silo overflows, 0 ibuf overflows
Feb 28 23:24:34 ns /bsd: com1: 28 silo overflows, 0 ibuf overflows
Feb 28 23:25:42 ns /bsd: com1: 30 silo overflows, 0 ibuf overflows
Feb 28 23:26:50 ns /bsd: com1: 23 silo overflows, 0 ibuf overflows
Feb 28 23:27:57 ns /bsd: com1: 23 silo overflows, 0 ibuf overflows
Feb 28 23:29:09 ns /bsd: com1: 20 silo overflows, 0 ibuf overflows
Feb 28 23:30:16 ns /bsd: com1: 12 silo overflows, 0 ibuf overflows
Feb 28 23:31:23 ns /bsd: com1: 12 silo overflows, 0 ibuf overflows
Feb 28 23:32:28 ns /bsd: com1: 10 silo overflows, 0 ibuf overflows
Feb 28 23:33:34 ns /bsd: com1: 16 silo overflows, 0 ibuf overflows

I have NMEA sensor (Garmin GPS 18x Lvc) which is used for time source 
for OpenNTPD


/etc/ttys:
...
tty01   /sbin/ldattach -t dcd nmeaunknown on  mdmbuf
...

[ns]~$ cat /etc/ntpd.conf
# Addresses to listen on (ntpd does not listen by default)
listen on *

servers 1.bg.pool.ntp.org
servers 2.bg.pool.ntp.org
servers 3.europe.pool.ntp.org

# use a specific local timedelta sensor (radio clock, etc)
sensor nmea0 correction 600 weight 10 refid GPS

# get the time constraint from a well-known HTTPS site
constraints from https://www.google.com/search?q=openntpd;

From man com:
   com0: N silo overflows  The input ``silo'' has overflowed and 
incoming

 data has been lost.
As I understand the buffer of UART (16 byte) has been overflowed because 
UART can't interrupt the CPU, or I'm wrong.


You may see that some GPRMC sentences weren't whole because of data 
loss:

[ns]~$ sudo cu -l /dev/cua01 -s 4800
Connected to /dev/cua01 (speed 4800)
$GPRMC,215204,A,4241.2899,N,02319.6677,E,000.0,079.5,280215,004.5,E*70
$GPRMC,215205,A,4241.2899,N,02319.6676,E,000.0,079.5,280*70
$GPRMC,215206,A,4241.2898,N,02319.6680,E,000.0,05,004.5,E*7B
$GPRMC,215207,A,4241.2895,N,02319.6671,E,000.0,079.5,280215,004.5,E*79
$GPRMC,215208,A,4241.2894,N,02319.6670,E,000.0,079.5,280215,004.5,E*76
$GPRMC,215209,A,4241.2894,N,02319.6670,E,000.0,079.5,280215,004.5,E*77
$GPRMC,215210,A,4241.2895,N,02319.6670,E,000.0,079.5,280215,004.5,E*7E
$GPRMC,215211,A,4241.2896,N,02319.6670,E9.5,280215,004.5,E*7C
$GPRMC,215212,A,4241.2897,N,02319.6670,E,000.0,079.5,280215,004.5,E*7E
$GPRMC,215213,A,4241.2897,N,02319.6670,E,000.0,05,004.5,E*7F
$GPRMC,215214,A,4241.2897,N,02319.6669,E,000.0,079.5,280215,004.5,E*70
$GPRMC,215215,A,41.2898,N,02319.6669,E,000.0,079.5,280215,004.5,E*7E
$GPRMC,215216,A,4241.2909,N,02319.6669,E,001.3,348.7,280215,004.5,E*75
$GPRMC,215217,A,4241.2920,N,02319.6673,E,001.3,354.6,2808
$GPRMC,215218,A,4241.2932,N,02319.6676,E80215,004.5,E*73
$GPRMC,215219,A,241.2943,N,02319.6680,E,001.8,356.6,280215,004.5,E*76
$GPRMC,215220,A,4241.2954,N,02319.6683,E,002.0,359.7,280215,004.5,E*7C
$GPRMC,215221,A,4241.2964,N,02319.6684,E,002.0,356.6,280*77
$GPRMC,215222,A,4241.2977,N,02319.6689,E,002.1,358.2,280215,004.5,E*70
$GPRMC,215223,A,4241.2981,N,02319.6700,E,001.6,009.3,280215,004.5,E*7A

I also observed that kern.netlivelocks are increasing with one or two 
every two/three seconds.

[ns]~$ sysctl -a | grep livelock
kern.netlivelocks=2720

Here my knowledge ends but I can provide more details if you tell me 
how.


[ns]~$ uptime
11:28PM  up 8 days,  1:28, 1 user, load averages: 0.36, 0.35, 0.33

[ns]~$ vmstat -i
interrupt   total rate
irq0/clock  276233041  396
irq0/ipi 40525429   58
irq101/uhci0 69369194   99
irq104/ehci020
irq112/em0  378518877  543
irq113/em1  319490873  458
irq108/ahci0 10221709   14
irq104/ichiic045454806
irq145/com0   1540
irq146/com1   7527171   10
Total  1106431930 1588

dmesg:

OpenBSD 5.7-beta (GENERIC.MP) #858: Fri Feb 20 06:47:16 MST 2015
t...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 6416760832 (6119MB)
avail mem = 6242033664 (5952MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0x9ac00 (37 entries)
bios0: vendor American Megatrends Inc. version 2.0b date 11/07/2013
bios0: Supermicro X8ST3
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP APIC MCFG OEMB HPET DMAR SSDT EINJ BERT ERST 
HEST
acpi0: wakeup devices P0P1(S4) PS2K(S4) PS2M(S4) USB0(S4) USB1(S4) 
USB2(S4) USB5(S4) EUSB(S4) USB3(S4) USB4(S4) USB6(S4) USBE(S4) GBE_(S4) 
P0P4(S4) P0P5(S4) P0P6(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) Core(TM) i7 CPU 950 @ 3.07GHz, 3067.11 MHz
cpu0: 

Re: symon: mbuf() failed (508)

2014-11-12 Thread Atanas Vladimirov

On 11.11.2014 23:49, Stuart Henderson wrote:

On 2014-11-10, Atanas Vladimirov vl...@bsdbg.net wrote:

Hi,
After the upgrade to the recent snapshot I got many
symon: mbuf() failed (508)

in /var/log/messages.


I've just committed a fix to ports for this.


Thanks. Now it works as it should.



Re: unbound package missing in 5.6

2014-11-12 Thread Atanas Vladimirov

On 12.11.2014 21:32, John Smith wrote:

Why is there no package for unbound in 5.6?

Because unbound is in base now. See upgrade guide:
http://www.openbsd.org/faq/upgrade56.html
...
Section 3. Upgrading packages:
unbound(8) moved to the base OS.
...



symon: mbuf() failed (508)

2014-11-10 Thread Atanas Vladimirov

Hi,
After the upgrade to the recent snapshot I got many

symon: mbuf() failed (508)

in /var/log/messages.

# cat /etc/symon.conf

monitor { cpu(0), cpu(1), cpu(2), cpu(3), mem,
  if(vlan41), if(vlan81),
  pf,
  mbuf,
  sensor(cpu0.temp0), sensor(nvt0.temp1), sensor(nvt0.temp2),
  sensor(nvt0.fan0), sensor(nvt0.fan1), 
sensor(softraid0.drive0),

  io(sd0), io(sd1), io(sd2),
  df(sd2a), df(sd2d), df(sd2e), df(sd2f),
  df(sd0d), df(sd0e), df(sd0f)
} stream to 127.0.0.1 2100

# dmesg

OpenBSD 5.6-current (GENERIC.MP) #547: Mon Nov 10 08:50:13 MST 2014
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 6416760832 (6119MB)
avail mem = 6242119680 (5952MB)
warning: no entropy supplied by boot loader
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0x9ac00 (37 entries)
bios0: vendor American Megatrends Inc. version 2.0b date 11/07/2013
bios0: Supermicro X8ST3
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP APIC MCFG OEMB HPET DMAR SSDT EINJ BERT ERST 
HEST
acpi0: wakeup devices P0P1(S4) PS2K(S4) PS2M(S4) USB0(S4) USB1(S4) 
USB2(S4) USB5(S4) EUSB(S4) USB3(S4) USB4(S4) USB6(S4) USBE(S4) GBE_(S4) 
P0P4(S4) P0P5(S4) P0P6(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) Core(TM) i7 CPU 950 @ 3.07GHz, 3067.09 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC

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 133MHz
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i7 CPU 950 @ 3.07GHz, 3066.66 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC

cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Core(TM) i7 CPU 950 @ 3.07GHz, 3066.66 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,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC

cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Core(TM) i7 CPU 950 @ 3.07GHz, 3066.66 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,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC

cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 0, core 3, package 0
ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 24 pins
ioapic0: misconfigured as apic 8, remapped to apid 1
acpimcfg0 at acpi0 addr 0xe000, bus 0-255
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 8 (P0P1)
acpiprt2 at acpi0: bus 6 (P0P4)
acpiprt3 at acpi0: bus 7 (P0P5)
acpiprt4 at acpi0: bus -1 (P0P6)
acpiprt5 at acpi0: bus -1 (P0P7)
acpiprt6 at acpi0: bus -1 (P0P8)
acpiprt7 at acpi0: bus -1 (P0P9)
acpiprt8 at acpi0: bus 1 (NPE1)
acpiprt9 at acpi0: bus -1 (NPE2)
acpiprt10 at acpi0: bus 2 (NPE3)
acpiprt11 at acpi0: bus -1 (NPE4)
acpiprt12 at acpi0: bus 3 (NPE5)
acpiprt13 at acpi0: bus -1 (NPE6)
acpiprt14 at acpi0: bus 4 (NPE7)
acpiprt15 at acpi0: bus -1 (NPE8)
acpiprt16 at acpi0: bus 5 (NPE9)
acpiprt17 at acpi0: bus -1 (NPEA)
acpicpu0 at acpi0: C3, C1, PSS
acpicpu1 at acpi0: C3, C1, PSS
acpicpu2 at acpi0: C3, C1, PSS
acpicpu3 at acpi0: C3, C1, PSS
acpibtn0 at acpi0: SLPB
acpibtn1 at acpi0: PWRB
ipmi at mainbus0 not configured
cpu0: Enhanced SpeedStep 3067 MHz: speeds: 3068, 3067, 2933, 2800, 2667, 
2533, 2400, 2267, 2133, 2000, 1867, 1733, 1600 MHz

pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 Intel X58 Host rev 0x22
ppb0 at pci0 dev 1 function 0 Intel X58 PCIE rev 0x22: msi
pci1 at ppb0 bus 1
ppb1 at pci0 dev 3 function 0 Intel X58 PCIE rev 0x22: msi
pci2 at ppb1 bus 2
ppb2 at pci0 dev 5 function 0 Intel X58 PCIE rev 0x22: msi
pci3 at ppb2 bus 3
ppb3 at pci0 dev 7 function 0 Intel X58 PCIE rev 0x22: msi
pci4 at ppb3 bus 4
ppb4 at pci0 dev 9 function 0 Intel X58 PCIE rev 0x22: msi
pci5 at ppb4 bus 5
Intel X58 Misc rev 0x22 at pci0 dev 20 function 0 not configured
Intel X58 GPIO rev 0x22 at pci0 dev 20 function 1 not configured
Intel X58 RAS rev 0x22 at pci0 dev 20 function 2 not configured
Intel X58 Throttle rev 0x22 at pci0 dev 20 function 3 not configured
Intel X58 QuickData rev 0x22 at pci0 

Re: CVS: cvs.openbsd.org: src

2014-11-09 Thread Atanas Vladimirov

On 09.11.2014 12:59, thev...@openmailbox.org wrote:

On Sun, 9 Nov 2014 10:09:49 +0100 =?utf-8?Q?S=C3=A9bastien?= Marie
semarie-open...@latrappe.fr wrote:

On Sat, Nov 08, 2014 at 10:57:41PM +0200, Atanas Vladimirov wrote:
 On 24.10.2014 00:33, Robert Peichaer wrote:

 I'm following -current and decided to try autoinstall(8) from
 /auto_upgrade.conf when I moved to newer snapshot.
 I made a custom auto_upgrade.conf on my root [sd2a] partition but when I
 boot a newer bsd.rd,
 auto_upgrade.conf is not on the miniroot. I escaped to shell, mounted sd2a
 on /mnt and copied auto_upgrade.conf to miniroot.
 Then Autoupgrade completed as it should.
 The question is whether there are any easier steps to make auto_upgrade from
 local file, not by using dhcp/tftp/http?
 Thanks,
 Atanas

The auto_upgrade.conf is searched in the ramdisk partition (which was
into bsd.rd). As thevoid@ wrote, you could rebuild a new bsd.rd image 
to

include it.

Personnally, I extract the ramdisk image from bsd.rd, mount it, copy 
the

auto_upgrade.conf to it, and restore the ramdisk into bsd.rd.

Here the pseudo-script I use:

# build rdsetroot
( cd /usr/src/distrib/common  cc -o /tmp/rdsetroot elf32.c elf64.c 
elfrdsetroot.c )


# extract ramdisk from bsd.rd
/tmp/rdsetroot -x bsd.rd ramdisk.img

# mount ramdisk
vnconfig vnd0 ramdisk.img
mount /dev/vnd0a /mnt

# copy config file
cp auto_upgrade.conf /mnt/auto_upgrade.conf

# umount ramdisk
umount /dev/vnd0a
vnconfig -u vnd0

# put modified ramdisk in bsd.rd
/tmp/rdsetroot bsd.rd ramdisk.img

# cleanup
rm ramdisk.img

And now, you could boot your modified bsd.rd.
--
Sébastien Marie



i like this. for this particular purpose, this is definitely a better 
method.


I like it too. Thank you both.



Re: CVS: cvs.openbsd.org: src

2014-11-08 Thread Atanas Vladimirov

On 24.10.2014 00:33, Robert Peichaer wrote:

CVSROOT:/cvs
Module name:src
Changes by: r...@cvs.openbsd.org2014/10/23 15:33:21

Modified files:
distrib/miniroot: dot.profile install.sub
distrib/notes  : m4.common
share/man/man8 : autoinstall.8

Log message:
Extend autoinstall(8) feature:

- Ask for responsefile location (url or local path) if dhcp discovery
fails for location or mode.  If 'next-server' is found in dhcp lease
file, provide a default url http://next-server/install.conf.

- Ask for installer mode if the specified response file name does not
match *install.conf or *upgrade.conf.

- If present, use /auto_install.conf or /auto_upgrade.conf as response
file for unattended installation or upgrade.

- Automatically start installer in unattended mode if either one of
these files is present when the system boots.

- Document changes in manpage and installation notes.

OK krw@ deraadt@


I'm following -current and decided to try autoinstall(8) from 
/auto_upgrade.conf when I moved to newer snapshot.
I made a custom auto_upgrade.conf on my root [sd2a] partition but when I 
boot a newer bsd.rd,
auto_upgrade.conf is not on the miniroot. I escaped to shell, mounted 
sd2a on /mnt and copied auto_upgrade.conf to miniroot.

Then Autoupgrade completed as it should.
The question is whether there are any easier steps to make auto_upgrade 
from local file, not by using dhcp/tftp/http?

Thanks,
Atanas



Re: AR8161 patch , FYI

2014-11-02 Thread Atanas Vladimirov
On Sun, Nov 02, 2014 at 08:11:51AM +0100, o...@openbsd.se wrote:
 I have tested the driver on both openbsd 5.5 and 5.6, not on current.
 
 
 OpenBSD 5.6-stable (GENERIC.MP) #6: Sat Nov  1 14:02:01 CET 2014
 root@ubook.hagen.hassel:/usr/src/sys/arch/amd64/compile/GENERIC.MP
 real mem = 4157509632 (3964MB)
 avail mem = 4038041600 (3850MB)
 mpath0 at root
 scsibus0 at mpath0: 256 targets
 mainbus0 at root
 bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xebdb0 (22 entries)
 bios0: vendor American Megatrends Inc. version S400CA.207 date 12/27/2012
 bios0: ASUSTeK COMPUTER INC. S400CA
 
 ...
 
 alc0 at pci3 dev 0 function 0 Attansic Technology AR8161 rev 0x10
 
 
 Diffs are appended.
 I have tested the driver on hw  L2C  and AR8161.
 When looking at the diff I saw that there are some obsolete predefinition 
 left in the code. They have not generated any warnings, but might be 
 confusing for a reviewer.
 I read that the freebsd driver have som problems at long cable length. If you 
 have access to an artificial ethernet cable this could be a subject for 
 testing.
 

Hi,
Thanks for your work.
'if_alc.c.diff' didn't apply correctly because of some formatting differences - 
mostly spaces and TABs.
I spend few hours to correct it and now it apply against if_alc.c revision 1.27.
'if_alcreg.h' is not a diff, it's if_alcreg.h revision 1.4.
I used if_alcreg.h from sourceforge.net.
Both diffs are appended inline so other people could test.
As a result my Attansic Technology AR8161 works as it should.
Best wishes,
Atanas

Index: if_alc.c
===
RCS file: /home/vlado/cvsync/cvsroot/src/sys/dev/pci/if_alc.c,v
retrieving revision 1.27
diff -u -p -r1.27 if_alc.c
--- if_alc.c22 Jul 2014 13:12:11 -  1.27
+++ if_alc.c2 Nov 2014 15:11:59 -
@@ -1,5 +1,10 @@
+
+/* $OpenBSD: if_alc.c,v 1.26 2013/12/28 03:34:53 deraadt Exp $ */
+/*- patched by oht to fit with the AR816X_FAMILY*/
+
 /* $OpenBSD: if_alc.c,v 1.27 2014/07/22 13:12:11 mpi Exp $ */
 /*-
+ 1.27
  * Copyright (c) 2009, Pyun YongHyeon yong...@freebsd.org
  * All rights reserved.
  *
@@ -26,7 +31,7 @@
  * SUCH DAMAGE.
  */
 
-/* Driver for Atheros AR8131/AR8132 PCIe Ethernet. */
+/* Driver for Atheros AR8131/AR8132 AR8161/AR8162 AR8171/AR8172  PCIe 
Ethernet. */
 
 #include bpfilter.h
 #include vlan.h
@@ -84,12 +89,17 @@ voidalc_watchdog(struct ifnet *);
 intalc_mediachange(struct ifnet *);
 void   alc_mediastatus(struct ifnet *, struct ifmediareq *);
 
-void   alc_aspm(struct alc_softc *, int);
+void   alc_aspm(struct alc_softc *, int, int);
+void   alc_aspm_813x(struct alc_softc *, int);
+void   alc_aspm_816x(struct alc_softc *, int);
 void   alc_disable_l0s_l1(struct alc_softc *);
 intalc_dma_alloc(struct alc_softc *);
 void   alc_dma_free(struct alc_softc *);
 intalc_encap(struct alc_softc *, struct mbuf **);
 void   alc_get_macaddr(struct alc_softc *);
+ void  alc_get_macaddr_813x(struct alc_softc *);
+ void  alc_get_macaddr_816x(struct alc_softc *);
+ void  alc_get_macaddr_par(struct alc_softc *);
 void   alc_init_cmb(struct alc_softc *);
 void   alc_init_rr_ring(struct alc_softc *);
 intalc_init_rx_ring(struct alc_softc *);
@@ -97,9 +107,26 @@ voidalc_init_smb(struct alc_softc *);
 void   alc_init_tx_ring(struct alc_softc *);
 intalc_intr(void *);
 void   alc_mac_config(struct alc_softc *);
+ uint32_t  alc_mii_readreg_813x(struct alc_softc *, int, int);
+ uint32_t  alc_mii_readreg_816x(struct alc_softc *, int, int);
+ uint32_t  alc_mii_writereg_813x(struct alc_softc *, int, int, int);
+ uint32_t  alc_mii_writereg_816x(struct alc_softc *, int, int, int);
+ void  alc_dsp_fixup(struct alc_softc *, int);
+
 intalc_miibus_readreg(struct device *, int, int);
 void   alc_miibus_statchg(struct device *);
+intalc_miibus_writeregr(struct device *, int, int, int);
 void   alc_miibus_writereg(struct device *, int, int, int);
+ uint32_t  alc_miidbg_readreg(struct alc_softc *, int);
+ uint32_t  alc_miidbg_writereg(struct alc_softc *, int, int);
+ uint32_t  alc_miiext_readreg(struct alc_softc *, int, int);
+ uint32_t  alc_miiext_writereg(struct alc_softc *, int, int, int);
+ //int alc_mediachange_locked(struct alc_softc *);
+ void  alc_phy_reset_813x(struct alc_softc *);
+ void  alc_phy_reset_816x(struct alc_softc *);
+ void  alc_setwol_813x(struct alc_softc *);
+ void  alc_setwol_816x(struct alc_softc *);
+ 
 intalc_newbuf(struct alc_softc *, struct alc_rxdesc *);
 void   alc_phy_down(struct alc_softc *);
 void   alc_phy_reset(struct alc_softc *);
@@ -116,6 +143,18 @@ void   alc_stop_mac(struct alc_softc *);
 void   alc_stop_queue(struct alc_softc *);
 void   alc_tick(void *);
 void   alc_txeof(struct alc_softc *);
+void   alc_init_pcie(struct alc_softc *, int);
+void   alc_config_msi(struct alc_softc *);
+
+intalc_dma_alloc(struct alc_softc *);
+void   alc_dma_free(struct alc_softc *);
+int

Re: UPDATE: www/tt-rss to 1.14

2014-11-02 Thread Atanas Vladimirov

On 02.11.2014 17:29, Robert Peichaer wrote:

Hi Atanas

As you provided update diffs in the past, would you mind testing
this update for tt-rss from 1.13 to 1.14? I don't have mysql running
here and being lazy I would like to avoid setting one up just to test
this update.

Thanks
Robert


Hi,
I've just updated and everything seems fine.
Best wishes,
Atanas



OpenBSD -current AHCI on HP Probook 450 G0

2014-10-10 Thread Atanas Vladimirov

Hi,
This is the first time when I try to install OpenBSD on a such hardware.
I used bsd.rd to install it on a usb flash drive. After reboot I choose 
to boot from the usb drive.

Bootloader can't load bsd kernel and the laptop restarts without error.
If I change SATA mode in BIOS from AHCI to IDE I can boot from the usb 
drive.


# dmesg with SATA in IDE mode

OpenBSD 5.6-current (GENERIC.MP) #407: Thu Oct  9 00:51:33 MDT 2014
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4119818240 (3928MB)
avail mem = 4001447936 (3816MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xb7e7e000 (31 entries)
bios0: vendor Hewlett-Packard version 68IRF Ver. F.01 date 03/29/2013
bios0: Hewlett-Packard HP ProBook 450 G0
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP HPET APIC MCFG ASF! SSDT SSDT SSDT FPDT BGRT 
SSDT SSDT
acpi0: wakeup devices LANC(S5) EHC1(S3) EHC2(S3) XHC_(S3) PCIB(S5) 
RP02(S4) ECF0(S4) RP03(S4) RP04(S5) WNIC(S5) RP06(S5) NIC_(S5) RP07(S4) 
RP08(S4) HST1(S5)

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-3120M CPU @ 2.50GHz, 2494.64 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,F16C,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS

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
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i3-3120M CPU @ 2.50GHz, 2494.34 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,F16C,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS

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-3120M CPU @ 2.50GHz, 2494.34 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,F16C,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS

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-3120M CPU @ 2.50GHz, 2494.34 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,F16C,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS

cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 0 pa 0xfec0, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xe000, bus 0-255
acpiprt0 at acpi0: bus -1 (PEGP)
acpiprt1 at acpi0: bus -1 (PCIB)
acpiprt2 at acpi0: bus 1 (RP01)
acpiprt3 at acpi0: bus 2 (RP03)
acpiprt4 at acpi0: bus 3 (RP04)
acpiprt5 at acpi0: bus 4 (RP06)
acpiprt6 at acpi0: bus 0 (PCI0)
acpiec0 at acpi0
acpicpu0 at acpi0: C2, C1, PSS
acpicpu1 at acpi0: C2, C1, PSS
acpicpu2 at acpi0: C2, C1, PSS
acpicpu3 at acpi0: C2, C1, PSS
acpipwrres0 at acpi0: APPR, resource for HDEF
acpipwrres1 at acpi0: COMP, resource for COM1
acpipwrres2 at acpi0: LPP_, resource for LPT0
acpitz0 at acpi0: critical temperature is 128 degC
acpitz1 at acpi0: critical temperature is 128 degC
acpitz2 at acpi0: critical temperature is 128 degC
acpitz3 at acpi0: critical temperature is 128 degC
acpitz4 at acpi0: critical temperature is 128 degC
acpitz5 at acpi0: critical temperature is 128 degC
acpitz6 at acpi0: critical temperature is 128 degC
acpitz7 at acpi0: critical temperature is 128 degC
acpibat0 at acpi0: BAT0 model Primary serial 00190 2013/05/22 type 
LIon oem Hewlett-Packard

acpibat1 at acpi0: BAT1 not present
acpiac0 at acpi0: AC unit online
acpibtn0 at acpi0: SLPB
acpibtn1 at acpi0: LID_
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: DD02
cpu0: Enhanced SpeedStep 2494 MHz: speeds: 2500, 2400, 2300, 2200, 2100, 
2000, 1900, 1800, 1700, 1600, 1500, 1400, 1300, 1200 MHz

pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 Intel Core 3G Host rev 0x09
vga1 at pci0 dev 2 function 0 Intel HD Graphics 4000 rev 0x09
intagp at vga1 not configured
inteldrm0 at vga1
drm0 at inteldrm0
drm: Memory usable by graphics device = 2048M
inteldrm0: 1366x768
wsdisplay0 at vga1 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
Intel 7 

Re: bgpd(8) dies when accepting phessler's spam feed

2014-10-02 Thread Atanas Vladimirov
На 02.10.2014 19:18 Remi Locherer remi.loche...@relo.ch написа:

 On Tue, Sep 23, 2014 at 06:34:50PM -0500, athom...@athompso.net wrote: 
  Synopsis: bgpd(8) dies when accepting phessler's spam feed 
  Category: user 
  Environment: 
  System  : OpenBSD 5.5 
  Details : OpenBSD 5.5 (GENERIC) #0: Fri Apr 25 13:07:59 CEST 2014 
  r...@stable-55-amd64.mtier.org:/binpatchng/work-binpatch55-amd64/src/sys/arch/amd64/compile/GENERIC
   

 Today bgpd also failed on my 5.5 i386 box.

Me too:

[ns]~$ zgrep bgpd /var/log/messages.0.gz
Oct  2 14:02:51 ns bgpd[31046]: neighbor 64.142.121.62: sending notification: 
HoldTimer expired
Oct  2 15:06:52 ns bgpd[31046]: neighbor 64.142.121.62: sending notification: 
error in UPDATE message, attribute list error
Oct  2 15:06:52 ns bgpd[31046]: neighbor 64.142.121.62: graceful restart of 
IPv4 unicast, keeping routes
Oct  2 15:10:08 ns bgpd[31046]: neighbor 64.142.121.62: graceful restart of 
IPv4 unicast, not restarted, flushing
Oct  2 15:10:08 ns bgpd[19676]: fatal in RDE: peer_up: bad state
Oct  2 15:10:08 ns bgpd[7843]: dispatch_imsg in main: pipe closed
Oct  2 15:10:08 ns bgpd[31046]: fatal in SE: session_dispatch_imsg: pipe closed

[ns]~$ more /var/run/dmesg.boot
OpenBSD 5.6-current (GENERIC.MP) #388: Mon Sep 22 02:23:15 MDT 2014
    t...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 6416760832 (6119MB)
avail mem = 6237212672 (5948MB)


 From /var/log/damon: 
 Oct  2 14:08:07 typhoon bgpd[7906]: neighbor 64.142.121.62: state change 
 Connect - Active, reason: Connection open failed 
 Oct  2 14:10:07 typhoon bgpd[7906]: neighbor 64.142.121.62: state change 
 Connect - OpenSent, reason: Connection opened 
 Oct  2 14:10:07 typhoon bgpd[7906]: neighbor 64.142.121.62: graceful restart 
 of IPv4 unicast, not restarted, flushing 
 Oct  2 14:10:07 typhoon bgpd[7906]: neighbor 64.142.121.62: state change 
 OpenSent - OpenConfirm, reason: OPEN message received 
 Oct  2 14:10:07 typhoon bgpd[7906]: neighbor 64.142.121.62: state change 
 OpenConfirm - Established, reason: KEEPALIVE message received 
 Oct  2 14:10:07 typhoon bgpd[11293]: fatal in RDE: peer_up: bad state Oct  2 
 14:10:07 typhoon bgpd[3779]: Lost child: route decision engine exited 
 Oct  2 14:10:07 typhoon bgpd[7906]: fatal in SE: session_dispatch_imsg: pipe 
 closed 
 Oct  2 14:10:07 typhoon bgpd[3779]: Terminating 


 The config: 
 spamdAS=65066 

 AS 65371 
 fib-update no    # Mandatory, to not update the local routing table 

 group spamd-bgp { 
     remote-as $spamdAS 
     multihop 64 
     announce none   # Do not send Route Server any information 

     # rs.bgp-spamd.net 
     neighbor 64.142.121.62 
 } 

 # 'match' is required, to remove entries when routes are withdrawn 
 match from group spamd-bgp community $spamdAS:42  set pftable 
 bgp-spamd-bypass 


 I was capturing the bgp traffic. The pcap file can be downloaded here: 
 https://relo.ch/bgp.pcap.gz 


 OpenBSD 5.5 (GENERIC) #0: Fri Apr 25 15:04:32 CEST 2014 
     
 r...@stable-55-i386.mtier.org:/binpatchng/work-binpatch55-i386/src/sys/arch/i386/compile/GENERIC
  
 cpu0: AMD Athlon(tm) 64 Processor 3700+ (AuthenticAMD 686-class, 1024KB L2 
 cache) 2.20 GHz 
 cpu0: 
 FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW,SSE3,LAHF
  
 real mem  = 2145873920 (2046MB) 
 avail mem = 2098520064 (2001MB) 
 mainbus0 at root 
 bios0 at mainbus0: AT/286+ BIOS, date 10/12/06, BIOS32 rev. 0 @ 0xfb020, 
 SMBIOS rev. 2.3 @ 0xf (36 entries) 
 bios0: vendor Phoenix Technologies, LTD version V3.6 date 10/12/2006 
 bios0: MICRO-STAR INTERNATIONAL CO., LTD MS-7094 
 acpi0 at bios0: rev 0 
 acpi0: sleep states S0 S1 S4 S5 
 acpi0: tables DSDT FACP SRAT APIC 
 acpi0: wakeup devices PCI0(S5) USB0(S1) USB1(S1) USB2(S1) USB3(S1) USB4(S1) 
 USB5(S1) USB6(S1) USB7(S1) LAN0(S5) AC97(S5) UAR1(S5) 
 acpitimer0 at acpi0: 3579545 Hz, 24 bits 
 acpimadt0 at acpi0 addr 0xfee0: PC-AT compat 
 cpu0 at mainbus0: apid 0 (boot processor) 
 mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges 
 cpu0: apic clock running at 199MHz 
 ioapic0 at mainbus0: apid 2 pa 0xfec0, version 3, 24 pins 
 acpiprt0 at acpi0: bus 0 (PCI0) 
 acpicpu0 at acpi0 
 acpibtn0 at acpi0: PWRB 
 bios0: ROM list: 0xc/0xa800 0xcc000/0x1000 0xcd000/0x4c00! 
 cpu0: Cool'n'Quiet K8 2200 MHz: speeds: 2200 2000 1800 1000 MHz 
 pci0 at mainbus0 bus 0: configuration mode 1 (bios) 
 pchb0 at pci0 dev 0 function 0 VIA K8HTB Host rev 0x00 
 agp at pchb0 not configured 
 pchb1 at pci0 dev 0 function 1 VIA K8HTB Host rev 0x00 
 pchb2 at pci0 dev 0 function 2 VIA K8HTB Host rev 0x00 
 pchb3 at pci0 dev 0 function 3 VIA K8HTB Host rev 0x00 
 pchb4 at pci0 dev 0 function 4 VIA K8HTB Host rev 0x00 
 pchb5 at pci0 dev 0 function 7 VIA K8HTB Host rev 0x00 
 ppb0 at pci0 dev 1 function 0 VIA K8HTB AGP rev 0x00 
 pci1 at ppb0 bus 1 
 vga1 at pci1 dev 0 function 0 ATI Rage Fury rev 0x00 

Re: pf queue max bug

2014-09-24 Thread Atanas Vladimirov

Hi,
I think that I found something.
It occurs when I set max limit on i_bittor/b_bittor queues but I didn't 
set min limit.
I read pf.conf(5) many times and I didn't find that min and max must be 
used together.


In i386 I had this:

 queue rootq on $ExtIf bandwidth 100M max 100M
  queue inter parent rootq bandwidth 3M max 2950K
   queue i_ack parent inter bandwidth 2M, min 1M
   queue i_dns parent inter bandwidth 500K
   queue i_ntp parent inter bandwidth 300K
   queue i_web parent inter bandwidth 2M burst 2M for 1ms
   queue i_bulkparent inter bandwidth 170K
   queue i_bittor  parent inter bandwidth 30K, max 1400K default

  queue bg parent rootq bandwidth 40M max 39M
   queue b_ack parent bg bandwidth 15M, min 10M
   queue b_dns parent bg bandwidth 1M, min 1M
   queue b_ntp parent bg bandwidth 4M, min 4M
   queue b_rdc parent bg bandwidth 4M, min 4M
   queue b_web parent bg bandwidth 15M, min 15M burst 40M for 
5000ms, max 37M

   queue b_bulkparent bg bandwidth 8M, min 5M
   queue b_bittor  parent bg bandwidth 2M, max 29M

 and it worked as it should!

When I changed my server and I installed amd64 -current I just copied my 
working pf.conf.
After few days I noticed that max limit on some of my queues didn't work 
properly as expected.

Today I set min limit to i_bittor/b_bittor and it works again:

 queue rootq on $ExtIf bandwidth 100M max 100M
  queue inter parent rootq bandwidth 3M max 2950K
   queue i_ack parent inter bandwidth 2M, min 1M
   queue i_dns parent inter bandwidth 500K
   queue i_ntp parent inter bandwidth 300K
   queue i_web parent inter bandwidth 2M burst 2M for 1ms
   queue i_bulkparent inter bandwidth 170K
   queue i_bittor  parent inter bandwidth 30K, min 20K, max 1400K 
default


  queue bg parent rootq bandwidth 40M max 39M
   queue b_ack parent bg bandwidth 15M, min 10M
   queue b_dns parent bg bandwidth 1M, min 1M
   queue b_ntp parent bg bandwidth 4M, min 4M
   queue b_rdc parent bg bandwidth 4M, min 4M
   queue b_web parent bg bandwidth 15M, min 15M burst 40M for 
5000ms, max 37M

   queue b_bulkparent bg bandwidth 8M, min 5M
   queue b_bittor  parent bg bandwidth 2M, min 1M, max 29M

Is this a bug in pf or pf.conf(5) is not correct?
Thank for your time,
Atanas



Re: pf queue max bug

2014-09-23 Thread Atanas Vladimirov

On 22.09.2014 23:23, Jacob L. Leifman wrote:

Hi,

I think you are hitting the edge case discussed earlier this month (by
stu@ henning@ and others and it might have been on tech@) -- due to
fairly low OS interrupt rate (baked in default is 100Hz), low bandwidth
queue limits on high-bandwidth pipes mostly do not work. Currently the
only offered solution was to rebuild the kernel with increased tick
rate. I recommend searching the archives, the subject was something
about the new queue system.

-Jacob.



Hi,
I made a new kernel on top of GENERIC.MP with HZ=1000. Same behavior.
Also qlimit(50) never get full and pkts/bytes never get dropped.

[ns]/sys/arch/amd64/conf$ more HZ
#   $OpenBSD: GENERIC.MP,v 1.11 2014/09/03 07:44:33 blambert Exp $

include arch/amd64/conf/GENERIC

option  MULTIPROCESSOR
#option MP_LOCKDEBUG
option  HZ=1000
cpu*at mainbus?


pf.conf

 queue rootq on $ExtIf bandwidth 98M, max 99M
  queue inter parent rootq bandwidth 1M, max 2M default
  queue bg parent rootq bandwidth 10M, max 15M

[ns]~$ sysctl -a | grep kern.clo
kern.clockrate=tick = 1000, tickadj = 4, hz = 1000, profhz = 1000, 
stathz = 1000


pfctl -vvs queue
queue rootq on em0 bandwidth 98M, max 99M qlimit 50
  [ pkts:  0  bytes:  0  dropped pkts:  0 bytes: 
 0 ]

  [ qlength:   0/ 50 ]
  [ measured: 0.0 packets/s, 0 b/s ]
queue inter parent rootq on em0 bandwidth 1M, max 2M default qlimit 50
  [ pkts: 147059  bytes:  150743153  dropped pkts:  0 bytes: 
 0 ]

  [ qlength:   0/ 50 ]
  [ measured:  3751.0 packets/s, 30.76Mb/s ]
queue bg parent rootq on em0 bandwidth 10M, max 15M qlimit 50
  [ pkts:   1015  bytes: 107200  dropped pkts:  0 bytes: 
 0 ]

  [ qlength:   0/ 50 ]
  [ measured:27.2 packets/s, 23.16Kb/s ]

systat q

QUEUE BW SCH  PRIO PKTSBYTES   
DROP_P   DROP_B QLEN BORROW SUSPEN P/S B/S
rootq on em0 98M  00
000 0   0
 inter1M 191868  194045K
000  3004 3455760
 bg  10M   1297   135814
000324608


dmesg
OpenBSD 5.6-current (HZ) #0: Tue Sep 23 11:26:16 EEST 2014
vl...@ns.bsdbg.net:/sys/arch/amd64/compile/HZ
real mem = 6416760832 (6119MB)
avail mem = 6237212672 (5948MB)
.



Re: pf queue max bug

2014-09-22 Thread Atanas Vladimirov

Hi,
I rewrote my rulesets with no luck:

QUEUE   BW SCH  PRIO PKTSBYTES   DROP_P   DROP_B 
QLEN BORROW SUSPEN P/S B/S
rootq on em0   98M  0000 
   0 0   0
 inter  1M 179572  214136K00 
   0   898 1232993
 bg10M   6360   72776400 
   0 3 308


queue rootq on em0 bandwidth 98M, max 99M qlimit 50
  [ pkts:  0  bytes:  0  dropped pkts:  0 bytes: 
 0 ]

  [ qlength:   0/ 50 ]
  [ measured: 0.0 packets/s, 0 b/s ]
queue inter parent rootq on em0 bandwidth 1M, max 2M default qlimit 50
  [ pkts:  67209  bytes:   80035513  dropped pkts:  0 bytes: 
 0 ]

  [ qlength:   0/ 50 ]
  [ measured:  1172.0 packets/s, 11.13Mb/s ]
queue bg parent rootq on em0 bandwidth 10M, max 15M qlimit 50
  [ pkts:   1858  bytes: 215486  dropped pkts:  0 bytes: 
 0 ]

  [ qlength:   0/ 50 ]
  [ measured:32.5 packets/s, 30.58Kb/s ]



pf.conf

### Interfaces ###
 ExtIf =em0
 IntIf =vlan41
 Free  =vlan81

 sam = 192.168.1.18

### Tables ###
  table bgnets file /etc/bgnets
  table spamd-white persist
  table bgp-spamd-bypass persist

### Misc Options
 set loginterface $ExtIf
 set skip on { lo, enc0 }
 set limit table-entries 40  # Full list is 200k entries as of March 
1


 Queueing 



 queue rootq on $ExtIf bandwidth 98M, max 99M
  queue inter parent rootq bandwidth 1M, max 2M default
  queue bg parent rootq bandwidth 10M, max 15M

 Translation and Filtering 
###


### BLOCK all in/out on all interfaces by default and log
 block return log on $ExtIf
 block return log on $IntIf
 block return log on $Free

### Network Address Translation (NAT with outgoing source port 
randomization)

 match out log on egress from $IntIf:network \
to any nat-to ($ExtIf:0)
 match out log on egress from $Free:network \
to any nat-to ($ExtIf:0)

### NAT from IntIf to FreeWifi
 match out log on $Free from $IntIf:network \
to $Free:network nat-to ($Free:0)

### Packet normalization ( scrubbing )
 match log on $ExtIf all scrub (random-id max-mss 1440)

### $ExtIf inbound 

# dns nsd
  pass in log on $ExtIf inet proto {tcp, udp} from any \
 to ($ExtIf) port domain set queue inter
  pass in log on $ExtIf inet proto {tcp, udp} from bgnets \
 to ($ExtIf) port domain set queue bg

# OpenSMTPD
  pass in log quick on $ExtIf inet proto tcp from bgp-spamd-bypass \
 to ($ExtIf) port smtp set queue  inter rdr-to lo0
  pass in log on $ExtIf inet proto tcp from any \
 to ($ExtIf) port smtp rdr-to lo0 port spamd
  pass in log on $ExtIf inet proto tcp from spamd-white \
 to ($ExtIf) port smtp set queue  inter rdr-to lo0

# Nginx
  pass in log on $ExtIf inet proto tcp from any \
 to ($ExtIf) port {www, https} set queue  inter rdr-to lo0
  pass in log on $ExtIf inet proto tcp from bgnets \
 to ($ExtIf) port {www, https} set queue bg rdr-to lo0


# Ntpd ( time server )
  pass in log on $ExtIf inet proto udp from any \
 to ($ExtIf) port ntp set queue inter
  pass in log on $ExtIf inet proto udp from bgnets \
 to ($ExtIf) port ntp set queue bg

### End $ExtIf inbound ###

### $IntIf outbound ###

# Allow self to reach Lan
  pass out log on $IntIf inet proto {tcp, udp, icmp} from (self) \
 to $IntIf:network

### End $IntIf outbound ###

### $IntIf inbound ###

# Allow all out
  pass in log on $IntIf inet proto {tcp, udp, icmp} from $IntIf:network 
\

 to any

# Allow SamKnows to run it's tests
  pass in log on $IntIf inet proto {tcp, udp, icmp} from $sam \
 to any tag SAM

### End $IntIf inbound ###

### $ExtIf outbound ###

## TCP ##
# Queue default
  pass out log on $ExtIf inet proto tcp from ($ExtIf) \
 to any set queue inter
  pass out log on $ExtIf inet proto tcp from ($ExtIf) \
 to bgnets set queue bg

# Queue dns
  pass out log on $ExtIf inet proto tcp from ($ExtIf) \
 to any port domain set queue inter
  pass out log on $ExtIf inet proto tcp from ($ExtIf) \
 to bgnets port domain set queue bg

## UDP ##
# Queue default
  pass out log on $ExtIf inet proto udp from ($ExtIf) \
 to any set queue inter
  pass out log on $ExtIf inet proto udp from ($ExtIf) \
 to bgnets set queue bg

# Queue dns
  pass out log on $ExtIf inet proto udp from ($ExtIf) \
 to any port domain set queue inter
  pass out log on $ExtIf inet proto udp from ($ExtIf) \
 to bgnets port domain set queue bg

# Queue ntp
  pass out log on $ExtIf inet proto udp from ($ExtIf) \
 to any port ntp set queue inter
  pass out log on $ExtIf inet proto udp from ($ExtIf) \
 to bgnets port ntp set queue bg

# ICMP
  pass out log on $ExtIf inet proto icmp from ($ExtIf) \
 to 

Re: pf queue max bug

2014-09-22 Thread Atanas Vladimirov

On 22.09.2014 22:50, Atanas Vladimirov wrote:

Hi,
I rewrote my rulesets with no luck:

QUEUE   BW SCH  PRIO PKTSBYTES   DROP_P
DROP_B QLEN BORROW SUSPEN P/S B/S
rootq on em0   98M  000
00 0   0
 inter  1M 179572  214136K0
00   898 1232993
 bg10M   6360   7277640
00 3 308

queue rootq on em0 bandwidth 98M, max 99M qlimit 50
  [ pkts:  0  bytes:  0  dropped pkts:  0 bytes:
  0 ]

  [ qlength:   0/ 50 ]
  [ measured: 0.0 packets/s, 0 b/s ]
queue inter parent rootq on em0 bandwidth 1M, max 2M default qlimit 50
  [ pkts:  67209  bytes:   80035513  dropped pkts:  0 bytes:
  0 ]

  [ qlength:   0/ 50 ]
  [ measured:  1172.0 packets/s, 11.13Mb/s ]
queue bg parent rootq on em0 bandwidth 10M, max 15M qlimit 50
  [ pkts:   1858  bytes: 215486  dropped pkts:  0 bytes:
  0 ]

  [ qlength:   0/ 50 ]
  [ measured:32.5 packets/s, 30.58Kb/s ]



pf.conf

### Interfaces ###
 ExtIf =em0
 IntIf =vlan41
 Free  =vlan81

 sam = 192.168.1.18

### Tables ###
  table bgnets file /etc/bgnets
  table spamd-white persist
  table bgp-spamd-bypass persist

### Misc Options
 set loginterface $ExtIf
 set skip on { lo, enc0 }
 set limit table-entries 40  # Full list is 200k entries as of 
March 1


 Queueing 



 queue rootq on $ExtIf bandwidth 98M, max 99M
  queue inter parent rootq bandwidth 1M, max 2M default
  queue bg parent rootq bandwidth 10M, max 15M

 Translation and Filtering 
###


### BLOCK all in/out on all interfaces by default and log
 block return log on $ExtIf
 block return log on $IntIf
 block return log on $Free

### Network Address Translation (NAT with outgoing source port 
randomization)

 match out log on egress from $IntIf:network \
to any nat-to ($ExtIf:0)
 match out log on egress from $Free:network \
to any nat-to ($ExtIf:0)

### NAT from IntIf to FreeWifi
 match out log on $Free from $IntIf:network \
to $Free:network nat-to ($Free:0)

### Packet normalization ( scrubbing )
 match log on $ExtIf all scrub (random-id max-mss 1440)

### $ExtIf inbound 

# dns nsd
  pass in log on $ExtIf inet proto {tcp, udp} from any \
 to ($ExtIf) port domain set queue inter
  pass in log on $ExtIf inet proto {tcp, udp} from bgnets \
 to ($ExtIf) port domain set queue bg

# OpenSMTPD
  pass in log quick on $ExtIf inet proto tcp from bgp-spamd-bypass \
 to ($ExtIf) port smtp set queue  inter rdr-to lo0
  pass in log on $ExtIf inet proto tcp from any \
 to ($ExtIf) port smtp rdr-to lo0 port spamd
  pass in log on $ExtIf inet proto tcp from spamd-white \
 to ($ExtIf) port smtp set queue  inter rdr-to lo0

# Nginx
  pass in log on $ExtIf inet proto tcp from any \
 to ($ExtIf) port {www, https} set queue  inter rdr-to lo0
  pass in log on $ExtIf inet proto tcp from bgnets \
 to ($ExtIf) port {www, https} set queue bg rdr-to lo0


# Ntpd ( time server )
  pass in log on $ExtIf inet proto udp from any \
 to ($ExtIf) port ntp set queue inter
  pass in log on $ExtIf inet proto udp from bgnets \
 to ($ExtIf) port ntp set queue bg

### End $ExtIf inbound ###

### $IntIf outbound ###

# Allow self to reach Lan
  pass out log on $IntIf inet proto {tcp, udp, icmp} from (self) \
 to $IntIf:network

### End $IntIf outbound ###

### $IntIf inbound ###

# Allow all out
  pass in log on $IntIf inet proto {tcp, udp, icmp} from $IntIf:network 
\

 to any

# Allow SamKnows to run it's tests
  pass in log on $IntIf inet proto {tcp, udp, icmp} from $sam \
 to any tag SAM

### End $IntIf inbound ###

### $ExtIf outbound ###

## TCP ##
# Queue default
  pass out log on $ExtIf inet proto tcp from ($ExtIf) \
 to any set queue inter
  pass out log on $ExtIf inet proto tcp from ($ExtIf) \
 to bgnets set queue bg

# Queue dns
  pass out log on $ExtIf inet proto tcp from ($ExtIf) \
 to any port domain set queue inter
  pass out log on $ExtIf inet proto tcp from ($ExtIf) \
 to bgnets port domain set queue bg

## UDP ##
# Queue default
  pass out log on $ExtIf inet proto udp from ($ExtIf) \
 to any set queue inter
  pass out log on $ExtIf inet proto udp from ($ExtIf) \
 to bgnets set queue bg

# Queue dns
  pass out log on $ExtIf inet proto udp from ($ExtIf) \
 to any port domain set queue inter
  pass out log on $ExtIf inet proto udp from ($ExtIf) \
 to bgnets port domain set queue bg

# Queue ntp
  pass out log on $ExtIf inet proto udp from ($ExtIf) \
 to any port ntp set queue inter
  pass out log on $ExtIf inet proto udp from ($ExtIf) \
 to bgnets port ntp set queue bg

# ICMP
  pass out log on $ExtIf inet proto icmp

Re: pf queue max bug

2014-09-21 Thread Atanas Vladimirov

Hi,
Is there any way to disable/flush (like with ALTQ) pf queues?
I tryed with `pfctl -d; pfctl -e; pfctl -f /etc/pf.conf' but I got an 
error:


pfctl: DIOCXCOMMIT: Invalid argument

The only reference I could find was this:

http://marc.info/?l=openbsd-techm=140421855720135w=2

Is this a known behavior?
After this error the only way to load my rulesets was with reboot.
I still trying to figure out why my queues don't limit the max 
bandwidth.

Thanks for your time.

--
pf.conf
--

### Interfaces ###
 ExtIf =em0
 IntIf =vlan41
 Free  =vlan81
 lo0   =127.0.0.1

### Hosts ###
 vl=192.168.1.2
 jl=192.168.1.3
 ve=192.168.1.4
 ntp=192.168.1.5
 rpi=192.168.1.7
 dpc11=192.168.1.11
 sam=192.168.1.16
 cs_serv=10.10.10.254
 mc_serv=10.10.10.253
 mc_serv1=10.10.10.252
 r2_serv=10.10.10.240
 w7_rdc =10.10.10.241
 dpc21=192.168.1.21

### Ports ###
 low_ports = 0:1023
 hi_ports  = 1024:65535
 web   = {20, 21, 22, 25, 80, 443, , 3389, 5900, 6000, , 
8080 }

 ssh_extif = 
 rdc   = 3389
 rdc_extif = 4910
 rdc_r2= 5511
 rdc_w7= 5522
 squid = 8080
 squid_extif = 8080
 vl_skype  = 30001
 jl_skype  = 30002
 ve_skype  = 30003
 vl_torrent= 30004
 jl_torrent= 30005
 ve_torrent= 30006
 vl_hfs= 8081
 ftp_proxy = 8021
 symux = 2100
 ftp   = 21
 vnc_ext   = 59001
 vnc_int   = 5900
 sftp  = 2
 l2tp  = { 500, 1701, 4500 }
 mine  = 25565
 mine1 = 25566
 trace = 33434:33498
 cs16  = 27000:27018
 q3= 27960:27963
 ventrilo  = 3784

### Queues, States and Types ###
 IcmpType =icmp-type 8 code 0
 SynState =flags S/SAFR synproxy state

### Tables ###
  table bgnets file /etc/bgnets
  table spamd-white persist
  table bgp-spamd-bypass persist
  table proxy-users file /etc/proxy_users
  table BLOCK persist #{ 82.119.88.70 }

 Options 
##

### Misc Options
# set block-policy drop
 set loginterface $ExtIf
 set skip on { lo, enc0 }
# set optimization aggressive
 set limit table-entries 40  # Full list is 200k entries as of March 
1

# set state-defaults pflow

 Queueing 



 queue rootq on $ExtIf bandwidth 98M, max 99M
  queue inter parent rootq bandwidth 2M, max 3M
   queue i_ack parent inter bandwidth 1M, min 900K
   queue i_dns parent inter bandwidth 500K, min 400K
   queue i_ntp parent inter bandwidth 300K, min 200K
   queue i_web parent inter bandwidth 500K burst 2M for 1ms
   queue i_bulkparent inter bandwidth 170K
   queue i_bittor  parent inter bandwidth 30K, max 1400K default

  queue bg parent rootq bandwidth 39M, max 40M
   queue b_ack parent bg bandwidth 15M, min 10M
   queue b_dns parent bg bandwidth 1M, min 900K
   queue b_ntp parent bg bandwidth 4M, min 3900K
   queue b_rdc parent bg bandwidth 4M, min 3900K
   queue b_web parent bg bandwidth 10M, min 9M burst 40M for 5000ms, 
max 37M

   queue b_bulkparent bg bandwidth 5M, min 4M
   queue b_bittor  parent bg bandwidth 1M, max 2M

 Translation and Filtering 
###


### BLOCK all in/out on all interfaces by default and log
 block return log on $ExtIf
 block return log on $IntIf
 block return log on $Free
 block quick  log on $ExtIf from BLOCK

### Network Address Translation (NAT with outgoing source port 
randomization)

 match out log on egress from $IntIf:network \
to any nat-to ($ExtIf:0)
 match out log on egress from $Free:network \
to any nat-to ($ExtIf:0)
 match out log on egress from 192.168.3.0/24 \
to any nat-to ($ExtIf:0)

### NAT from IntIf to FreeWifi
 match out log on $Free from $IntIf:network \
to $Free:network nat-to ($Free:0)

### Packet normalization ( scrubbing )
 match log on $ExtIf all scrub (random-id max-mss 1440)

### Ftp ( secure ftp proxy for LAN )
 anchor ftp-proxy/*
 anchor vpn

### pppx
 pass log on pppx

 pass log proto esp set queue b_ack
# pass log proto gre set queue b_ack

### $ExtIf inbound 

# npppd
  pass in log on $ExtIf proto {tcp, udp} from bgnets \
 to ($ExtIf) port $l2tp set queue b_dns

# dns nsd
  pass in log on $ExtIf inet proto {tcp, udp} from any \
 to ($ExtIf) port domain set queue i_dns
  pass in log on $ExtIf inet proto {tcp, udp} from bgnets \
 to ($ExtIf) port domain set queue b_dns

# OpenSSH
  pass in log on $ExtIf inet proto tcp from bgnets \
 to ($ExtIf) port $ssh_extif set queue b_ack rdr-to $lo0 port ssh

# OpenSMTPD
  pass in log quick on $ExtIf inet proto tcp from bgp-spamd-bypass \
 to ($ExtIf) port smtp set queue (i_web, i_ack) rdr-to lo0
  pass in log on $ExtIf inet proto tcp from any \
 to ($ExtIf) port smtp rdr-to lo0 port spamd
  pass in log on $ExtIf inet proto tcp from spamd-white \
 to ($ExtIf) port smtp set queue (i_web, i_ack) rdr-to lo0

# IMAPS/SMTPS
  pass in log on $ExtIf inet proto tcp from bgnets \
 to ($ExtIf) 

Re: pf queue max bug

2014-09-21 Thread Atanas Vladimirov

On 21.09.2014 20:56, Kevin Gerrard wrote:
I was receiving this same error a few days ago. It was because I had a 
rule
that was referring to a table that was not there or something another. 
That
was the exact error I received. Finally figured that out and it has 
been

flawless since.

The rule to flush queues only is :pfctl -F queue


There is no such option, you may see pfctl(8)

[ns]~$ pfctl -F queue
pfctl: Unknown flush modifier 'queue'
usage: pfctl [-deghnPqrvz] [-a anchor] [-D macro=value] [-F modifier]
[-f file] [-i interface] [-K host | network]
[-k host | network | label | id] [-L statefile] [-o level] [-p 
device]
[-S statefile] [-s modifier [-R id]] [-t table -T command 
[address ...]]

[-x level]



I also had to reboot to get away from that error but it was something 
to do

with a table that was not right or a rule referring to the wrong table.
Can't remember why exactly but it was a typo.

As for max queues here is a simple few line queue rule to try and it is
tested and works. All it does is control MAX bandwidth on the interface 
for

me. It is tested and works.

#   Queues   #
##
queue download on $int_if bandwidth 10M, max 10M
   queue down parent download bandwidth 10M default
queue upload on $ext_if bandwidth 10M, max 10M
   queue up parent upload bandwidth 10M default

Keep in mind this is a fiber connection where ATT lets us spike above 
our
25Mbit limit for a price, therefore we put this rule in to keep 
that

from happening.

Hope this helps.

Kevin Gerrard


Thanks for your time. I'm going to rewrite my rulesets with minimum for 
my needs and I'll test again.




Re: pf queue max bug

2014-09-17 Thread Atanas Vladimirov

On 16.09.2014 20:00, Atanas Vladimirov wrote:

On 16.09.2014 19:32, Zé Loff wrote:

On Tue, Sep 16, 2014 at 01:07:00PM +0200, Henning Brauer wrote:

* Atanas Vladimirov vl...@bsdbg.net [2014-09-16 12:58]:
 As I said this was my working pf.conf for new queueing system on i386.
 I think that the problem is elsewhere. When you set the queue max bandwidth
 it must not exceed that value.

if the sums of the target bandwidth exceed interface speed or
min/target exceed max, all bets are off. fix your queue defs.


I was looking at pf.conf's man page and noticed that in some examples
the queue parameters appear separated by commas:

  queue ssh parent std bandwidth 10M, min 5M, max 25M

and in some cases without commas:

  queue  ssh_interactive parent ssh bandwidth 10M min 5M

Does this make a difference? And if not, should pf.conf be fixed for
consistency?

Cheers
Zé


--
Henning Brauer, h...@bsws.de, henn...@openbsd.org
BS Web Services GmbH, http://bsws.de, Full-Service ISP
Secure Hosting, Mail and DNS. Virtual  Dedicated Servers, Root to 
Fully Managed

Henning Brauer Consulting, http://henningbrauer.com/



Hi Henning,
Thanks for your respond but can you give me an advice on how to solve
this matter.
I changed my queues definitions (the sums didn't exceed interface
speed or min  max) with no luck:

   ^
min  max


 queue rootq on $ExtIf bandwidth 100M max 100M
  queue inter parent rootq bandwidth 3M max 3M
   queue i_ack parent inter bandwidth 1M, min 1M
   queue i_dns parent inter bandwidth 500K
   queue i_ntp parent inter bandwidth 300K
   queue i_web parent inter bandwidth 1M burst 2M for 1ms
   queue i_bulkparent inter bandwidth 170K
   queue i_bittor  parent inter bandwidth 30K, max 1400K default

  queue bg parent rootq bandwidth 40M max 40M
   queue b_ack parent bg bandwidth 15M, min 10M
   queue b_dns parent bg bandwidth 1M, min 1M
   queue b_ntp parent bg bandwidth 4M, min 4M
   queue b_rdc parent bg bandwidth 4M, min 4M
   queue b_web parent bg bandwidth 10M, min 9M burst 40M for 
5000ms, max 37M

   queue b_bulkparent bg bandwidth 5M, min 4M
   queue b_bittor  parent bg bandwidth 1M, max 2M

queue b_bittor parent bg on em0 bandwidth 1M, max 2M qlimit 50
  [ pkts:  54890  bytes:   79466769  dropped pkts:  0 bytes:
  0 ]

  [ qlength:   0/ 50 ]
  [ measured:  2701.8 packets/s, 31.28Mb/s ]

QUEUE BW SCH  PRIO PKTSBYTES
DROP_P   DROP_B QLEN BORROW SUSPEN P/S B/S
rootq on em0100M  00
 000 0   0
 inter3M  00
 000 0   0
  i_ack   1M  47177  3118394
 000   215   14246
  i_dns 500K35432191
 00010 954
  i_ntp 300K15113590
 000   1.0  89
  i_web   1M   1970   634138
 000102810
  i_bulk170K14328491
 000   1.0  41
  i_bittor   30K  19556  2837925
 00060   18395
 bg  40M  00
 000 0   0
  b_ack  15M   101160608
 000   1.0  57
  b_dns   1M 56 8423
 000 0   0
  b_ntp   4M43439016
 000   1.0  89
  b_rdc   4M  00
 000 0   0
  b_web  10M10714833
 000   1.0 108
  b_bulk  5M 32 2318
 000 0   0
  b_bittor1M 450367  636064K
 000  2264 3245446




pf queue max bug

2014-09-16 Thread Atanas Vladimirov

Hi,
I moved my old server to a better hardware and I installed amd64 
-current (old one was i386 following -current) and made a drop in 
replacement of pf.conf.
The problem is that when I set a queue MAX speed limit it didn't work as 
it should - for example b_bittor:


pf.conf:

 queue rootq on $ExtIf bandwidth 100M max 100M
  queue inter parent rootq bandwidth 3M max 2950K
   queue i_ack parent inter bandwidth 2M, min 1M
   queue i_dns parent inter bandwidth 500K
   queue i_ntp parent inter bandwidth 300K
   queue i_web parent inter bandwidth 2M burst 2M for 1ms
   queue i_bulkparent inter bandwidth 170K
   queue i_bittor  parent inter bandwidth 30K, max 1400K default

  queue bg parent rootq bandwidth 40M max 39M
   queue b_ack parent bg bandwidth 15M, min 10M
   queue b_dns parent bg bandwidth 1M, min 1M
   queue b_ntp parent bg bandwidth 4M, min 4M
   queue b_rdc parent bg bandwidth 4M, min 4M
   queue b_web parent bg bandwidth 15M, min 15M burst 40M for 
5000ms, max 37M

   queue b_bulkparent bg bandwidth 8M, min 5M
   queue b_bittor  parent bg bandwidth 2M, max 2M

queue b_bittor parent bg on em0 bandwidth 2M, max 2M qlimit 50
  [ pkts:1441771  bytes: 2064477928  dropped pkts:  0 bytes: 
 0 ]

  [ qlength:   0/ 50 ]
  [ measured:  2043.4 packets/s, 23.69Mb/s ]

1 usersLoad 0.41 0.40 0.43 Tue Sep 16 
10:12:56 2014


QUEUE BW SCH  PRIO PKTSBYTES   
DROP_P   DROP_B QLEN BORROW SUSPEN P/S B/S
rootq on em0100M  00
000 0   0
 inter3M  00
000 0   0
  i_ack   2M   8365   527486   
44 23880 0   0
  i_dns 500K   1333   142263
000 0   0
  i_ntp 300K   1143   105017
000   1.0  89
  i_web   2M   2328   742242   
24 21970 0   0
  i_bulk170K   1482   242112
000 0   0
  i_bittor   30K  91768  9426828
000453024
 bg  40M  00
000 0   0
  b_ack  15M  23306  1428052
000 2 164
  b_dns   1M  10044  4865285
00028   18672
  b_ntp   4M   2819   256892
000 1 178
  b_rdc   4M  00
000 0   0
  b_web  15M800   203426   
23105560   1.0  97
  b_bulk  8M32823814
000 0   0
  b_bittor2M1649850 2310255K
000  2610 3796423


dmesg:
OpenBSD 5.6-current (GENERIC.MP) #374: Mon Sep 15 08:42:10 MDT 2014
t...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 6416760832 (6119MB)
avail mem = 6237216768 (5948MB)
..



Re: pf queue max bug

2014-09-16 Thread Atanas Vladimirov

On 16.09.2014 12:36, Zé Loff wrote:

On Tue, Sep 16, 2014 at 10:20:34AM +0300, Atanas Vladimirov wrote:

Hi,
I moved my old server to a better hardware and I installed amd64 
-current
(old one was i386 following -current) and made a drop in replacement 
of

pf.conf.
The problem is that when I set a queue MAX speed limit it didn't work 
as it

should - for example b_bittor:

pf.conf:

 queue rootq on $ExtIf bandwidth 100M max 100M
  queue inter parent rootq bandwidth 3M max 2950K
   queue i_ack parent inter bandwidth 2M, min 1M
   queue i_dns parent inter bandwidth 500K
   queue i_ntp parent inter bandwidth 300K
   queue i_web parent inter bandwidth 2M burst 2M for 1ms
   queue i_bulkparent inter bandwidth 170K
   queue i_bittor  parent inter bandwidth 30K, max 1400K default

  queue bg parent rootq bandwidth 40M max 39M
   queue b_ack parent bg bandwidth 15M, min 10M
   queue b_dns parent bg bandwidth 1M, min 1M
   queue b_ntp parent bg bandwidth 4M, min 4M
   queue b_rdc parent bg bandwidth 4M, min 4M
   queue b_web parent bg bandwidth 15M, min 15M burst 40M for 
5000ms,

max 37M
   queue b_bulkparent bg bandwidth 8M, min 5M
   queue b_bittor  parent bg bandwidth 2M, max 2M


Why are some of your target bandwidths higher than the allowed maximum
bandwidths?

As I said this was my working pf.conf for new queueing system on i386.
I think that the problem is elsewhere. When you set the queue max 
bandwidth it must not exceed that value.




Re: pf queue max bug

2014-09-16 Thread Atanas Vladimirov

On 16.09.2014 19:32, Zé Loff wrote:

On Tue, Sep 16, 2014 at 01:07:00PM +0200, Henning Brauer wrote:

* Atanas Vladimirov vl...@bsdbg.net [2014-09-16 12:58]:
 As I said this was my working pf.conf for new queueing system on i386.
 I think that the problem is elsewhere. When you set the queue max bandwidth
 it must not exceed that value.

if the sums of the target bandwidth exceed interface speed or
min/target exceed max, all bets are off. fix your queue defs.


I was looking at pf.conf's man page and noticed that in some examples
the queue parameters appear separated by commas:

  queue ssh parent std bandwidth 10M, min 5M, max 25M

and in some cases without commas:

  queue  ssh_interactive parent ssh bandwidth 10M min 5M

Does this make a difference? And if not, should pf.conf be fixed for
consistency?

Cheers
Zé


--
Henning Brauer, h...@bsws.de, henn...@openbsd.org
BS Web Services GmbH, http://bsws.de, Full-Service ISP
Secure Hosting, Mail and DNS. Virtual  Dedicated Servers, Root to 
Fully Managed

Henning Brauer Consulting, http://henningbrauer.com/



Hi Henning,
Thanks for your respond but can you give me an advice on how to solve 
this matter.
I changed my queues definitions (the sums didn't exceed interface speed 
or min  max) with no luck:


 queue rootq on $ExtIf bandwidth 100M max 100M
  queue inter parent rootq bandwidth 3M max 3M
   queue i_ack parent inter bandwidth 1M, min 1M
   queue i_dns parent inter bandwidth 500K
   queue i_ntp parent inter bandwidth 300K
   queue i_web parent inter bandwidth 1M burst 2M for 1ms
   queue i_bulkparent inter bandwidth 170K
   queue i_bittor  parent inter bandwidth 30K, max 1400K default

  queue bg parent rootq bandwidth 40M max 40M
   queue b_ack parent bg bandwidth 15M, min 10M
   queue b_dns parent bg bandwidth 1M, min 1M
   queue b_ntp parent bg bandwidth 4M, min 4M
   queue b_rdc parent bg bandwidth 4M, min 4M
   queue b_web parent bg bandwidth 10M, min 9M burst 40M for 5000ms, 
max 37M

   queue b_bulkparent bg bandwidth 5M, min 4M
   queue b_bittor  parent bg bandwidth 1M, max 2M

queue b_bittor parent bg on em0 bandwidth 1M, max 2M qlimit 50
  [ pkts:  54890  bytes:   79466769  dropped pkts:  0 bytes: 
 0 ]

  [ qlength:   0/ 50 ]
  [ measured:  2701.8 packets/s, 31.28Mb/s ]

QUEUE BW SCH  PRIO PKTSBYTES   
DROP_P   DROP_B QLEN BORROW SUSPEN P/S B/S
rootq on em0100M  00
000 0   0
 inter3M  00
000 0   0
  i_ack   1M  47177  3118394
000   215   14246
  i_dns 500K35432191
00010 954
  i_ntp 300K15113590
000   1.0  89
  i_web   1M   1970   634138
000102810
  i_bulk170K14328491
000   1.0  41
  i_bittor   30K  19556  2837925
00060   18395
 bg  40M  00
000 0   0
  b_ack  15M   101160608
000   1.0  57
  b_dns   1M 56 8423
000 0   0
  b_ntp   4M43439016
000   1.0  89
  b_rdc   4M  00
000 0   0
  b_web  10M10714833
000   1.0 108
  b_bulk  5M 32 2318
000 0   0
  b_bittor1M 450367  636064K
000  2264 3245446




Re: panic: mtx_enter: locking against myself

2014-09-15 Thread Atanas Vladimirov

On 29.01.2013 01:47, mxb wrote:

Those panics seems to be related to GRE.
I switched from using gre to gif and was unable to reproduce this 
panic.


On 4 jan 2013, at 00:01, mxb m...@alumni.chalmers.se wrote:



scp from within internal network (network2) does not trigger this 
panic,

eg.


client_on_network2# scp fw2.int_ip:/bsd .


On 3 jan 2013, at 20:15, mxb m...@alumni.chalmers.se wrote:


client does 'scp fw2.network2_ip:/bsd .'  - results in panic.
client does 'scp fw2.public_ip:/bsd .' - all fine.


Hi,
Today I had the same kernel panic and found this thread.
If you need more info just ask.

ddb{0} trace
Debugger() at Debugger+0x9
panic() at panic+0xfe
mtx_enter() at mtx_enter+0x61
m_clget() at m_clget+0x69
em_get_buf() at em_get_buf+0x89
em_rxfill() at em_rxfill+0x6b
em_intr() at em_intr+0xbe
intr_handler() at intr_handler+0x40
Xintr_ioapic_edge22() at Xintr_ioapic_edge22+0xdc
--- interrupt ---
Bad frame pointer: 0x8000225a8af0
end trace frame: 0x8000225a8af0, count: -9
sysctl_dopool+0x16f:

ddb{0} show panic
mtx_enter: locking against myself

ddb{0} show registers
ds0x7c01
es0x86e0
fs 0x8f5
gs   0xd
rdi  0x1
rsi0x296
rbp   0x8000225a86d0
rbx   0x81327c01mtx_enter+0x61
rdx0
rcx   0x81a8b520cpu_info_primary
rax  0x1
r80x8000225a85f0
r90x81327c01mtx_enter+0x61
r10   0x8000225a8658
r11   0x81086e40comcnputc
r120x100
r13   0x8000225a86e0
r14  0x7
r15  0x2
rip   0x81345339Debugger+0x9
cs   0x8
rflags 0x286
rsp   0x8000225a86c0
ss  0x10
Debugger+0x9:   leave

ddb{0} ps
   PID   PPID   PGRPUID  S   FLAGS  WAIT  COMMAND
 27073  27824  27824   1000  30x92  kqreadimap
 12037  27824  27824666  30x92  kqreadimap-login
 18660  27824  27824  0  30x92  kqreadconfig
 16322  12237  12237   1000  30x82  selectsftp-server
 12237  28885  12237   1000  30x8a  pause ksh
 28885  24546  24546   1000  30x90  selectsshd
 24546  22061  24546  0  30x92  poll  sshd
  3820  20714  20714 67  30x90  netconphp-fpm-5.5
 21014  20714  20714 67  30x90  netconphp-fpm-5.5
 22827  20714  20714 67  30x90  netconphp-fpm-5.5
 10670  23743  10670   1000  30x83  ttyin ksh
 23743  1  23743   1000  30x80  kqreadtmux
 29126  32014  29126   1000  30x83  kqreadtmux
  6579  19889  19889 68  30x90  selectisakmpd
 19889  1  19889  0  30x80  netio isakmpd
 32014  13736  32014   1000  30x8b  pause ksh
 13736   6127   6127   1000  30x90  selectsshd
  6127  22061   6127  0  30x82  poll  sshd
 19627  10889  19627   1000  30x83  ttyin ksh
 10889  14020  14020   1000  30x90  selectsshd
 14020  22061  14020  0  30x92  poll  sshd
 27970  19711  19711 67  30x90  kqreadnginx
 19711  1  19711  0  30x88  pause nginx
 15661  1  15661 67  30x90  kqreadthttpd
 25643  19536  25643550  30x90  poll  nagios
 19024  19536  19024550  30x82  poll  nagios
 25989  19536  25989550  30x82  poll  nagios
 14929  19536  14929550  30x82  poll  nagios
 13499  19536  13499550  30x82  poll  nagios
 15637  19536  15637550  30x82  poll  nagios
 10152  19536  10152550  30x82  poll  nagios
 19536  1  19536550  30x90  poll  nagios
 30833  1  30833562  30x90  nanosleep perl
*19594  1  19594535  70x10symon
 25749337337 62  30x90  piperdspamd
 16064337337 62  30x90  selectspamd
   337  1337 62  30x90  nanosleep spamd
 28289266266 73  30x90  poll  syslogd
   266  1266  0  30x80  netio syslogd
  7744  1   7744  0  30x80  selectsymux
 25430   4232  25430503  30x80  netio postgres
  2110  1  1  0  30x8a  pause ldattach
 17950  1  17950  0  30x83  ttyin getty
   334  1334  0  3

Re: How to run smokeping with slowcgi?

2014-09-15 Thread Atanas Vladimirov

On 14.09.2014 22:29, Adam Thompson wrote:

On 2014-09-14 11:58, Atanas Vladimirov wrote:

Hi,
I'm trying to run smokeping (installed via ppkg_add) with nginx
(installed via ppkg_add) and slowcgi.
Is it possible?


Not sure about the package... also not sure running smokeping under
slowcgi is sane.  It's really intended, based on the upstream docs, to
run under Apache with FastCGI; if you aren't running it fcgi, you need
pretty decent hardware to handle the invocation overhead.

I installed it from source, and got it working on a dedicated VM.  I
dedicated a VM to it because I wasn't comfortable with that much
web-accessible stuff running (ultimately) setuid root, and not
chroot'ed.

Running as FastCGI wasn't too difficult, in the end... although
figuring out how to do it took me some time.

===nginx.conf===
worker_processes  1;
error_log  logs/error.log  debug;
events {
worker_connections  1024;
}
http {
include   mime.types;
default_type  application/octet-stream;
index smokeping.fcgi index.html index.htm;
keepalive_timeout  65;
server_tokens off;
server {
listen   80;
listen   [::]:80;
server_name  localhost;
root /opt/smokeping/htdocs;
error_page   500 502 503 504  /50x.html;
location = /50x.html {
root  /var/www/htdocs;
}
location  /smokeping.fcgi {
fastcgi_pass   unix:/opt/smokeping/var/smokeping.sock;
includefastcgi_params;
}
}
}
===EOF===

I'm also forwarding, separately, to both you and ports@, the message I
sent to sthen@ covering what I had to do to make it work on
5.5-RELEASE with my conclusions on what would have to change in the
port.
Since nginx is no longer in base as of 5.7 (IIRC - ?) there might not
be much point in fixing the package... dunno, not my call.

Note that you need a FCGI launcher when using nginx instead of Apache;
I hacked one together in rc.local because I didn't fully understand
the problem until I had already solved it the hard way.


===rc.local snippet===
/opt/smokeping/bin/smokeping --config=/opt/smokeping/etc/config
--logfile=/opt/smokeping/log/smokeping.log

(
while true; do
SMOKE_SOCKET=/opt/smokeping/var/smokeping.sock
rm -f $SMOKE_SOCKET
FCGI_SOCKET_PATH=$SMOKE_SOCKET
/opt/smokeping/bin/smokeping_cgi 
FPID=$!
until [ -e $SMOKE_SOCKET ]; do
sleep 1;
done;
chgrp www /opt/smokeping/var/smokeping.sock \
 chmod g+w /opt/smokeping/var/smokeping.sock
wait $FPID
done
) 
===EOF===

There are a handful of fcgi launchers in ports/pkgs that should do a
much cleaner job of it.


Hi,
Thanks for your time.
I started this topic just out of curousity and searching for a working 
config without sthttpd.

Here is my working config with nginx and sthttpd as a proxy:

[ns]~$ cat /etc/rc.local

# sthttpd
if [ -x /usr/local/sbin/thttpd ]; then
echo -n ' thttpd'; /usr/local/sbin/thttpd -C /etc/thttpd.conf
fi
echo '.'


nginx.conf

location ~ .*\\.(fcgi|cgi)$ {
proxy_pass http://127.0.0.1:8000;
}


thttpd.conf

# BEWARE : No empty lines are allowed!
# This section overrides defaults
# This section _documents_ defaults in effect
# port=80
# nosymlink # default = !chroot
# novhost
# nocgipat
# nothrottles
# host=0.0.0.0
# charset=iso-8859-1
host=127.0.0.1
port=8000
user=www
logfile=/var/log/thttpd.log
pidfile=/var/run/thttpd.pid
dir=/var/www/
cgipat=**.cgi|**.pl|**.fcgi



How to run smokeping with slowcgi?

2014-09-14 Thread Atanas Vladimirov

Hi,
I'm trying to run smokeping (installed via ppkg_add) with nginx 
(installed via ppkg_add) and slowcgi.

Is it possible?

Nginx flags are set to -u

nginx conf:
..
location ~ .*\\.(fcgi|cgi)$ {
fastcgi_pass   unix:/var/www/run/slowcgi.sock;
gzipoff;
fastcgi_param  PATH_INFO $fastcgi_path_info;
includefastcgi_params;
}
..

'slowcgi -d -p /' output:

slowcgi: inflight incremented, now 1
slowcgi: version: 1
slowcgi: type:1
slowcgi: requestId:   1
slowcgi: contentLength:   8
slowcgi: paddingLength:   0
slowcgi: reserved:0
slowcgi: role 1
slowcgi: flags0
slowcgi: version: 1
slowcgi: type:4
slowcgi: requestId:   1
slowcgi: contentLength:   811
slowcgi: paddingLength:   5
slowcgi: reserved:0
slowcgi: version: 1
slowcgi: type:4
slowcgi: requestId:   1
slowcgi: contentLength:   0
slowcgi: paddingLength:   0
slowcgi: reserved:0
slowcgi: fork: /var/www/htdocs/smokeping/smokeping.fcgi
slowcgi: version: 1
slowcgi: type:5
slowcgi: requestId:   1
slowcgi: contentLength:   0
slowcgi: paddingLength:   0
slowcgi: reserved:0
slowcgi: resp version: 1
slowcgi: resp type:6
slowcgi: resp requestId:   1
slowcgi: resp contentLength:   876
slowcgi: resp paddingLength:   0
slowcgi: resp reserved:0
slowcgi: resp version: 1
slowcgi: resp type:6
slowcgi: resp requestId:   1
slowcgi: resp contentLength:   0
slowcgi: resp paddingLength:   0
slowcgi: resp reserved:0
slowcgi: resp version: 1
slowcgi: resp type:7
slowcgi: resp requestId:   1
slowcgi: resp contentLength:   0
slowcgi: resp paddingLength:   0
slowcgi: resp reserved:0
slowcgi: caught exit of unknown child 29979

dmesg:
OpenBSD 5.6-current (GENERIC.MP) #368: Tue Sep  9 00:28:20 MDT 2014
t...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 6416760832 (6119MB)
avail mem = 6237216768 (5948MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0x9ac00 (37 entries)
bios0: vendor American Megatrends Inc. version 2.0b date 11/07/2013
bios0: Supermicro X8ST3
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP APIC MCFG OEMB HPET DMAR SSDT EINJ BERT ERST 
HEST
acpi0: wakeup devices P0P1(S4) PS2K(S4) PS2M(S4) USB0(S4) USB1(S4) 
USB2(S4) USB5(S4) EUSB(S4) USB3(S4) USB4(S4) USB6(S4

) USBE(S4) GBE_(S4) P0P4(S4) P0P5(S4) P0P6(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) Core(TM) i7 CPU 950 @ 3.07GHz, 3067.06 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,T

M,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC
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 133MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1.0, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i7 CPU 950 @ 3.07GHz, 3066.67 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,T

M,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Core(TM) i7 CPU 950 @ 3.07GHz, 3066.67 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,T

M,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Core(TM) i7 CPU 950 @ 3.07GHz, 3066.67 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,T

M,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 0, core 3, package 0
ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 24 pins
ioapic0: misconfigured as apic 8, remapped to apid 1
acpimcfg0 at acpi0 addr 0xe000, bus 0-255
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 8 (P0P1)
acpiprt2 at acpi0: bus 6 (P0P4)
acpiprt3 at acpi0: bus 7 (P0P5)
acpiprt4 at acpi0: bus -1 (P0P6)
acpiprt5 at acpi0: bus -1 (P0P7)
acpiprt6 at acpi0: bus -1 (P0P8)
acpiprt7 at acpi0: bus -1 (P0P9)
acpiprt8 at acpi0: bus 1 

Nuvoton W83795ADG wrong values

2014-09-04 Thread Atanas Vladimirov

Hi,
nvt0 shows wrong values for fan speed and voltage.
In BIOS values are correct. The motherboard is Supermicro X8STE (dmesg 
at the end).


Is this a known behavior of nvt sensor/driver?

P.S.: lm1 sensor also shows wrong/different values.

### systat sensors

SENSOR VALUE  STATUS  DESCRIPTION
cpu0.temp043.00 degC
cpu1.temp043.00 degC
cpu2.temp043.00 degC
cpu3.temp043.00 degC
nvt0.temp140.75 degC
nvt0.temp249.00 degC
nvt0.fan0492 RPM
nvt0.fan1   1278 RPM
nvt0.fan2164 RPM
nvt0.fan3164 RPM
nvt0.fan4164 RPM
nvt0.volt0 8.11 V DC
nvt0.volt2 6.94 V DC
nvt0.volt3 7.47 V DC
nvt0.volt4 6.49 V DC
nvt0.volt5 7.05 V DC
nvt0.volt117.71 V DC  VTT
nvt0.volt123.47 V DC  3VDD
nvt0.volt133.51 V DC  3VSB
nvt0.volt143.42 V DC  VBat
lm1.temp0 32.00 degC
lm1.temp1-32.00 degC
lm1.temp2 29.00 degC
lm1.volt0  0.98 V DC  VCore
lm1.volt1  6.23 V DC  +12V
lm1.volt2  3.34 V DC  +3.3V
lm1.volt3  3.34 V DC  +3.3V
lm1.volt4-18.09 V DC  -12V
lm1.volt5  0.95 V DC
lm1.volt6  0.94 V DC
lm1.volt7  3.34 V DC  3.3VSB
lm1.volt8  1.66 V DC  VBAT


### sysctl hw

hw.machine=amd64
hw.model=Intel(R) Core(TM) i7 CPU 950 @ 3.07GHz
hw.ncpu=4
hw.byteorder=1234
hw.pagesize=4096
hw.disknames=sd0:d4d513a9cceb220e
hw.diskcount=1
hw.sensors.cpu0.temp0=42.00 degC
hw.sensors.cpu1.temp0=42.00 degC
hw.sensors.cpu2.temp0=42.00 degC
hw.sensors.cpu3.temp0=42.00 degC
hw.sensors.nvt0.temp1=40.75 degC
hw.sensors.nvt0.temp2=49.00 degC
hw.sensors.nvt0.fan0=491 RPM
hw.sensors.nvt0.fan1=1261 RPM
hw.sensors.nvt0.fan2=164 RPM
hw.sensors.nvt0.fan3=164 RPM
hw.sensors.nvt0.fan4=164 RPM
hw.sensors.nvt0.volt0=8.12 VDC
hw.sensors.nvt0.volt2=6.94 VDC
hw.sensors.nvt0.volt3=7.47 VDC
hw.sensors.nvt0.volt4=6.49 VDC
hw.sensors.nvt0.volt5=7.04 VDC
hw.sensors.nvt0.volt11=7.71 VDC (VTT)
hw.sensors.nvt0.volt12=3.47 VDC (3VDD)
hw.sensors.nvt0.volt13=3.51 VDC (3VSB)
hw.sensors.nvt0.volt14=3.42 VDC (VBat)
hw.sensors.lm1.temp0=32.00 degC
hw.sensors.lm1.temp1=-31.50 degC
hw.sensors.lm1.temp2=28.50 degC
hw.sensors.lm1.volt0=0.98 VDC (VCore)
hw.sensors.lm1.volt1=6.23 VDC (+12V)
hw.sensors.lm1.volt2=3.34 VDC (+3.3V)
hw.sensors.lm1.volt3=3.34 VDC (+3.3V)
hw.sensors.lm1.volt4=-18.09 VDC (-12V)
hw.sensors.lm1.volt5=0.95 VDC
hw.sensors.lm1.volt6=0.94 VDC
hw.sensors.lm1.volt7=3.34 VDC (3.3VSB)
hw.sensors.lm1.volt8=1.66 VDC (VBAT)
hw.cpuspeed=1600
hw.setperf=0
hw.vendor=Supermicro
hw.product=X8ST3
hw.version=1234567890
hw.serialno=1234567890
hw.uuid=534d4349-0002-1490-2500-149025005443
hw.physmem=6416760832
hw.usermem=6416736256
hw.ncpufound=4
hw.allowpowerdown=1


#
### dmesg
#
OpenBSD 5.6 (GENERIC.MP) #333: Fri Aug  8 00:20:21 MDT 2014
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 6416760832 (6119MB)
avail mem = 6237163520 (5948MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0x9ac00 (37 entries)
bios0: vendor American Megatrends Inc. version 2.0b date 11/07/2013
bios0: Supermicro X8ST3
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP APIC MCFG OEMB HPET DMAR SSDT EINJ BERT ERST 
HEST
acpi0: wakeup devices P0P1(S4) PS2K(S4) PS2M(S4) USB0(S4) USB1(S4) 
USB2(S4) USB5(S4) EUSB(S4) USB3(S4) USB4(S4) USB6(S4) USBE(S4) GBE_(S4) 
P0P4(S4) P0P5(S4) P0P6(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) Core(TM) i7 CPU 950 @ 3.07GHz, 3067.10 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC

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 133MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1.0, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i7 CPU 950 @ 3.07GHz, 3066.67 MHz
cpu1: 

Re: reload isakmpd

2014-07-25 Thread Atanas Vladimirov

On 25.07.2014 19:42, James Shupe wrote:

Note that this doesn't clear old config, so you can't use it to tear
down sessions that you no longer want - you can paste the relevant
config lines to ipsecctl -df - to delete them though.





As an added note for ipsecctl -df, you can break all your peers into
their own files and include them from the main ipsec.conf. Then you can
ipsecctl -df /etc/ipsec/peer.conf...

When you have several dozen peers, it makes troubleshooting individual
ones a bit easier.


There is a good article about isakmpd/ipsec on undeadly:
http://undeadly.org/cgi?action=articlesid=20131125041429



Re: After the upgrade with the last snapshot all traffic flow only on default queue

2014-04-24 Thread Atanas Vladimirov

On 24.04.2014 14:55, Henning Brauer wrote:

* Atanas Vladimirov vl...@bsdbg.net [2014-04-23 21:30]:

`pfctl -vvs queue` shows that traffic flow only on default queue.


ewps... I feel stupid. repaired. sorry.


No problem. Thank you and good luck!



Re: After the upgrade with the last snapshot all traffic flow only on default queue

2014-04-23 Thread Atanas Vladimirov

On 21.04.2014 23:50, Atanas Vladimirov wrote:

Ok. Thanks for your time.

On 21.04.2014 23:46, Stuart Henderson wrote:
This is what I'm wondering, which is why I cc'd henning on my reply to 
you -
my pf queue setup is in a place which is awkward for me to test at the 
moment

so I can't check it myself yet.


Hi,
I've noticed the same behavior after the upgrade to April 22 snapshot.
I haven't made any changes to my pf.conf for more that two months. I've 
made an ordinary upgrade as I always do, nothing more.

`pfctl -vvs queue` shows that traffic flow only on default queue.
If you need more info just ask.

.. (default i_bittor queue)
queue i_bulk parent inter on em0 bandwidth 170K qlimit 50
  [ pkts:  0  bytes:  0  dropped pkts:  0 bytes: 
 0 ]

  [ qlength:   0/ 50 ]
queue i_bittor parent inter on em0 bandwidth 30K, max 1M default qlimit 
50
  [ pkts:  30180  bytes:   23309345  dropped pkts:   1031 bytes: 
772978 ]

  [ qlength:  31/ 50 ]
queue bg parent rootq on em0 bandwidth 38M, max 38M qlimit 50
  [ pkts:  0  bytes:  0  dropped pkts:  0 bytes: 
 0 ]

  [ qlength:   0/ 50 ]
queue b_ack parent bg on em0 bandwidth 15M, min 10M qlimit 50
  [ pkts:  0  bytes:  0  dropped pkts:  0 bytes: 
 0 ]

  [ qlength:   0/ 50 ]
..
queue i_web parent inter on em0 bandwidth 2M burst 2M for 1ms qlimit 
50
  [ pkts:  0  bytes:  0  dropped pkts:  0 bytes: 
 0 ]

  [ qlength:   0/ 50 ]
  [ measured: 0.0 packets/s, 0 b/s ]
queue i_bulk parent inter on em0 bandwidth 170K qlimit 50
  [ pkts:  0  bytes:  0  dropped pkts:  0 bytes: 
 0 ]

  [ qlength:   0/ 50 ]
  [ measured: 0.0 packets/s, 0 b/s ]
queue i_bittor parent inter on em0 bandwidth 30K, max 1M default qlimit 
50
  [ pkts:  31365  bytes:   24228375  dropped pkts:   1075 bytes: 
811524 ]

  [ qlength:  29/ 50 ]
  [ measured:   237.0 packets/s, 1.47Mb/s ]
..
queue i_bittor parent inter on em0 bandwidth 30K, max 1M default qlimit 
50
  [ pkts:  32588  bytes:   25160325  dropped pkts:   1118 bytes: 
843626 ]

  [ qlength:  44/ 50 ]
  [ measured:   240.8 packets/s, 1.48Mb/s ]
queue bg parent rootq on em0 bandwidth 38M, max 38M qlimit 50
  [ pkts:  0  bytes:  0  dropped pkts:  0 bytes: 
 0 ]

  [ qlength:   0/ 50 ]
  [ measured: 0.0 packets/s, 0 b/s ]
queue b_ack parent bg on em0 bandwidth 15M, min 10M qlimit 50
  [ pkts:  0  bytes:  0  dropped pkts:  0 bytes: 
 0 ]

  [ qlength:   0/ 50 ]
  [ measured: 0.0 packets/s, 0 b/s ]
queue b_dns parent bg on em0 bandwidth 1M, min 1M qlimit 50
  [ pkts:  0  bytes:  0  dropped pkts:  0 bytes: 
 0 ]

  [ qlength:   0/ 50 ]
  [ measured: 0.0 packets/s, 0 b/s ]
..

systat queue: (default b_web queue)

1 usersLoad 0.31 0.43 0.31 Wed Apr 23 
21:59:30 2014


QUEUE BW SCH  PRIO PKTSBYTES   
DROP_P   DROP_B QLEN BORROW SUSPEN P/S B/S
rootq   100M  00
000
 inter3M  00
000
  i_ack   2M  00
000
  i_dns 500K  00
000
  i_ntp 300K  00
000
  i_web   2M  00
000
  i_bulk170K  00
000
  i_bittor   30K  00
000
 bg  38M  00
000
  b_ack  15M  00
000
  b_dns   1M  00
000
  b_ntp   4M  00
000
  b_rdc   4M  00
000
  b_web  15M 395939  445285K   
55723400
  b_bulk  8M  00
000
  b_bittor2M  00
000


systat queue: (default i_bittor queue)

1 usersLoad 0.65 0.61 0.43 Wed Apr 23 
22:06:35 2014


QUEUE BW SCH  PRIO PKTSBYTES   
DROP_P   DROP_B QLEN BORROW SUSPEN P/S B/S
rootq   100M  00
000
 inter3M  00
000
  i_ack   2M

  1   2   >