Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Jun 2008 12:52:15 GMT
From:      Marcin Kucharczyk <marcinkk@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/124300: Some application doesn't start properly after system crash
Message-ID:  <200806051252.m55CqFcw010779@www.freebsd.org>
Resent-Message-ID: <200806051300.m55D01dt038577@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200806051252.m55CqFcw010779>