relayd crash on load/reload

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

relayd crash on load/reload

trondd-2
Relayd is crashing on configuration reload.

I am running a snapshot from 4/18 but running the relayd source from CVS
as of 4/26.

I am running "relayd -d -f /etc/relayd.conf".  It will also crash when
daemonized.

Run "relayctl reload", sometimes takes 2 or three invocations.

Output:
# relayd -d -f /etc/relayd.conf
startup
protocol 1: name test1
         flags: used, relay flags:
         tcp flags: nodelay, sack, socket buffer size
         type: http
adding 1 hosts from table test1:8080 (no check)
adding 1 hosts from table test1:8080 (no check)
adding 1 hosts from table test1:8080 (no check)
protocol 1: name test1
         flags: used, relay flags:
         tcp flags: nodelay, sack, socket buffer size
         type: http
hce exiting, pid 10254
fatal: parent: Broken pipe
ca exiting, pid 16426
ca exiting, pid 25491
pfe exiting, pid 26479
ca exiting, pid 15412
relay exiting, pid 17354
relay exiting, pid 23961

Also, sometimes get the core dump:

# relayd -d -f /etc/relayd.conf
startup
protocol 1: name test1
         flags: used, relay flags:
         tcp flags: nodelay, sack, socket buffer size
         type: http
adding 1 hosts from table test1:8080 (no check)
adding 1 hosts from table test1:8080 (no check)
adding 1 hosts from table test1:8080 (no check)
protocol 1: name test1
         flags: used, relay flags:
         tcp flags: nodelay, sack, socket buffer size
         type: http
adding 1 hosts from table test1:8080 (no check)
adding 1 hosts from table test1:8080 (no check)
adding 1 hosts from table test1:8080 (no check)
protocol 1: name test1
         flags: used, relay flags:
         tcp flags: nodelay, sack, socket buffer size
         type: http
adding 1 hosts from table test1:8080 (no check)
adding 1 hosts from table test1:8080 (no check)
adding 1 hosts from table test1:8080 (no check)
pfe exiting, pid 4832
ca exiting, pid 32218
ca exiting, pid 22794
ca exiting, pid 18534
Segmentation fault (core dumped)
hce exiting, pid 2281
relay exiting, pid 11139
relay exiting, pid 13802
relay exiting, pid 31645


# gdb relayd

GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "amd64-unknown-openbsd5.7"...
(gdb) run -d -f /etc/relayd.conf
Starting program: /usr/src/usr.sbin/relayd/relayd -d -f /etc/relayd.conf
startup
[New process 8136]
protocol 1: name test1
         flags: used, relay flags:
         tcp flags: nodelay, sack, socket buffer size
         type: http
adding 1 hosts from table test1:8080 (no check)
adding 1 hosts from table test1:8080 (no check)
adding 1 hosts from table test1:8080 (no check)
protocol 1: name test1
         flags: used, relay flags:
         tcp flags: nodelay, sack, socket buffer size
         type: http
adding 1 hosts from table test1:8080 (no check)
adding 1 hosts from table test1:8080 (no check)
adding 1 hosts from table test1:8080 (no check)

Program received signal SIGSEGV, Segmentation fault.
0x0000183478b09b5b in table_inherit (tb=0x1836a6b04000) at parse.y:3128
3128                    TAILQ_INSERT_TAIL(&conf->sc_hosts, h,
globalentry);
(gdb) bt
#0  0x0000183478b09b5b in table_inherit (tb=0x1836a6b04000) at
parse.y:3128
#1  0x0000183478b0b429 in yyparse () at parse.y:705
#2  0x0000183478b0f227 in load_config (filename=Variable "filename" is
not available.
) at parse.y:2653
#3  0x0000183478b29b61 in parent_reload (env=0x18369c987000, reset=0,
filename=0x7f7ffffc883e "/etc/relayd.conf") at relayd.c:367
#4  0x0000183478b29e4e in parent_dispatch_pfe (fd=Variable "fd" is not
available.
) at relayd.c:449
#5  0x0000183478b1c41a in proc_dispatch (fd=6, event=Variable "event" is
not available.
) at proc.c:481
#6  0x0000183776d79218 in event_base_loop (base=0x1836cb881c00,
flags=Variable "flags" is not available.
) at /usr/src/lib/libevent/event.c:350
#7  0x0000183478b2a36d in main (argc=Variable "argc" is not available.
) at relayd.c:278
(gdb)


relayd.conf:

# $OpenBSD: relayd.conf,v 1.3 2014/12/12 10:05:09 reyk Exp $
#
# Macros
#
ext_addr="192.168.1.1"
webhost1="10.0.0.1"
webhost2="10.0.0.2"
sshhost1="10.0.0.3"

#
# Global Options
#
# interval 10
# timeout 1000
# prefork 5

#
# Each table will be mapped to a pf table.
#
table <test1> { 127.0.0.1 }

#
# Relay and protocol for HTTP layer 7 loadbalancing and SSL/TLS
acceleration
#
http protocol test1 {
         # Various TCP performance options
         tcp { nodelay, sack, socket buffer 65536, backlog 128 }
}

relay www1 {
         listen on 127.0.0.1 port 80
         protocol test1

         forward to <test1> port 8080
}

dmesg:

OpenBSD 5.7-current (RAMDISK_CD) #853: Sat Apr 18 15:21:00 MDT 2015
     [hidden email]:/usr/src/sys/arch/amd64/compile/RAMDISK_CD
real mem = 4242014208 (4045MB)
avail mem = 4111736832 (3921MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.5 @ 0xfcfa0 (38 entries)
bios0: vendor American Megatrends Inc. version "206" date 02/14/2011
bios0: ASUSTeK Computer Inc. P50IJ
acpi0 at bios0: rev 2
acpi0: ATKG checksum error
acpi0: tables DSDT FACP APIC MCFG SLIC ECDT DBGP BOOT OEMB HPET GSCI
ATKG SSDT
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Pentium(R) Dual-Core CPU T4500 @ 2.30GHz, 2194.90 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,EST,TM2,SSSE3,CX16,xTPR,PDCM,XSAVE,NXE,LONG,LAHF,PERF
cpu0: 1MB 64b/line 4-way L2 cache
cpu0: apic clock running at 199MHz
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins
acpiec0 at acpi0
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 2 (P0P2)
acpiprt2 at acpi0: bus -1 (P0P3)
acpiprt3 at acpi0: bus 3 (P0P7)
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel GM45 Host" rev 0x09
vga1 at pci0 dev 2 function 0 "Intel GM45 Video" rev 0x09
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
"Intel GM45 Video" rev 0x09 at pci0 dev 2 function 1 not configured
uhci0 at pci0 dev 26 function 0 "Intel 82801I USB" rev 0x03: apic 2 int
16
uhci1 at pci0 dev 26 function 1 "Intel 82801I USB" rev 0x03: apic 2 int
21
uhci2 at pci0 dev 26 function 2 "Intel 82801I USB" rev 0x03: apic 2 int
19
ehci0 at pci0 dev 26 function 7 "Intel 82801I USB" rev 0x03: apic 2 int
18
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
"Intel 82801I HD Audio" rev 0x03 at pci0 dev 27 function 0 not
configured
ppb0 at pci0 dev 28 function 0 "Intel 82801I PCIE" rev 0x03
pci1 at ppb0 bus 1
ppb1 at pci0 dev 28 function 1 "Intel 82801I PCIE" rev 0x03
pci2 at ppb1 bus 2
athn0 at pci2 dev 0 function 0 "Atheros AR9285" rev 0x01: apic 2 int 17
athn0: AR9285 rev 2 (1T1R), ROM rev 13, address 1c:4b:d6:c6:cb:7e
ppb2 at pci0 dev 28 function 5 "Intel 82801I PCIE" rev 0x03: msi
pci3 at ppb2 bus 3
ale0 at pci3 dev 0 function 0 "Attansic Technology L1E" rev 0xb0:
AR8121, msi, address 48:5b:39:6e:d9:c1
atphy0 at ale0 phy 0: F1 10/100/1000 PHY, rev. 9
uhci3 at pci0 dev 29 function 0 "Intel 82801I USB" rev 0x03: apic 2 int
23
uhci4 at pci0 dev 29 function 1 "Intel 82801I USB" rev 0x03: apic 2 int
19
uhci5 at pci0 dev 29 function 2 "Intel 82801I USB" rev 0x03: apic 2 int
18
ehci1 at pci0 dev 29 function 7 "Intel 82801I USB" rev 0x03: apic 2 int
23
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb3 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0x93
pci4 at ppb3 bus 4
"Intel 82801IBM LPC" rev 0x03 at pci0 dev 31 function 0 not configured
ahci0 at pci0 dev 31 function 2 "Intel 82801I AHCI" rev 0x03: msi, AHCI
1.2
ahci0: port 0: 3.0Gb/s
ahci0: port 1: 1.5Gb/s
scsibus0 at ahci0: 32 targets
sd0 at scsibus0 targ 0 lun 0: <ATA, WDC WD3200BEVT-8, 01.0> SCSI3
0/direct fixed naa.50014ee6aabb8053
sd0: 305245MB, 512 bytes/sector, 625142448 sectors
cd0 at scsibus0 targ 1 lun 0: <HL-DT-ST, DVDRAM GT32N, AS01> ATAPI
5/cdrom removable
usb2 at uhci0: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci1: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb4 at uhci2: USB revision 1.0
uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb5 at uhci3: USB revision 1.0
uhub5 at usb5 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb6 at uhci4: USB revision 1.0
uhub6 at usb6 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb7 at uhci5: USB revision 1.0
uhub7 at usb7 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at mainbus0
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
pckbc0: using irq 12 for aux slot
"Sonix Technology Co., Ltd. USB 2.0 Camera" rev 2.00/12.11 addr 2 at
uhub0 port 3 not configured
softraid0 at root
scsibus1 at softraid0: 256 targets
sd1 at scsibus1 targ 1 lun 0: <OPENBSD, SR CRYPTO, 005> SCSI2 0/direct
fixed
sd1: 204804MB, 512 bytes/sector, 419440493 sectors
root on rd0a swap on rd0b dump on rd0b
syncing disks...
OpenBSD 5.7-current (GENERIC.MP) #932: Sat Apr 18 15:16:07 MDT 2015
     [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4242014208 (4045MB)
avail mem = 4109602816 (3919MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.5 @ 0xfcfa0 (38 entries)
bios0: vendor American Megatrends Inc. version "206" date 02/14/2011
bios0: ASUSTeK Computer Inc. P50IJ
acpi0 at bios0: rev 2
acpi0: ATKG checksum error
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC MCFG SLIC ECDT DBGP BOOT OEMB HPET GSCI
ATKG SSDT
acpi0: wakeup devices USB0(S3) USB1(S3) USB2(S3) USB5(S3) EUSB(S3)
USB3(S3) USB4(S3) USB6(S3) USBE(S3) HDAC(S3) P0P1(S3) P0P3(S3) P0P5(S3)
P0P6(S3) P0P7(S4) GLAN(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Pentium(R) Dual-Core CPU T4500 @ 2.30GHz, 2194.90 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,EST,TM2,SSSE3,CX16,xTPR,PDCM,XSAVE,NXE,LONG,LAHF,PERF
cpu0: 1MB 64b/line 4-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 199MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.2.0, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Pentium(R) Dual-Core CPU T4500 @ 2.30GHz, 2194.50 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,EST,TM2,SSSE3,CX16,xTPR,PDCM,XSAVE,NXE,LONG,LAHF,PERF
cpu1: 1MB 64b/line 4-way L2 cache
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xe0000000, bus 0-255
acpiec0 at acpi0
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 2 (P0P2)
acpiprt2 at acpi0: bus -1 (P0P3)
acpiprt3 at acpi0: bus 3 (P0P7)
acpicpu0 at acpi0: C3, C2, C1, PSS
acpicpu1 at acpi0: C3, C2, C1, PSS
acpitz0 at acpi0: critical temperature is 111 degC
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT0 model "F82--22" serial   type LIon oem "ASUSTEK"
acpiasus at acpi0 not configured
acpibtn0 at acpi0: SLPB
acpibtn1 at acpi0: LID_
cpu0: Enhanced SpeedStep 2194 MHz: speeds: 2300, 1600, 1200 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel GM45 Host" rev 0x09
vga1 at pci0 dev 2 function 0 "Intel GM45 Video" rev 0x09
intagp0 at vga1
agp0 at intagp0: aperture at 0xd0000000, size 0x10000000
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 0x09 at pci0 dev 2 function 1 not configured
uhci0 at pci0 dev 26 function 0 "Intel 82801I USB" rev 0x03: apic 2 int
16
uhci1 at pci0 dev 26 function 1 "Intel 82801I USB" rev 0x03: apic 2 int
21
uhci2 at pci0 dev 26 function 2 "Intel 82801I USB" rev 0x03: apic 2 int
19
ehci0 at pci0 dev 26 function 7 "Intel 82801I USB" rev 0x03: apic 2 int
18
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: VIA/0x0397
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 82801I PCIE" rev 0x03
pci1 at ppb0 bus 1
ppb1 at pci0 dev 28 function 1 "Intel 82801I PCIE" rev 0x03
pci2 at ppb1 bus 2
athn0 at pci2 dev 0 function 0 "Atheros AR9285" rev 0x01: apic 2 int 17
athn0: AR9285 rev 2 (1T1R), ROM rev 13, address 1c:4b:d6:c6:cb:7e
ppb2 at pci0 dev 28 function 5 "Intel 82801I PCIE" rev 0x03: msi
pci3 at ppb2 bus 3
ale0 at pci3 dev 0 function 0 "Attansic Technology L1E" rev 0xb0:
AR8121, msi, address 48:5b:39:6e:d9:c1
atphy0 at ale0 phy 0: F1 10/100/1000 PHY, rev. 9
uhci3 at pci0 dev 29 function 0 "Intel 82801I USB" rev 0x03: apic 2 int
23
uhci4 at pci0 dev 29 function 1 "Intel 82801I USB" rev 0x03: apic 2 int
19
uhci5 at pci0 dev 29 function 2 "Intel 82801I USB" rev 0x03: apic 2 int
18
ehci1 at pci0 dev 29 function 7 "Intel 82801I USB" rev 0x03: apic 2 int
23
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb3 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0x93
pci4 at ppb3 bus 4
pcib0 at pci0 dev 31 function 0 "Intel 82801IBM LPC" rev 0x03
ahci0 at pci0 dev 31 function 2 "Intel 82801I AHCI" rev 0x03: msi, AHCI
1.2
ahci0: port 0: 3.0Gb/s
ahci0: port 1: 1.5Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, WDC WD3200BEVT-8, 01.0> SCSI3
0/direct fixed naa.50014ee6aabb8053
sd0: 305245MB, 512 bytes/sector, 625142448 sectors
cd0 at scsibus1 targ 1 lun 0: <HL-DT-ST, DVDRAM GT32N, AS01> ATAPI
5/cdrom removable
usb2 at uhci0: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci1: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb4 at uhci2: USB revision 1.0
uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb5 at uhci3: USB revision 1.0
uhub5 at usb5 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb6 at uhci4: USB revision 1.0
uhub6 at usb6 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb7 at uhci5: USB revision 1.0
uhub7 at usb7 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at pcib0
isadma0 at isa0
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
pms0: Elantech Touchpad, version 2, firmware 0x40101
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
uvideo0 at uhub0 port 3 configuration 1 interface 0 "Sonix Technology
Co., Ltd. USB 2.0 Camera" rev 2.00/12.11 addr 2
video0 at uvideo0
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
sd1 at scsibus3 targ 1 lun 0: <OPENBSD, SR CRYPTO, 005> SCSI2 0/direct
fixed
sd1: 204804MB, 512 bytes/sector, 419440493 sectors
root on sd1a (31ab7a6141794c2c.a) swap on sd1b dump on sd1b
sd2 at scsibus3 targ 2 lun 0: <OPENBSD, SR CRYPTO, 005> SCSI2 0/direct
fixed
sd2: 92240MB, 512 bytes/sector, 188907807 sectors