From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Jun 5 13:00:02 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F4721065671 for ; Thu, 5 Jun 2008 13:00:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 0F93B8FC36 for ; Thu, 5 Jun 2008 13:00:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m55D01l9038578 for ; Thu, 5 Jun 2008 13:00:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m55D01dt038577; Thu, 5 Jun 2008 13:00:01 GMT (envelope-from gnats) Resent-Date: Thu, 5 Jun 2008 13:00:01 GMT Resent-Message-Id: <200806051300.m55D01dt038577@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, Marcin Kucharczyk Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E83191065670 for ; Thu, 5 Jun 2008 12:52:15 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id D1CCC8FC17 for ; Thu, 5 Jun 2008 12:52:15 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m55CqFxS010780 for ; Thu, 5 Jun 2008 12:52:15 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m55CqFcw010779; Thu, 5 Jun 2008 12:52:15 GMT (envelope-from nobody) Message-Id: <200806051252.m55CqFcw010779@www.freebsd.org> Date: Thu, 5 Jun 2008 12:52:15 GMT From: Marcin Kucharczyk To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/124300: Some application doesn't start properly after system crash X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2008 13:00:02 -0000 >Number: 124300 >Category: ports >Synopsis: Some application doesn't start properly after system crash >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jun 05 13:00:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Marcin Kucharczyk >Release: 6.2 RELEASE >Organization: >Environment: FreeBSD main.mini.net.pl 6.2-RELEASE-p7 FreeBSD 6.2-RELEASE-p7 #8: Tue Oct 2 11:37:29 CEST 2007 marcinkk@main.mini.net.pl:/usr/obj/usr/src/sys/MAIN amd64 FreeBSD backup.mini.net.pl 6.2-RELEASE-p11 FreeBSD 6.2-RELEASE-p11 #4: Wed Apr 9 23:10:10 CEST 2008 marcinkk@backup.mini.net.pl:/usr/obj/usr/src/sys/BACKUP i386 >Description: The description is from samba-list. I've posted the problem there some time ago: ----------------------------------------- I have a problem with samba 3.0.26a (from ports) on FreeBSD (amd64, SMP, 6.2 RELEASE). My log.smbd looks like below: --- samba starts normally: [2007/11/24 16:55:22, 0] smbd/server.c:main(944) smbd version 3.0.26a started. Copyright Andrew Tridgell and the Samba Team 1992-2007 --- but an error is reported: [2007/11/24 16:55:22, 0] /usr/ports/net/samba3/work/samba-3.0.26a/source/lib/pidfile.c:pidfile_create(112) ERROR: smbd is already running. File /var/run/smbd.pid exists and process id 1961 is running. --- /var/run/smbd.pid exists, becase the error is created after unexpected system shutdown... --- next I can see in log.smbd: [2007/11/24 16:59:53, 0] lib/util_tdb.c:tdb_log(662) tdb(/var/db/samba/gencache.tdb): tdb_reopen: open failed (No such file or directory) [2007/11/24 16:59:53, 0] smbd/server.c:open_sockets_smbd(572) tdb_reopen_all failed. [2007/11/24 16:59:53, 0] lib/util.c:smb_panic(1632) PANIC (pid 2621): tdb_reopen_all failed. [2007/11/24 16:59:53, 0] lib/fault.c:fault_report(41) =============================================================== [2007/11/24 16:59:53, 0] lib/fault.c:fault_report(42) INTERNAL ERROR: Signal 11 in pid 2621 (3.0.26a) Please read the Trouble-Shooting section of the Samba3-HOWTO [2007/11/24 16:59:53, 0] lib/fault.c:fault_report(44) From: http://www.samba.org/samba/docs/Samba3-HOWTO.pdf [2007/11/24 16:59:53, 0] lib/fault.c:fault_report(45) =============================================================== [2007/11/24 16:59:53, 0] lib/util.c:smb_panic(1632) PANIC (pid 2621): internal error [2007/11/24 16:59:53, 0] lib/util_tdb.c:tdb_log(662) tdb(/var/db/samba/gencache.tdb): tdb_reopen: open failed (No such file or directory) [2007/11/24 16:59:53, 0] smbd/server.c:open_sockets_smbd(572) tdb_reopen_all failed. [2007/11/24 16:59:53, 0] lib/util.c:smb_panic(1632) PANIC (pid 2622): tdb_reopen_all failed. [2007/11/24 16:59:53, 0] lib/fault.c:fault_report(41) =============================================================== [2007/11/24 16:59:53, 0] lib/fault.c:fault_report(42) INTERNAL ERROR: Signal 11 in pid 2622 (3.0.26a) Please read the Trouble-Shooting section of the Samba3-HOWTO [2007/11/24 16:59:53, 0] lib/fault.c:fault_report(44) From: http://www.samba.org/samba/docs/Samba3-HOWTO.pdf [2007/11/24 16:59:53, 0] lib/fault.c:fault_report(45) --- the error is repeated about 100 times ... and it is still repeated. Next I can see in the top a lot of run smbd processes. System load grows and smbd makes it unresponsible. Connection with ssh is impossible, I can only use (with problems) console. Command "killall -9 smbd" helps, system goes back to normal work. -------------------------------------------- Samba 3.0.24 doesn't produce such many processes and system is ok, but log.smbd is full od panic problems and SMB protocol doesn't work. -------------------------------------------- After killall sometimes "/usr/local/etc/rc.d/samba restart" is enough but sometimes it is necessary to clear all files from /var/db/samba/ and then run samba again... On 3.0.24 "/usr/local/etc/rc.d/samba restart" works ok. >How-To-Repeat: I'm not sure, but the problem repeats after every hard reboot - after shutdown on power loss :( >Fix: I'm not sure, but I noticed some things last time ... Problem is because system crashed and some files are damaged. After power loss system starts fsck to correct all fs problems. What is the filesystem state when backgroud fsck is running? Is it read only mode? If yes, maybe it makes the problem with samba start? It looks like samba problem. If filesystem is in read only mode, then maybe smbd start should be delayed? Is it possible to run "/usr/local/etc/rc.d/samba start" on system boot after fsck finishes? >Release-Note: >Audit-Trail: >Unformatted: