TritonDataCenter / pkgsrc

NetBSD/pkgsrc fork for our binary package repositories
https://pkgsrc.smartos.org/
131 stars 51 forks source link

netatalk3-3.1.13nb3 is broken #348

Closed whorfin closed 1 year ago

whorfin commented 1 year ago

Using https://pkgsrc.smartos.org/packages/SmartOS/trunk/x86_64/All on

$ uname -a
SunOS serverbox 5.11 omnios-r151038-ef7fcbcae5 i86pc i386 i86pc illumos

with netatalk installed, which is currently netatalk3-3.1.13nb3

Much barfing on remote afp connections and system log shows this over and over:

Dec  4 21:44:04 serverbox afpd[1473]: [ID 702911 daemon.notice] Login by shareuser (AFP3.4)
Dec  4 21:44:04 serverbox afpd[1473]: [ID 702911 daemon.notice] afp_disconnect: trying primary reconnect
Dec  4 21:44:04 serverbox afpd[533]: [ID 702911 daemon.notice] Reconnect: no child[1466]
Dec  4 21:44:09 serverbox afpd[1473]: [ID 702911 daemon.error] afp_disconnect: primary reconnect failed
Dec  4 21:44:10 serverbox afpd[1473]: [ID 702911 daemon.error] ===============================================================
Dec  4 21:44:10 serverbox afpd[1473]: [ID 702911 daemon.error] INTERNAL ERROR: Signal 11 in pid 1473 (3.1.13)
Dec  4 21:44:10 serverbox afpd[1473]: [ID 702911 daemon.error] ===============================================================
Dec  4 21:44:10 serverbox afpd[1473]: [ID 702911 daemon.error] PANIC: internal error
Dec  4 21:44:10 serverbox afpd[1473]: [ID 702911 daemon.error] BACKTRACE: 11 stack frames:
Dec  4 21:44:10 serverbox afpd[1473]: [ID 702911 daemon.error]  #0 /opt/local/lib/libatalk.so.18.0.0'netatalk_panic+0x40 [0xfffffc7fee9fb640]
Dec  4 21:44:10 serverbox afpd[1473]: [ID 702911 daemon.error]  #1 /opt/local/lib/libatalk.so.18.0.0'sig_fault+0x49 [0xfffffc7fee9fb799]
Dec  4 21:44:10 serverbox afpd[1473]: [ID 702911 daemon.error]  #2 /lib/amd64/libc.so.1'__sighndlr+0x6 [0xfffffc7fef098106]
Dec  4 21:44:10 serverbox afpd[1473]: [ID 702911 daemon.error]  #3 /lib/amd64/libc.so.1'call_user_handler+0x1db [0xfffffc7fef08af0b]
Dec  4 21:44:10 serverbox afpd[1473]: [ID 702911 daemon.error]  #4 /opt/local/libexec/netatalk/afpd'getmetadata+0x1b8 [0x4254d8]
Dec  4 21:44:10 serverbox afpd[1473]: [ID 702911 daemon.error]  #5 /opt/local/libexec/netatalk/afpd'getfilparams+0xe8 [0x425ea8]
Dec  4 21:44:10 serverbox afpd[1473]: [ID 702911 daemon.error]  #6 /opt/local/libexec/netatalk/afpd'afp_getfildirparams+0x318 [0x429cf8]
Dec  4 21:44:10 serverbox afpd[1473]: [ID 702911 daemon.error]  #7 /opt/local/libexec/netatalk/afpd'afp_over_dsi+0x825 [0x412995]
Dec  4 21:44:10 serverbox afpd[1473]: [ID 702911 daemon.error]  #8 /opt/local/libexec/netatalk/afpd'main+0xa34 [0x42fc14]
Dec  4 21:44:10 serverbox afpd[1473]: [ID 702911 daemon.error]  #9 /opt/local/libexec/netatalk/afpd'_start_crt+0x87 [0x410a87]
Dec  4 21:44:10 serverbox afpd[1473]: [ID 702911 daemon.error]  #10 /opt/local/libexec/netatalk/afpd'_start+0x18 [0x4109e8]

Looks like 3.1.13 borked a bunch and at least a _3 update to address such things is needed https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263743

whorfin commented 1 year ago

more discussion here: https://github.com/Netatalk/Netatalk/pull/174

I think my scenario may relate to this: changing to a directory containing a symbolic link fails with a panic of afpd.

Pointing finder at a dir containing symlinks causes repeated crashes in afpd as above, while other dirs i've casually perused seemed ok.

...and confirmed, reverted to netatalk3-3.1.12nb19 from SmartOS/2021Q4 resolves the issue, though of course that older version now has a bunch of CVEs against it

jperkin commented 1 year ago

I believe this is fixed in 3.1.14 which is available in trunk, are you able to give that a try?

whorfin commented 1 year ago

Thanks for the update! Hmm, after a

$ pkgin update

it appears there is no more netatalk in trunk; previously there was 22-2.2.6 and 3-3.1.13 looking here: https://pkgsrc.smartos.org/packages/SmartOS/trunk/x86_64/All seems to confirm this at the moment; netatalk was pulled it would appear

I do see a 3.1.14 in the Linux trunk, but not SmartOS

jperkin commented 1 year ago

Ah sorry, I missed this. Will fix it tomorrow.

whorfin commented 1 year ago

...as good as your word! Thank you; all working as hoped once more