Problem with AFPD
Since 9.2.x I'm facing a problem with AFP. Opening a folder, finder is locked and FreeNas gives this error message:
Apr 22 20:51:35 freenas8 afpd47664: Login by Christoph (AFP3.4)
Apr 22 20:51:35 freenas8 kernel: Failed to write core file for process afpd (error 14)
Apr 22 20:51:35 freenas8 kernel: pid 47657 (afpd), uid 1001: exited on signal 6
Apr 22 20:51:35 freenas8 afpd47664: afp_disconnect: trying primary reconnect
Apr 22 20:51:35 freenas8 afpd3225: Reconnect: no child47652
Apr 22 20:51:40 freenas8 afpd47664: afp_disconnect: primary reconnect failed
Apr 22 20:51:40 freenas8 afpd47664: parse_entries: bogus eid: 9, off: 50, len: 3760
Apr 22 20:51:40 freenas8 afpd47664: parse_entries: bogus eid: 2, off: 3810, len: 286
Apr 22 20:51:40 freenas8 afpd47664: ad_header_read(/mnt/Daten/software/Sat-Receiver/Kathrein/Images/AAF/._AAF_Last_Summer_Dream_UFS910_Flash.rar): malformed AppleDouble
Apr 22 20:51:40 freenas8 afpd47664: Convert OS X to Netatalk AppleDouble: /mnt/Daten/software/Sat-Receiver/Kathrein/Images/AAF/._AAF_Last_Summer_Dream_UFS910_Flash.rar
A workaround is to delete the mentioned file.
Attached a copy of the "buggy" file.
#2 Updated by Christoph Weiss about 5 years ago
It happen on a few files in several subfolders. I deleted them to fix the issue. Usually these folders are not so often "visited". The first time I faced this problem, I think, it was with FreeNas 9.2.x. But it happens with Mavericks 10.9 and Snow Leopard 10.6 while opening the folder with Finder.
#3 Updated by Josh Paetzel about 5 years ago
- Status changed from Unscreened to Screened
Netatalk includes a tool called dbd that will rebuild your appledouble files and sync the CNID database with the filesystem.
Generally when problems like this happen it's because something other than netatalk is being used to access the files and gets the appledouble files out of sync.
You run dbd from the CLI as root.
- dbd /path/to/afp/share
#4 Updated by Josh Paetzel about 5 years ago
- Status changed from Screened to Resolved
- Target version changed from 49 to 18.104.22.168-RELEASE
So far we've yet to see a case where either dbd or deleting the malformed appledouble file didn't solve this problem.
In general it seems to be most often caused by filesystem manipulations happening behind netatalk's back, either via CIFS, NFS, or on the local filesystem.
If you're doing that...don't, as it will only cause issues.
If you are having reoccurring issues where appledouble files are getting corrupted for an unknown reason then we should punt this upstream to the netatalk devs and have them take a look at it.