I’ve just setup a test server running Ubuntu 14.04 and Netatalk 3.1.5 and I’m able to reproduce the afpd crash when initiating a spotlight search from a 10.9 client.  Testing 3.1.3 on this same machine against the same data set does not yield the afpd crash. (Results are returned as expected using 3.1.3)

My meta.db in /var/netatalk/tracker is about 902 MB.  Data on the volume is 124 GB, though there are a ton of very small files.  (I just copied my home folder over, including my mail.)

Interesting observations (all performed using 10.9 as a client):

This leads me to believe that it may be the number of entries returned by tracker that may be causing the issue.   I have tested the "sparql results limit = 100” setting on my production server as well and it prevents afpd from crashing there as well.  

There is a short pause (about 1-2 seconds) before the client attempts to reconnect and the connection is restored.   Then another few seconds before afpd reconnects to Tracker.  At that point, searches are possible again, if the search term is long enough.  Entering another short search term will make afpd crash again.

Aug 13 20:28:53.345531 afpd[15306] {fault.c:123} (severe:Default): ===============================================================
Aug 13 20:28:53.345654 afpd[15306] {fault.c:124} (severe:Default): INTERNAL ERROR: Signal 11 in pid 15306 (3.1.5)
Aug 13 20:28:53.345686 afpd[15306] {fault.c:125} (severe:Default): ===============================================================
Aug 13 20:28:53.346496 afpd[15306] {fault.c:96} (severe:Default): PANIC: internal error
Aug 13 20:28:53.346541 afpd[15306] {fault.c:97} (severe:Default): BACKTRACE: 8 stack frames:
Aug 13 20:28:53.346565 afpd[15306] {fault.c:103} (severe:Default):  #0 /usr/local/lib/libatalk.so.16(netatalk_panic+0x24) [0x7fe58c9ac164]
Aug 13 20:28:53.346591 afpd[15306] {fault.c:103} (severe:Default):  #1 /usr/local/lib/libatalk.so.16(+0x39298) [0x7fe58c9ac298]
Aug 13 20:28:53.346614 afpd[15306] {fault.c:103} (severe:Default):  #2 /lib/x86_64-linux-gnu/libc.so.6(+0x37000) [0x7fe58b4ce000]
Aug 13 20:28:53.346636 afpd[15306] {fault.c:103} (severe:Default):  #3 /usr/local/sbin/afpd(afp_spotlight_rpc+0xc18) [0x4322c8]
Aug 13 20:28:53.346659 afpd[15306] {fault.c:103} (severe:Default):  #4 /usr/local/sbin/afpd(afp_over_dsi+0x53e) [0x40e09e]
Aug 13 20:28:53.346757 afpd[15306] {fault.c:103} (severe:Default):  #5 /usr/local/sbin/afpd(main+0xb80) [0x40c450]
Aug 13 20:28:53.346781 afpd[15306] {fault.c:103} (severe:Default):  #6 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7fe58b4b8ec5]
Aug 13 20:28:53.346804 afpd[15306] {fault.c:103} (severe:Default):  #7 /usr/local/sbin/afpd() [0x40c588]
Aug 13 20:28:53.570329 afpd[15236] {main.c:154} (info:AFPDaemon): child[15306]: killed by signal 6
Aug 13 20:28:53.622265 afpd[15310] {dsi_tcp.c:241} (info:DSI): AFP/TCP session from
Aug 13 20:28:53.624345 afpd[15310] {uams_dhx2_pam.c:329} (info:UAMS): DHX2 login: joe
Aug 13 20:28:53.703803 afpd[15310] {uams_dhx2_pam.c:214} (info:UAMS): PAM DHX2: PAM Success
Aug 13 20:28:53.724114 afpd[15310] {uams_dhx2_pam.c:709} (info:UAMS): DHX2: PAM Auth OK!
Aug 13 20:28:53.724273 afpd[15310] {auth.c:236} (note:AFPDaemon): Login by joe (AFP3.4)
Aug 13 20:28:53.725221 afpd[15310] {auth.c:567} (note:AFPDaemon): afp_disconnect: trying primary reconnect
Aug 13 20:28:53.725567 afpd[15236] {server_child.c:233} (note:Default): Reconnect: no child[15306]
Aug 13 20:28:58.725632 afpd[15310] {auth.c:600} (error:AFPDaemon): afp_disconnect: primary reconnect failed
Aug 13 20:28:58.730884 afpd[15310] {spotlight.c:1276} (info:Spotlight): Initializing Spotlight
Aug 13 20:28:58.732084 afpd[15310] {spotlight.c:1394} (error:Default): sl_rpc_fetchQueryResultsForContext(obj, query, reply, vol) failed: Resource temporarily unavailable
Aug 13 20:29:08.802307 afpd[15310] {spotlight.c:588} (info:Spotlight): connected to Tracker

The details of my test system are as follows:

Intel(R) Celeron(R) CPU 1007U @ 1.50GHz
RAM:  8 GB non-ECC

Ubuntu 14.04 LTS (Server edition)
EXT4 File system 
Tracker 0.16.4

Netatalk Config/Compile:

./configure --sysconfdir=/etc --with-pam --with-shadow --localstatedir=/var --with-init-style=debian --with-cracklib --with-dbus-sysconf-dir=/etc/dbus-1/system.d --with-pam-confdir=/etc/pam.d --with-tracker-pkgconfig-version=0.16 --disable-shell-check

Compilation summary:

    CPPFLAGS       = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir) 
    CFLAGS         = -D_U_="__attribute__((unused))" -g -O2
    LIBS           = -ldl  -lcrack
        LIBS   = 
        CFLAGS = -pthread
        LIBS   = -Wl,--export-dynamic -pthread -ltracker-sparql-0.16 -lgio-2.0 -lgmodule-2.0 -lgobject-2.0 -lglib-2.0  
        CFLAGS = -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/tracker-0.16 -I/usr/include/tracker-0.16/libtracker-sparql  
        LIBS   =  -L/usr/lib64 -lcrypto
        CFLAGS =  -I/usr/include/openssl
        LIBS   = -lgcrypt
        CFLAGS = 
        LIBS   =  -lpam
        CFLAGS = 
        LIBS   = -lwrap
        CFLAGS = 
        LIBS   =  -L/usr/lib64 -ldb-5.3
        CFLAGS = 
        LIBS   =  -lavahi-common -lavahi-client
        LIBS   =  -lldap
        CFLAGS = 
        LIBS   = -L/usr/lib/x86_64-linux-gnu -lmysqlclient -lpthread -lz -lm -ldl
        CFLAGS = -I/usr/include/mysql -DBIG_JOINS=1  -fno-strict-aliasing   -g -DNDEBUG

Configure summary:
         Extended Attributes: ad | sys
         ACL support: yes
         Spotlight: yes
         backends:  dbd last tdb mysql
         DHX     (PAM SHADOW)
         DHX2    (PAM SHADOW)
         RANDNUM (afppasswd)
         clrtxt  (PAM SHADOW)
         Zeroconf support:        yes
         tcp wrapper support:     yes
         quota support:           yes
         admin group support:     yes
         valid shell check:       no
         cracklib support:        yes
         ACL support:             auto
         Kerberos support:        yes
         LDAP support:            yes
         AFP stats via dbus:      yes
         dtrace probes:           yes
         Netatalk lockfile:       /var/lock/netatalk
         init directory:          /etc/init.d
         dbus system directory:   /etc/dbus-1/system.d
         pam config directory:    /etc/pam.d
         Docbook:                 no

; Netatalk 3.x configuration file

  uam list = uams_dhx.so uams_dhx2.so
  zeroconf = yes
  log level = default:info #,spotlight:debug
  max connections = 200
 log file = /var/log/netatalk.log
  guest account = nobody
  sparql results limit = 100

  unix priv = yes
  directory perm = 0777
  file perm = 0777
  spotlight = yes

  path = /share
  vol preset = Defaults
  spotlight = yes

On Aug 13, 2014, at 12:05 PM, HAT <hat@fa2.so-net.ne.jp> wrote:


Wed, 13 Aug 2014 11:09:30 -0400, Joe Rhodes <lists@joerhodes.com>:
I used that wiki when installing netatalk.

It's too different from my wiki page.
It's necessary to investigate each difference.

I’ve just double-checked, and everything seems to be in order.  The only lib that I haven’t installed is "systemtap-sdt-dev (DTrace-compatible)”.

My wiki supported all the features.

Details of the environment:

Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-30-generic x86_64)
64 bit

Desktop Edition or Server Edition ?

CPU:  Dual Intel(R) Xeon(R) CPU E5-2620 v2 @ 2.10GHz
Storage:  ZFS (ZFSonLinux) for main data storage, 10 drives configured as mirrored RAID

Please try ext4.

Configure Options:
--sysconfdir=/etc --with-pam --with-shadow --localstatedir=/var --with-init-style=debian --with-cracklib --with-dbus-sysconf-dir=/etc/dbus-1/system.d --with-pam-confdir=/etc/pam.d --with-tracker-pkgconfig-version=0.16 --disable-shell-check

Configure Summary:
configure:22634: result: Compilation summary:
configure:22636: result:     CPPFLAGS       = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)
configure:22638: result:     CFLAGS         = -D_U_="__attribute__((unused))" -g -O2
configure:22640: result:     LIBS           = -ldl  -lcrack
configure:22642: result:     PTHREADS:
configure:22644: result:         LIBS   =
configure:22646: result:         CFLAGS = -pthread
configure:22649: result:     TRACKER:
configure:22651: result:         LIBS   = -Wl,--export-dynamic -pthread -ltracker-sparql-0.16 -lgio-2.0 -lgmodule-2.0 -lgobject-2.0 -lglib-2.0
configure:22653: result:         CFLAGS = -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/tracker-0.16 -I/usr/include/tracker-0.16/libtracker-sparql
configure:22657: result:     SSL:
configure:22659: result:         LIBS   =  -L/usr/lib64 -lcrypto
configure:22661: result:         CFLAGS =  -I/usr/include/openssl
configure:22665: result:     LIBGCRYPT:
configure:22667: result:         LIBS   = -lgcrypt
configure:22669: result:         CFLAGS =
configure:22673: result:     PAM:
configure:22675: result:         LIBS   =  -lpam
configure:22677: result:         CFLAGS =
configure:22681: result:     WRAP:
configure:22683: result:         LIBS   =
configure:22685: result:         CFLAGS =
configure:22689: result:     BDB:
configure:22691: result:         LIBS   =  -L/usr/lib64 -ldb-5.3
configure:22693: result:         CFLAGS =
configure:22713: result:     ZEROCONF:
configure:22715: result:         LIBS   =  -lavahi-common -lavahi-client
configure:22717: result:         CFLAGS =  -D_REENTRANT
configure:22721: result:     LDAP:
configure:22723: result:         LIBS   =  -lldap
configure:22725: result:         CFLAGS =
configure:22728: result:     LIBEVENT:
configure:22731: result:         bundled
configure:22739: result:     TDB:
configure:22742: result:         bundled
configure:22751: result:     MySQL:
configure:22753: result:         LIBS   = -L/usr/lib/x86_64-linux-gnu -lmysqlclient -lpthread -lz -lm -ldl
configure:22755: result:         CFLAGS = -I/usr/include/mysql -DBIG_JOINS=1  -fno-strict-aliasing   -g -DNDEBUG
configure:22761: result: Configure summary:
configure:22763: result:     INIT STYLE:
configure:22766: result:          debian
configure:22772: result:     AFP:
configure:22774: result:          Extended Attributes: ad | sys
configure:22776: result:          ACL support: yes
configure:22778: result:          Spotlight: yes
configure:22780: result:     CNID:
configure:22782: result:          backends:  dbd last tdb mysql
configure:22784: result:     UAMS:
configure:22794: result:          DHX     (PAM SHADOW)
configure:22798: result:          DHX2    (PAM SHADOW)
configure:22802: result:          RANDNUM (afppasswd)
configure:22813: result:          clrtxt  (PAM SHADOW)
configure:22815: result:          guest
configure:22817: result:     Options:
configure:22819: result:          Zeroconf support:        yes
configure:22821: result:          tcp wrapper support:     no
configure:22823: result:          quota support:           yes
configure:22825: result:          admin group support:     yes
configure:22827: result:          valid shell check:       no
configure:22829: result:          cracklib support:        yes
configure:22831: result:          ACL support:             auto
configure:22833: result:          Kerberos support:        auto
configure:22835: result:          LDAP support:            yes
configure:22837: result:          AFP stats via dbus:      yes
configure:22839: result:          dtrace probes:           no
configure:22841: result:     Paths:
configure:22843: result:          Netatalk lockfile:       /var/lock/netatalk
configure:22846: result:          init directory:          /etc/init.d
configure:22850: result:          dbus system directory:   /etc/dbus-1/system.d
configure:22855: result:          pam config directory:    /etc/pam.d
configure:22870: result:     Documentation:
configure:22872: result:          Docbook:                 no

Please install all the pachages.

afpd -V

afpd 3.1.5 - Apple Filing Protocol (AFP) daemon of Netatalk

This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version. Please see the file COPYING for further information and details.

afpd has been compiled with support for these features:

         AFP versions: 2.2 3.0 3.1 3.2 3.3 3.4 
        CNID backends: dbd last tdb mysql 
     Zeroconf support: Avahi
 TCP wrappers support: No

This differs from my environment.

        Quota support: Yes
  Admin group support: Yes
   Valid shell checks: No

This differs from my environment.

     cracklib support: Yes
           EA support: ad | sys
          ACL support: Yes
         LDAP support: Yes
        D-Bus support: Yes
    Spotlight support: Yes
        DTrace probes: No

This differs from my environment.

             afp.conf: /etc/afp.conf
          extmap.conf: /etc/extmap.conf
      state directory: /var/netatalk/
   afp_signature.conf: /var/netatalk/afp_signature.conf
     afp_voluuid.conf: /var/netatalk/afp_voluuid.conf
      UAM search path: /usr/local/lib/netatalk//
 Server messages path: /var/netatalk/msg/


 uam list = uams_dhx.so uams_dhx2.so
 zeroconf = yes
 log level = default:info #,spotlight:debug
 max connections = 200
 mimic model = RackMac

If this parameter is deleted, what will happen?

 log file = /var/log/netatalk.log
 guest account = nobody
 hostname = File Server

If this parameter is deleted, what will happen? 

 unix priv = yes
 directory perm = 0777
 file perm = 0777
 spotlight = no

 basedir regex = /home
 stat vol = no
 home name = $u Home

 path = /main-storage/Archive
 vol preset = Defaults
 spotlight = yes

 path = /main-storage/Graphics
 vol preset = Defaults
 spotlight = yes

 path = /main-storage/Office
 vol preset = Defaults
 spotlight = yes

; Accounting Group only
 path = /main-storage/Adman
 vol preset = Defaults
 directory perm = 0770
 file perm = 0770
 spotlight = yes

 path = /main-storage/Utilities
 vol presets = Defaults
 spotlight = yes