Describe the bug
Occasionall afp processes panic.
To Reproduce
Not sure - happens occasionally
Expected behavior
no panics :)
Environment
- Server OS: Ubuntu 25.10
- Client OS: macOS Sequoia
- Netatalk Version: 4.4.1
I use mariadb as CNID database and tuned dircache configurations.
Configuration
[Global]
; Global server settings
afpstats = yes
name = ****
unix charsert = UTF8
vol charset = UTF8
uam list = uams_dhx2.so
mimic model = RackMac
cnid scheme = mysql
cnid mysql host = localhost
cnid mysql user = root
cnid mysql pw = ***
cnid mysql db = cnid
dircache validation freq = 100
dircache metadata window = 3600
dircache metadata threshold = 1800
dircachesize = 131072
dircache files = no
dircache validation freq = 100
log file = /var/run/afpd.log
dsireadbuf = 100
afp listen = *.*.*.*
zeroconf = yes
ea = ad
disconnect time = 48
sleep time = 48
...
Logs
Feb 05 11:11:05.474736 afpd[92655] {enumerate.c:427} (error:AFPDaemon): enumerate(vid:4, did:294630, name:'.'): error adding dir: 'ZAPROSZENIA'
Feb 05 11:11:05.478848 afpd[92655] {dircache.c:608} (error:AFPDaemon): dircache_add(): did:0 is less than the allowed 17. Try rebuilding the CNID database for: ".DS_Store"
Feb 05 11:11:05.481324 afpd[92655] {fault.c:93} (severe:Default): PANIC: ntohl(dir->d_did) >= CNID_START
Feb 05 11:11:05.481334 afpd[92655] {fault.c:94} (severe:Default): BACKTRACE: 10 stack frames:
Feb 05 11:11:05.481340 afpd[92655] {fault.c:100} (severe:Default): #0 /usr/local/lib/x86_64-linux-gnu/libatalk.so.19(netatalk_panic+0x32) [0x7f1961bce5d2]
Feb 05 11:11:05.481469 afpd[92655] {fault.c:100} (severe:Default): #1 /usr/local/sbin/afpd(dircache_add+0x24c) [0x564ba2dd869c]
Feb 05 11:11:05.481475 afpd[92655] {fault.c:100} (severe:Default): #2 /usr/local/sbin/afpd(getmetadata+0x1e6) [0x564ba2de40a6]
Feb 05 11:11:05.481480 afpd[92655] {fault.c:100} (severe:Default): #3 /usr/local/sbin/afpd(getfilparams+0xca) [0x564ba2de4a6a]
Feb 05 11:11:05.481485 afpd[92655] {fault.c:100} (severe:Default): #4 /usr/local/sbin/afpd(afp_getfildirparams+0x379) [0x564ba2de8e39]
Feb 05 11:11:05.481489 afpd[92655] {fault.c:100} (severe:Default): #5 /usr/local/sbin/afpd(afp_over_dsi+0x655) [0x564ba2dcd8a5]
Feb 05 11:11:05.481494 afpd[92655] {fault.c:100} (severe:Default): #6 /usr/local/sbin/afpd(main+0xbb8) [0x564ba2dcae98]
Feb 05 11:11:05.481499 afpd[92655] {fault.c:100} (severe:Default): #7 /lib/x86_64-linux-gnu/libc.so.6(+0x2a575) [0x7f196142a575]
Feb 05 11:11:05.481504 afpd[92655] {fault.c:100} (severe:Default): #8 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x88) [0x7f196142a628]
Feb 05 11:11:05.481508 afpd[92655] {fault.c:100} (severe:Default): #9 /usr/local/sbin/afpd(_start+0x25) [0x564ba2dcb1b5]
Additional context
Panic's with .DS_Store happened several times but that's not the only one file:
grep -B 1 PANIC /run/afpd.log
Feb 03 09:32:39.793722 afpd[7794] {dircache.c:608} (error:AFPDaemon): dircache_add(): did:0 is less than the allowed 17. Try rebuilding the CNID database for: "JAGUAREC_NEO026_007_Young_Elegance.wav"
Feb 03 09:32:39.794925 afpd[7794] {fault.c:93} (severe:Default): PANIC: ntohl(dir->d_did) >= CNID_START
--
Feb 03 11:02:27.124349 afpd[8036] {dircache.c:608} (error:AFPDaemon): dircache_add(): did:0 is less than the allowed 17. Try rebuilding the CNID database for: ".DS_Store"
Feb 03 11:02:27.125349 afpd[8036] {fault.c:93} (severe:Default): PANIC: ntohl(dir->d_did) >= CNID_START
--
Feb 03 17:35:35.705264 afpd[32781] {dircache.c:608} (error:AFPDaemon): dircache_add(): did:0 is less than the allowed 17. Try rebuilding the CNID database for: ".DS_Store"
Feb 03 17:35:35.708888 afpd[32781] {fault.c:93} (severe:Default): PANIC: ntohl(dir->d_did) >= CNID_START
--
Feb 04 01:09:10.936688 afpd[33924] {dircache.c:608} (error:AFPDaemon): dircache_add(): did:0 is less than the allowed 17. Try rebuilding the CNID database for: ".DS_Store"
Feb 04 01:09:10.938469 afpd[33924] {fault.c:93} (severe:Default): PANIC: ntohl(dir->d_did) >= CNID_START
--
Feb 04 01:28:09.651106 afpd[38627] {dircache.c:608} (error:AFPDaemon): dircache_add(): did:0 is less than the allowed 17. Try rebuilding the CNID database for: ".DS_Store"
Feb 04 01:28:09.653203 afpd[38627] {fault.c:93} (severe:Default): PANIC: ntohl(dir->d_did) >= CNID_START
--
Feb 05 08:15:46.210171 afpd[84258] {dircache.c:608} (error:AFPDaemon): dircache_add(): did:0 is less than the allowed 17. Try rebuilding the CNID database for: "250813_SO_A_0062_Proxy.mov"
Feb 05 08:15:46.214210 afpd[84258] {fault.c:93} (severe:Default): PANIC: ntohl(dir->d_did) >= CNID_START
--
Feb 05 08:40:05.846957 afpd[82998] {dircache.c:608} (error:AFPDaemon): dircache_add(): did:0 is less than the allowed 17. Try rebuilding the CNID database for: ".DS_Store"
Feb 05 08:40:05.850160 afpd[82998] {fault.c:93} (severe:Default): PANIC: ntohl(dir->d_did) >= CNID_START
--
Feb 05 08:40:40.597139 afpd[78437] {dircache.c:608} (error:AFPDaemon): dircache_add(): did:0 is less than the allowed 17. Try rebuilding the CNID database for: ".DS_Store"
Feb 05 08:40:40.600603 afpd[78437] {fault.c:93} (severe:Default): PANIC: ntohl(dir->d_did) >= CNID_START
--
Feb 05 08:44:13.783888 afpd[78898] {dircache.c:608} (error:AFPDaemon): dircache_add(): did:0 is less than the allowed 17. Try rebuilding the CNID database for: ".DS_Store"
Feb 05 08:44:13.787213 afpd[78898] {fault.c:93} (severe:Default): PANIC: ntohl(dir->d_did) >= CNID_START
--
Feb 05 08:48:45.728412 afpd[78460] {dircache.c:608} (error:AFPDaemon): dircache_add(): did:0 is less than the allowed 17. Try rebuilding the CNID database for: ".DS_Store"
Feb 05 08:48:45.731937 afpd[78460] {fault.c:93} (severe:Default): PANIC: ntohl(dir->d_did) >= CNID_START
--
Feb 05 08:54:00.203023 afpd[82743] {dircache.c:608} (error:AFPDaemon): dircache_add(): did:0 is less than the allowed 17. Try rebuilding the CNID database for: ".DS_Store"
Feb 05 08:54:00.205459 afpd[82743] {fault.c:93} (severe:Default): PANIC: ntohl(dir->d_did) >= CNID_START
--
Feb 05 08:58:35.047531 afpd[80227] {dircache.c:608} (error:AFPDaemon): dircache_add(): did:0 is less than the allowed 17. Try rebuilding the CNID database for: ".DS_Store"
Feb 05 08:58:35.051013 afpd[80227] {fault.c:93} (severe:Default): PANIC: ntohl(dir->d_did) >= CNID_START
--
Feb 05 08:58:59.456119 afpd[87116] {dircache.c:608} (error:AFPDaemon): dircache_add(): did:0 is less than the allowed 17. Try rebuilding the CNID database for: ".DS_Store"
Feb 05 08:58:59.459001 afpd[87116] {fault.c:93} (severe:Default): PANIC: ntohl(dir->d_did) >= CNID_START
--
Feb 05 09:13:46.996138 afpd[92429] {dircache.c:608} (error:AFPDaemon): dircache_add(): did:0 is less than the allowed 17. Try rebuilding the CNID database for: ".DS_Store"
Feb 05 09:13:46.998859 afpd[92429] {fault.c:93} (severe:Default): PANIC: ntohl(dir->d_did) >= CNID_START
--
Feb 05 09:30:10.146431 afpd[78402] {dircache.c:608} (error:AFPDaemon): dircache_add(): did:0 is less than the allowed 17. Try rebuilding the CNID database for: ".DS_Store"
Feb 05 09:30:10.149204 afpd[78402] {fault.c:93} (severe:Default): PANIC: ntohl(dir->d_did) >= CNID_START
--
Feb 05 09:48:00.686806 afpd[77872] {dircache.c:608} (error:AFPDaemon): dircache_add(): did:0 is less than the allowed 17. Try rebuilding the CNID database for: ".DS_Store"
Feb 05 09:48:00.689394 afpd[77872] {fault.c:93} (severe:Default): PANIC: ntohl(dir->d_did) >= CNID_START
--
Feb 05 09:49:43.148927 afpd[85334] {dircache.c:608} (error:AFPDaemon): dircache_add(): did:0 is less than the allowed 17. Try rebuilding the CNID database for: ".DS_Store"
Feb 05 09:49:43.151467 afpd[85334] {fault.c:93} (severe:Default): PANIC: ntohl(dir->d_did) >= CNID_START
--
Feb 05 10:01:50.015438 afpd[86165] {dircache.c:608} (error:AFPDaemon): dircache_add(): did:0 is less than the allowed 17. Try rebuilding the CNID database for: ".DS_Store"
Feb 05 10:01:50.018312 afpd[86165] {fault.c:93} (severe:Default): PANIC: ntohl(dir->d_did) >= CNID_START
--
Feb 05 10:40:31.788921 afpd[82467] {dircache.c:608} (error:AFPDaemon): dircache_add(): did:0 is less than the allowed 17. Try rebuilding the CNID database for: ".DS_Store"
Feb 05 10:40:31.792264 afpd[82467] {fault.c:93} (severe:Default): PANIC: ntohl(dir->d_did) >= CNID_START
--
Feb 05 11:11:05.478848 afpd[92655] {dircache.c:608} (error:AFPDaemon): dircache_add(): did:0 is less than the allowed 17. Try rebuilding the CNID database for: ".DS_Store"
Feb 05 11:11:05.481324 afpd[92655] {fault.c:93} (severe:Default): PANIC: ntohl(dir->d_did) >= CNID_START
I've rebuild CNID database of volumes this morning but issue is still happening and data in CNID database are exactly the same (ie. Did, Id, InodeNo)
From CNID database perspetive - not sure if that matters but
MariaDB [cnid]> select * from CE9B8F93315E58AE8FAB62C408C3BA25 where ID <=17;
+----+-----------+-----+-------+-------------+
| Id | Name | Did | DevNo | InodeNo |
+----+-----------+-----+-------+-------------+
| 17 | .DS_Store | 2 | 2080 | 25769803922 |
+----+-----------+-----+-------+-------------+
Simmilary - almost all my Volumes (about 12) have one entry with Id=17 (but no less than 17)
and
MariaDB [cnid]> MariaDB [cnid]> select * from CE9B8F93315E58AE8FAB62C408C3BA25 where did <=17;
+--------+-----------+-----+-------+--------------+
| Id | Name | Did | DevNo | InodeNo |
+--------+-----------+-----+-------+--------------+
| 17 | .DS_Store | 2 | 2080 | 25769803922 |
| 18 | SEBA | 2 | 2080 | 223339048240 |
| 209684 | SYIA | 2 | 2080 | 15040199322 |
+--------+-----------+-----+-------+--------------+
3 rows in set (0.001 sec)
Describe the bug
Occasionall afp processes panic.
To Reproduce
Not sure - happens occasionally
Expected behavior
no panics :)
Environment
I use mariadb as CNID database and tuned dircache configurations.
Configuration
Logs
Additional context
Panic's with .DS_Store happened several times but that's not the only one file:
I've rebuild CNID database of volumes this morning but issue is still happening and data in CNID database are exactly the same (ie. Did, Id, InodeNo)
From CNID database perspetive - not sure if that matters but
Simmilary - almost all my Volumes (about 12) have one entry with Id=17 (but no less than 17)
and