ad_read_rsrc_adouble: invalid AppleDouble resource crashes samba - TrueNAS 12 U1
Description
Problem/Justification
Impact
relates to
SmartDraw Connector
Katalon Manual Tests (BETA)
Activity

Andrew Walker February 26, 2021 at 6:48 PMEdited
Issue with appledouble files was caused by bug in this version of samba. Addressed by updating to version 4.12.11 from upstream ().

Aljaž Podpečan January 19, 2021 at 12:57 AM
Thanks, i've forwarded the logs via email.

Andrew Walker January 18, 2021 at 6:55 PM
You can send them to awalker@ixsystems.com

Aljaž Podpečan January 14, 2021 at 3:05 PM
Would it be possible for me to forward the mentioned logs via email/private message? As the log is quite verbose, it reveals quite a bit of data. I'd really appreciate it if that's an option.

Andrew Walker January 13, 2021 at 2:04 AM
Okay. I misread the code path for vfs_fruit in this case. The appledouble code from fruit was broken up into separate library source3/lib/adouble. This shouldn't be executed when fruit:resource = stream, and so I'll probably need more detailed logs. Set the following auxiliary parameter under services->smb:
Then repeat the issue, copy out /var/log/samba4/log.smbd, and remove the auxiliary parameter.
Details
Details
Assignee

Reporter

Hey,
We've been having issues with SMB crashing on os on both TrueNAS 12 and U1. The logs before the crash are
[2021/01/08 09:18:02.035768, 0] ../../source3/lib/adouble.c:2188(ad_read_rsrc_adouble)
ad_read_rsrc_adouble: invalid AppleDouble resource KVADRA mobil/Katalog_za_danski_trg/~ai-32b928c8-c213-4b3f-95fb-c620502d6618_.tmp
[2021/01/08 09:19:14.208736, 1] ../../source3/lib/adouble.c:868(ad_unpack)
wrong magic or version
[2021/01/08 09:19:14.208778, 0] ../../source3/lib/adouble.c:2188(ad_read_rsrc_adouble)
ad_read_rsrc_adouble: invalid AppleDouble resource KVADRA mobil/Katalog_za_danski_trg/~ai-32b928c8-c213-4b3f-95fb-c620502d6618_.tmp
[2021/01/08 09:19:47.637880, 0] ../../lib/util/fault.c:79(fault_report)
===============================================================
[2021/01/08 09:19:47.637905, 0] ../../lib/util/fault.c:80(fault_report)
INTERNAL ERROR: Signal 10 in pid 12572 (4.12.9)
If you are running a recent Samba version, and if you think this problem is not yet fixed in the latest versions, please consider reporting this bug, see https://wiki.samba.org/index.php/Bug_Reporting
[2021/01/08 09:19:47.637915, 0] ../../lib/util/fault.c:86(fault_report)
===============================================================
[2021/01/08 09:19:47.637923, 0] ../../source3/lib/util.c:830(smb_panic_s3)
PANIC (pid 12572): internal error
[2021/01/08 09:19:47.638963, 0] ../../lib/util/fault.c:265(log_stack_trace)
BACKTRACE: 6 stack frames:
#0 0x801296217 <log_stack_trace+0x37> at /usr/local/lib/samba4/libsamba-util.so.0
#1 0x802f9b656 <smb_panic_s3+0x56> at /usr/local/lib/samba4/libsmbconf.so.0
#2 0x801296007 <smb_panic+0x17> at /usr/local/lib/samba4/libsamba-util.so.0
#3 0x8012963ee <log_stack_trace+0x20e> at /usr/local/lib/samba4/libsamba-util.so.0
#4 0x801295fe9 <fault_setup+0x59> at /usr/local/lib/samba4/libsamba-util.so.0
#5 0x8099dbc20 <_pthread_sigmask+0x530> at /lib/libthr.so.3
[2021/01/08 09:19:47.639014, 0] ../../source3/lib/dumpcore.c:315(dump_core)
dumping core in /var/db/system/cores
It seems to happen either when we're using Adobe Photoshop or Premiere while editing directly off the server with MacOS Big Sur (Ver 11.1 - 20C69), both macbooks and mac pro's, on both wifi and wired connection. I can't attach the smbd.core dumb to this issue, as it is 200MB in size. I can upload it to an alternative location if needed.
smb config is
[global]
aio max threads = 2
bind interfaces only = Yes
disable spoolss = Yes
dns proxy = No
enable web service discovery = Yes
kernel change notify = No
load printers = No
logging = file
max log size = 51200
netbios aliases = server
nsupdate command = /usr/local/bin/samba-nsupdate -g
registry shares = Yes
restrict anonymous = 2
server role = standalone server
server string = TrueNAS server
unix extensions = No
idmap config *: range = 90000001-100000000
fruit:nfs_aces = No
idmap config * : backend = tdb
directory name cache size = 0
dos filemode = Yes
[share]
ea support = No
kernel share modes = No
path = /mnt/pool1/dataset1
posix locking = No
read only = No
vfs objects = aio_fbsd fruit streams_xattr shadow_copy_zfs ixnas
fruit:resource = stream
fruit:metadata = stream
nfs4:chown = true
I feel like this is not expected behavior, as some older forum posts have mentioned appledouble file modifications/creations should be handled by the fruit vfs and I also haven't found an existing issue for this. Hope the issue description is detailed enough, but I will provide more logs/configs upon request!
Thanks in advance for looking into it!