From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Aug 9 12:00:02 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 76F96D26 for ; Fri, 9 Aug 2013 12:00:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3D8B3233F for ; Fri, 9 Aug 2013 12:00:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r79C02In078311 for ; Fri, 9 Aug 2013 12:00:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r79C02Oj078310; Fri, 9 Aug 2013 12:00:02 GMT (envelope-from gnats) Resent-Date: Fri, 9 Aug 2013 12:00:02 GMT Resent-Message-Id: <201308091200.r79C02Oj078310@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Kai Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CFCE7BDE for ; Fri, 9 Aug 2013 11:56:28 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BC0022322 for ; Fri, 9 Aug 2013 11:56:28 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r79BuRZT018148 for ; Fri, 9 Aug 2013 11:56:27 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r79BuR7j018147; Fri, 9 Aug 2013 11:56:27 GMT (envelope-from nobody) Message-Id: <201308091156.r79BuR7j018147@oldred.freebsd.org> Date: Fri, 9 Aug 2013 11:56:27 GMT From: Kai To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/181160: Port sysutils/bacula-client - All bacula-fd processes killed when upgrading port X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Aug 2013 12:00:02 -0000 >Number: 181160 >Category: ports >Synopsis: Port sysutils/bacula-client - All bacula-fd processes killed when upgrading port >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Aug 09 12:00:01 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Kai >Release: 9.1 >Organization: >Environment: Copyright (c) 1992-2013 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 9.1-STABLE #0: Sun Feb 24 09:20:25 CET 2013 kgal@gemuetlich.free.de:/usr/obj/usr/src/sys/Q6600 amd64 CPU: Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz (2394.05-MHz K8-class CPU) Origin = "GenuineIntel" Id = 0x6fb Family = 0x6 Model = 0xf Stepping = 11 Features=0xbfebfbff Features2=0xe3bd AMD Features=0x20100800 AMD Features2=0x1 TSC: P-state invariant, performance statistics real memory = 8589934592 (8192 MB) avail memory = 8249102336 (7866 MB) Event timer "LAPIC" quality 400 ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs FreeBSD/SMP: 1 package(s) x 4 core(s) cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 cpu2 (AP): APIC ID: 2 cpu3 (AP): APIC ID: 3 ioapic0 irqs 0-23 on motherboard ioapic1 irqs 24-47 on motherboard kbd1 at kbdmux0 cryptosoft0: on motherboard acpi0: on motherboard acpi0: Power Button (fixed) cpu0: on acpi0 cpu1: on acpi0 cpu2: on acpi0 cpu3: on acpi0 atrtc0: port 0x70-0x71 on acpi0 Event timer "RTC" frequency 32768 Hz quality 0 attimer0: port 0x40-0x43,0x50-0x53 on acpi0 Timecounter "i8254" frequency 1193182 Hz quality 0 Event timer "i8254" frequency 1193182 Hz quality 100 hpet0: iomem 0xfed00000-0xfed003ff irq 0,8 on acpi0 Timecounter "HPET" frequency 14318180 Hz quality 950 Event timer "HPET" frequency 14318180 Hz quality 450 Event timer "HPET1" frequency 14318180 Hz quality 440 Event timer "HPET2" frequency 14318180 Hz quality 440 Timecounter "ACPI-fast" frequency 3579545 Hz quality 900 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 pcib1: irq 16 at device 1.0 on pci0 pci1: on pcib1 pcib2: irq 17 at device 28.0 on pci0 pci9: on pcib2 pcib3: at device 0.0 on pci9 pci10: on pcib3 em0: port 0x4000-0x403f mem 0xe0240000-0xe025ffff,0xe0200000-0xe023ffff irq 24 at device 1.0 on pci10 em0: Ethernet address: 00:11:0a:5d:00:fc em1: port 0x4040-0x407f mem 0xe0260000-0xe027ffff irq 25 at device 1.1 on pci10 em1: Ethernet address: 00:11:0a:5d:00:fd pcib4: irq 17 at device 28.4 on pci0 pci13: on pcib4 em2: port 0x5000-0x501f mem 0xe0300000-0xe031ffff irq 16 at device 0.0 on pci13 em2: Using an MSI interrupt em2: Ethernet address: 00:30:48:91:5a:da pcib5: irq 16 at device 28.5 on pci0 pci14: on pcib5 em3: port 0x6000-0x601f mem 0xe0400000-0xe041ffff irq 17 at device 0.0 on pci14 em3: Using an MSI interrupt em3: Ethernet address: 00:30:48:91:5a:db uhci0: port 0x3000-0x301f irq 23 at device 29.0 on pci0 usbus0 on uhci0 uhci1: port 0x3020-0x303f irq 19 at device 29.1 on pci0 usbus1 on uhci1 uhci2: port 0x3040-0x305f irq 18 at device 29.2 on pci0 usbus2 on uhci2 uhci3: port 0x3060-0x307f irq 16 at device 29.3 on pci0 usbus3 on uhci3 ehci0: mem 0xe0000000-0xe00003ff irq 23 at device 29.7 on pci0 usbus4: EHCI version 1.0 usbus4 on ehci0 pcib6: at device 30.0 on pci0 pci15: on pcib6 vgapci0: port 0x7000-0x70ff mem 0xe8000000-0xefffffff,0xe0500000-0xe050ffff irq 16 at device 0.0 on pci15 isab0: at device 31.0 on pci0 isa0: on isab0 ahci0: port 0x30c0-0x30c7,0x30b4-0x30b7,0x30b8-0x30bf,0x30b0-0x30b3,0x30a0-0x30af mem 0xe0000400-0xe00007ff irq 19 at device 31.2 on pci0 ahci0: AHCI v1.10 with 4 3Gbps ports, Port Multiplier not supported ahcich0: at channel 0 on ahci0 ahcich1: at channel 1 on ahci0 ahcich2: at channel 2 on ahci0 ahcich3: at channel 3 on ahci0 pci0: at device 31.3 (no driver attached) acpi_button0: on acpi0 atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] psm0: irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: model IntelliMouse, device ID 3 uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 uart0: console (9600,n,8,1) uart1: <16550 or compatible> port 0x2f8-0x2ff irq 3 on acpi0 fdc0: port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0 ipmi0: on isa0 ipmi0: KCS mode found at io 0xca8 alignment 0x4 on isa orm0: at iomem 0xc0000-0xcafff,0xcb000-0xcc7ff on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 ppc0: cannot reserve I/O port range ctl: CAM Target Layer loaded coretemp0: on cpu0 est0: on cpu0 p4tcc0: on cpu0 coretemp1: on cpu1 est1: on cpu1 p4tcc1: on cpu1 coretemp2: on cpu2 est2: on cpu2 p4tcc2: on cpu2 coretemp3: on cpu3 est3: on cpu3 p4tcc3: on cpu3 ZFS filesystem version: 5 ZFS storage pool version: features support (5000) Timecounters tick every 1.000 msec IPsec: Initialized Security Association Processing. usbus0: 12Mbps Full Speed USB v1.0 usbus1: 12Mbps Full Speed USB v1.0 ugen0.1: at usbus0 uhub0: on usbus0 ugen1.1: at usbus1 uhub1: on usbus1 usbus2: 12Mbps Full Speed USB v1.0 usbus3: 12Mbps Full Speed USB v1.0 ugen2.1: at usbus2 uhub2: on usbus2 ugen3.1: at usbus3 uhub3: on usbus3 usbus4: 480Mbps High Speed USB v2.0 ugen4.1: at usbus4 uhub4: on usbus4 uhub0: 2 ports with 2 removable, self powered ipmi0: IPMI device rev. 0, firmware rev. 14.44, version 2.0 uhub1: 2 ports with 2 removable, self powered ipmi0: Number of channels 4 ipmi0: Attached watchdog uhub2: 2 ports with 2 removable, self powered uhub3: 2 ports with 2 removable, self powered ada0 at ahcich0 bus 0 scbus0 target 0 lun 0 ada0: ATA-8 SATA 1.x device ada0: 150.000MB/s transfers (SATA 1.x, UDMA6, PIO 8192bytes) ada0: Command Queueing enabled ada0: 953869MB (1953525168 512 byte sectors: 16H 63S/T 16383C) ada0: Previously was known as ad4 SMP: AP CPU #3 Launched! SMP: AP CPU #2 Launched! SMP: AP CPU #1 Launched! Timecounter "TSC-low" frequency 1197023778 Hz quality 1000 Root mount waiting for: usbus4 Root mount waiting for: usbus4 Root mount waiting for: usbus4 uhub4: 8 ports with 8 removable, self powered Trying to mount root from zfs:rpool/ROOT/9-STABLE-20130222 []... em0: link state changed to DOWN lagg0: link state changed to DOWN vlan6: link state changed to DOWN em0: link state changed to UP lagg0: link state changed to UP vlan6: link state changed to UP pid 90649 (try), uid 0: exited on signal 10 pid 62402 (try), uid 0: exited on signal 10 pid 91652 (try), uid 0: exited on signal 10 Limiting closed port RST response from 221 to 200 packets/sec Limiting closed port RST response from 556 to 200 packets/sec Limiting closed port RST response from 518 to 200 packets/sec Limiting closed port RST response from 358 to 200 packets/sec Limiting closed port RST response from 489 to 200 packets/sec Limiting closed port RST response from 251 to 200 packets/sec Limiting closed port RST response from 268 to 200 packets/sec Limiting closed port RST response from 291 to 200 packets/sec pid 13135 (try), uid 0: exited on signal 10 pid 24799 (try), uid 0: exited on signal 10 pid 35132 (try), uid 0: exited on signal 10 pid 35369 (try), uid 0: exited on signal 10 pid 43398 (try), uid 0: exited on signal 10 pid 14157 (try), uid 0: exited on signal 10 Limiting closed port RST response from 201 to 200 packets/sec Limiting closed port RST response from 227 to 200 packets/sec Limiting closed port RST response from 206 to 200 packets/sec Limiting closed port RST response from 224 to 200 packets/sec Limiting closed port RST response from 244 to 200 packets/sec ugen4.2: at usbus4 umass0: on usbus4 umass0: SCSI over Bulk-Only; quirks = 0x4100 umass0:5:0:-1: Attached to scbus5 da0 at umass-sim0 bus 0 scbus5 target 0 lun 0 da0: Removable Direct Access SCSI-2 device da0: 40.000MB/s transfers da0: 3830MB (7843840 512 byte sectors: 255H 63S/T 488C) >Description: * FreeBSD Port sysutils/bacula-client and "killall" in pkg-plist.client * Upgrading bacula-client on a jail server running jails with other bacula-client processes ("bacula-fd") kills all bacula-cient processes. They do not get restartet afer upgrading.. $cat /usr/ports/sysutils/bacula-server/pkg-plist.client lib/libbac.la lib/libbac.so lib/libbac.so.%%MAJOR%% lib/libbaccfg.la lib/libbaccfg.so lib/libbaccfg.so.%%MAJOR%% lib/libbacfind.la lib/libbacfind.so lib/libbacfind.so.%%MAJOR%% lib/libbacpy.la lib/libbacpy.so lib/libbacpy.so.%%MAJOR%% lib/bpipe-fd.so sbin/bacula-fd sbin/bconsole @unexec /usr/bin/killall bacula-fd > /dev/null 2>&1 || true @exec mkdir -p %%BACULA_DIR%% @dirrmtry %%BACULA_DIR%% @dirrmtry share/bacula Here you are using "@unexec /usr/bin/killall bacula-fd > /dev/null 2>&1 || true" I maintain some multijail-servers hosting about 50 jails per server and I have bacula-client running on the jail-host itself and also inside on a great part of the jails (because this makes it easier for me to relocate jails to different jail-hosts and not having to worry that they are actually being backepd up, also because bacula-server becomes unusable slow when restoring to a bacula-client hosting millions of files or many jails - I guess database limitations.) If I do a pkg upgrade of bacula-client on the jail-host, "killall" is killing all running bacula-fd processes on the jailhost, also the bacula-fd processes inside all of the jails. >How-To-Repeat: Upgrade bacula-client on a jail-host running bacula-client inside hosted jails. >Fix: I propose the following patch for pkg-plist.client: --- pkg-plist.client 2012-12-16 17:32:45.000000000 +0100 +++ pkg-plist.client.patched 2013-07-08 11:25:05.092088611 +0200 @@ -13,7 +13,7 @@ lib/bpipe-fd.so sbin/bacula-fd sbin/bconsole -@unexec /usr/bin/killall bacula-fd > /dev/null 2>&1 || true +@unexec kill `cat /var/run/bacula-fd*.pid` > /dev/null 2>&1 || true @exec mkdir -p %%BACULA_DIR%% @dirrmtry %%BACULA_DIR%% @dirrmtry share/bacula This of course makes the assumption that there is bacula-fd .pid file in /var/run Looking at /usr/local/etc/bacula-fd.conf.sample I assume it is the common case that users have "Pid Directory = /var/run" confuigured into bacula-fd.conf The more universal solution would be to come up with a short script that a) uses pkill for killing purposes b) checks if it is running inside or outside a jail (sysctl) c) makes sure pkill only shoots down the wanted bacula-fd process inside (jailed) or outside (host). Besides: Why not use the bacula rc script in /usr/local/etc/rc.d/ for stopping/starting bacula-client? I think this could be achieved by using "@stopdaemon bacula-fd" in pkg-plist.client I'd favour a solution where portupgrade stops bacula-fd by using the rc script, upgrades the port and then starts bacula-fd (also by rc script). >Release-Note: >Audit-Trail: >Unformatted: