# Samba 3.6.5: nmbd INTERNAL ERROR: Signal 6



## simonsays (Jul 9, 2012)

Hi,

I'm having problems running Samba on my computer. After some time (a couple of hours/days) nmbd core dumps... Can someone help me here? Thanks a lot!

regards

Simon

`pkg_info | grep samba`:

```
samba36-3.6.5       A free SMB and CIFS client and server for UNIX
```

`uname -a`:

```
FreeBSD server.iicast.net 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:15:25 UTC 2012     root@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
```

log.nmbd:

```
Assertion failed: (iface_comp(&((ifaces)[0]), &((ifaces)[1])) <= 0), function get_interfaces, file lib/interfaces.c, line 283
[2012/07/09 17:11:13,  0] lib/fault.c:51(fault_report)
  ===============================================================
[2012/07/09 17:11:13,  0] lib/fault.c:52(fault_report)
  INTERNAL ERROR: Signal 6 in pid 1976 (3.6.5)
  Please read the Trouble-Shooting section of the Samba3-HOWTO
[2012/07/09 17:11:13,  0] lib/fault.c:54(fault_report)

  From: http://www.samba.org/samba/docs/Samba3-HOWTO.pdf
[2012/07/09 17:11:13,  0] lib/fault.c:55(fault_report)
  ===============================================================
[2012/07/09 17:11:13,  0] lib/util.c:1117(smb_panic)
  PANIC (pid 1976): internal error
[2012/07/09 17:11:13,  0] lib/util.c:1221(log_stack_trace)
  BACKTRACE: 11 stack frames:
   #0 0x1194f21 <smb_panic+49> at /usr/local/sbin/nmbd
   #1 0x1183a56 <dump_core_setup+2134> at /usr/local/sbin/nmbd
   #2 0xbfbfffb4
   #3 0x21554bfa <abort+106> at /lib/libc.so.7
   #4 0x2153d2c6 <__assert+86> at /lib/libc.so.7
   #5 0x1177395 <get_interfaces+757> at /usr/local/sbin/nmbd
   #6 0x1183dd5 <interfaces_changed+53> at /usr/local/sbin/nmbd
   #7 0x104c900 <kill_async_dns_child+720> at /usr/local/sbin/nmbd
   #8 0x104e084 <main+3876> at /usr/local/sbin/nmbd
   #9 0x104bb0b <_start+203> at /usr/local/sbin/nmbd
   #10 0x104ba58 <_start+24> at /usr/local/sbin/nmbd
[2012/07/09 17:11:13,  0] lib/fault.c:416(dump_core)
  dumping core in /var/log/samba/cores/nmbd
```


----------



## ZFSZealot (Sep 21, 2012)

This is probably not much help but this started showing up on a server where I configured an additional network interface up on.  If I configure the network interface to 0.0.0.0 and down samba will work again.  The other network interface was something I was going to use to provide iscsi service.


----------



## ZFSZealot (Sep 21, 2012)

And actually just configuring the interface down will get samba to start, no need to remove the IP address.  The interface in question is em3

Samba works with this:


```
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
        ether 00:04:23:c0:4c:d8
        inet 192.168.1.2 netmask 0xffffff00 broadcast 192.168.1.255
        inet6 fe80::204:23ff:fec0:4cd8%em0 prefixlen 64 scopeid 0x1
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
em1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
        ether 00:04:23:c0:4c:d9
        inet 0.0.0.0 netmask 0xff000000 broadcast 0.255.255.255
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect
        status: no carrier
em2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC>
        ether 00:25:90:14:6d:44
        inet 192.168.4.2 netmask 0xffffff00 broadcast 192.168.4.255
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet 1000baseT <full-duplex>
        status: active
em3: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC>
        ether 00:25:90:14:6d:45
        inet6 fe80::225:90ff:fe14:6d45%em3 prefixlen 64 scopeid 0x8
        inet 192.168.5.2 netmask 0xffffff00 broadcast 192.168.5.255
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet 1000baseT <full-duplex>
        status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=3<RXCSUM,TXCSUM>
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0xd
        inet 127.0.0.1 netmask 0xff000000
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
```

Samba does not work with this:


```
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
        ether 00:04:23:c0:4c:d8
        inet 192.168.1.2 netmask 0xffffff00 broadcast 192.168.1.255
        inet6 fe80::204:23ff:fec0:4cd8%em0 prefixlen 64 scopeid 0x1
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
em1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
        ether 00:04:23:c0:4c:d9
        inet 0.0.0.0 netmask 0xff000000 broadcast 0.255.255.255
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect
        status: no carrier
em2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC>
        ether 00:25:90:14:6d:44
        inet 192.168.4.2 netmask 0xffffff00 broadcast 192.168.4.255
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet 1000baseT <full-duplex>
        status: active
em3: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC>
        ether 00:25:90:14:6d:45
        inet6 fe80::225:90ff:fe14:6d45%em3 prefixlen 64 scopeid 0x8
        inet 192.168.5.2 netmask 0xffffff00 broadcast 192.168.5.255
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet 1000baseT <full-duplex>
        status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=3<RXCSUM,TXCSUM>
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0xd
        inet 127.0.0.1 netmask 0xff000000
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
```


----------



## SirDice (Sep 21, 2012)

Try binding samba to a specific interface and IP address.


```
bind interfaces only = yes
   interfaces = 192.168.4.2/24
```


----------



## ZFSZealot (Sep 21, 2012)

I thought that might work but unfortunately it didn't:


```
bind interfaces only = yes
   interfaces = 192.168.1.2/24
```

smbd and winbindd core dump:


```
cadence# service samba start
Removing stale Samba tdb files: ....... done
Starting nmbd.
Starting smbd.
Abort trap (core dumped)
/usr/local/etc/rc.d/samba: WARNING: failed to start smbd
Starting winbindd.
Abort trap (core dumped)
/usr/local/etc/rc.d/samba: WARNING: failed to start winbindd
```

Excerpt from /var/log/samba/log.winbindd, log.smbd is similar, most relevant I think is the "Assertion failed" error:


```
Copyright Andrew Tridgell and the Samba Team 1992-2011
Assertion failed: (iface_comp(&((ifaces)[0]), &((ifaces)[1])) <= 0), function get_interfaces, file lib/interfaces.c, line 283.
[2012/09/21 06:54:03.340274,  0] lib/fault.c:51(fault_report)
  ===============================================================
[2012/09/21 06:54:03.340466,  0] lib/fault.c:52(fault_report)
  INTERNAL ERROR: Signal 6 in pid 81824 (3.6.7)
  Please read the Trouble-Shooting section of the Samba3-HOWTO
[2012/09/21 06:54:03.340548,  0] lib/fault.c:54(fault_report)

  From: http://www.samba.org/samba/docs/Samba3-HOWTO.pdf
[2012/09/21 06:54:03.340627,  0] lib/fault.c:55(fault_report)
  ===============================================================
[2012/09/21 06:54:03.340683,  0] lib/util.c:1117(smb_panic)
  PANIC (pid 81824): internal error
[2012/09/21 06:54:03.340746,  0] lib/util.c:1221(log_stack_trace)
  BACKTRACE: 0 stack frames:
[2012/09/21 06:54:03.340825,  0] lib/fault.c:416(dump_core)
  dumping core in /var/log/samba/cores/winbindd
```

Clearly this is a bug with enumerating interfaces though, oddly I was able to use an address on em3 from a completely different RFC 1918 subnet and it did not break Samba (172.16.100.2).  Putting 192.168.6.2 on em1 and 192.168.5.2 on em3 with everything else the same also breaks Samba.

I am using Samba 3.6.7 now as that's what's in the ports tree.  I took a brief look at the source but the code at the line number in the error message doesn't seem to match the error.

It's been years since I programmed but I will try to take a closer look at this with a debugger in the next few days, can't promise how far I will get.


----------



## lyon4a (Sep 30, 2012)

The same issue here. 

- FreeBSD 9.0-RELEASE amd64
- samba36-3.6.7 
- 2 lagg interfaces

Samba starts if only one interface has an IP configured. With two IPs no chance. Does anyone know the last known working version of samba36 for multiple interfaces?


----------



## Uniballer (Oct 1, 2012)

That's why I had to back up to net/samba35.


----------



## von_Gaden (Nov 26, 2012)

I had the same problem with samba 3.6.9.
My chance was that Samba worked well until I switched to the GENERIC kernel. That was part of my plans for easier updates using binary freebsd-update().
Since I don't use IPv6 yet it was not compiled in my custom kernel. But it presents in GENERIC. My Samba was compiled without IPv6 support. As I enabled it and recompiled everything went fine with no crash dumps.
If somebody can test and confirm my results we'd consider the problem solved.


----------



## ziyanm (Nov 27, 2012)

A quick temporary fix might be to disable the assertion that's triggering the error. Looks like the assertion assumes linux-style eth0, eth1, ... numbering which may not be the case on FreeBSD (ugh, more linuxisms!) It's best to file a bug against the Samba port and/or corresponding upstream release.


----------



## it_at_payr (Feb 27, 2013)

*interface "bug" -> solution?*

We currently have the same issue with and without IPv6. Some time Samba is working properly and then some day the smbd won't start anymore. No we're trying to go back to samba35 but we don't really understand why the 3.6 versions do not work long.

Did you have luck with the 3.5 versions or how did you fix the problem?


----------



## lyon4a (Feb 28, 2013)

I use productively samba 3.5.15 and it works


----------



## kha0s (Aug 9, 2013)

Same problem. FreeBSD 9-STABLE amd64 + actual ports database + samba36-3.6.17 from ports. It coredumps on start  Samba35 worked fine but the port of samba35 has now been deleted (obsoleted by net/samba36).


----------



## kha0s (Aug 9, 2013)

Samba was compiled without IPv6 (I don't use it), but the kernel compiled with IPv6. After recompiling the port with IPv6 support, samba36 started.


----------



## zzattack (Aug 22, 2013)

Thanks @kha0s, worked here on 3.6.18 too.


----------



## ingiboy (Jun 18, 2014)

I also had this problem. Samba 3.6.X did not work if there were active connections to mpd5.  Temporary solution: stop mpd5, restart Samba and run mpd5 again.


----------



## ZFSZealot (Sep 16, 2014)

I ran across this thread again when this problem came up again due to changing which network interfaces I'm using.  Sorry for digging the old thread up but I wanted to post for anyone searching that I did go back and recompile samba 3.6 *with* IPv6 enabled and it does appear to have fixed the problem.

I was using em0, em1, and em2 without the problem.  When I switched to using em0, em2, and em3 because of improved performance/better chipset on em3, the problem reappeared and I started digging again.  Very simple fix, just configure your port to enable IPv6.


----------



## Timothy Kaleev (Dec 18, 2014)

Thank you, I had same problem. After rebuilding Samba with IPv6 option all Samba daemons started normally.


----------



## Pacificman (Jan 14, 2015)

I had same problem with samba  Version 3.6.24  and FreeBSD 10.1-RELEASE #0:  When mpd5(8) created ng0 samba crashed.
After rebuilding Samba with IPv6 option works fine.

Thank you.


----------

