Re: current/macppc on Mac Mini

2013-05-22 Thread Martin Pieuchot
On 26/12/12(Wed) 20:54, Miod Vallat wrote:
> > Just upgraded to a current again, with the same problem,
> > and the same solution:
> 
> [...]
> > wdc1 at kauaiata0 irq 39: DMA
> > atapiscsi0 at wdc1 channel 0 drive 0
> > scsibus0 at atapiscsi0: 2 targets
> > cd0 at scsibus0 targ 0 lun 0:  ATAPI 5/cdrom 
> > removable
> > wd0 at wdc1 channel 0 drive 1: 
> > wd0: 16-sector PIO, LBA, 76319MB, 156301488 sectors
> [...]
> > bootpath: /pci@f400/ata-6@d/disk@1:/bsd
> 
> I think I understand what goes wrong. The code responsible for matching
> the boot device to the actual kernel device on macppc is quite crude,
> especially for non-SCSI disks.
> 
> Your bootpath specifies `disk@1' because the disk drive is the second
> device (slave) on the ATA channel, the cdrom drive being master.
> However, the kernel wants to match this information against a `wd1'
> device (as if there were two hard disks on the ATA channel).
> 
> The kernel code needs to be fixed to use device_register() to match the
> boot path against actual attachment information, instead of walking the
> device tree at the end of autoconf. If nobody beats me to do this, I'll
> try to cook a diff in a few days.

Were you thinking of something like that? It works for me (c) tm, with
my PowerBooks (disk@0/wd0), I haven't tried NFS boot yet.

Jan, does it improve something for you?

Index: autoconf.c
===
RCS file: /cvs/src/sys/arch/macppc/macppc/autoconf.c,v
retrieving revision 1.39
diff -u -p -r1.39 autoconf.c
--- autoconf.c  11 Nov 2010 17:58:21 -  1.39
+++ autoconf.c  22 May 2013 19:00:45 -
@@ -68,7 +68,7 @@
 
 void   dumpconf(void);
 static struct devmap *findtype(char **);
-void   makebootdev(char *cp);
+void   parseofwbp(char *);
 intgetpno(char **);
 
 /*
@@ -79,6 +79,9 @@ int   getpno(char **);
 intcold = 1;   /* if 1, still working on cold-start */
 char   bootdev[16];/* to hold boot dev name */
 struct device *bootdv = NULL;
+enum devclass bootdev_class = DV_DULL;
+intbootdev_type = 0;
+intbootdev_unit = 0;
 
 struct dumpmem dumpmem[VM_PHYSSEG_MAX];
 u_int ndumpmem;
@@ -165,9 +168,9 @@ findtype(char **s)
  *  '/ht@0,f200/pci@2/bcom5704@4/bsd'
  */
 void
-makebootdev(char *bp)
+parseofwbp(char *bp)
 {
-   int unit, ptype;
+   int ptype;
char   *dev, *cp;
struct devmap *dp;
 
@@ -184,6 +187,8 @@ makebootdev(char *bp)
} while((dp->type & T_IFACE) == 0);
 
if (dp->att && dp->type == T_IFACE) {
+   bootdev_class = DV_IFNET;
+   bootdev_type = dp->type;
strlcpy(bootdev, dp->dev, sizeof bootdev);
return;
}
@@ -193,24 +198,9 @@ makebootdev(char *bp)
ptype = dp->type;
dp = findtype(&cp);
if (dp->att && dp->type == T_DISK) {
-   unit = getpno(&cp);
-   if (ptype == T_SCSI) {
-   struct device *dv;
-   struct sd_softc *sd;
-
-   TAILQ_FOREACH(dv, &alldevs, dv_list) {
-   if (dv->dv_class != DV_DISK ||
-   strcmp(dv->dv_cfdata->cf_driver->cd_name, 
"sd"))
-   continue;
-   sd = (struct sd_softc *)dv;
-   if (sd->sc_link->target != unit)
-   continue;
-   snprintf(bootdev, sizeof bootdev,
-   "%s%c", dv->dv_xname, 'a');
-   return;
-   }
-   }
-   snprintf(bootdev, sizeof bootdev, "%s%d%c", dev, unit, 'a');
+   bootdev_class = DV_DISK;
+   bootdev_type = ptype;
+   bootdev_unit = getpno(&cp);
return;
}
printf("Warning: boot device unrecognized: %s\n", bp);
@@ -239,25 +229,44 @@ getpno(char **cp)
 void
 device_register(struct device *dev, void *aux)
 {
+   const char *drvrname = dev->dv_cfdata->cf_driver->cd_name;
+   const char *name = dev->dv_xname;
+
+   if (bootdv != NULL || dev->dv_class != bootdev_class)
+   return;
+
+   switch (bootdev_type) {
+   case T_SCSI:
+   if (strcmp(drvrname, "sd") == 0) {
+   struct sd_softc *sd = (struct sd_softc *)dev;
+
+   if (sd->sc_link->target == bootdev_unit)
+   bootdv = dev;
+   }
+   case T_IDE:
+   /*
+* Do not require the bootpath unit number to match
+* against the driver's one, a slave disk on the ATA
+* channel `disk@1' can attach as `wd0'.
+*/
+   if (strcmp(drvrname, "wd") == 0)
+   bootdv = dev;
+   break;
+   case T_IFACE:
+   

Re: __guard_local issue

2013-05-22 Thread Matthew Dempsky
On Wed, May 22, 2013 at 3:30 AM, Bogdan Andu  wrote:
> I compile from source Erlang R14B04 on a freshly installed OpenBSD 5.3 amd64 
> machine, configured with preinstalled opensssl library 
> /usr/lib/libssl.so.19.0 .

This was fixed upstream in R15B03:
https://github.com/erlang/otp/commit/c282f35cf30d87b61baa30cc7b57ed8c858759ef

Our R15B02 port includes the same fix.  You should be able to backport
it to R14B04 without trouble if you need to stick with an older Erlang
release.



Re: __guard_local issue

2013-05-22 Thread Tomas Bodzar
On Wed, May 22, 2013 at 12:30 PM, Bogdan Andu  wrote:

> Hello,
>
>
> I compile from source Erlang R14B04 on a freshly installed OpenBSD 5.3
> amd64 machine, configured with preinstalled opensssl library
> /usr/lib/libssl.so.19.0 .
>


Why older version as there's package of newer one available anyway?
http://openports.se/lang/erlang


>
> $ /usr/sbin/openssl
> OpenSSL> version
> OpenSSL 1.0.1c 10 May 2012
> OpenSSL>
> ^D
>
> when I try to load the crypto module I get the follwing error:
>
> $erl
> Erlang R14B04 (erts-5.8.5) [source] [64-bit] [smp:2:2] [rq:2]
> [async-threads:0] [kernel-poll:false]
>
> Eshell V5.8.5  (abort with ^G)
> 1> crypto:start().
> /usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
> undefined symbol '__guard_local'
> /usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
> undefined symbol '__guard_local'
> /usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
> undefined symbol '__guard_local'
> /usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
> undefined symbol '__guard_local'
> /usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
> undefined symbol '__guard_local'
> /usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
> undefined symbol '__guard_local'
> /usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
> undefined symbol '__guard_local'
> /usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
> undefined symbol '__guard_local'
> /usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
> undefined symbol '__guard_local'
> /usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
> undefined symbol '__guard_local'
> /usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
> undefined symbol '__guard_local'
> /usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
> undefined symbol '__guard_local'
> /usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
> undefined symbol '__guard_local'
> /usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
> undefined symbol '__guard_local'
> /usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
> undefined symbol '__guard_local'
> /usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
> undefined symbol '__guard_local'
> /usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
> undefined symbol '__guard_local'
> /usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
> undefined symbol '__guard_local'
> /usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
> undefined symbol '__guard_local'
> /usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
> undefined symbol '__guard_local'
> /usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
> undefined symbol '__guard_local'
> /usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
> undefined symbol '__guard_local'
> /usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
> undefined symbol '__guard_local'
> /usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
> undefined symbol '__guard_local'
> /usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
> undefined symbol '__guard_local'
> /usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
> undefined symbol '__guard_local'
> /usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
> undefined symbol '__guard_local'
> /usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
> undefined symbol '__guard_local'
> /usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
> undefined symbol '__guard_local'
> /usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
> undefined symbol '__guard_local'
>
> =ERROR REPORT 21-May-2013::15:19:12 ===
> Unable to load crypto libra

Re: remove old distfiles no longer associated with ports?

2013-05-22 Thread Barry Grumbine
Have a look at clean-old-distfiles(1)


On Wed, May 22, 2013 at 9:10 PM, f5b  wrote:

> how to auto clean old distfiles no longer associated with new ports source.
>
>
> any clue?



remove old distfiles no longer associated with ports?

2013-05-22 Thread f5b
how to auto clean old distfiles no longer associated with new ports source.


any clue?



watchdog on Atom N270

2013-05-22 Thread Devin Reade
I just picked up a Lanner LEC-2010P, which is a fanless embedded
Atom N270 industrial control system.  It seems to work just fine so
far, overall. Since the N270 isn't all that new, I was a bit surprised
though to find that its hardware watchdog wasn't detected (no criticism
implied).

The user manual for the LEC-2010P shows sample code for talking to
the watchdog of the Winbond W83697UHG (just C source intended to be
run under MS Windows).  I've also managed to locate a data sheet for
the W83697UHG.  Both the manual and the data sheet are available on
request.

dmesg below (and sent to dmesg@)

Devin

OpenBSD 5.3 (GENERIC.MP) #58: Tue Mar 12 18:43:53 MDT 2013
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
cpu0: Genuine Intel(R) CPU N270 @ 1.60GHz ("GenuineIntel" 686-class) 1.60 GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,SSE3,DTES64,MWAIT,DS-CPL,EST,TM2,SSSE3,xTPR,PDCM,MOVBE,LAHF,PERF
real mem  = 2138370048 (2039MB)
avail mem = 2092429312 (1995MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 05/31/10, BIOS32 rev. 0 @ 0xf0010, SMBIOS 
rev. 2.4 @ 0xfd230 (28 entries)
bios0: vendor American Megatrends Inc. version "080015" date 05/31/2010
acpi0 at bios0: rev 0
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP APIC MCFG OEMB ASF! SSDT
acpi0: wakeup devices P0P2(S4) P0P1(S4) USB0(S4) USB1(S4) USB2(S4) USB3(S4) 
EUSB(S4) MC97(S4) P0P4(S4) P0P5(S4) P0P6(S4) P0P7(S4) P0P8(S4) P0P9(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: apic clock running at 133MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Genuine Intel(R) CPU N270 @ 1.60GHz ("GenuineIntel" 686-class) 1.60 GHz
cpu1: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,SSE3,DTES64,MWAIT,DS-CPL,EST,TM2,SSSE3,xTPR,PDCM,MOVBE,LAHF,PERF
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
ioapic0: misconfigured as apic 1, remapped to apid 2
acpimcfg0 at acpi0 addr 0xe000, bus 0-255
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 3 (P0P1)
acpiprt2 at acpi0: bus 1 (P0P4)
acpiprt3 at acpi0: bus 2 (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)
acpicpu0 at acpi0: C3, C2, C1, PSS
acpicpu1 at acpi0: C3, C2, C1, PSS
acpibtn0 at acpi0: SLPB
acpibtn1 at acpi0: PWRB
bios0: ROM list: 0xc/0xec00!
cpu0: Enhanced SpeedStep 1597 MHz: speeds: 1600, 1333, 1067, 800 MHz
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "Intel 82945GME Host" rev 0x03
vga1 at pci0 dev 2 function 0 "Intel 82945GME Video" rev 0x03
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
intagp0 at vga1
agp0 at intagp0: aperture at 0xd000, size 0x1000
inteldrm0 at vga1: apic 2 int 16
drm0 at inteldrm0
"Intel 82945GM Video" rev 0x03 at pci0 dev 2 function 1 not configured
azalia0 at pci0 dev 27 function 0 "Intel 82801GB HD Audio" rev 0x02: msi
azalia0: codecs: Realtek ALC888
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 82801GB PCIE" rev 0x02: apic 2 int 16
pci1 at ppb0 bus 1
re0 at pci1 dev 0 function 0 "Realtek 8168" rev 0x02: RTL8168C/8111C (0x3c00), 
apic 2 int 16, address 00:90:0b:28:3f:84
rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 2
ppb1 at pci0 dev 28 function 1 "Intel 82801GB PCIE" rev 0x02: apic 2 int 17
pci2 at ppb1 bus 2
re1 at pci2 dev 0 function 0 "Realtek 8168" rev 0x02: RTL8168C/8111C (0x3c00), 
apic 2 int 17, address 00:90:0b:28:3f:85
rgephy1 at re1 phy 7: RTL8169S/8110S PHY, rev. 2
uhci0 at pci0 dev 29 function 0 "Intel 82801GB USB" rev 0x02: apic 2 int 23
uhci1 at pci0 dev 29 function 1 "Intel 82801GB USB" rev 0x02: apic 2 int 19
uhci2 at pci0 dev 29 function 2 "Intel 82801GB USB" rev 0x02: apic 2 int 18
uhci3 at pci0 dev 29 function 3 "Intel 82801GB USB" rev 0x02: apic 2 int 16
ehci0 at pci0 dev 29 function 7 "Intel 82801GB USB" rev 0x02: apic 2 int 23
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb2 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xe2
pci3 at ppb2 bus 3
ichpcib0 at pci0 dev 31 function 0 "Intel 82801GBM LPC" rev 0x02: PM disabled
pciide0 at pci0 dev 31 function 2 "Intel 82801GBM SATA" rev 0x02: DMA, channel 
0 wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: 
wd0: 16-sector PIO, LBA48, 38166MB, 78165360 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 6
wd1 at pciide0 channel 1 drive 0: 
wd1: 1-sector PIO, LBA, 3823MB, 7831152 sectors
wd1(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 5
ichiic0 at pci0 dev 31 function 3 "Intel 82801GB SMBus" rev 0x02: apic 2 int 19
iic0 at ichiic0
spdmem0 at iic0 addr 0x51: 1GB DDR2 SDRAM non-parity PC2-4200CL3 S

Re: Problem with a startup script

2013-05-22 Thread russell

Because pexp uses pkill to do its work and pkill matches on command name
only(like ps -c).


sorry for the noise I just revisited this and I am wrong.
the pkill bits in rc.subr are using "pkill -f"
and that does match agianst the full arg list.

as said before make a better pexp and it should work.



Re: Problem with a startup script

2013-05-22 Thread russell

On 05/21/2013 11:18 PM, C. L. Martinez wrote:

Hi all,

  I have a problem with some tcl rc.d startup scripts. Start and status
works ok but stop and restart, doesn't.

  Script:

#!/bin/sh -x
#
# $OpenBSD: suricata_proxyin_agent,v 1.0

daemon="/usr/local/bin/suricata_proxyin_agent.tcl"
daemon_flags="-c /data/config/etc/sguil/suricata_proxyin_agent.conf -D"

. /etc/rc.d/rc.subr

pexp="/usr/local/bin/tclsh8.5 $daemon"

rc_cmd $1

I have tried several variants like to insert rc_stop specific option
or changing pexp to "/usr/local/bin/tclsh8.5 $daemon $daemon_args"
without luck.

Debugging script, acts as like the other system startup scripts:

.

+ echo NO
+ : NO
+ [ XNO = XYES ]
+ echo NO
+ : NO
+ domainname
+ [ X != X -a -d /var/yp/binding ]
+ echo NO
+ : NO
+ : NO
+ [ -n /usr/local/bin/suricata_proxyin_agent.tcl ]
+ unset _RC_DEBUG _RC_FORCE
+ getopts df c
+ shift 0
+ basename ./suricata_proxyin_agent
+ _name=suricata_proxyin_agent
+ _RC_RUNDIR=/var/run/rc.d
+ _RC_RUNFILE=/var/run/rc.d/suricata_proxyin_agent
+ eval _rcflags=${suricata_proxyin_agent_flags}
+ _rcflags=
+ eval _rcuser=${suricata_proxyin_agent_user}
+ _rcuser=
+ getcap -f /etc/login.conf suricata_proxyin_agent
+ > /dev/null
+ 2>&1
+ [ -z  ]
+ daemon_class=daemon
+ [ -z  ]
+ daemon_user=root
+ [ -n  ]
+ [ -n  ]
+ [ -n  ]
+ printf  %s -c /data/config/etc/sguil/suricata_proxyin_agent.conf -D
+ daemon_flags= -c /data/config/etc/sguil/suricata_proxyin_agent.conf -D
+ daemon_flags=-c /data/config/etc/sguil/suricata_proxyin_agent.conf -D
+ readonly daemon_class
+ unset _rcflags _rcuser
+ pexp=/usr/local/bin/suricata_proxyin_agent.tcl -c
/data/config/etc/sguil/suricata_proxyin_agent.conf -D
+ rcexec=su -l -c daemon -s /bin/sh root -c
+ pexp=/usr/local/bin/tclsh8.5 /usr/local/bin/suricata_proxyin_agent.tcl
+ rc_cmd stop

root@nsm10:/usr/local/etc/rc.d# ps xa |grep suricata_proxyin_agent.tcl
| grep -v grep
17486 p2- I   0:00.29 /usr/local/bin/tclsh8.5
/usr/local/bin/suricata_proxyin_agent.tcl -c
/data/config/etc/sguil/suricata_proxyin_agent.conf -D

Any idea why process is not stopped??

Because pexp uses pkill to do its work and pkill matches on command name 
only(like ps -c).


the command name for your tcl scripts is the tcl interpreter.

I had same problem with some python daemons I wrote.

my solution
ignore all the nice rc.subr goodness and write the rc.d script with 
explicit start and stop bits.




Re: Problems w/apache+php+mysqld since 4.9-5.0 OpenBSD Upgrade

2013-05-22 Thread Richard Toohey

On 05/23/13 12:08, Damon Getsman wrote:

Okay, now I've got the phpinfo output.  Nothing is jumpin' out at me,
if y'all care to take a look at it I've got it available at
bismaninfo.hopto.org/debug.php for a limited time here.



No mysql in the output.

What does php -m give you, etc.

It's like the message you are getting - something is up with the mysql 
extension in your install.


Check the ini files, etc.

You are using the base Apache and PHP is working - you need to look at 
the mysql extension and find out why it is not enabled or not loading.




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

2013-05-22 Thread Johan Huldtgren

hello,

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

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

Thanks,

.jh


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

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


dmesg:

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

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

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

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

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

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

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

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

Re: Problems w/apache+php+mysqld since 4.9-5.0 OpenBSD Upgrade

2013-05-22 Thread Damon Getsman
Okay, now I've got the phpinfo output.  Nothing is jumpin' out at me,
if y'all care to take a look at it I've got it available at
bismaninfo.hopto.org/debug.php for a limited time here.



Re: Problems w/apache+php+mysqld since 4.9-5.0 OpenBSD Upgrade

2013-05-22 Thread Damon Getsman
Nope, I caught the PHP upgrade instructions and I believe they've been
carried out
correctly.  :(



Re: Problems w/apache+php+mysqld since 4.9-5.0 OpenBSD Upgrade

2013-05-22 Thread Richard Toohey

On 05/23/13 11:44, Damon Getsman wrote:

Bryan, after doing that it appears that it's not even getting executed.
I put the script into a web accessible file called debug.php, loaded
it in my browser and saw a blank page.  Viewing the source is
showing the original , leading me to believe that it is
not even handing it off to the appropriate script engine...  Not sure if
I'm right but does that help at all?



You can't use shorttags* ...

You need to use ...



* Well, you can if you tweak settings.



Re: Problems w/apache+php+mysqld since 4.9-5.0 OpenBSD Upgrade

2013-05-22 Thread Barry Grumbine
IIRC 4.9-5.0 was a little ugly, maybe you missed the PHP upgrade
instructions here:
http://www.openbsd.org/faq/upgrade50.html#Pkgup



On Wed, May 22, 2013 at 4:44 PM, Damon Getsman  wrote:

> Bryan, after doing that it appears that it's not even getting executed.
> I put the script into a web accessible file called debug.php, loaded
> it in my browser and saw a blank page.  Viewing the source is
> showing the original , leading me to believe that it is
> not even handing it off to the appropriate script engine...  Not sure if
> I'm right but does that help at all?



Re: Problems w/apache+php+mysqld since 4.9-5.0 OpenBSD Upgrade

2013-05-22 Thread Damon Getsman
And, um, wrapping the snippet in the appropriate

 
 

didn't seem to help matters at all, either.  :(



Re: Problems w/apache+php+mysqld since 4.9-5.0 OpenBSD Upgrade

2013-05-22 Thread Damon Getsman
Bryan, after doing that it appears that it's not even getting executed.
I put the script into a web accessible file called debug.php, loaded
it in my browser and saw a blank page.  Viewing the source is
showing the original , leading me to believe that it is
not even handing it off to the appropriate script engine...  Not sure if
I'm right but does that help at all?



Re: Problems w/apache+php+mysqld since 4.9-5.0 OpenBSD Upgrade

2013-05-22 Thread Damon Getsman
Richard:

Not sure if I'm using the base apache or 2.2.  Here's what
httpd -V is showing me:

Wed May 22 17:50
contract:~$ httpd -V
Server version: Apache/1.3.29 (Unix)
Server's Module Magic Number: 19990320:15
Server compiled with
 -D EAPI
 -D HAVE_MMAP
 -D HAVE_SHMGET
 -D USE_MMAP_SCOREBOARD
 -D USE_MMAP_FILES
 -D HAVE_FLOCK_SERIALIZED_ACCEPT
 -D HAVE_SYSVSEM_SERIALIZED_ACCEPT
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D DYNAMIC_MODULE_LIMIT=64
 -D HARD_SERVER_LIMIT=256
 -D HTTPD_ROOT="/var/www"
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/httpd.scoreboard"
 -D DEFAULT_LOCKFILE="logs/httpd.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"
 -D ACCESS_CONFIG_FILE="conf/access.conf"
 -D RESOURCE_CONFIG_FILE="conf/srm.conf"

I stopped at 5.0 because I figured that if I was having
problems at this point pushing it further might create more until I get
them resolved.  If I'm wrong about that I'll certainly push it up to
5.3.  I've got another machine here that I've installed 5.2 on
recently, I'll take that one up to 5.3 just to get used to it (it's not
a server machine).
I do understand the 'chroot' concept, not sure how exactly it's
applicable in this case; despite the fact that I believe httpd is
chrooted to /var/www, I do know that php exists under this tree in its
/usr/local/bin and the libphp5 file exists there where it should as
well, I believe.
I have also bumped up the php error reporting but I can't seem
to find much about it in the applicable logfiles (/var/log/messages,
/var/www/logs/error_log, etc).
Truncating the previous discussion as I'm assuming that you've
got logs of what's going on here.  Thank you for the help!



Re: Problems w/apache+php+mysqld since 4.9-5.0 OpenBSD Upgrade

2013-05-22 Thread Richard Toohey

On 05/23/13 10:15, Damon Getsman wrote:

  Hello all, and thank you for taking the time to take a look at
this issue that I am currently having.  I've been a strong advocate of
OpenBSD for some time, but have only recently taken steps to start
upgrading some of my machines instead of reinstalling.
My primary server was a 4.9 installation, and it was running
apache, with PHP and MySQL integrated for the purpose of serving a
mediawiki, a gallery2 installation, and a few other utilities that I
have had up for myself and some friends.  Unfortunately, ever since I've
made the leap from 4.9 to 5.0, I've been unable to get anything other
than plain HTML documents to display via apache.  The server tells me
that there are either '500' server errors or with a little more detail
MediaWiki tells me "(Can't contact the database server: MySQL functions
missing, have you compiled PHP with the --with-mysql option? )".
Now according to the pkg_info listing that I have, I _believe_
that I have all of the proper packages and libraries installed, but I
guess I am mistaken as I'm still not able to serve pages up with any
sort of MySQL back end handling.  Here is the output of 'pkg_info -a -m'
for anybody who cares to verify this:

BitTorrent-4.4.0p10 cooperative file distribution system implemented in
Python
ImageMagick-6.6.6.10p0 image processing tools
alacarte-0.12.4p7   easy GNOME menu editing tool
apache-httpd-2.2.15p0 apache HTTP server
apcupsd-3.14.8p2daemon for controlling APC UPSes
archie-1.4.1Prospero client for the archie service
bash-4.2.10 GNU Bourne Again Shell
beav-1.40.15binary editor and viewer
bzip2-1.0.6 block-sorting file compressor, unencumbered
calc-2.11.7 C-style arbitrary precision calculator
camlimages-3.0.2p0  image manipulation functions for Objective Caml
check_bioctl-1.9Nagios plugin to check RAID status with bioctl
check_email_delivery-0.7.0 Nagios plugin to check full email delivery loop
(SMTP
/IMAP)
check_hw_sensors-1.42 Nagios plugin to monitor sysctl hw.sensors
check_mssql_health-1.5.3 Nagios plugin to check Microsoft SQL Server
check_openbgpd-1.5  Nagios plugin to monitor OpenBGPd peers
cups-1.4.7p0Common Unix Printing System
cups-pdf-2.5.1  PDF backend for CUPS
curl-7.21.7 get files from FTP, Gopher, HTTP or HTTPS servers
dosbox-0.74p0   x86 with DOS emulator targeted at playing games
emacs-22.3p10   GNU editor: extensible, customizable, self-documenting
fedora_base-4.0p8   Linux compatibility package based on Fedora Core 4
firefox-5.0p3   Mozilla web browser
firefox35-3.5.19p2  Mozilla web browser
ghostview-1.5p3 X11 front-end for ghostscript
git-1.7.6p0 GIT - Tree History Storage Tool
git-svn-1.7.6p0 GIT - subversion interoperability tools
git-x11-1.7.6p0 GIT - graphical tools
gnome-common-2.34.0 common automake macros for GNOME
gnome-desktop-2.32.1p4 components for the GNOME desktop
gnome-mplayer-1.0.4p1 GTK+/GNOME frontend for MPlayer
gnome-panel-2.32.1p5 GNOME panel
gnome-screensaver-2.30.2p2 screen saver and locker for GNOME
gnome-system-monitor-2.28.2p6 sytem monitor for GNOME
gnome-system-tools-2.32.0p6 sytem configuration GUI for desktops
gnuchess-5.08   chess program
gpgme-1.1.5p1   GnuPG Made Easy
gstoraster-1.03p0   filter to convert PostScript or PDF to cups raster
format
ircII-20081115p0Internet Relay Chat client
ispell-3.2.06p6 interactive spelling checker
jove-4.16p1 Jonathan's Own Version of Emacs
kdebase-3.5.10p13   K Desktop Environment, basic applications
kermit-8.0.211  serial and network communications package
latex-mk-1.9.1p0set of Makefile fragments to manage LaTeX documents
libpurple-2.9.0 multi-protocol instant messaging library
libreoffice-3.4.1.3p1v0 multi-platform productivity suite
mediawiki-1.15.5p3  web-based collaborative editing environment
minicom-2.2p0   MS-DOS Telix-like serial communication program
mpg123-1.13.1   fast console MPEG audio player and decoder library
mrtg-2.17.1p1   multi-router traffic grapher
mutt-1.5.21v0-sasl  tty-based e-mail client, development version
mysql-server-5.1.54p9 multithreaded SQL database (server)
ncftp-3.2.3 ftp replacement with advanced user interface
nethack-3.4.3p4-qt  dungeon explorin', hackin', game.  Piece of cake
nmap-5.51p0 scan ports and fingerprint stack of network hosts
ntop-1.1network usage, interface similar to top(1)
ntp-4.2.6pl2p7  Network Time Protocol reference implementation
ocaml-3.12.0p0  ML language based on complete class-based objective
system
oinkmaster-2.0p0update your Snort rules
p7zip-9.20.1file archiver with high compression ratio
partial-wordpress-3.0.2 standard compliant weblog
pgp-2.6.3   Pretty Good Privacy 2.6.3ia
php-5.2.17p5server-side HTML-embedded scripting language
php-curl-5.2.17p3   curl URL library extensions for php5
php-gd-5.2.17p4 image manipulation extensions for p

Re: softraid: adding volumes, CPU requirements, RAID5

2013-05-22 Thread Hugo Osvaldo Barrera
On 2013-05-20 07:46, Nick Holland wrote:
> On 05/20/13 00:52, Hugo Osvaldo Barrera wrote:
> > Hi,
> >
> > I'm building myself an openbsd-based fileserver, which will initially
> > have three disks with softraid in RAID5 mode.
> >
> > I've three questions regarding softraid:
> >
> > 1) I intend on using a single-core 1.8Ghz Atom processor I have lying
> > around. Would that limit my performance too much? I'll be using this
> > fileserver mostly for media (movies/series/music) and some ocassional
> > backups. Can anyone share what CPU they've used and their experience?
(I'm
> > clarifying my intended usage for the fileserver since I think it's quite
> > relevant to say if the CPU is or isn't enough).
>
> Wrong question, I think.  More than processor is memory (caching) and
> disk interface (ahci rocks), network interface, etc.

Oh, great, that's good to know. I though processor power was a very
limiting factor in this. Memory and network won't be an issue in this
case.

>
> > 2) How do I add additional volumes to an already created softraid
> > volume? I intend on adding additional disks as necessary. Is it possible?
>
> Not in the way you are likely thinking.
> Besides, your Atom board probably has a rather finite amount of
> expandability.

Hmm. That makes everything far more complicated. :/
Actually, this motherboard I've lying around has four ports, and there
are some other mini-itx one with up to seven ports.

>
> > 3) The man pages report RAID5 as experimental. I'm curious, why is
> > this so? Is it just not-very-thoroughly tested, or is there some
> > missing feature? I read on a 2010 presentation that rebuild was not
> > implemented yet, is this still so?
>
> That's really a question you will need to find out though
> experimentation before you implement (i.e., you MUST practice this
> recovery stuff before going into production), but yes, RAID5 rebuild is
> still not there, so I would NOT recommend going this route.

Yes, indeed. It's way to dangerous and I don't have the storage to create
a dump and rebuild if a disk fails.

>
> However, a nice little RAID1 system to start, hopefully leaving you two
> SATA ports for the next generation/upgrade disks.

Regrettably, I've too much data to take this route. The costs are
prohibitive, and I'd need way too many disks.

>
> Nick.
>

Thanks,

--
Hugo Osvaldo Barrera

[demime 1.01d removed an attachment of type application/pgp-signature]



Re: Option to allow directly connected ebgp nexthops?

2013-05-22 Thread Claudio Jeker
On Wed, May 22, 2013 at 08:31:15PM +0100, Joe Holden wrote:
> Christopher J. Umina wrote:
> >Hello,
> >
> >I'm hoping Claudio or someone can take a quick look at this:
> >
> >I'm testing a simple hub/spoke VPN configuration using vtun (tun
> >interfaces) for 'last mile' between sites. Over the tunnels, I would
> >like to run EBGP sessions using OpenBGPd (on FreeBSD 9.1) on both
> >ends, but I'm running into some trouble. I'm trying to do this as an
> >extremely cheap solution to use in a very small scale, so bgpd will be
> >listening on the tunnel interface local address rather than a loopback
> >address. This is true at both ends of the configuration.
> >
> >The tunnel interfaces are configured as such and work properly with
> >the hub router IP 10.1.254.1 and the spoke router IP 10.1.254.2 able
> >to ping each other and all that.
> >
> >The BGP configuration is fairly standard, I can include it if needed
> >later, but I think it's probably irrelevant. The hub router is running
> >AS 64598 and the spoke running AS 64593 and each are listening on
> >their tunnel IPs, the sessions come up and everything is fine on the
> >spoke router.
> >
> >After the session comes up, the hub router logs:
> >May 22 18:13:06 ar01 bgpd[792]: nexthop 10.1.254.2 now invalid:
> >directly connected
> >
> FreeBSD != OpenBSD, there are huge differences in the way the
> routing table works, including the lack of priorities and interface
> route protection.

While this is true the main problem is that on OpenBSD bgpd gets more
help from the kernel. But the "directly connected" is not an error it is
just the indication that the nexthop can be reached directly (over the
tunnel) instead of using a gateway (or a link local route).

> >The routes show up in the RIB, but never make it to the FIB, I assume
> >because of the previous message. To add to the confusion the following
> >output is from the hub router:
> >
> ># bgpctl show nexthop
> >Flags: * = nexthop valid
> >
> >  Nexthop Route  Prio Gateway Iface
> >  10.1.254.1
> >  10.1.254.2  10.1.254.2/3248 connected   tun100 (DOWN, 
> > active)
> >
> >Is that "DOWN" indicating the link state of the tunnel interface? The
> >tunnel interface is up and operating.
> >
> tun has no link state, use tap.

At least on OpenBSD that is not true. Every interface has a link state and
in some cases it will be unknown. IIRC tun(4) is considered DOWN when the
device node was not opened. Is it possible that bgpd missed the UP event?
ifconfig(8) should show the link state:
# ifconfig tun1
tun1: flags=11 mtu 1500
priority: 0
groups: tun
status: down


> >Is this intended behavior? It appears bgpd is invalidating all routes
> >due to a 'directly connected' nexthop. If so, would it make sense to
> >have an option to allow directly connected nexthops?
> >
> This isn't an appropriate place to ask really, post to freebsd-net.

I think this should work on OpenBSD maybe talk to the OpenBGPD port
maintainer.

-- 
:wq Claudio



Re: pms problems in latest snapshot

2013-05-22 Thread Frank Brodbeck
Hi,

On Sat, May 11, 2013 at 09:47:01AM +0200, Janne Johansson wrote:
> I see this too, after the PS2 mux commit. For me, a workaround is to zzz
> the machine and wake it up. Not very neat but works.

Doesn't work out for me, but I managed to get all the pieces I need to
revert to:

dev/isa/pckbc_isa.c -> 1.11
dev/ic/pckbc.c -> 1.33
dev/ic/pckbcvar.h -> 1.12
dev/pckbc/pms.c -> 1.37

A custom kernel w/ the above revisions is working fine - see dmesg
below. But I would welcome any hint how to further debug this issue as
I'd rather prefer helping to fix the issue with the active multiplexing
than to back out the change.

> > pckbd.c -> 1.32

I believe this is unnecessary and can be kept at HEAD.

TIA,
Frank.

OpenBSD 5.3-current (GENERIC) #6: Thu May 23 00:02:01 CEST 2013
f...@bootes.split-brain.de:/usr/src/sys/arch/amd64/compile/GENERIC
real mem = 2088452096 (1991MB)
avail mem = 2025242624 (1931MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.5 @ 0xdc010 (51 entries)
bios0: vendor Dell Inc. version "A02" date 01/11/2010
bios0: Dell Inc. Vostro V13
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP HPET MCFG APIC SLIC BOOT SLIC SSDT SSDT SSDT SSDT SSDT
acpi0: wakeup devices P0P1(S3) USB2(S3) USBR(S3) RP03(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimcfg0 at acpi0 addr 0xe000, bus 0-255
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 Solo CPU U3500 @ 1.40GHz, 1396.75 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,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,XSAVE,NXE,LONG,LAHF,PERF
cpu0: 3MB 64b/line 8-way L2 cache
cpu0: apic clock running at 199MHz
ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 24 pins
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 11 (P0P1)
acpiprt2 at acpi0: bus 1 (RP01)
acpiprt3 at acpi0: bus 3 (RP02)
acpiprt4 at acpi0: bus 5 (RP03)
acpiprt5 at acpi0: bus 7 (RP04)
acpiprt6 at acpi0: bus 9 (RP05)
acpiec0 at acpi0
acpicpu0 at acpi0: C3, C2, C1, PSS
acpitz0 at acpi0: critical temperature is 100 degC
acpibtn0 at acpi0: LID0
acpibtn1 at acpi0: PWRB
acpibtn2 at acpi0: SLPB
acpibat0 at acpi0: BAT0 model "SIMPLO" serial 01AF type Li-I oem "Li-I"
acpiac0 at acpi0: AC unit online
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: DD03
cpu0: Enhanced SpeedStep 1396 MHz: speeds: 1400, 1200, 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel GM45 Host" rev 0x07
vga1 at pci0 dev 2 function 0 "Intel GM45 Video" rev 0x07
intagp0 at vga1
agp0 at intagp0: aperture at 0xd000, size 0x1000
inteldrm0 at vga1
drm0 at inteldrm0
inteldrm0: 1366x768
wsdisplay0 at vga1 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
"Intel GM45 Video" rev 0x07 at pci0 dev 2 function 1 not configured
uhci0 at pci0 dev 26 function 0 "Intel 82801I USB" rev 0x03: apic 1 int 16
uhci1 at pci0 dev 26 function 1 "Intel 82801I USB" rev 0x03: apic 1 int 21
uhci2 at pci0 dev 26 function 2 "Intel 82801I USB" rev 0x03: apic 1 int 19
ehci0 at pci0 dev 26 function 7 "Intel 82801I USB" rev 0x03: apic 1 int 19
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
azalia0 at pci0 dev 27 function 0 "Intel 82801I HD Audio" rev 0x03: msi
azalia0: codecs: Realtek ALC269
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 82801I PCIE" rev 0x03: msi
pci1 at ppb0 bus 1
ppb1 at pci0 dev 28 function 1 "Intel 82801I PCIE" rev 0x03: msi
pci2 at ppb1 bus 3
ppb2 at pci0 dev 28 function 2 "Intel 82801I PCIE" rev 0x03: msi
pci3 at ppb2 bus 5
re0 at pci3 dev 0 function 0 "Realtek 8168" rev 0x03: RTL8168D/8111D (0x2800), 
apic 1 int 18, address 00:26:6c:10:fc:e2
rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 2
ppb3 at pci0 dev 28 function 3 "Intel 82801I PCIE" rev 0x03: msi
pci4 at ppb3 bus 7
ppb4 at pci0 dev 28 function 4 "Intel 82801I PCIE" rev 0x03: msi
pci5 at ppb4 bus 9
uhci3 at pci0 dev 29 function 0 "Intel 82801I USB" rev 0x03: apic 1 int 23
uhci4 at pci0 dev 29 function 1 "Intel 82801I USB" rev 0x03: apic 1 int 19
uhci5 at pci0 dev 29 function 2 "Intel 82801I USB" rev 0x03: apic 1 int 18
ehci1 at pci0 dev 29 function 7 "Intel 82801I USB" rev 0x03: apic 1 int 23
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb5 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0x93
pci6 at ppb5 bus 11
pcib0 at pci0 dev 31 function 0 "Intel 82801IEM LPC" rev 0x03
pciide0 at pci0 dev 31 function 2 "Intel 82801I SATA" rev 0x03: DMA, channel 0 
configured to native-PCI, channel 1 configured to native-PCI
pciide0: using apic 1 int 19 for native-PCI interrupt
wd0 at pciide0 channel 0 drive 0: 
wd0: 1-sector PIO, LBA48, 57241MB, 117231408 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 6
ichiic0 at pci0 dev 31 function 3 "Intel 82801I SMBus" rev 0x03: ap

Problems w/apache+php+mysqld since 4.9-5.0 OpenBSD Upgrade

2013-05-22 Thread Damon Getsman
 Hello all, and thank you for taking the time to take a look at
this issue that I am currently having.  I've been a strong advocate of
OpenBSD for some time, but have only recently taken steps to start
upgrading some of my machines instead of reinstalling.
My primary server was a 4.9 installation, and it was running
apache, with PHP and MySQL integrated for the purpose of serving a
mediawiki, a gallery2 installation, and a few other utilities that I
have had up for myself and some friends.  Unfortunately, ever since I've
made the leap from 4.9 to 5.0, I've been unable to get anything other
than plain HTML documents to display via apache.  The server tells me
that there are either '500' server errors or with a little more detail
MediaWiki tells me "(Can't contact the database server: MySQL functions
missing, have you compiled PHP with the --with-mysql option? )".
Now according to the pkg_info listing that I have, I _believe_
that I have all of the proper packages and libraries installed, but I
guess I am mistaken as I'm still not able to serve pages up with any
sort of MySQL back end handling.  Here is the output of 'pkg_info -a -m'
for anybody who cares to verify this:

BitTorrent-4.4.0p10 cooperative file distribution system implemented in
Python
ImageMagick-6.6.6.10p0 image processing tools
alacarte-0.12.4p7   easy GNOME menu editing tool
apache-httpd-2.2.15p0 apache HTTP server
apcupsd-3.14.8p2daemon for controlling APC UPSes
archie-1.4.1Prospero client for the archie service
bash-4.2.10 GNU Bourne Again Shell
beav-1.40.15binary editor and viewer
bzip2-1.0.6 block-sorting file compressor, unencumbered
calc-2.11.7 C-style arbitrary precision calculator
camlimages-3.0.2p0  image manipulation functions for Objective Caml
check_bioctl-1.9Nagios plugin to check RAID status with bioctl
check_email_delivery-0.7.0 Nagios plugin to check full email delivery loop
(SMTP
/IMAP)
check_hw_sensors-1.42 Nagios plugin to monitor sysctl hw.sensors
check_mssql_health-1.5.3 Nagios plugin to check Microsoft SQL Server
check_openbgpd-1.5  Nagios plugin to monitor OpenBGPd peers
cups-1.4.7p0Common Unix Printing System
cups-pdf-2.5.1  PDF backend for CUPS
curl-7.21.7 get files from FTP, Gopher, HTTP or HTTPS servers
dosbox-0.74p0   x86 with DOS emulator targeted at playing games
emacs-22.3p10   GNU editor: extensible, customizable, self-documenting
fedora_base-4.0p8   Linux compatibility package based on Fedora Core 4
firefox-5.0p3   Mozilla web browser
firefox35-3.5.19p2  Mozilla web browser
ghostview-1.5p3 X11 front-end for ghostscript
git-1.7.6p0 GIT - Tree History Storage Tool
git-svn-1.7.6p0 GIT - subversion interoperability tools
git-x11-1.7.6p0 GIT - graphical tools
gnome-common-2.34.0 common automake macros for GNOME
gnome-desktop-2.32.1p4 components for the GNOME desktop
gnome-mplayer-1.0.4p1 GTK+/GNOME frontend for MPlayer
gnome-panel-2.32.1p5 GNOME panel
gnome-screensaver-2.30.2p2 screen saver and locker for GNOME
gnome-system-monitor-2.28.2p6 sytem monitor for GNOME
gnome-system-tools-2.32.0p6 sytem configuration GUI for desktops
gnuchess-5.08   chess program
gpgme-1.1.5p1   GnuPG Made Easy
gstoraster-1.03p0   filter to convert PostScript or PDF to cups raster
format
ircII-20081115p0Internet Relay Chat client
ispell-3.2.06p6 interactive spelling checker
jove-4.16p1 Jonathan's Own Version of Emacs
kdebase-3.5.10p13   K Desktop Environment, basic applications
kermit-8.0.211  serial and network communications package
latex-mk-1.9.1p0set of Makefile fragments to manage LaTeX documents
libpurple-2.9.0 multi-protocol instant messaging library
libreoffice-3.4.1.3p1v0 multi-platform productivity suite
mediawiki-1.15.5p3  web-based collaborative editing environment
minicom-2.2p0   MS-DOS Telix-like serial communication program
mpg123-1.13.1   fast console MPEG audio player and decoder library
mrtg-2.17.1p1   multi-router traffic grapher
mutt-1.5.21v0-sasl  tty-based e-mail client, development version
mysql-server-5.1.54p9 multithreaded SQL database (server)
ncftp-3.2.3 ftp replacement with advanced user interface
nethack-3.4.3p4-qt  dungeon explorin', hackin', game.  Piece of cake
nmap-5.51p0 scan ports and fingerprint stack of network hosts
ntop-1.1network usage, interface similar to top(1)
ntp-4.2.6pl2p7  Network Time Protocol reference implementation
ocaml-3.12.0p0  ML language based on complete class-based objective
system
oinkmaster-2.0p0update your Snort rules
p7zip-9.20.1file archiver with high compression ratio
partial-wordpress-3.0.2 standard compliant weblog
pgp-2.6.3   Pretty Good Privacy 2.6.3ia
php-5.2.17p5server-side HTML-embedded scripting language
php-curl-5.2.17p3   curl URL library extensions for php5
php-gd-5.2.17p4 image manipulation extensions for php5
php-imap-5.2.17p3   imap, pop3 and nntp

Updating ports via anoncvs hangs

2013-05-22 Thread John Tate
When I go to update ports by anoncvs it just hangs, it's been like this for
hours. Something doesn't seem right.

elijah:usr # cvs -qd anon...@anoncvs.ca.openbsd.org:/cvs get -rOPENBSD_5_3
-P ports

-- 
www.johntate.org



Re: Policy Based Routing/pfctl help

2013-05-22 Thread Aaron Dewell
On May 22, 2013, at 3:02 AM, Stuart Henderson wrote:
>> pass in from 10.1.1.0/24 route-to 10.1.1.1@vlan1
>> pass in from 10.1.2.0/24 route-to 10.1.2.1@vlan2
>> pass in from 10.1.3.0/24 route-to 10.1.3.1@vlan3
>> pass in from 10.1.4.0/24 route-to 10.1.4.1@vlan4
>> 
>> If I needed inbound traffic returned (ping), I would add:
>> 
>> pass in on vlan1 reply-to 10.1.1.1@vlan1
>> pass in on vlan2 reply-to 10.1.2.1@vlan2
>> pass in on vlan3 reply-to 10.1.3.1@vlan3
>> pass in on vlan4 reply-to 10.1.4.1@vlan4
>> 
>> That's assuming I've understood what you've said correctly!
> 
> That looks right to me.

I think I've got it going, thanks very much for your help!  The final syntax I 
used, after more messing with it, was:

pass in on vlan0 route-to 10.1.1.1 from 10.1.1.0/24 to any
pass in on vlan1 reply-to 10.1.1.1

Which comes out as:

# pfctl -sr
No ALTQ support in kernel
ALTQ related functions disabled
pass in on vlan0 route-to 10.1.1.1 inet from 10.1.1.0/24 to any flags S/SA keep 
state
pass in on vlan1 reply-to 10.1.1.1 all flags S/SA keep state

vlan0 being the one with the default route.  I believe this is right, at least, 
I can ping both ways across all four of the VLANs in question end-to-end.  I'm 
suspicious the first line should be "pass out" but since it's working, perhaps 
not.  

Aaron



Re: Option to allow directly connected ebgp nexthops?

2013-05-22 Thread Joe Holden

Christopher J. Umina wrote:

Hello,

I'm hoping Claudio or someone can take a quick look at this:

I'm testing a simple hub/spoke VPN configuration using vtun (tun
interfaces) for 'last mile' between sites. Over the tunnels, I would
like to run EBGP sessions using OpenBGPd (on FreeBSD 9.1) on both
ends, but I'm running into some trouble. I'm trying to do this as an
extremely cheap solution to use in a very small scale, so bgpd will be
listening on the tunnel interface local address rather than a loopback
address. This is true at both ends of the configuration.

The tunnel interfaces are configured as such and work properly with
the hub router IP 10.1.254.1 and the spoke router IP 10.1.254.2 able
to ping each other and all that.

The BGP configuration is fairly standard, I can include it if needed
later, but I think it's probably irrelevant. The hub router is running
AS 64598 and the spoke running AS 64593 and each are listening on
their tunnel IPs, the sessions come up and everything is fine on the
spoke router.

After the session comes up, the hub router logs:
May 22 18:13:06 ar01 bgpd[792]: nexthop 10.1.254.2 now invalid:
directly connected

FreeBSD != OpenBSD, there are huge differences in the way the routing 
table works, including the lack of priorities and interface route 
protection.

The routes show up in the RIB, but never make it to the FIB, I assume
because of the previous message. To add to the confusion the following
output is from the hub router:

# bgpctl show nexthop
Flags: * = nexthop valid

  Nexthop Route  Prio Gateway Iface
  10.1.254.1
  10.1.254.2  10.1.254.2/3248 connected   tun100 (DOWN, active)

Is that "DOWN" indicating the link state of the tunnel interface? The
tunnel interface is up and operating.


tun has no link state, use tap.

Is this intended behavior? It appears bgpd is invalidating all routes
due to a 'directly connected' nexthop. If so, would it make sense to
have an option to allow directly connected nexthops?


This isn't an appropriate place to ask really, post to freebsd-net.

Thank you,

--
Christopher J. Umina
ch...@uminac.com




Option to allow directly connected ebgp nexthops?

2013-05-22 Thread Christopher J. Umina
Hello,

I'm hoping Claudio or someone can take a quick look at this:

I'm testing a simple hub/spoke VPN configuration using vtun (tun
interfaces) for 'last mile' between sites. Over the tunnels, I would
like to run EBGP sessions using OpenBGPd (on FreeBSD 9.1) on both
ends, but I'm running into some trouble. I'm trying to do this as an
extremely cheap solution to use in a very small scale, so bgpd will be
listening on the tunnel interface local address rather than a loopback
address. This is true at both ends of the configuration.

The tunnel interfaces are configured as such and work properly with
the hub router IP 10.1.254.1 and the spoke router IP 10.1.254.2 able
to ping each other and all that.

The BGP configuration is fairly standard, I can include it if needed
later, but I think it's probably irrelevant. The hub router is running
AS 64598 and the spoke running AS 64593 and each are listening on
their tunnel IPs, the sessions come up and everything is fine on the
spoke router.

After the session comes up, the hub router logs:
May 22 18:13:06 ar01 bgpd[792]: nexthop 10.1.254.2 now invalid:
directly connected

The routes show up in the RIB, but never make it to the FIB, I assume
because of the previous message. To add to the confusion the following
output is from the hub router:

# bgpctl show nexthop
Flags: * = nexthop valid

  Nexthop Route  Prio Gateway Iface
  10.1.254.1
  10.1.254.2  10.1.254.2/3248 connected   tun100 (DOWN, active)

Is that "DOWN" indicating the link state of the tunnel interface? The
tunnel interface is up and operating.

Is this intended behavior? It appears bgpd is invalidating all routes
due to a 'directly connected' nexthop. If so, would it make sense to
have an option to allow directly connected nexthops?

Thank you,

--
Christopher J. Umina
ch...@uminac.com



Re: init disappeared on my OpenBSD VPS

2013-05-22 Thread John Tate
I have since ran the OpenBSD 5.3 media for an upgrade and got the system
running. However, I accidentally built the i386 kernel when the machine is
amd64, which might have replaced init or something in the process which
might be why obsd didn't work.


On Thu, May 23, 2013 at 3:25 AM, John Tate  wrote:

> I have an OpenBSD VPS, I just built the latest kernel from the 5.3 patch
> branch, and the new kernel can't find init, but neither can the old kernel,
> they both make this output:
>
> >> OpenBSD/amd64 BOOT 3.01
> boot> obsd
> booting hd0a:obsd: 8404228+1102404 [52+381152+367486]=0x9c7d50
> entry point at 0x200120 [7205c766, 3404, 24448b12, 2494a304]
>
> [ using 749064 bytes of bsd ELF symbol table ]
> Copyright (c) 1982, 1986, 1989, 1991, 1993
> The Regents of the University of California.  All rights reserved.
> Copyright (c) 1995-2013 OpenBSD. All rights reserved.
> http://www.OpenBSD.org
>
> OpenBSD 5.3-stable (SECUSRVR) #0: Wed May 22 10:07:51 PDT 2013
> r...@elijah.secusrvr.com:/usr/src/sys/arch/i386/compile/SECUSRVR
> cpu0: QEMU Virtual CPU version 0.9.1 ("GenuineIntel" 686-class) 2.65 GHz
> cpu0:
> FPU,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,NXE,LONG,SSE3,PERF
> real mem  = 804777984 (767MB)
> avail mem = 780640256 (744MB)
> mainbus0 at root
> bios0 at mainbus0: AT/286+ BIOS, date 02/13/10, BIOS32 rev. 0 @ 0xfb4d0,
> SMBIOS rev. 2.4 @ 0xfbd3f (10 entries)
> bios0: vendor QEMU version "QEMU" date 01/01/2007
> acpi0 at bios0: rev 0
> acpi0: sleep states S3 S4 S5
> acpi0: tables DSDT FACP APIC
> acpi0: wakeup devices
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpicpu0 at acpi0
> mpbios0 at bios0: Intel MP Specification 1.4
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: apic clock running at 999MHz
> mpbios0: bus 0 is type ISA
> ioapic0 at mainbus0: apid 1 pa 0xfec0, version 11, 24 pins
> ioapic0: misconfigured as apic 0, remapped to apid 1
> bios0: ROM list: 0xc/0x8c00 0xd/0x600!
> pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
> pchb0 at pci0 dev 0 function 0 "Intel 82441FX" rev 0x02
> pcib0 at pci0 dev 1 function 0 "Intel 82371SB ISA" rev 0x00
> pciide0 at pci0 dev 1 function 1 "Intel 82371SB IDE" rev 0x00: DMA,
> channel 0 wired to compatibility, channel 1 wired to compatibility
> wd0 at pciide0 channel 0 drive 0: 
> wd0: 16-sector PIO, LBA48, 20480MB, 41943040 sectors
> atapiscsi0 at pciide0 channel 0 drive 1
> scsibus0 at atapiscsi0: 2 targets
> cd0 at scsibus0 targ 0 lun 0:  ATAPI 5/cdrom
> removable
> wd0(pciide0:0:0): using PIO mode 0, DMA mode 2
> cd0(pciide0:0:1): using PIO mode 0
> atapiscsi1 at pciide0 channel 1 drive 0
> scsibus1 at atapiscsi1: 2 targets
> cd1 at scsibus1 targ 0 lun 0:  ATAPI 5/cdrom
> removable
> cd1(pciide0:1:0): using PIO mode 0
> uhci0 at pci0 dev 1 function 2 "Intel 82371SB USB" rev 0x01: apic 1 int 11
> piixpm0 at pci0 dev 1 function 3 "Intel 82371AB Power" rev 0x03: apic 1
> int 10
> iic0 at piixpm0
> iic0: addr 0x19 3e=00 48=00 4a=00 4e=00 fc=00 fe=00 words 00= 01=
> 02= 03= 04= 05= 06= 07=
> iic0: addr 0x1b 3e=00 48=00 4a=00 4e=00 fc=00 fe=00 words 00= 01=
> 02= 03= 04= 05= 06= 07=
> iic0: addr 0x1c 0f=00 3e=00 48=00 4a=00 4e=00 fc=00 fe=00 words 00=
> 01= 02= 03= 04= 05= 06= 07=
> iic0: addr 0x1d 0f=00 3e=00 48=00 4a=00 4e=00 fc=00 fe=00 words 00=
> 01= 02= 03= 04= 05= 06= 07=
> iic0: addr 0x1e 3e=00 48=00 4a=00 4e=00 fc=00 fe=00 words 00= 01=
> 02= 03= 04= 05= 06= 07=
> iic0: addr 0x1f 3e=00 48=00 4a=00 4e=00 fc=00 fe=00 words 00= 01=
> 02= 03= 04= 05= 06= 07=
> iic0: addr 0x29 00=d0 01=d0 02=d0 03=d0 04=d0 05=d0 06=d0 07=d0 08=d0
> words 00= 01= 02= 03= 04= 05= 06= 07=
> iic0: addr 0x2b 00=d0 01=d0 02=d0 03=d0 04=d0 05=d0 06=d0 07=d0 08=d0
> words 00= 01= 02= 03= 04= 05= 06= 07=
> iic0: addr 0x4c 00=d0 01=d0 02=d0 03=d0 04=d0 05=d0 06=d0 07=d0 08=d0
> words 00= 01= 02= 03= 04= 05= 06= 07=
> iic0: addr 0x4e 00=d0 01=d0 02=d0 03=d0 04=d0 05=d0 06=d0 07=d0 08=d0
> words 00= 01= 02= 03= 04= 05= 06= 07=
> vga1 at pci0 dev 2 function 0 "Cirrus Logic CL-GD5446" rev 0x00
> wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
> wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
> em0 at pci0 dev 3 function 0 "Intel PRO/1000MT (82540EM)" rev 0x03: apic 1
> int 11, address 52:54:00:27:26:84
> em1 at pci0 dev 4 function 0 "Intel PRO/1000MT (82540EM)" rev 0x03: apic 1
> int 11, address 52:54:00:3b:26:84
> virtio0 at pci0 dev 5 function 0 "Qumranet Virtio Memory" rev 0x00: Virtio
> Memory Balloon Device
> viomb0 at virtio0
> virtio0: apic 1 int 10
> virtio1 at pci0 dev 6 function 0 "Qumra

Re: init disappeared on my OpenBSD VPS

2013-05-22 Thread Peter J. Philipp

On 05/22/13 19:25, John Tate wrote:

I have an OpenBSD VPS, I just built the latest kernel from the 5.3 patch
branch, and the new kernel can't find init, but neither can the old kernel,
they both make this output:


OpenBSD/amd64 BOOT 3.01

boot> obsd
booting hd0a:obsd: 8404228+1102404 [52+381152+367486]=0x9c7d50
entry point at 0x200120 [7205c766, 3404, 24448b12, 2494a304]

[ using 749064 bytes of bsd ELF symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2013 OpenBSD. All rights reserved.
http://www.OpenBSD.org

OpenBSD 5.3-stable (SECUSRVR) #0: Wed May 22 10:07:51 PDT 2013
 r...@elijah.secusrvr.com:/usr/src/sys/arch/i386/compile/SECUSRVR
cpu0: QEMU Virtual CPU version 0.9.1 ("GenuineIntel" 686-class) 2.65 GHz
cpu0:
FPU,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,NXE,LONG,SSE3,PERF
real mem  = 804777984 (767MB)
avail mem = 780640256 (744MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 02/13/10, BIOS32 rev. 0 @ 0xfb4d0,
SMBIOS rev. 2.4 @ 0xfbd3f (10 entries)
bios0: vendor QEMU version "QEMU" date 01/01/2007
acpi0 at bios0: rev 0
acpi0: sleep states S3 S4 S5
acpi0: tables DSDT FACP APIC
acpi0: wakeup devices
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
acpiprt0 at acpi0: bus 0 (PCI0)
acpicpu0 at acpi0
mpbios0 at bios0: Intel MP Specification 1.4
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: apic clock running at 999MHz
mpbios0: bus 0 is type ISA
ioapic0 at mainbus0: apid 1 pa 0xfec0, version 11, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 1
bios0: ROM list: 0xc/0x8c00 0xd/0x600!
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 "Intel 82441FX" rev 0x02
pcib0 at pci0 dev 1 function 0 "Intel 82371SB ISA" rev 0x00
pciide0 at pci0 dev 1 function 1 "Intel 82371SB IDE" rev 0x00: DMA, channel
0 wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: 
wd0: 16-sector PIO, LBA48, 20480MB, 41943040 sectors
atapiscsi0 at pciide0 channel 0 drive 1
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0:  ATAPI 5/cdrom
removable
wd0(pciide0:0:0): using PIO mode 0, DMA mode 2
cd0(pciide0:0:1): using PIO mode 0
atapiscsi1 at pciide0 channel 1 drive 0
scsibus1 at atapiscsi1: 2 targets
cd1 at scsibus1 targ 0 lun 0:  ATAPI 5/cdrom
removable
cd1(pciide0:1:0): using PIO mode 0
uhci0 at pci0 dev 1 function 2 "Intel 82371SB USB" rev 0x01: apic 1 int 11
piixpm0 at pci0 dev 1 function 3 "Intel 82371AB Power" rev 0x03: apic 1 int
10
iic0 at piixpm0
iic0: addr 0x19 3e=00 48=00 4a=00 4e=00 fc=00 fe=00 words 00= 01=
02= 03= 04= 05= 06= 07=
iic0: addr 0x1b 3e=00 48=00 4a=00 4e=00 fc=00 fe=00 words 00= 01=
02= 03= 04= 05= 06= 07=
iic0: addr 0x1c 0f=00 3e=00 48=00 4a=00 4e=00 fc=00 fe=00 words 00=
01= 02= 03= 04= 05= 06= 07=
iic0: addr 0x1d 0f=00 3e=00 48=00 4a=00 4e=00 fc=00 fe=00 words 00=
01= 02= 03= 04= 05= 06= 07=
iic0: addr 0x1e 3e=00 48=00 4a=00 4e=00 fc=00 fe=00 words 00= 01=
02= 03= 04= 05= 06= 07=
iic0: addr 0x1f 3e=00 48=00 4a=00 4e=00 fc=00 fe=00 words 00= 01=
02= 03= 04= 05= 06= 07=
iic0: addr 0x29 00=d0 01=d0 02=d0 03=d0 04=d0 05=d0 06=d0 07=d0 08=d0 words
00= 01= 02= 03= 04= 05= 06= 07=
iic0: addr 0x2b 00=d0 01=d0 02=d0 03=d0 04=d0 05=d0 06=d0 07=d0 08=d0 words
00= 01= 02= 03= 04= 05= 06= 07=
iic0: addr 0x4c 00=d0 01=d0 02=d0 03=d0 04=d0 05=d0 06=d0 07=d0 08=d0 words
00= 01= 02= 03= 04= 05= 06= 07=
iic0: addr 0x4e 00=d0 01=d0 02=d0 03=d0 04=d0 05=d0 06=d0 07=d0 08=d0 words
00= 01= 02= 03= 04= 05= 06= 07=
vga1 at pci0 dev 2 function 0 "Cirrus Logic CL-GD5446" rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
em0 at pci0 dev 3 function 0 "Intel PRO/1000MT (82540EM)" rev 0x03: apic 1
int 11, address 52:54:00:27:26:84
em1 at pci0 dev 4 function 0 "Intel PRO/1000MT (82540EM)" rev 0x03: apic 1
int 11, address 52:54:00:3b:26:84
virtio0 at pci0 dev 5 function 0 "Qumranet Virtio Memory" rev 0x00: Virtio
Memory Balloon Device
viomb0 at virtio0
virtio0: apic 1 int 10
virtio1 at pci0 dev 6 function 0 "Qumranet Virtio Console" rev 0x00: Virtio
Console Device
virtio1: no matching child driver; not configured
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: console
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
spk

init disappeared on my OpenBSD VPS

2013-05-22 Thread John Tate
I have an OpenBSD VPS, I just built the latest kernel from the 5.3 patch
branch, and the new kernel can't find init, but neither can the old kernel,
they both make this output:

>> OpenBSD/amd64 BOOT 3.01
boot> obsd
booting hd0a:obsd: 8404228+1102404 [52+381152+367486]=0x9c7d50
entry point at 0x200120 [7205c766, 3404, 24448b12, 2494a304]

[ using 749064 bytes of bsd ELF symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2013 OpenBSD. All rights reserved.
http://www.OpenBSD.org

OpenBSD 5.3-stable (SECUSRVR) #0: Wed May 22 10:07:51 PDT 2013
r...@elijah.secusrvr.com:/usr/src/sys/arch/i386/compile/SECUSRVR
cpu0: QEMU Virtual CPU version 0.9.1 ("GenuineIntel" 686-class) 2.65 GHz
cpu0:
FPU,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,NXE,LONG,SSE3,PERF
real mem  = 804777984 (767MB)
avail mem = 780640256 (744MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 02/13/10, BIOS32 rev. 0 @ 0xfb4d0,
SMBIOS rev. 2.4 @ 0xfbd3f (10 entries)
bios0: vendor QEMU version "QEMU" date 01/01/2007
acpi0 at bios0: rev 0
acpi0: sleep states S3 S4 S5
acpi0: tables DSDT FACP APIC
acpi0: wakeup devices
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
acpiprt0 at acpi0: bus 0 (PCI0)
acpicpu0 at acpi0
mpbios0 at bios0: Intel MP Specification 1.4
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: apic clock running at 999MHz
mpbios0: bus 0 is type ISA
ioapic0 at mainbus0: apid 1 pa 0xfec0, version 11, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 1
bios0: ROM list: 0xc/0x8c00 0xd/0x600!
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 "Intel 82441FX" rev 0x02
pcib0 at pci0 dev 1 function 0 "Intel 82371SB ISA" rev 0x00
pciide0 at pci0 dev 1 function 1 "Intel 82371SB IDE" rev 0x00: DMA, channel
0 wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: 
wd0: 16-sector PIO, LBA48, 20480MB, 41943040 sectors
atapiscsi0 at pciide0 channel 0 drive 1
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0:  ATAPI 5/cdrom
removable
wd0(pciide0:0:0): using PIO mode 0, DMA mode 2
cd0(pciide0:0:1): using PIO mode 0
atapiscsi1 at pciide0 channel 1 drive 0
scsibus1 at atapiscsi1: 2 targets
cd1 at scsibus1 targ 0 lun 0:  ATAPI 5/cdrom
removable
cd1(pciide0:1:0): using PIO mode 0
uhci0 at pci0 dev 1 function 2 "Intel 82371SB USB" rev 0x01: apic 1 int 11
piixpm0 at pci0 dev 1 function 3 "Intel 82371AB Power" rev 0x03: apic 1 int
10
iic0 at piixpm0
iic0: addr 0x19 3e=00 48=00 4a=00 4e=00 fc=00 fe=00 words 00= 01=
02= 03= 04= 05= 06= 07=
iic0: addr 0x1b 3e=00 48=00 4a=00 4e=00 fc=00 fe=00 words 00= 01=
02= 03= 04= 05= 06= 07=
iic0: addr 0x1c 0f=00 3e=00 48=00 4a=00 4e=00 fc=00 fe=00 words 00=
01= 02= 03= 04= 05= 06= 07=
iic0: addr 0x1d 0f=00 3e=00 48=00 4a=00 4e=00 fc=00 fe=00 words 00=
01= 02= 03= 04= 05= 06= 07=
iic0: addr 0x1e 3e=00 48=00 4a=00 4e=00 fc=00 fe=00 words 00= 01=
02= 03= 04= 05= 06= 07=
iic0: addr 0x1f 3e=00 48=00 4a=00 4e=00 fc=00 fe=00 words 00= 01=
02= 03= 04= 05= 06= 07=
iic0: addr 0x29 00=d0 01=d0 02=d0 03=d0 04=d0 05=d0 06=d0 07=d0 08=d0 words
00= 01= 02= 03= 04= 05= 06= 07=
iic0: addr 0x2b 00=d0 01=d0 02=d0 03=d0 04=d0 05=d0 06=d0 07=d0 08=d0 words
00= 01= 02= 03= 04= 05= 06= 07=
iic0: addr 0x4c 00=d0 01=d0 02=d0 03=d0 04=d0 05=d0 06=d0 07=d0 08=d0 words
00= 01= 02= 03= 04= 05= 06= 07=
iic0: addr 0x4e 00=d0 01=d0 02=d0 03=d0 04=d0 05=d0 06=d0 07=d0 08=d0 words
00= 01= 02= 03= 04= 05= 06= 07=
vga1 at pci0 dev 2 function 0 "Cirrus Logic CL-GD5446" rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
em0 at pci0 dev 3 function 0 "Intel PRO/1000MT (82540EM)" rev 0x03: apic 1
int 11, address 52:54:00:27:26:84
em1 at pci0 dev 4 function 0 "Intel PRO/1000MT (82540EM)" rev 0x03: apic 1
int 11, address 52:54:00:3b:26:84
virtio0 at pci0 dev 5 function 0 "Qumranet Virtio Memory" rev 0x00: Virtio
Memory Balloon Device
viomb0 at virtio0
virtio0: apic 1 int 10
virtio1 at pci0 dev 6 function 0 "Qumranet Virtio Console" rev 0x00: Virtio
Console Device
virtio1: no matching child driver; not configured
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: console
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
npx0 at isa0 port 0xf0/16

Canceled SSH forwarding

2013-05-22 Thread Lars Nooden
I've got OpenSSH_6.2 from the latest snapshot and would like to cancel 
remote forwarding without closing the existing session.  I seem to be 
missing something with the escape sequence ~CKR

If I start remote forwarding like this:

ssh -R 9000:localhost:80 192.0.43.10

The remote machine can access port 80 via its port 9000.  And if I use the 
following escape sequence,

~C
KR9000

ssh reports having canceled the forwarding:

ssh> -KL9000
Canceled forwarding.

However, the remote machine is still able to use the forwarded port until 
the connection is finally closed.  The same syntax seems to shutdown 
regular (-L) forwarded ports, just not for reverse (-R) forwarding.  What 
am I missing?  

Regards,
/Lars



Re: BCM5720 and LACP

2013-05-22 Thread Loïc Blot
Hello all,
At this time, i have recompiled a fresh kernel (from ftp 5.3 sources).
The problem persist. I have recompiled with makeoptions DEBUG=-g, can
this help ??
If i use option DEBUG my kernel stays after the OpenBSD boot banner :s.

I can say bge1 doesn't want to be in the trunk, never. For now i have
em0-1 and bge0,2-3 in trunks
(http://www.hostingpics.net/viewer.php?id=705980photo.jpg )

At this time system works but there is some system freezes for 10-15sec
and after it comes back.

Any ideas ?
-- 
Best regards, 

Loïc BLOT, Engineering
UNIX Systems, Security and Networks
http://www.unix-experience.fr


Le jeudi 09 mai 2013 à 10:02 +0200, Loïc BLOT a écrit :
> No it's a dell r320 Then a 64bit cpu then amd64 architecture :)
> 
> Loic Blot
> 
> Le 8 mai 2013 à 23:54, Joerg Goltermann  a écrit :
> 
> > Hi,
> > 
> > On 04.05.2013 20:11, Loïc Blot wrote:
> >> Today, i want to upgrade exactly same model (Dell R320 with PCI Intel
> >> CARD and BCM5720 on motherbroad plus PCI BCM5720), and i have some very
> >> problematic issues. OpenBSD upgrade works like a charm, but when i use
> >> LACP with broadcom cards, after a moment, system totally freeze and
> >> nothing responds (on ssh connect but also on the server screen and
> >> keyboard).
> > 
> > let me guess, you have upgraded from <= 5.1 to 5.3 on i386 platform?
> > 
> > - Joerg



Re: Problem with a startup script

2013-05-22 Thread Andy
I had a similar problem when writing my own rc.d start script for Snort 
(compiled instead of package version), and it turned out to be becuase 
the rc.d script did not implicity incude the variables in 
'rc.conf.local' and 'rc.conf' any more.

So I just added the following to the top of the rc.d script;
if [ -e /etc/rc.conf.local ]; then
 . /etc/rc.conf.local
fi

In versions of OBSD prior to 5.2 this worked, but after 5.2 I had to 
start explicitly including the rc.conf files.
This probably isn't your issue but is still something to consider.

Specifically 'rc_check' runs 'pkill -0 -f "^${pexp}"' to test to see of 
the binary is running, and I found I had to tweak the 'pexp' string to 
match my snort2pf process properly with 'perl: snort2pf' (I.e. I had to 
include the perl bit too as the regular expression states 'starts with' 
due to the leading '^').

Hope this is useful.
Andrew Lemin

On 22/05/13 08:02, Antoine Jacoutot wrote:
> On Wed, May 22, 2013 at 06:57:16AM +, C. L. Martinez wrote:
>> On Wed, May 22, 2013 at 6:50 AM, Antoine Jacoutot  
>> wrote:
>>> On Wed, May 22, 2013 at 06:18:04AM +, C. L. Martinez wrote:
 Hi all,

   I have a problem with some tcl rc.d startup scripts. Start and status
>>> You mean check instead of status, right?
>> Yep, you are rigth Antoine ..
>>
 works ok but stop and restart, doesn't.
>>> Running the rc script in debug mode may give you some clue (-d).
>>>
>>
>> Uhmm .. no clues:
>>
>> /usr/local/etc/rc.d/suricata_proxyin_agent -d stop
>>
>> + [ -n /usr/local/bin/suricata_proxyin_agent.tcl ]
>> + unset _RC_DEBUG _RC_FORCE
>> + getopts df c
>> + _RC_DEBUG=-d
>> + getopts df c
>> + shift 1
>> + basename /usr/local/etc/rc.d/suricata_proxyin_agent
>> + _name=suricata_proxyin_agent
>> + _RC_RUNDIR=/var/run/rc.d
>> + _RC_RUNFILE=/var/run/rc.d/suricata_proxyin_agent
>> + eval _rcflags=${suricata_proxyin_agent_flags}
>> + _rcflags=
>> + eval _rcuser=${suricata_proxyin_agent_user}
>> + _rcuser=
>> + getcap -f /etc/login.conf suricata_proxyin_agent
>> + > /dev/null
>> + 2>&1
>> + [ -z  ]
>> + daemon_class=daemon
>> + [ -z  ]
>> + daemon_user=root
>> + [ -n  ]
>> + [ -n  ]
>> + [ -n  ]
>> + printf  %s -c /data/config/etc/sguil/suricata_proxyin_agent.conf -D
>> + daemon_flags= -c /data/config/etc/sguil/suricata_proxyin_agent.conf -D
>> + daemon_flags=-c /data/config/etc/sguil/suricata_proxyin_agent.conf -D
>> + readonly daemon_class
>> + unset _rcflags _rcuser
>> + pexp=/usr/local/bin/suricata_proxyin_agent.tcl -c
>> /data/config/etc/sguil/suricata_proxyin_agent.conf -D
>> + rcexec=su -l -c daemon -s /bin/sh root -c
>> + pexp=/usr/local/bin/tclsh8.5 /usr/local/bin/suricata_proxyin_agent.tcl
>> + rc_cmd stop
>> doing rc_read_runfile
>> doing rc_check
> Well it seems to stop at rc_check.
> Maybe the pexp doesn't match.
>
>> Nothing strange here ...



__guard_local issue

2013-05-22 Thread Bogdan Andu
Hello,


I compile from source Erlang R14B04 on a freshly installed OpenBSD 5.3 amd64 
machine, configured with preinstalled opensssl library /usr/lib/libssl.so.19.0 .

$ /usr/sbin/openssl
OpenSSL> version
OpenSSL 1.0.1c 10 May 2012
OpenSSL>
^D

when I try to load the crypto module I get the follwing error:

$erl
Erlang R14B04 (erts-5.8.5) [source] [64-bit] [smp:2:2] [rq:2] [async-threads:0] 
[kernel-poll:false]

Eshell V5.8.5  (abort with ^G)
1> crypto:start().
/usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
 undefined symbol '__guard_local'
/usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
 undefined symbol '__guard_local'
/usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
 undefined symbol '__guard_local'
/usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
 undefined symbol '__guard_local'
/usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
 undefined symbol '__guard_local'
/usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
 undefined symbol '__guard_local'
/usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
 undefined symbol '__guard_local'
/usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
 undefined symbol '__guard_local'
/usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
 undefined symbol '__guard_local'
/usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
 undefined symbol '__guard_local'
/usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
 undefined symbol '__guard_local'
/usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
 undefined symbol '__guard_local'
/usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
 undefined symbol '__guard_local'
/usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
 undefined symbol '__guard_local'
/usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
 undefined symbol '__guard_local'
/usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
 undefined symbol '__guard_local'
/usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
 undefined symbol '__guard_local'
/usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
 undefined symbol '__guard_local'
/usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
 undefined symbol '__guard_local'
/usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
 undefined symbol '__guard_local'
/usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
 undefined symbol '__guard_local'
/usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
 undefined symbol '__guard_local'
/usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
 undefined symbol '__guard_local'
/usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
 undefined symbol '__guard_local'
/usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
 undefined symbol '__guard_local'
/usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
 undefined symbol '__guard_local'
/usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
 undefined symbol '__guard_local'
/usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
 undefined symbol '__guard_local'
/usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
 undefined symbol '__guard_local'
/usr/local/lib/erlang/erts-5.8.5/bin/beam.smp:/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto.so:
 undefined symbol '__guard_local'

=ERROR REPORT 21-May-2013::15:19:12 ===
Unable to load crypto library. Failed with error:
"load_failed, Failed to load NIF library 
/usr/local/lib/erlang/lib/crypto-2.0.4/priv/lib/crypto: 'Cannot load specified 
object'"
OpenSSL might not be installed on this system.

=ERROR REPORT 21-May-2013::15:19:12 ===
The on_load function for module crypto retur

Re: BCM5720, LACP and CARP serious problem

2013-05-22 Thread Loïc Blot
I have disabled motherboard BCM5720 and plugged the external.
i have understand the problem.
If I have two BCM5720 the server freeze. If you have only one no
problem. The only remaining problem is bge1 stay in active mode (on each
card) and don't pass in distribute mode


-- 
Best regards, 

Loïc BLOT, Engineering
UNIX Systems, Security and Networks
http://www.unix-experience.fr


Le mercredi 22 mai 2013 à 11:03 +0200, Loïc Blot a écrit :
> Ok, i have another new to this problem.
> 
> I have unplugged the external BCM5720 card, and now there is only the
> motherboard BCM5720 + the Intel Pro 1000.
> I created two LACP trunks with 2 ports (1 for each card).
> The servers doesn't freeze anymore !! (but there is a problem,
> motherboard bge1 stay active but doesn't collect and distribute. The
> switch doesn't agregate the port, this problem was present when the 4
> bge ports were on the server).
> 
> The next test is to disable motherboard BCM 5720 and retry with the
> external BCM5720, to see if the same comportment is present.



Re: Problem with a startup script

2013-05-22 Thread C. L. Martinez
On Wed, May 22, 2013 at 9:15 AM, Vadim Zhukov  wrote:
> 2013/5/22 C. L. Martinez 
>
>> On Wed, May 22, 2013 at 8:44 AM, Vadim Zhukov  wrote:
>> > 22.05.2013 10:19 пользователь "C. L. Martinez" 
>> > написал:
>> >
>> >
>> >>
>> >> Hi all,
>> >>
>> >>  I have a problem with some tcl rc.d startup scripts. Start and status
>> >> works ok but stop and restart, doesn't.
>> >
>> > Stupid question: does it stop if you kill it by pid directly? I've seen
>> > at
>> > least one daemon do far that ignores SIGTERM...
>> >
>>
>> Yes, doing a kill -9 pid, works and doing pkill -f "${pexp}", too ...
>> from command line ...
>
>
> Okay... Another stupid questions: did you modify your /etc/rc.d/rc.subr?
> What version has it in its RCS header, did you run sysmerge(8)? What if you
> add rc_stop() manually in your rcscript, same as in /etc/rc.d/rc.subr?
>

No, I have not modified rc.subr:

#   $OpenBSD: rc.subr,v 1.68 2012/11/19 07:10:59 ajacoutot Exp $
#
# Copyright (c) 2010, 2011 Antoine Jacoutot 
# Copyright (c) 2010, 2011 Ingo Schwarze 
# Copyright (c) 2010, 2011 Robert Nagy 
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.


# Default functions and variables used by rc.d(8) scripts.

rc_err() {
echo $1 1>&2
exit 1
}

This OpenBSD host it is a clean 5.3 amd64 install ...

Yes, I have tried to insert rc_stop in my startup script, but results
are the same: process is never stopped ...



Re: BCM5720, LACP and CARP serious problem

2013-05-22 Thread Loïc Blot
Hi all,
i have plugged a serial cable on the server and started a tty on it.
In fact my server has com0 and com1 port but it seems com1 is the real
console port. I have also set ddb.console=1 to sysctl.conf but when i
send break or ctrl+alt+escape in the console terminal nothing happen.
I am connected on another switch (before i thought it's a cisco 2960
communication problem, but it seem not, i'm on a dell powerconnect
6224).
Why break doesn't have effect on com1 ?
-- 
Best regards, 

Loïc BLOT, Engineering
UNIX Systems, Security and Networks
http://www.unix-experience.fr


Le lundi 06 mai 2013 à 14:59 +1000, David Gwynne a écrit :
> do you have a real serial console hooked up to the machines? more 
> specifically, can you break into ddb when the machine breaks and get a trace?
> 
> i use carp on vlans on lacp trunks on top of myx(4) and em(4) "quite a lot" 
> without trouble, so its likely to be bge(4) if you ask me. unfortunately that 
> means its my fault or responsibility.
> 
> if you could get a trace to verify, that would be much appreciated.
> 
> cheers,
> dlg
> 
> On 05/05/2013, at 4:11 AM, Loïc Blot  wrote:
> 
> > Hello misc.
> > On thursay i have upgraded one of our BGP border routers to OpenBSD 5.3,
> > and i was pleased to get the BCM5720 working. I have added it to
> > existing LACP trunk for LAN (2 LACP, 2 ports on WAN 4 on LAN now).
> > There is no problem on this router.
> > 
> > Today, i want to upgrade exactly same model (Dell R320 with PCI Intel
> > CARD and BCM5720 on motherbroad plus PCI BCM5720), and i have some very
> > problematic issues. OpenBSD upgrade works like a charm, but when i use
> > LACP with broadcom cards, after a moment, system totally freeze and
> > nothing responds (on ssh connect but also on the server screen and
> > keyboard).
> > On this router ports must be agregated by 3 (3 for LAN 3 for DMZ), then
> > each trunk have 1 intel port and 2 broadcom ports.
> > I have tried two configuration, same BCM5720 card in the trunk and 1
> > port from each card. Same problem appears.
> > To finish, i have disabled all ports except working Intel card, but the
> > problem also occurs The only solution i have found to get server
> > working is to up bge1 and bge2 and down other interfaces (on the CISCO
> > 2960G switch, ios 12.2(55)SE3), it's the only case when server doesn't
> > freeze.
> > When i do each try and i think it was a success i waited 5 min and
> > problem occurs, or problem occurs when i reboot the machine.
> > 
> > Other detail, the working router with BCM 5720 is between an Alcatel
> > 6850 and a CISCO 4507 (Supervisor IV, ios 12.2(54)SG)
> > 
> > OpenBSD mustn't freeze totally, i think something is missing on BCM
> > driver or on LACP handling or maybe BCM + LACP + CARP isn't a good idea
> > but i haven't any choice :s
> > 
> > Thanks for advance.
> > -- 
> > Best regards, 
> > 
> > Loïc BLOT, Engineering
> > UNIX Systems, Security and Networks
> > http://www.unix-experience.fr



Re: BCM5720, LACP and CARP serious problem

2013-05-22 Thread Loïc Blot
Ok, i have another new to this problem.

I have unplugged the external BCM5720 card, and now there is only the
motherboard BCM5720 + the Intel Pro 1000.
I created two LACP trunks with 2 ports (1 for each card).
The servers doesn't freeze anymore !! (but there is a problem,
motherboard bge1 stay active but doesn't collect and distribute. The
switch doesn't agregate the port, this problem was present when the 4
bge ports were on the server).

The next test is to disable motherboard BCM 5720 and retry with the
external BCM5720, to see if the same comportment is present.
-- 
Best regards, 

Loïc BLOT, Engineering
UNIX Systems, Security and Networks
http://www.unix-experience.fr


Le lundi 06 mai 2013 à 14:59 +1000, David Gwynne a écrit :
> do you have a real serial console hooked up to the machines? more 
> specifically, can you break into ddb when the machine breaks and get a trace?
> 
> i use carp on vlans on lacp trunks on top of myx(4) and em(4) "quite a lot" 
> without trouble, so its likely to be bge(4) if you ask me. unfortunately that 
> means its my fault or responsibility.
> 
> if you could get a trace to verify, that would be much appreciated.
> 
> cheers,
> dlg
> 
> On 05/05/2013, at 4:11 AM, Loïc Blot  wrote:
> 
> > Hello misc.
> > On thursay i have upgraded one of our BGP border routers to OpenBSD 5.3,
> > and i was pleased to get the BCM5720 working. I have added it to
> > existing LACP trunk for LAN (2 LACP, 2 ports on WAN 4 on LAN now).
> > There is no problem on this router.
> > 
> > Today, i want to upgrade exactly same model (Dell R320 with PCI Intel
> > CARD and BCM5720 on motherbroad plus PCI BCM5720), and i have some very
> > problematic issues. OpenBSD upgrade works like a charm, but when i use
> > LACP with broadcom cards, after a moment, system totally freeze and
> > nothing responds (on ssh connect but also on the server screen and
> > keyboard).
> > On this router ports must be agregated by 3 (3 for LAN 3 for DMZ), then
> > each trunk have 1 intel port and 2 broadcom ports.
> > I have tried two configuration, same BCM5720 card in the trunk and 1
> > port from each card. Same problem appears.
> > To finish, i have disabled all ports except working Intel card, but the
> > problem also occurs The only solution i have found to get server
> > working is to up bge1 and bge2 and down other interfaces (on the CISCO
> > 2960G switch, ios 12.2(55)SE3), it's the only case when server doesn't
> > freeze.
> > When i do each try and i think it was a success i waited 5 min and
> > problem occurs, or problem occurs when i reboot the machine.
> > 
> > Other detail, the working router with BCM 5720 is between an Alcatel
> > 6850 and a CISCO 4507 (Supervisor IV, ios 12.2(54)SG)
> > 
> > OpenBSD mustn't freeze totally, i think something is missing on BCM
> > driver or on LACP handling or maybe BCM + LACP + CARP isn't a good idea
> > but i haven't any choice :s
> > 
> > Thanks for advance.
> > -- 
> > Best regards, 
> > 
> > Loïc BLOT, Engineering
> > UNIX Systems, Security and Networks
> > http://www.unix-experience.fr



Re: Policy Based Routing/pfctl help

2013-05-22 Thread Stuart Henderson
On 2013/05/21 17:09, Aaron Dewell wrote:
> There will be packets arriving at this interface also, however, they aren't 
> "returned" as such, just counted (except ping testing), so I should be good 
> there.  So it sounds like what I need is, for example:
> 
> pass in from 10.1.1.0/24 route-to 10.1.1.1@vlan1
> 
> vlan1 being the correct outgoing interface which is configured with an 
> address on the 10.1.1.0/24 network.  That's much simpler than I was 
> imagining.  I have four of these, so my pf.conf file could look like:
> 
> pass in from 10.1.1.0/24 route-to 10.1.1.1@vlan1
> pass in from 10.1.2.0/24 route-to 10.1.2.1@vlan2
> pass in from 10.1.3.0/24 route-to 10.1.3.1@vlan3
> pass in from 10.1.4.0/24 route-to 10.1.4.1@vlan4
> 
> If I needed inbound traffic returned (ping), I would add:
> 
> pass in on vlan1 reply-to 10.1.1.1@vlan1
> pass in on vlan2 reply-to 10.1.2.1@vlan2
> pass in on vlan3 reply-to 10.1.3.1@vlan3
> pass in on vlan4 reply-to 10.1.4.1@vlan4
> 
> That's assuming I've understood what you've said correctly!

That looks right to me.



Re: Problem with a startup script

2013-05-22 Thread Vadim Zhukov
22.05.2013 10:19 пользователь "C. L. Martinez"

написал:
>
> Hi all,
>
>  I have a problem with some tcl rc.d startup scripts. Start and status
> works ok but stop and restart, doesn't.

Stupid question: does it stop if you kill it by pid directly? I've seen at
least one daemon do far that ignores SIGTERM...

>  Script:
>
> #!/bin/sh -x
> #
> # $OpenBSD: suricata_proxyin_agent,v 1.0
>
> daemon="/usr/local/bin/suricata_proxyin_agent.tcl"
> daemon_flags="-c /data/config/etc/sguil/suricata_proxyin_agent.conf -D"
>
> . /etc/rc.d/rc.subr
>
> pexp="/usr/local/bin/tclsh8.5 $daemon"
>
> rc_cmd $1
>
> I have tried several variants like to insert rc_stop specific option
> or changing pexp to "/usr/local/bin/tclsh8.5 $daemon $daemon_args"
> without luck.
>
> Debugging script, acts as like the other system startup scripts:
>
> .
>
> + echo NO
> + : NO
> + [ XNO = XYES ]
> + echo NO
> + : NO
> + domainname
> + [ X != X -a -d /var/yp/binding ]
> + echo NO
> + : NO
> + : NO
> + [ -n /usr/local/bin/suricata_proxyin_agent.tcl ]
> + unset _RC_DEBUG _RC_FORCE
> + getopts df c
> + shift 0
> + basename ./suricata_proxyin_agent
> + _name=suricata_proxyin_agent
> + _RC_RUNDIR=/var/run/rc.d
> + _RC_RUNFILE=/var/run/rc.d/suricata_proxyin_agent
> + eval _rcflags=${suricata_proxyin_agent_flags}
> + _rcflags=
> + eval _rcuser=${suricata_proxyin_agent_user}
> + _rcuser=
> + getcap -f /etc/login.conf suricata_proxyin_agent
> + > /dev/null
> + 2>&1
> + [ -z  ]
> + daemon_class=daemon
> + [ -z  ]
> + daemon_user=root
> + [ -n  ]
> + [ -n  ]
> + [ -n  ]
> + printf  %s -c /data/config/etc/sguil/suricata_proxyin_agent.conf -D
> + daemon_flags= -c /data/config/etc/sguil/suricata_proxyin_agent.conf -D
> + daemon_flags=-c /data/config/etc/sguil/suricata_proxyin_agent.conf -D
> + readonly daemon_class
> + unset _rcflags _rcuser
> + pexp=/usr/local/bin/suricata_proxyin_agent.tcl -c
> /data/config/etc/sguil/suricata_proxyin_agent.conf -D
> + rcexec=su -l -c daemon -s /bin/sh root -c
> + pexp=/usr/local/bin/tclsh8.5 /usr/local/bin/suricata_proxyin_agent.tcl
> + rc_cmd stop
>
> root@nsm10:/usr/local/etc/rc.d# ps xa |grep suricata_proxyin_agent.tcl
> | grep -v grep
> 17486 p2- I   0:00.29 /usr/local/bin/tclsh8.5
> /usr/local/bin/suricata_proxyin_agent.tcl -c
> /data/config/etc/sguil/suricata_proxyin_agent.conf -D
>
> Any idea why process is not stopped??



Re: Problem with a startup script

2013-05-22 Thread Antoine Jacoutot
On Wed, May 22, 2013 at 07:41:38AM +, C. L. Martinez wrote:
> On Wed, May 22, 2013 at 7:37 AM, Antoine Jacoutot  
> wrote:
> > On Wed, May 22, 2013 at 07:30:19AM +, C. L. Martinez wrote:
> >> On Wed, May 22, 2013 at 7:02 AM, Antoine Jacoutot  
> >> wrote:
> >> > On Wed, May 22, 2013 at 06:57:16AM +, C. L. Martinez wrote:
> >> >> On Wed, May 22, 2013 at 6:50 AM, Antoine Jacoutot 
> >> >>  wrote:
> >> >> > On Wed, May 22, 2013 at 06:18:04AM +, C. L. Martinez wrote:
> >> >> >> Hi all,
> >> >> >>
> >> >> >>  I have a problem with some tcl rc.d startup scripts. Start and 
> >> >> >> status
> >> >> >
> >> >> > You mean check instead of status, right?
> >> >>
> >> >> Yep, you are rigth Antoine ..
> >> >>
> >> >> >
> >> >> >> works ok but stop and restart, doesn't.
> >> >> >
> >> >> > Running the rc script in debug mode may give you some clue (-d).
> >> >> >
> >> >>
> >> >>
> >> >> Uhmm .. no clues:
> >> >>
> >> >> /usr/local/etc/rc.d/suricata_proxyin_agent -d stop
> >> >>
> >> >> + [ -n /usr/local/bin/suricata_proxyin_agent.tcl ]
> >> >> + unset _RC_DEBUG _RC_FORCE
> >> >> + getopts df c
> >> >> + _RC_DEBUG=-d
> >> >> + getopts df c
> >> >> + shift 1
> >> >> + basename /usr/local/etc/rc.d/suricata_proxyin_agent
> >> >> + _name=suricata_proxyin_agent
> >> >> + _RC_RUNDIR=/var/run/rc.d
> >> >> + _RC_RUNFILE=/var/run/rc.d/suricata_proxyin_agent
> >> >> + eval _rcflags=${suricata_proxyin_agent_flags}
> >> >> + _rcflags=
> >> >> + eval _rcuser=${suricata_proxyin_agent_user}
> >> >> + _rcuser=
> >> >> + getcap -f /etc/login.conf suricata_proxyin_agent
> >> >> + > /dev/null
> >> >> + 2>&1
> >> >> + [ -z  ]
> >> >> + daemon_class=daemon
> >> >> + [ -z  ]
> >> >> + daemon_user=root
> >> >> + [ -n  ]
> >> >> + [ -n  ]
> >> >> + [ -n  ]
> >> >> + printf  %s -c /data/config/etc/sguil/suricata_proxyin_agent.conf -D
> >> >> + daemon_flags= -c /data/config/etc/sguil/suricata_proxyin_agent.conf -D
> >> >> + daemon_flags=-c /data/config/etc/sguil/suricata_proxyin_agent.conf -D
> >> >> + readonly daemon_class
> >> >> + unset _rcflags _rcuser
> >> >> + pexp=/usr/local/bin/suricata_proxyin_agent.tcl -c
> >> >> /data/config/etc/sguil/suricata_proxyin_agent.conf -D
> >
> > versus
> >
> >> 17486 p2- I   0:00.30 /usr/local/bin/tclsh8.5
> >> /usr/local/bin/suricata_proxyin_agent.tcl -c
> >> /data/config/etc/sguil/suricata_proxyin_agent.conf -D
> >
> 
> Modified:

Then sorry but I don't see. It would help if I could try this software; is it a 
port of yours or?


> 
> + daemon_user=root
> + [ -n  ]
> + [ -n  ]
> + [ -n  ]
> + printf  %s -c /data/config/etc/sguil/suricata_proxyin_agent.conf -D
> + daemon_flags= -c /data/config/etc/sguil/suricata_proxyin_agent.conf -D
> + daemon_flags=-c /data/config/etc/sguil/suricata_proxyin_agent.conf -D
> + readonly daemon_class
> + unset _rcflags _rcuser
> + pexp=/usr/local/bin/suricata_proxyin_agent.tcl -c
> /data/config/etc/sguil/suricata_proxyin_agent.conf -D
> + rcexec=su -l -c daemon -s /bin/sh root -c
> + pexp=/usr/local/bin/tclsh8.5
> /usr/local/bin/suricata_proxyin_agent.tcl -c
> /data/config/etc/sguil/suricata_proxyin_agent.conf -D
> + rc_cmd stop
> doing rc_read_runfile
> doing rc_check
> 
> .. and nothing changes ...
> 
> root@nsm10:/etc# ps xa
>   PID TT  STAT   TIME COMMAND
> 1 ??  Ss  0:01.21 /sbin/init
> 17527 ??  Is  0:00.02 syslogd: [priv] (syslogd)
> 10721 ??  I   0:00.76 /usr/sbin/syslogd -a /var/www/dev/log -a
> /var/empty/dev/log
>  6621 ??  Is  0:00.06 pflogd: [priv] (pflogd)
>  7793 ??  S   0:04.96 pflogd: [running] -s 160 -i pflog0 -f
> /var/log/pflog (pflogd)
>   160 ??  Is  0:00.26 ntpd: ntp engine (ntpd)
>  8497 ??  Is  0:00.01 ntpd: dns engine (ntpd)
>  2615 ??  Is  0:00.01 ntpd: [priv] (ntpd)
> 22730 ??  Is  0:00.22 /usr/sbin/sshd
> 20624 ??  Ss  0:02.82 sendmail: accepting connections (sendmail)
>  6481 ??  Is  0:00.03 /usr/sbin/inetd
> 20209 ??  Is  0:00.71 /usr/sbin/cron
> 28761 ??  Ss  0:00.78 sshd: root@ttyp0 (sshd)
> 17173 ??  Is  0:00.51 sshd: root@ttyp1 (sshd)
> 30836 p0  Ss  0:00.22 -ksh (ksh)
> 15177 p0  S   0:00.05 /usr/local/bin/tclsh8.5
> /usr/local/bin/suricata_proxyin_agent.tcl -c
> /data/config/etc/sguil/suricata_proxyin_agent.conf -D
> 14502 p0  R+/30:00.00 ps -xa
> 31013 p1  Is+ 0:00.16 -ksh (ksh)
> 30991 C0  Is+ 0:00.02 /usr/libexec/getty std.9600 ttyC0
> 25448 C1  Is+ 0:00.00 /usr/libexec/getty std.9600 ttyC1

-- 
Antoine



Re: Problem with a startup script

2013-05-22 Thread Antoine Jacoutot
On Wed, May 22, 2013 at 07:30:19AM +, C. L. Martinez wrote:
> On Wed, May 22, 2013 at 7:02 AM, Antoine Jacoutot  
> wrote:
> > On Wed, May 22, 2013 at 06:57:16AM +, C. L. Martinez wrote:
> >> On Wed, May 22, 2013 at 6:50 AM, Antoine Jacoutot  
> >> wrote:
> >> > On Wed, May 22, 2013 at 06:18:04AM +, C. L. Martinez wrote:
> >> >> Hi all,
> >> >>
> >> >>  I have a problem with some tcl rc.d startup scripts. Start and status
> >> >
> >> > You mean check instead of status, right?
> >>
> >> Yep, you are rigth Antoine ..
> >>
> >> >
> >> >> works ok but stop and restart, doesn't.
> >> >
> >> > Running the rc script in debug mode may give you some clue (-d).
> >> >
> >>
> >>
> >> Uhmm .. no clues:
> >>
> >> /usr/local/etc/rc.d/suricata_proxyin_agent -d stop
> >>
> >> + [ -n /usr/local/bin/suricata_proxyin_agent.tcl ]
> >> + unset _RC_DEBUG _RC_FORCE
> >> + getopts df c
> >> + _RC_DEBUG=-d
> >> + getopts df c
> >> + shift 1
> >> + basename /usr/local/etc/rc.d/suricata_proxyin_agent
> >> + _name=suricata_proxyin_agent
> >> + _RC_RUNDIR=/var/run/rc.d
> >> + _RC_RUNFILE=/var/run/rc.d/suricata_proxyin_agent
> >> + eval _rcflags=${suricata_proxyin_agent_flags}
> >> + _rcflags=
> >> + eval _rcuser=${suricata_proxyin_agent_user}
> >> + _rcuser=
> >> + getcap -f /etc/login.conf suricata_proxyin_agent
> >> + > /dev/null
> >> + 2>&1
> >> + [ -z  ]
> >> + daemon_class=daemon
> >> + [ -z  ]
> >> + daemon_user=root
> >> + [ -n  ]
> >> + [ -n  ]
> >> + [ -n  ]
> >> + printf  %s -c /data/config/etc/sguil/suricata_proxyin_agent.conf -D
> >> + daemon_flags= -c /data/config/etc/sguil/suricata_proxyin_agent.conf -D
> >> + daemon_flags=-c /data/config/etc/sguil/suricata_proxyin_agent.conf -D
> >> + readonly daemon_class
> >> + unset _rcflags _rcuser
> >> + pexp=/usr/local/bin/suricata_proxyin_agent.tcl -c
> >> /data/config/etc/sguil/suricata_proxyin_agent.conf -D

versus

> 17486 p2- I   0:00.30 /usr/local/bin/tclsh8.5
> /usr/local/bin/suricata_proxyin_agent.tcl -c
> /data/config/etc/sguil/suricata_proxyin_agent.conf -D



Re: Problem with a startup script

2013-05-22 Thread C. L. Martinez
On Wed, May 22, 2013 at 7:02 AM, Antoine Jacoutot  wrote:
> On Wed, May 22, 2013 at 06:57:16AM +, C. L. Martinez wrote:
>> On Wed, May 22, 2013 at 6:50 AM, Antoine Jacoutot  
>> wrote:
>> > On Wed, May 22, 2013 at 06:18:04AM +, C. L. Martinez wrote:
>> >> Hi all,
>> >>
>> >>  I have a problem with some tcl rc.d startup scripts. Start and status
>> >
>> > You mean check instead of status, right?
>>
>> Yep, you are rigth Antoine ..
>>
>> >
>> >> works ok but stop and restart, doesn't.
>> >
>> > Running the rc script in debug mode may give you some clue (-d).
>> >
>>
>>
>> Uhmm .. no clues:
>>
>> /usr/local/etc/rc.d/suricata_proxyin_agent -d stop
>>
>> + [ -n /usr/local/bin/suricata_proxyin_agent.tcl ]
>> + unset _RC_DEBUG _RC_FORCE
>> + getopts df c
>> + _RC_DEBUG=-d
>> + getopts df c
>> + shift 1
>> + basename /usr/local/etc/rc.d/suricata_proxyin_agent
>> + _name=suricata_proxyin_agent
>> + _RC_RUNDIR=/var/run/rc.d
>> + _RC_RUNFILE=/var/run/rc.d/suricata_proxyin_agent
>> + eval _rcflags=${suricata_proxyin_agent_flags}
>> + _rcflags=
>> + eval _rcuser=${suricata_proxyin_agent_user}
>> + _rcuser=
>> + getcap -f /etc/login.conf suricata_proxyin_agent
>> + > /dev/null
>> + 2>&1
>> + [ -z  ]
>> + daemon_class=daemon
>> + [ -z  ]
>> + daemon_user=root
>> + [ -n  ]
>> + [ -n  ]
>> + [ -n  ]
>> + printf  %s -c /data/config/etc/sguil/suricata_proxyin_agent.conf -D
>> + daemon_flags= -c /data/config/etc/sguil/suricata_proxyin_agent.conf -D
>> + daemon_flags=-c /data/config/etc/sguil/suricata_proxyin_agent.conf -D
>> + readonly daemon_class
>> + unset _rcflags _rcuser
>> + pexp=/usr/local/bin/suricata_proxyin_agent.tcl -c
>> /data/config/etc/sguil/suricata_proxyin_agent.conf -D
>> + rcexec=su -l -c daemon -s /bin/sh root -c
>> + pexp=/usr/local/bin/tclsh8.5 /usr/local/bin/suricata_proxyin_agent.tcl
>> + rc_cmd stop
>> doing rc_read_runfile
>> doing rc_check
>
> Well it seems to stop at rc_check.
> Maybe the pexp doesn't match.
>

>From command line match:

+ daemon_class=daemon
+ [ -z  ]
+ daemon_user=root
+ [ -n  ]
+ [ -n  ]
+ [ -n  ]
+ printf  %s -c /data/config/etc/sguil/suricata_proxyin_agent.conf -D
+ daemon_flags= -c /data/config/etc/sguil/suricata_proxyin_agent.conf -D
+ daemon_flags=-c /data/config/etc/sguil/suricata_proxyin_agent.conf -D
+ readonly daemon_class
+ unset _rcflags _rcuser
+ pexp=/usr/local/bin/suricata_proxyin_agent.tcl -c
/data/config/etc/sguil/suricata_proxyin_agent.conf -D
+ rcexec=su -l -c daemon -s /bin/sh root -c
+ pexp=/usr/local/bin/tclsh8.5
/usr/local/bin/suricata_proxyin_agent.tcl -c
/data/config/etc/sguil/suricata_proxyin_agent.conf -D
+ rc_cmd stop
doing rc_read_runfile
doing rc_check
root@nsm10:/tmp#
root@nsm10:/tmp# ps xa
  PID TT  STAT   TIME COMMAND
1 ??  Is  0:01.21 /sbin/init
17527 ??  Is  0:00.02 syslogd: [priv] (syslogd)
10721 ??  S   0:00.75 /usr/sbin/syslogd -a /var/www/dev/log -a
/var/empty/dev/log
 6621 ??  Is  0:00.06 pflogd: [priv] (pflogd)
 7793 ??  S   0:04.93 pflogd: [running] -s 160 -i pflog0 -f
/var/log/pflog (pflogd)
  160 ??  Ss  0:00.26 ntpd: ntp engine (ntpd)
 8497 ??  Is  0:00.01 ntpd: dns engine (ntpd)
 2615 ??  Is  0:00.01 ntpd: [priv] (ntpd)
22730 ??  Is  0:00.22 /usr/sbin/sshd
20624 ??  Ss  0:02.80 sendmail: accepting connections (sendmail)
 6481 ??  Is  0:00.03 /usr/sbin/inetd
20209 ??  Ss  0:00.71 /usr/sbin/cron
28761 ??  Is  0:00.63 sshd: root@ttyp0 (sshd)
17173 ??  Ss  0:00.45 sshd: root@ttyp1 (sshd)
30836 p0  Is+ 0:00.18 -ksh (ksh)
31013 p1  Ss  0:00.14 -ksh (ksh)
17680 p1  R+/30:00.28 ps -xa
17486 p2- I   0:00.30 /usr/local/bin/tclsh8.5
/usr/local/bin/suricata_proxyin_agent.tcl -c
/data/config/etc/sguil/suricata_proxyin_agent.conf -D
30991 C0  Is+ 0:00.02 /usr/libexec/getty std.9600 ttyC0
25448 C1  Is+ 0:00.00 /usr/libexec/getty std.9600 ttyC1

root@nsm10:/tmp# export pexp="/usr/local/bin/tclsh8.5
/usr/local/bin/suricata_proxyin_agent.tcl -c
/data/config/etc/sguil/suricata_proxyin_agent.conf -D"
root@nsm10:/tmp# set
COLUMNS=203
HOME=/root
IFS='
'
KSH_VERSION='@(#)PD KSH v5.2.14 99/07/13.2'
LINES=60
LOGNAME=root
MAIL=/var/mail/root
MAILCHECK=600
OLDPWD=/tmp/l/cxtracker-master
OPTIND=1
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin
PKG_PATH=http://ftp.openbsd.org/pub/OpenBSD/5.3/packages/amd64/
PPID=17173
PS1='\u@\h:\w\$ '
PS2='> '
PS3='#? '
PS4='+ '
PWD=/tmp/l/cxtracker-master/src
RANDOM
SECONDS=5105
SHELL=/bin/ksh
TERM=xterm
TERMCAP='xterm:NP:@8=\EOM:K2=\EOE:SF=\E[%dS:SR=\E[%dT:kB=\E[Z:@7=\EOF:kd=\EOB:kh=\EOH:kl=\EOD:kr=\EOC:ku=\EOA:2:F1=\E[23~:F2=\E[24~:F3=\E[1;2P:F4=\E[1;2Q:F5=\E[1;2R:F6=\E[1;2S:F7=\E[15;2~:F8=\E[17;2~:F9=\E[18;2~:FA=\E[19;2~:FB=\E[20;2~:FC=\E[21;2~:FD=\E[23;2~:FE=\E[24;2~:FF=\E[1;5P:FG=\E[1;5Q:FH=\E[1;5R:FI=\E[1;5S:FJ=\E[15;5~:FK=\E[17;5~:FL=\E[18;5~:FM=\E[19;5~:FN=\E[20;5~:FO=\E[21;5~:FP=\E[23;5~:FQ=\E[24;5~:FR=\E[1;6P:FS=\E[1;6Q:FT=\E[1;6R:FU=\E[1;6S:FV=\E[15;6~:FW=\E[17;6~:FX=\E[18;6~:FY=\E[19;6~:FZ=\E[20

Re: Problem with a startup script

2013-05-22 Thread Antoine Jacoutot
On Wed, May 22, 2013 at 06:57:16AM +, C. L. Martinez wrote:
> On Wed, May 22, 2013 at 6:50 AM, Antoine Jacoutot  
> wrote:
> > On Wed, May 22, 2013 at 06:18:04AM +, C. L. Martinez wrote:
> >> Hi all,
> >>
> >>  I have a problem with some tcl rc.d startup scripts. Start and status
> >
> > You mean check instead of status, right?
> 
> Yep, you are rigth Antoine ..
> 
> >
> >> works ok but stop and restart, doesn't.
> >
> > Running the rc script in debug mode may give you some clue (-d).
> >
> 
> 
> Uhmm .. no clues:
> 
> /usr/local/etc/rc.d/suricata_proxyin_agent -d stop
> 
> + [ -n /usr/local/bin/suricata_proxyin_agent.tcl ]
> + unset _RC_DEBUG _RC_FORCE
> + getopts df c
> + _RC_DEBUG=-d
> + getopts df c
> + shift 1
> + basename /usr/local/etc/rc.d/suricata_proxyin_agent
> + _name=suricata_proxyin_agent
> + _RC_RUNDIR=/var/run/rc.d
> + _RC_RUNFILE=/var/run/rc.d/suricata_proxyin_agent
> + eval _rcflags=${suricata_proxyin_agent_flags}
> + _rcflags=
> + eval _rcuser=${suricata_proxyin_agent_user}
> + _rcuser=
> + getcap -f /etc/login.conf suricata_proxyin_agent
> + > /dev/null
> + 2>&1
> + [ -z  ]
> + daemon_class=daemon
> + [ -z  ]
> + daemon_user=root
> + [ -n  ]
> + [ -n  ]
> + [ -n  ]
> + printf  %s -c /data/config/etc/sguil/suricata_proxyin_agent.conf -D
> + daemon_flags= -c /data/config/etc/sguil/suricata_proxyin_agent.conf -D
> + daemon_flags=-c /data/config/etc/sguil/suricata_proxyin_agent.conf -D
> + readonly daemon_class
> + unset _rcflags _rcuser
> + pexp=/usr/local/bin/suricata_proxyin_agent.tcl -c
> /data/config/etc/sguil/suricata_proxyin_agent.conf -D
> + rcexec=su -l -c daemon -s /bin/sh root -c
> + pexp=/usr/local/bin/tclsh8.5 /usr/local/bin/suricata_proxyin_agent.tcl
> + rc_cmd stop
> doing rc_read_runfile
> doing rc_check

Well it seems to stop at rc_check.
Maybe the pexp doesn't match.

> Nothing strange here ...
> 

-- 
Antoine