Re: opensmtpd crashing intermittently
fix commited to -current, thanks Gilles On 09/08/10 02:45, Sacha El Masry wrote: Gilles (or anybody), I've been using smtpd since 4.6-RELEASE, for one domain-several email addresses, plus one constantly receiving mailing list emails (including misc@). It's been great. Problem is, I've just set up smtpd on 4.7-RELEASE, using a very simple ruleset, with the aim of using this as an outgoing only smtp server, for an in-house weekly newsletter, going out to 3000+ recipients. The server crashes intermittently. With smtpd started with the -dvf arguments, I can see where it breaks: ... lookup_a mx2.mail.eu.yahoo.com:0 fatal: dns: fork: Resource temporarily unavailable lookup_ptr success mta: getting datafd lost child: lookup agent exited abnormally queue handler exiting mail filter exiting mail delivery agent exiting control process exiting mail transfer agent exiting smtp server exiting runner handler exiting parent terminating lookup_a success loolookup_ptr success kup_a mx1.mail.eu.yahoo.com:0 lookup_ptr success lookup_a success lookup_mx success fatal: dns_dispatch_parent: msgbuf_write: Broken pipe # (command prompt) # lookup_ptr success fatal: dns_dispatch_parent: msgbuf_write: Broken pipe Obviously, the record being looked up constantly changes, but the crash is always the same: msgbuf_write: Broken pipe. Now, I realise, from reading this list, that smtpd is not meant to be production-ready, but I'm happy to use it (so long as it works) and test it, and send information back to the developers, where relevant. Is this a bug that's been looked at and fixed since -RELEASE? My ruleset: ext_if= re0 listen on $ext_if map aliases { source db /etc/mail/aliases.db } accept for local alias aliases deliver to maildir accept from all for all relay accept for all relay My dmesg follows: OpenBSD 4.7 (GENERIC.MP) #130: Wed Mar 17 20:48:50 MDT 2010 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 2145255424 (2045MB) avail mem = 2078703616 (1982MB) mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf0100 (39 entries) bios0: vendor Award Software International, Inc. version F4 date 04/03/2009 bios0: Gigabyte Technology Co., Ltd. EP41-UD3L acpi0 at bios0: rev 0 acpi0: tables DSDT FACP HPET MCFG APIC SSDT SSDT SSDT SSDT SSDT acpi0: wakeup devices PEX0(S5) PEX1(S5) PEX2(S5) PEX3(S5) PEX4(S5) PEX5(S5) HUB0(S5) UAR1(S3) USB0(S3) USB1(S3) USB2(S3) USB3(S3) USBE(S3) AZAL(S5) PCI0(S5) acpitimer0 at acpi0: 3579545 Hz, 24 bits acpihpet0 at acpi0: 14318179 Hz acpimadt0 at acpi0 addr 0xfee0: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: Pentium(R) Dual-Core CPU E5300 @ 2.60GHz, 2600.28 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,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,CX16,xTPR,NXE,LONG cpu0: 2MB 64b/line 8-way L2 cache cpu0: apic clock running at 199MHz cpu1 at mainbus0: apid 1 (application processor) cpu1: Pentium(R) Dual-Core CPU E5300 @ 2.60GHz, 2599.94 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,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,CX16,xTPR,NXE,LONG cpu1: 2MB 64b/line 8-way L2 cache ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins ioapic0: misconfigured as apic 0, remapped to apid 2 acpiprt0 at acpi0: bus 0 (PCI0) acpiprt1 at acpi0: bus 2 (PEX0) acpiprt2 at acpi0: bus -1 (PEX1) acpiprt3 at acpi0: bus -1 (PEX2) acpiprt4 at acpi0: bus 3 (PEX3) acpiprt5 at acpi0: bus -1 (PEX4) acpiprt6 at acpi0: bus -1 (PEX5) acpiprt7 at acpi0: bus 4 (HUB0) acpicpu0 at acpi0: C3, C2, C1, FVS, 1600, 1200 MHz acpicpu1 at acpi0: C3, C2, C1, FVS, 1600, 1200 MHz acpibtn0 at acpi0: PWRB pci0 at mainbus0 bus 0 pchb0 at pci0 dev 0 function 0 Intel G41 Host rev 0x03 ppb0 at pci0 dev 1 function 0 vendor Intel, unknown product 0x2e31 rev 0x03: apic 2 int 16 (irq 10) pci1 at ppb0 bus 1 vga1 at pci1 dev 0 function 0 ATI Radeon HD 4550 rev 0x00 wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation) wsdisplay0: screen 1-5 added (80x25, vt100 emulation) azalia0 at pci1 dev 0 function 1 ATI Radeon HD 4000 HD Audio rev 0x00: apic 2 int 17 (irq 12) azalia0: no supported codecs azalia0: initialization failure, detaching azalia1 at pci0 dev 27 function 0 Intel 82801GB HD Audio rev 0x01: apic 2 int 16 (irq 10) azalia1: codecs: Realtek ALC888 audio0 at azalia1 ppb1 at pci0 dev 28 function 0 Intel 82801GB PCIE rev 0x01: apic 2 int 16 (irq 10) pci2 at ppb1 bus 2 ppb2 at pci0 dev 28 function 3 Intel 82801GB PCIE rev 0x01: apic 2 int 19 (irq 11) pci3 at ppb2 bus 3 re0 at pci3 dev 0 function 0 Realtek 8168 rev 0x02: RTL8168C/8111C (0x3c00), apic 2 int 19 (irq 11), address 00:24:1d:d0:a2:d8 rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 2 uhci0 at pci0 dev 29 function 0 Intel 82801GB USB rev 0x01: apic 2 int 23 (irq 5) uhci1 at pci0 dev 29 function 1 Intel 82801GB USB rev 0x01: apic 2 int 19 (irq 11) uhci2 at pci0 dev
opensmtpd crashing intermittently
Gilles (or anybody), I've been using smtpd since 4.6-RELEASE, for one domain-several email addresses, plus one constantly receiving mailing list emails (including misc@). It's been great. Problem is, I've just set up smtpd on 4.7-RELEASE, using a very simple ruleset, with the aim of using this as an outgoing only smtp server, for an in-house weekly newsletter, going out to 3000+ recipients. The server crashes intermittently. With smtpd started with the -dvf arguments, I can see where it breaks: ... lookup_a mx2.mail.eu.yahoo.com:0 fatal: dns: fork: Resource temporarily unavailable lookup_ptr success mta: getting datafd lost child: lookup agent exited abnormally queue handler exiting mail filter exiting mail delivery agent exiting control process exiting mail transfer agent exiting smtp server exiting runner handler exiting parent terminating lookup_a success loolookup_ptr success kup_a mx1.mail.eu.yahoo.com:0 lookup_ptr success lookup_a success lookup_mx success fatal: dns_dispatch_parent: msgbuf_write: Broken pipe # (command prompt) # lookup_ptr success fatal: dns_dispatch_parent: msgbuf_write: Broken pipe Obviously, the record being looked up constantly changes, but the crash is always the same: msgbuf_write: Broken pipe. Now, I realise, from reading this list, that smtpd is not meant to be production-ready, but I'm happy to use it (so long as it works) and test it, and send information back to the developers, where relevant. Is this a bug that's been looked at and fixed since -RELEASE? My ruleset: ext_if= re0 listen on $ext_if map aliases { source db /etc/mail/aliases.db } accept for local alias aliases deliver to maildir accept from all for all relay accept for all relay My dmesg follows: OpenBSD 4.7 (GENERIC.MP) #130: Wed Mar 17 20:48:50 MDT 2010 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 2145255424 (2045MB) avail mem = 2078703616 (1982MB) mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf0100 (39 entries) bios0: vendor Award Software International, Inc. version F4 date 04/03/2009 bios0: Gigabyte Technology Co., Ltd. EP41-UD3L acpi0 at bios0: rev 0 acpi0: tables DSDT FACP HPET MCFG APIC SSDT SSDT SSDT SSDT SSDT acpi0: wakeup devices PEX0(S5) PEX1(S5) PEX2(S5) PEX3(S5) PEX4(S5) PEX5(S5) HUB0(S5) UAR1(S3) USB0(S3) USB1(S3) USB2(S3) USB3(S3) USBE(S3) AZAL(S5) PCI0(S5) acpitimer0 at acpi0: 3579545 Hz, 24 bits acpihpet0 at acpi0: 14318179 Hz acpimadt0 at acpi0 addr 0xfee0: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: Pentium(R) Dual-Core CPU E5300 @ 2.60GHz, 2600.28 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,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,CX16,xTPR,NXE,LONG cpu0: 2MB 64b/line 8-way L2 cache cpu0: apic clock running at 199MHz cpu1 at mainbus0: apid 1 (application processor) cpu1: Pentium(R) Dual-Core CPU E5300 @ 2.60GHz, 2599.94 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,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,CX16,xTPR,NXE,LONG cpu1: 2MB 64b/line 8-way L2 cache ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins ioapic0: misconfigured as apic 0, remapped to apid 2 acpiprt0 at acpi0: bus 0 (PCI0) acpiprt1 at acpi0: bus 2 (PEX0) acpiprt2 at acpi0: bus -1 (PEX1) acpiprt3 at acpi0: bus -1 (PEX2) acpiprt4 at acpi0: bus 3 (PEX3) acpiprt5 at acpi0: bus -1 (PEX4) acpiprt6 at acpi0: bus -1 (PEX5) acpiprt7 at acpi0: bus 4 (HUB0) acpicpu0 at acpi0: C3, C2, C1, FVS, 1600, 1200 MHz acpicpu1 at acpi0: C3, C2, C1, FVS, 1600, 1200 MHz acpibtn0 at acpi0: PWRB pci0 at mainbus0 bus 0 pchb0 at pci0 dev 0 function 0 Intel G41 Host rev 0x03 ppb0 at pci0 dev 1 function 0 vendor Intel, unknown product 0x2e31 rev 0x03: apic 2 int 16 (irq 10) pci1 at ppb0 bus 1 vga1 at pci1 dev 0 function 0 ATI Radeon HD 4550 rev 0x00 wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation) wsdisplay0: screen 1-5 added (80x25, vt100 emulation) azalia0 at pci1 dev 0 function 1 ATI Radeon HD 4000 HD Audio rev 0x00: apic 2 int 17 (irq 12) azalia0: no supported codecs azalia0: initialization failure, detaching azalia1 at pci0 dev 27 function 0 Intel 82801GB HD Audio rev 0x01: apic 2 int 16 (irq 10) azalia1: codecs: Realtek ALC888 audio0 at azalia1 ppb1 at pci0 dev 28 function 0 Intel 82801GB PCIE rev 0x01: apic 2 int 16 (irq 10) pci2 at ppb1 bus 2 ppb2 at pci0 dev 28 function 3 Intel 82801GB PCIE rev 0x01: apic 2 int 19 (irq 11) pci3 at ppb2 bus 3 re0 at pci3 dev 0 function 0 Realtek 8168 rev 0x02: RTL8168C/8111C (0x3c00), apic 2 int 19 (irq 11), address 00:24:1d:d0:a2:d8 rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 2 uhci0 at pci0 dev 29 function 0 Intel 82801GB USB rev 0x01: apic 2 int 23 (irq 5) uhci1 at pci0 dev 29 function 1 Intel 82801GB USB rev 0x01: apic 2 int 19 (irq 11) uhci2 at pci0 dev 29 function 2 Intel 82801GB USB rev 0x01: apic 2 int 18 (irq 7) uhci3 at pci0 dev 29
Re: opensmtpd crashing intermittently
Sacha El Masry writes: fatal: dns: fork: Resource temporarily unavailable lost child: lookup agent exited abnormally fatal: dns_dispatch_parent: msgbuf_write: Broken pipe fatal: dns_dispatch_parent: msgbuf_write: Broken pipe These messages make me wonder if you have a problem with RLIMIT_NPROC being too low. Try giving the _smtpd user a higher limit? If you look at fork(2), that and swap are really the only reasons fork should fail. Just a guess, I don't really know.