Folks, I'm running -current from 2019-02-11 (dmesg below) and seeing very slow start up with samba's smbd (4.8.7 version from ports).
It appears to be a recurrence of the issue described here: https://groups.google.com/forum/#!topic/fa.openbsd.tech/yFTn1lyOQQI and here https://bugzilla.samba.org/show_bug.cgi?id=11355 The delay can be seen using this command: LD_DEBUG=1 smbd -D 2>&1 | ts %.s The key piece of output is here, showing a 55s delay after examining /usr/lib/libm.so.10.1: <snip> 1550056982.254470 linking dep /usr/local/lib/libgmp.so.10.0 as child of /usr/local/lib/libhogweed.so.2.0 1550056982.254539 examining: '/usr/local/lib/libgmp.so.10.0' 1550056982.254609 examining: '/usr/local/lib/libsasl2.so.3.1' 1550056982.254678 examining: '/usr/lib/libssl.so.47.3' 1550056982.254747 loading: libcrypto.so.45.3 required by /usr/lib/libssl.so.47.3 1550056982.254816 linking dep /usr/lib/libcrypto.so.45.3 as child of /usr/lib/libssl.so.47.3 1550056982.254886 examining: '/usr/lib/libm.so.10.1' 1550057037.791375 flags /usr/libexec/ld.so = 0x0 1550057037.791565 obj /usr/libexec/ld.so has smbd as head 1550057037.791672 static tls size=0 align=8 offset=0 1550057037.791894 protect RELRO [0x3a05766e000,0x3a05766f000) in /usr/lib/libm.so.10.1 1550057037.793600 protect RELRO [0x3a04047b000,0x3a040480000) in /usr/lib/libssl.so.47.3 </snip> if I compile and link a program, that does nothing, with "_Wl,--as-needed" and the shared libs used by smbd, I see the same kind of delay on startup. Maybe the issue is with ld, but I'm not sure if I am using the --as-needed flag in the correct way. Thanks, -mark OpenBSD 6.4-current (GENERIC.MP) #706: Mon Feb 11 20:59:31 MST 2019 [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 2129461248 (2030MB) avail mem = 2055290880 (1960MB) mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0010 (68 entries) bios0: vendor LENOVO version "7FET96WW (2.14 )" date 12/25/2006 bios0: LENOVO 0674KSG acpi0 at bios0: rev 2 acpi0: sleep states S0 S3 S4 S5 acpi0: tables DSDT FACP SSDT ECDT TCPA APIC MCFG HPET SLIC BOOT SSDT SSDT SSDT SSDT acpi0: wakeup devices LID_(S3) SLPB(S3) EXP0(S4) EXP1(S4) EXP2(S4) EXP3(S4) PCI1(S4) USB0(S3) USB1(S3) USB3(S3) USB7(S3) HDEF(S4) acpitimer0 at acpi0: 3579545 Hz, 24 bits acpiec0 at acpi0 acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz, 1995.35 MHz, 06-0f-06 cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF,SENSOR,MELTDOWN cpu0: 4MB 64b/line 16-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 166MHz cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2, IBE cpu1 at mainbus0: apid 1 (application processor) cpu1: Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz, 1995.01 MHz, 06-0f-06 cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF,SENSOR,MELTDOWN cpu1: 4MB 64b/line 16-way L2 cache cpu1: smt 0, core 1, package 0 ioapic0 at mainbus0: apid 1 pa 0xfec00000, version 20, 24 pins, remapped acpimcfg0 at acpi0 acpimcfg0: addr 0xf0000000, bus 0-63 acpihpet0 at acpi0: 14318179 Hz acpiprt0 at acpi0: bus 0 (PCI0) acpiprt1 at acpi0: bus 1 (AGP_) acpiprt2 at acpi0: bus 2 (EXP0) acpiprt3 at acpi0: bus 3 (EXP1) acpiprt4 at acpi0: bus 4 (EXP2) acpiprt5 at acpi0: bus 12 (EXP3) acpiprt6 at acpi0: bus 21 (PCI1) acpicpu0 at acpi0: !C3(250@17 mwait.3@0x20), !C2(500@1 mwait.1@0x10), C1(1000@1 mwait.1), PSS acpicpu1 at acpi0: !C3(250@17 mwait.3@0x20), !C2(500@1 mwait.1@0x10), C1(1000@1 mwait.1), PSS acpipwrres0 at acpi0: PUBS, resource for USB0, USB7 acpitz0 at acpi0: critical temperature is 127 degC acpitz1 at acpi0: critical temperature is 99 degC acpibtn0 at acpi0: LID_ acpibtn1 at acpi0: SLPB acpicmos0 at acpi0 "IBM0071" at acpi0 not configured tpm0 at acpi0: TPM_ addr 0xfed40000/0x1000: Atmel 97SC3203 rev 0x5 acpibat0 at acpi0: BAT0 model "92P1129" serial 1672 type LION oem "Panasonic" acpiac0 at acpi0: AC unit online acpithinkpad0 at acpi0 acpipci0 at acpi0 PCI0: 0x00000000 0x00000011 0x00000001 acpidock0 at acpi0: GDCK not docked (0) acpivideo0 at acpi0: VID_ acpivout0 at acpivideo0: LCD0 acpivideo1 at acpi0: VID_ acpivout at acpivideo1 not configured cpu0: Enhanced SpeedStep 1995 MHz: speeds: 2000, 1667, 1333, 1000 MHz pci0 at mainbus0 bus 0 pchb0 at pci0 dev 0 function 0 "Intel 82945GM Host" rev 0x03 ppb0 at pci0 dev 1 function 0 "Intel 82945GM PCIE" rev 0x03: msi pci1 at ppb0 bus 1 radeondrm0 at pci1 dev 0 function 0 "ATI FireGL V5200" rev 0x00 drm0 at radeondrm0 radeondrm0: msi azalia0 at pci0 dev 27 function 0 "Intel 82801GB HD Audio" rev 0x02: msi azalia0: codecs: Analog Devices AD1981HD, Conexant/0x2bfa, using Analog Devices AD1981HD audio0 at azalia0 ppb1 at pci0 dev 28 function 0 "Intel 82801GB PCIE" rev 0x02: msi pci2 at ppb1 bus 2 bge0 at pci2 dev 0 function 0 "Broadcom BCM5752M" rev 0x02, BCM5752 A2 (0x6002): msi, address 00:1b:24:0b:8a:27 brgphy0 at bge0 phy 1: BCM5752 10/100/1000baseT PHY, rev. 0 ppb2 at pci0 dev 28 function 1 "Intel 82801GB PCIE" rev 0x02: msi pci3 at ppb2 bus 3 wpi0 at pci3 dev 0 function 0 "Intel PRO/Wireless 3945ABG" rev 0x02: msi, MoW2, address 00:19:d2:b1:ef:f5 ppb3 at pci0 dev 28 function 2 "Intel 82801GB PCIE" rev 0x02: msi pci4 at ppb3 bus 4 ppb4 at pci0 dev 28 function 3 "Intel 82801GB PCIE" rev 0x02: msi pci5 at ppb4 bus 12 uhci0 at pci0 dev 29 function 0 "Intel 82801GB USB" rev 0x02: apic 1 int 16 uhci1 at pci0 dev 29 function 1 "Intel 82801GB USB" rev 0x02: apic 1 int 17 uhci2 at pci0 dev 29 function 2 "Intel 82801GB USB" rev 0x02: apic 1 int 18 uhci3 at pci0 dev 29 function 3 "Intel 82801GB USB" rev 0x02: apic 1 int 19 ehci0 at pci0 dev 29 function 7 "Intel 82801GB USB" rev 0x02: apic 1 int 19 usb0 at ehci0: USB revision 2.0 uhub0 at usb0 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00 addr 1 ppb5 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xe2 pci6 at ppb5 bus 21 cbb0 at pci6 dev 0 function 0 "TI PCIXX12 CardBus" rev 0x00: apic 1 int 16 "TI PCIXX12 FireWire" rev 0x00 at pci6 dev 0 function 1 not configured "TI PCIXX12 Multimedia Card Reader" rev 0x00 at pci6 dev 0 function 2 not configured sdhc0 at pci6 dev 0 function 3 "TI PCIXX12 SD" rev 0x00: apic 1 int 16 sdhc0: SDHC 1.0, 48 MHz base clock sdmmc0 at sdhc0: 4-bit, sd high-speed, mmc high-speed cardslot0 at cbb0 slot 0 flags 0 cardbus0 at cardslot0: bus 22 device 0 cacheline 0x8, lattimer 0xb0 pcmcia0 at cardslot0 pcib0 at pci0 dev 31 function 0 "Intel 82801GBM LPC" rev 0x02 pciide0 at pci0 dev 31 function 1 "Intel 82801GB IDE" rev 0x02: DMA, channel 0 configured to compatibility, channel 1 configured to compatibility atapiscsi0 at pciide0 channel 0 drive 0 scsibus1 at atapiscsi0: 2 targets cd0 at scsibus1 targ 0 lun 0: <MATSHITA, DVD-RAM UJ-850, RB11> ATAPI 5/cdrom removable cd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2 pciide0: channel 1 ignored (disabled) ahci0 at pci0 dev 31 function 2 "Intel 82801GBM AHCI" rev 0x02: msi, AHCI 1.1 ahci0: port 0: 1.5Gb/s scsibus2 at ahci0: 32 targets sd0 at scsibus2 targ 0 lun 0: <ATA, KINGSTON SV300S3, 603A> SCSI3 0/direct fixed naa.50026b775605cd58 sd0: 228936MB, 512 bytes/sector, 468862128 sectors, thin ichiic0 at pci0 dev 31 function 3 "Intel 82801GB SMBus" rev 0x02: apic 1 int 23 iic0 at ichiic0 usb1 at uhci0: USB revision 1.0 uhub1 at usb1 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb2 at uhci1: USB revision 1.0 uhub2 at usb2 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb3 at uhci2: USB revision 1.0 uhub3 at usb3 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb4 at uhci3: USB revision 1.0 uhub4 at usb4 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1 isa0 at pcib0 isadma0 at isa0 pckbc0 at isa0 port 0x60/5 irq 1 irq 12 pckbd0 at pckbc0 (kbd slot) wskbd0 at pckbd0: console keyboard pms0 at pckbc0 (aux slot) wsmouse0 at pms0 mux 0 wsmouse1 at pms0 mux 0 pms0: Synaptics touchpad, firmware 6.2, 0x81a0b1 0x300000 pcppi0 at isa0 port 0x61 spkr0 at pcppi0 aps0 at isa0 port 0x1600/31 ugen0 at uhub3 port 1 "Broadcom Corp BCM2045B" rev 2.00/1.00 addr 2 ugen1 at uhub3 port 2 "STMicroelectronics Biometric Coprocessor" rev 1.00/0.01 addr 3 vscsi0 at root scsibus3 at vscsi0: 256 targets softraid0 at root scsibus4 at softraid0: 256 targets root on sd0a (660795fa2a3e9604.a) swap on sd0b dump on sd0b initializing kernel modesetting (RV530 0x1002:0x71C4 0x17AA:0x202B). radeon_cp: Failed to load firmware "radeon/R520_cp.bin" error: [drm:pid0:r100_cp_init] *ERROR* Failed to load firmware! drm:pid0:r520_startup *ERROR* failed initializing CP (-2). drm:pid0:r520_init *ERROR* Disabling GPU acceleration Can't enable IRQ/MSI because no handler is installed Can't enable IRQ/MSI because no handler is installed radeondrm0: 1024x768, 32bpp wsdisplay0 at radeondrm0 mux 1: console (std, vt100 emulation), using wskbd0 wsdisplay0: screen 1-5 added (std, vt100 emulation) -- Mark Willson [email protected] http://www.hydrus.org.uk

