Bug 9482 - bind interface only=yes (core dump)
Summary: bind interface only=yes (core dump)
Status: RESOLVED INVALID
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: Other (show other bugs)
Version: 4.0.0
Hardware: x64 Linux
: P5 critical (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-08 20:09 UTC by Sergey Sidlyarenko
Modified: 2013-08-28 22:38 UTC (History)
2 users (show)

See Also:


Attachments
core dump (2.09 MB, application/zip)
2012-12-08 20:12 UTC, Sergey Sidlyarenko
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Sidlyarenko 2012-12-08 20:09:31 UTC
'bind interfaces only = Yes' core dump.


Debian sid
Linux ns 3.2.0-4-amd64 #1 SMP Debian 3.2.32-1 x86_64 GNU/Linux

---------

# Global parameters
[global]
        workgroup = WORKGROUP
        realm = DC.LEFOYER.RU
        netbios name = NS
        interfaces = 192.168.101.4/32
        bind interfaces only = Yes
        server role = active directory domain controller
        passdb backend = samba4
        allow dns updates = nonsecure and secure
        dns forwarder = 127.0.0.1
        server services = smb, rpc, nbt, wrepl, ldap, cldap, kdc, drepl, winbind, ntp_signd, kcc, dnsupdate, dns, s3fs

---------

br0       Link encap:Ethernet  HWaddr 00:1d:60:6c:91:be
          inet addr:192.168.101.2  Bcast:192.168.101.255  Mask:255.255.255.0

br0:0     Link encap:Ethernet  HWaddr 00:1d:60:6c:91:be
          inet addr:192.168.101.3  Bcast:192.168.101.255  Mask:255.255.255.0

br0:1     Link encap:Ethernet  HWaddr 00:1d:60:6c:91:be
          inet addr:192.168.101.4  Bcast:192.168.101.255  Mask:255.255.255.0

---------


service samba4 start

cat /var/log/samba/log.smbd

[2012/12/09 00:06:38,  0] ../source3/smbd/server.c:1200(main)
  smbd version 4.0.0rc6 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2012
[2012/12/09 00:06:38.885594,  0] ../source3/smbd/server.c:1280(main)
  standard input is not a socket, assuming -D option
[2012/12/09 00:06:39.733393,  0] ../source3/lib/util_sock.c:485(open_socket_in)
  bind failed on port 445 socket_addr = 192.168.101.4.
  Error = Адрес уже используется
[2012/12/09 00:06:39.734119,  0] ../source3/smbd/server.c:684(smbd_open_one_socket)
  smbd_open_once_socket: open_socket_in: Адрес уже используется
[2012/12/09 00:06:39.734237,  0] ../source3/lib/util_sock.c:485(open_socket_in)
  bind failed on port 139 socket_addr = 192.168.101.4.
  Error = Адрес уже используется
[2012/12/09 00:06:39.734382,  0] ../source3/smbd/server.c:684(smbd_open_one_socket)
  smbd_open_once_socket: open_socket_in: Адрес уже используется
[2012/12/09 00:06:39.734477,  0] ../source3/smbd/server.c:848(open_sockets_smbd)
  open_sockets_smbd: No sockets available to bind to.
[2012/12/09 00:06:39.734915,  0] ../source3/smbd/server_exit.c:205(exit_server_common)
  ===============================================================
[2012/12/09 00:06:39.735054,  0] ../source3/smbd/server_exit.c:207(exit_server_common)
  Abnormal server exit: open_sockets_smbd() failed
[2012/12/09 00:06:39.735134,  0] ../source3/smbd/server_exit.c:208(exit_server_common)
  ===============================================================
[2012/12/09 00:06:39.735718,  0] ../source3/lib/util.c:921(log_stack_trace)
  BACKTRACE: 7 stack frames:
   #0 /usr/lib/x86_64-linux-gnu/libsmbconf.so.0(log_stack_trace+0x1f) [0x7ff0a4fac322]
   #1 /usr/lib/x86_64-linux-gnu/samba/libsmbd_base.so(+0x1b762c) [0x7ff0a640062c]
   #2 /usr/lib/x86_64-linux-gnu/samba/libsmbd_base.so(smbd_exit_server_cleanly+0) [0x7ff0a64006e5]
   #3 /usr/lib/x86_64-linux-gnu/samba/libsmbd_shim.so(exit_server+0x28) [0x7ff0a48eab75]
   #4 /usr/sbin/smbd(main+0x15dd) [0x40bfe9]
   #5 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x7ff0a364cead]
   #6 /usr/sbin/smbd() [0x405c29]
[2012/12/09 00:06:39.736070,  0] ../source3/lib/dumpcore.c:317(dump_core)
  dumping core in /var/log/samba/cores/smbd


lsof -ni|grep samba


samba     12800     root   22u  IPv4 6981967      0t0  TCP 192.168.101.4:microsoft-ds (LISTEN)
samba     12800     root   23u  IPv4 6981969      0t0  TCP 192.168.101.4:netbios-ssn (LISTEN)
samba     12801     root   34u  IPv4 6981998      0t0  TCP 192.168.101.4:1024 (LISTEN)
samba     12801     root   37u  IPv4 6982006      0t0  TCP 192.168.101.4:loc-srv (LISTEN)
samba     12802     root   22u  IPv4 6982012      0t0  UDP 192.168.101.255:netbios-ns
samba     12802     root   23u  IPv4 6982013      0t0  UDP 192.168.101.4:netbios-ns
samba     12802     root   24u  IPv4 6982014      0t0  UDP 192.168.101.255:netbios-dgm
samba     12802     root   25u  IPv4 6982015      0t0  UDP 192.168.101.4:netbios-dgm
samba     12804     root   23u  IPv4 6982057      0t0  TCP 192.168.101.4:ldap (LISTEN)
samba     12804     root   24u  IPv4 6982059      0t0  TCP 192.168.101.4:ldaps (LISTEN)
samba     12804     root   25u  IPv4 6982061      0t0  TCP 192.168.101.4:3268 (LISTEN)
samba     12804     root   26u  IPv4 6982063      0t0  TCP 192.168.101.4:3269 (LISTEN)
samba     12805     root   22u  IPv4 6980804      0t0  UDP 192.168.101.4:ldap
samba     12806     root   22u  IPv4 6982025      0t0  TCP 192.168.101.4:kerberos (LISTEN)
samba     12806     root   23u  IPv4 6982026      0t0  UDP 192.168.101.4:kerberos
samba     12806     root   24u  IPv4 6982029      0t0  TCP 192.168.101.4:kpasswd (LISTEN)
samba     12806     root   25u  IPv4 6982030      0t0  UDP 192.168.101.4:kpasswd
samba     12812     root   23u  IPv4 6982048      0t0  TCP 192.168.101.4:domain (LISTEN)
samba     12812     root   24u  IPv4 6982049      0t0  UDP 192.168.101.4:domain
Comment 1 Sergey Sidlyarenko 2012-12-08 20:12:41 UTC
Created attachment 8313 [details]
core dump
Comment 2 Stefan Metzmacher 2012-12-12 15:38:33 UTC
Did you run an older samba4 version before and did not stop it?
There's a 'samba' binary still listening on port 139 and 445.

check with 'netstat -lpn'

I'm not able to reproduce this with 4.0.0.
Comment 3 Sergey Sidlyarenko 2012-12-12 16:34:52 UTC
root@ns:~# service samba4 stop
[ ok ] Stopping Samba 4 daemon: samba.

---------

root@ns:~# rm -f /var/log/samba/log.*

---------

root@ns:~# netstat -lpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 192.168.101.2:465       0.0.0.0:*               LISTEN      4758/exim4
tcp        0      0 127.0.0.1:465           0.0.0.0:*               LISTEN      4758/exim4
tcp        0      0 0.0.0.0:4369            0.0.0.0:*               LISTEN      3293/epmd
tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN      4606/vsftpd
tcp        0      0 0.0.0.0:5269            0.0.0.0:*               LISTEN      3642/beam
tcp        0      0 192.168.101.3:53        0.0.0.0:*               LISTEN      2750/named
tcp        0      0 192.168.101.2:53        0.0.0.0:*               LISTEN      2750/named
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      2750/named
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      4513/sshd
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      3323/cupsd
tcp        0      0 192.168.101.2:1720      0.0.0.0:*               LISTEN      4692/asterisk
tcp        0      0 0.0.0.0:5432            0.0.0.0:*               LISTEN      4362/postgres
tcp        0      0 192.168.101.2:25        0.0.0.0:*               LISTEN      4758/exim4
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      4758/exim4
tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN      2750/named
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      3557/lighttpd
tcp        0      0 0.0.0.0:4190            0.0.0.0:*               LISTEN      4780/dovecot
tcp        0      0 0.0.0.0:5280            0.0.0.0:*               LISTEN      3642/beam
tcp        0      0 0.0.0.0:993             0.0.0.0:*               LISTEN      4780/dovecot
tcp        0      0 192.168.101.2:7777      0.0.0.0:*               LISTEN      3642/beam
tcp        0      0 0.0.0.0:5222            0.0.0.0:*               LISTEN      3642/beam
tcp        0      0 0.0.0.0:46089           0.0.0.0:*               LISTEN      3642/beam
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      4257/mysqld
tcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN      4780/dovecot
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      3557/lighttpd
tcp6       0      0 ::1:465                 :::*                    LISTEN      4758/exim4
tcp6       0      0 :::22                   :::*                    LISTEN      4513/sshd
tcp6       0      0 ::1:631                 :::*                    LISTEN      3323/cupsd
tcp6       0      0 :::5432                 :::*                    LISTEN      4362/postgres
tcp6       0      0 ::1:25                  :::*                    LISTEN      4758/exim4
tcp6       0      0 :::443                  :::*                    LISTEN      3557/lighttpd
tcp6       0      0 :::4190                 :::*                    LISTEN      4780/dovecot
tcp6       0      0 :::993                  :::*                    LISTEN      4780/dovecot
tcp6       0      0 :::143                  :::*                    LISTEN      4780/dovecot
tcp6       0      0 :::80                   :::*                    LISTEN      3557/lighttpd
udp        0      0 0.0.0.0:3000            0.0.0.0:*                           3179/flow-capture
udp        0      0 0.0.0.0:3002            0.0.0.0:*                           3181/flow-capture
udp        0      0 192.168.101.3:3478      0.0.0.0:*                           2562/stund
udp        0      0 192.168.101.2:3478      0.0.0.0:*                           2562/stund
udp        0      0 192.168.101.3:3479      0.0.0.0:*                           2562/stund
udp        0      0 192.168.101.2:3479      0.0.0.0:*                           2562/stund
udp        0      0 192.168.101.3:53        0.0.0.0:*                           2750/named
udp        0      0 192.168.101.2:53        0.0.0.0:*                           2750/named
udp        0      0 127.0.0.1:53            0.0.0.0:*                           2750/named
udp        0      0 192.168.101.4:123       0.0.0.0:*                           4299/ntpd
udp        0      0 192.168.101.3:123       0.0.0.0:*                           4299/ntpd
udp        0      0 192.168.101.2:123       0.0.0.0:*                           4299/ntpd
udp        0      0 127.0.0.1:123           0.0.0.0:*                           4299/ntpd
udp        0      0 0.0.0.0:123             0.0.0.0:*                           4299/ntpd
udp        0      0 0.0.0.0:162             0.0.0.0:*                           4439/snmptrapd
udp        0      0 0.0.0.0:37314           0.0.0.0:*                           3799/miredo
udp        0      0 192.168.101.2:4569      0.0.0.0:*                           4692/asterisk
udp        0      0 0.0.0.0:631             0.0.0.0:*                           3323/cupsd
udp        0      0 192.168.101.2:5060      0.0.0.0:*                           4692/asterisk
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           3186/avahi-daemon:
udp        0      0 0.0.0.0:47070           0.0.0.0:*                           3186/avahi-daemon:
udp6       0      0 :::48486                :::*                                3186/avahi-daemon:
udp6       0      0 ::1:123                 :::*                                4299/ntpd
udp6       0      0 fe80::21d:60ff:fe6c:123 :::*                                4299/ntpd
udp6       0      0 2001:0:8b12:117b:83:123 :::*                                4299/ntpd
udp6       0      0 fe80::ffff:ffff:fff:123 :::*                                4299/ntpd
udp6       0      0 :::123                  :::*                                4299/ntpd
udp6       0      0 :::5353                 :::*                                3186/avahi-daemon:
raw6       0      0 :::58                   :::*                    7           3799/miredo
Active UNIX domain sockets (only servers)
Proto RefCnt Flags       Type       State         I-Node   PID/Program name    Path
unix  2      [ ACC ]     STREAM     LISTENING     7699     3325/clamd          /var/run/clamav/clamd.ctl
unix  2      [ ACC ]     STREAM     LISTENING     8237     3186/avahi-daemon:  /var/run/avahi-daemon/socket
unix  2      [ ACC ]     STREAM     LISTENING     10837    4780/dovecot        /var/run/dovecot/login/sieve
unix  2      [ ACC ]     STREAM     LISTENING     10839    4780/dovecot        /var/run/dovecot/stats
unix  2      [ ACC ]     STREAM     LISTENING     10842    4780/dovecot        /var/run/dovecot/login/ssl-params
unix  2      [ ACC ]     STREAM     LISTENING     10844    4780/dovecot        /var/run/dovecot/replicator
unix  2      [ ACC ]     STREAM     LISTENING     10846    4780/dovecot        /var/run/dovecot/replication-notify
unix  2      [ ACC ]     STREAM     LISTENING     10849    4780/dovecot        /var/run/dovecot/log-errors
unix  2      [ ACC ]     STREAM     LISTENING     8546     3323/cupsd          /var/run/cups/cups.sock
unix  2      [ ACC ]     STREAM     LISTENING     10851    4780/dovecot        /var/run/dovecot/ipc
unix  2      [ ACC ]     STREAM     LISTENING     10853    4780/dovecot        /var/run/dovecot/login/ipc-proxy
unix  2      [ ACC ]     STREAM     LISTENING     10855    4780/dovecot        /var/run/dovecot/indexer-worker
unix  2      [ ACC ]     STREAM     LISTENING     10857    4780/dovecot        /var/run/dovecot/indexer
unix  2      [ ACC ]     STREAM     LISTENING     10859    4780/dovecot        /var/run/dovecot/login/imap
unix  2      [ ACC ]     STREAM     LISTENING     10865    4780/dovecot        /var/run/dovecot/doveadm-server
unix  2      [ ACC ]     STREAM     LISTENING     10867    4780/dovecot        /var/run/dovecot/dns-client
unix  2      [ ACC ]     STREAM     LISTENING     10869    4780/dovecot        /var/run/dovecot/login/dns-client
unix  2      [ ACC ]     STREAM     LISTENING     10871    4780/dovecot        /var/run/dovecot/director-admin
unix  2      [ ACC ]     STREAM     LISTENING     10873    4780/dovecot        /var/run/dovecot/dict
unix  2      [ ACC ]     STREAM     LISTENING     10875    4780/dovecot        /var/run/dovecot/config
unix  2      [ ACC ]     STREAM     LISTENING     10877    4780/dovecot        /var/run/dovecot/login/login
unix  2      [ ACC ]     STREAM     LISTENING     10879    4780/dovecot        /var/run/dovecot/auth-login
unix  2      [ ACC ]     STREAM     LISTENING     10881    4780/dovecot        /var/run/dovecot/auth-client
unix  2      [ ACC ]     STREAM     LISTENING     10883    4780/dovecot        /var/run/dovecot/auth-userdb
unix  2      [ ACC ]     STREAM     LISTENING     10885    4780/dovecot        /var/run/dovecot/auth-master
unix  2      [ ACC ]     STREAM     LISTENING     10887    4780/dovecot        /var/run/dovecot/auth-worker
unix  2      [ ACC ]     STREAM     LISTENING     10889    4780/dovecot        /var/run/dovecot/anvil
unix  2      [ ACC ]     STREAM     LISTENING     10891    4780/dovecot        /var/run/dovecot/anvil-auth-penalty
unix  2      [ ACC ]     SEQPACKET  LISTENING     3226     344/udevd           /run/udev/control
unix  2      [ ACC ]     STREAM     LISTENING     10404    4362/postgres       /var/run/postgresql/.s.PGSQL.5432
unix  2      [ ACC ]     STREAM     LISTENING     8869     3748/memcached      /var/tmp/memcached.sock
unix  2      [ ACC ]     STREAM     LISTENING     7856     3576/php-cgi        /var/run/lighttpd/php-fastcgi.socket-0
unix  2      [ ACC ]     STREAM     LISTENING     9665     4658/uml_switch     /var/run/uml-utilities/uml_switch.ctl
unix  2      [ ACC ]     STREAM     LISTENING     7116     3125/dbus-daemon    /var/run/dbus/system_bus_socket
unix  2      [ ACC ]     STREAM     LISTENING     6096     2659/acpid          /var/run/acpid.socket
unix  2      [ ACC ]     STREAM     LISTENING     7890     3611/php-cgi        /var/run/lighttpd/php-fastcgi.socket-1
unix  2      [ ACC ]     STREAM     LISTENING     10707    4692/asterisk       /var/run/asterisk/asterisk.ctl
unix  2      [ ACC ]     STREAM     LISTENING     7903     3612/php-cgi        /var/run/lighttpd/php-fastcgi.socket-2
unix  2      [ ACC ]     STREAM     LISTENING     7906     3613/php-cgi        /var/run/lighttpd/php-fastcgi.socket-3
unix  2      [ ACC ]     STREAM     LISTENING     10472    4257/mysqld         /var/run/mysqld/mysqld.sock


---------

root@ns:~# samba-tool testparm
Press enter to see a dump of your service definitions

# Global parameters
[global]
        workgroup = WORKGROUP
        realm = DC.LEFOYER.RU
        netbios name = NS
        interfaces = br0:1
        bind interfaces only = Yes
        server role = active directory domain controller
        passdb backend = samba4
        allow dns updates = nonsecure and secure
        dns forwarder = 127.0.0.1
        server services = smb, rpc, nbt, wrepl, ldap, cldap, kdc, drepl, winbind, ntp_signd, kcc, dnsupdate, dns, s3fs

[netlogon]
        path = /var/lib/samba/sysvol/dc.lefoyer.ru/scripts
        read only = No

[sysvol]
        path = /var/lib/samba/sysvol
        read only = No

[profiles]
        path = /var/lib/samba/profiles
        read only = No

[syslog]
        path = /var/lib/samba/sysvol
        read only = No

[homes]
        path = /mnt/data-3tb
        read only = No

---------

root@ns:~# ifconfig
br0       Link encap:Ethernet  HWaddr 00:1d:60:6c:91:be
          inet addr:192.168.101.2  Bcast:192.168.101.255  Mask:255.255.255.0
          inet6 addr: fe80::21d:60ff:fe6c:91be/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:47184 errors:0 dropped:0 overruns:0 frame:0
          TX packets:27114 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:10765030 (10.2 MiB)  TX bytes:8910917 (8.4 MiB)

br0:0     Link encap:Ethernet  HWaddr 00:1d:60:6c:91:be
          inet addr:192.168.101.3  Bcast:192.168.101.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

br0:1     Link encap:Ethernet  HWaddr 00:1d:60:6c:91:be
          inet addr:192.168.101.4  Bcast:192.168.101.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0      Link encap:Ethernet  HWaddr 00:1d:60:6c:91:be
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:60007 errors:0 dropped:0 overruns:0 frame:0
          TX packets:26808 errors:0 dropped:0 overruns:0 carrier:1
          collisions:0 txqueuelen:1000
          RX bytes:15743024 (15.0 MiB)  TX bytes:8916870 (8.5 MiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:42627 errors:0 dropped:0 overruns:0 frame:0
          TX packets:42627 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:8811849 (8.4 MiB)  TX bytes:8811849 (8.4 MiB)

teredo    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet6 addr: fe80::ffff:ffff:ffff/64 Scope:Link
          inet6 addr: 2001:0:8b12:117b:834:6e3d:430b:d3ab/32 Scope:Global
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1280  Metric:1
          RX packets:410 errors:0 dropped:0 overruns:0 frame:0
          TX packets:797 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:201251 (196.5 KiB)  TX bytes:105458 (102.9 KiB)

---------

root@ns:~# service samba4 start
[ ok ] Starting Samba 4 daemon: samba.


---------

root@ns:~# cat /var/log/samba/log.smbd
[2012/12/12 20:19:39,  0] ../source3/smbd/server.c:1200(main)
  smbd version 4.0.0 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2012
[2012/12/12 20:19:39.693887,  0] ../source3/smbd/server.c:1280(main)
  standard input is not a socket, assuming -D option
[2012/12/12 20:19:40.505083,  0] ../source3/lib/util_sock.c:485(open_socket_in)
  bind failed on port 445 socket_addr = 192.168.101.4.
  Error = Адрес уже используется
[2012/12/12 20:19:40.505815,  0] ../source3/smbd/server.c:684(smbd_open_one_socket)
  smbd_open_once_socket: open_socket_in: Адрес уже используется
[2012/12/12 20:19:40.505934,  0] ../source3/lib/util_sock.c:485(open_socket_in)
  bind failed on port 139 socket_addr = 192.168.101.4.
  Error = Адрес уже используется
[2012/12/12 20:19:40.506085,  0] ../source3/smbd/server.c:684(smbd_open_one_socket)
  smbd_open_once_socket: open_socket_in: Адрес уже используется
[2012/12/12 20:19:40.506179,  0] ../source3/smbd/server.c:848(open_sockets_smbd)
  open_sockets_smbd: No sockets available to bind to.
[2012/12/12 20:19:40.506592,  0] ../source3/smbd/server_exit.c:205(exit_server_common)
  ===============================================================
[2012/12/12 20:19:40.506746,  0] ../source3/smbd/server_exit.c:207(exit_server_common)
  Abnormal server exit: open_sockets_smbd() failed
[2012/12/12 20:19:40.506828,  0] ../source3/smbd/server_exit.c:208(exit_server_common)
  ===============================================================
[2012/12/12 20:19:40.507401,  0] ../source3/lib/util.c:921(log_stack_trace)
  BACKTRACE: 7 stack frames:
   #0 /usr/lib/x86_64-linux-gnu/libsmbconf.so.0(log_stack_trace+0x1f) [0x7f4252c16212]
   #1 /usr/lib/x86_64-linux-gnu/samba/libsmbd_base.so(+0x1b9a40) [0x7f425407da40]
   #2 /usr/lib/x86_64-linux-gnu/samba/libsmbd_base.so(smbd_exit_server_cleanly+0) [0x7f425407daf9]
   #3 /usr/lib/x86_64-linux-gnu/samba/libsmbd_shim.so(exit_server+0x28) [0x7f4252553b75]
   #4 /usr/sbin/smbd(main+0x15dd) [0x40c191]
   #5 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x7f42512b5ead]
   #6 /usr/sbin/smbd() [0x405d39]
[2012/12/12 20:19:40.507771,  0] ../source3/lib/dumpcore.c:317(dump_core)
  dumping core in /var/log/samba/cores/smbd


---------

root@ns:~# cat /etc/init.d/samba4
#! /bin/sh

### BEGIN INIT INFO
# Provides:          samba4
# Required-Start:    $network $local_fs $remote_fs
# Required-Stop:     $network $local_fs $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: start Samba daemons
### END INIT INFO

#
# Start/stops the Samba daemon (samba).
# Adapted from the Samba 3 packages.
#

PIDDIR=/var/run/samba
SAMBAPID=$PIDDIR/samba.pid

# clear conflicting settings from the environment
unset TMPDIR

# See if the daemon and the config file are there
test -x /usr/sbin/samba -a -r /etc/samba/smb.conf || exit 0

. /lib/lsb/init-functions

case "$1" in
        start)
                log_daemon_msg "Starting Samba 4 daemon" "samba"
                # Make sure we have our PIDDIR, even if it's on a tmpfs
                install -o root -g root -m 755 -d $PIDDIR

                if ! start-stop-daemon --start --quiet --oknodo --exec /usr/sbin/samba -- -D; then
                        log_end_msg 1
                        exit 1
                fi

                log_end_msg 0
                ;;
        stop)
                log_daemon_msg "Stopping Samba 4 daemon" "samba"

                start-stop-daemon --stop --quiet --name samba $SAMBAPID
                # Wait a little and remove stale PID file
                sleep 1
                if [ -f $SAMBAPID ] && ! ps h `cat $SAMBAPID` > /dev/null
                then
                        # Stale PID file (samba was succesfully stopped),
                        # remove it (should be removed by samba itself IMHO.)
                        rm -f $SAMBAPID
                fi

                log_end_msg 0

                ;;
        restart|force-reload)
                $0 stop
                sleep 1
                $0 start
                ;;
        *)
                echo "Usage: /etc/init.d/samba {start|stop|restart|force-reload}"
                exit 1
                ;;
esac

exit 0


---------

root@ns:/# cat /etc/default/samba
# Defaults for samba initscript
# sourced by /etc/init.d/samba
# installed at /etc/default/samba by the maintainer scripts
#

#
# This is a POSIX shell fragment
#

# How should Samba (smbd) run? Possible values are "daemons"
#       or "inetd".
RUN_MODE="daemons"


root@ns:/home/samba/samba-4.0.0# samba -b
Samba version: 4.0.0
Build environment:
   Build host:  Linux ns 3.2.0-4-amd64 #1 SMP Debian 3.2.32-1 x86_64 GNU/Linux
Paths:
   BINDIR: /usr/bin
   SBINDIR: /usr/sbin
   CONFIGFILE: /etc/samba/smb.conf
   NCALRPCDIR: /var/run/samba/ncalrpc
   LOGFILEBASE: /var/log/samba
   LMHOSTSFILE: /etc/samba/lmhosts
   DATADIR: /usr/share
   MODULESDIR: /usr/lib/x86_64-linux-gnu/samba/
   LOCKDIR: /var/lock/samba
   STATEDIR: /var/lib/samba
   CACHEDIR: /var/cache/samba
   PIDDIR: /var/run
   PRIVATE_DIR: /var/lib/samba/private
   SWATDIR: /usr/share/samba/swat
   CODEPAGEDIR: /usr/share/samba/codepages
   SETUPDIR: /usr/share/samba/setup
   WINBINDD_SOCKET_DIR: /var/run/samba/winbindd
   WINBINDD_PRIVILEGED_SOCKET_DIR: /var/lib/samba/winbindd_privileged
   NTP_SIGND_SOCKET_DIR: /var/lib/samba/ntp_signd


---------

samba compiled param:
./configure  --prefix=/usr --sysconfdir=/etc --localstatedir=/var --mandir=/usr/share/man --with-piddir=/var/run \
    --with-modulesdir=/usr/lib/x86_64-linux-gnu/samba/ --libdir=/usr/lib/x86_64-linux-gnu --enable-fhs\
    --with-iconv --with-acl-support --with-dnsupdate --with-aio-support --with-profiling-data \
    --enable-gnutls --with-winbind --with-swat --with-ads --with-ldap --enable-cups \
    --enable-iprint --with-pam --with-pam_smbpass --with-quotas --with-utmp --with-sendfile-support --enable-avahi --with-cluster-support
Comment 4 Sergey Sidlyarenko 2013-01-26 10:27:45 UTC
Error in my config, services smb and s3fs not work 	
at the same time.

Need add this as error to log!!!
Comment 5 Björn Jacke 2013-08-28 22:38:53 UTC
if you run the smbd and samba daemon at the same time this is like if you run thttpd and apache at the same time on port 80 of course. You will not see nice error log messages there either I guess ;-). In any case  this is not a blocking bug. The logs already say that port 445 is already occupied. I don't see much space for improvement here :-|. The init scripts should take care that you don't accidently start smbd and samba at the same time. I'll close this as an invalid here.