Bug 13339 - samba 4.8 crash with vfs_fruit and "fruit:time machine"
Summary: samba 4.8 crash with vfs_fruit and "fruit:time machine"
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: VFS Modules (show other bugs)
Version: 4.8.0
Hardware: All FreeBSD
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-16 17:10 UTC by groenveld
Modified: 2018-03-26 16:21 UTC (History)
3 users (show)

See Also:


Attachments
log.smbd with log level 10 (386.66 KB, text/plain)
2018-03-16 17:10 UTC, groenveld
no flags Details
gdb output (13.91 KB, text/plain)
2018-03-18 03:48 UTC, groenveld
no flags Details
gdb backtrace w/ debug symbols and w/o -O (8.96 KB, text/plain)
2018-03-26 14:44 UTC, groenveld
no flags Details
gdb backtrace full (29.87 KB, text/plain)
2018-03-26 16:21 UTC, groenveld
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description groenveld 2018-03-16 17:10:28 UTC
Created attachment 14054 [details]
log.smbd with log level 10

samba 4.8 on FreeBSD x64 crashes with vfs_fruit and "fruit:time machine" with MacOSX 10.13
.3 Time Machine client.

$ uname -srv
FreeBSD 12.0-CURRENT FreeBSD 12.0-CURRENT #18 beb069a2a(trueos-master): Mon Feb 12 14:46:38 UTC 2018     root@chimera:/usr/obj/usr/src/amd64.amd64/sys/GENERIC

$ cat /etc/opt/samba/smb.conf
[global]
workgroup = WORKGROUP
netbios name = p150em
log level = 10
passdb backend = tdbsam
vfs objects = catia fruit streams_xattr zfsacl

[timecapsule]
path = /tmp/timecapsule
writable  = yes
browsable = yes
read only = no
guest ok = no
#fruit:resource = xattr
fruit:time machine = yes


[2018/03/14 17:33:17.385696, 10, pid=7639, effective(1002, 1002), real(0, 0), class=catia] ../source3/modules/vfs_catia.c:266(catia_debug_cc)
[2018/03/14 17:33:17.385727,  0, pid=7639, effective(1002, 1002), real(0, 0)] ../lib/util/fault.c:78(fault_report)
  ===============================================================
[2018/03/14 17:33:17.386067,  0, pid=7639, effective(1002, 1002), real(0, 0)] ..
/lib/util/fault.c:79(fault_report)
  INTERNAL ERROR: Signal 11 in pid 7639 (4.8.0)
  Please read the Trouble-Shooting section of the Samba HOWTO
[2018/03/14 17:33:17.386135,  0, pid=7639, effective(1002, 1002), real(0, 0)] ../lib/util/fault.c:81(fault_report)
  ===============================================================
[2018/03/14 17:33:17.386180,  0, pid=7639, effective(1002, 1002), real(0, 0)] ../source3/lib/util.c:815(smb_panic_s3)
  PANIC (pid 7639): internal error
[2018/03/14 17:33:17.388824,  0, pid=7639, effective(1002, 1002), real(0, 0)] ../source3/lib/util.c:926(log_stack_trace)
  BACKTRACE: 6 stack frames:
   #0 0x803a72b29 <log_stack_trace+0x1f> at /opt/samba/lib/libsmbconf.so.0
   #1 0x803a729af <smb_panic_s3+0x6d> at /opt/samba/lib/libsmbconf.so.0
   #2 0x8014cd381 <smb_panic+0x28> at /opt/samba/lib/libsamba-util.so.0
   #3 0x8014cd099 <fault_setup_disable+0x193> at /opt/samba/lib/libsamba-util.so.0
   #4 0x8014cd0ae <fault_setup_disable+0x1a8> at /opt/samba/lib/libsamba-util.so.0
   #5 0x80128f166 <pthread_sigmask+0x536> at /lib/libthr.so.3
Comment 1 groenveld 2018-03-16 17:15:28 UTC
I reproduced the problem with today's clone of git repo.
John
groenveld@acm.org
Comment 2 Jeremy Allison 2018-03-16 20:50:03 UTC
Can you load the debug symbols and get us a good backtrace ?

Set:

panic action = /bin/sleep 9999999

in the [global] section of your smb.conf, and then reproduce
the crash. Attach using the debugger and get a backtrace. That
will really help tracking this down.

Thanks.
Comment 3 groenveld 2018-03-18 03:48:10 UTC
Created attachment 14056 [details]
gdb output
Comment 5 Ralph Böhme 2018-03-26 05:19:32 UTC
(In reply to groenveld from comment #3)
Still lacking debug symbols. Please recompile Samba eg with CFLAGS="-g -O0" ./configure .... or use ./configure.developer.
Comment 6 groenveld 2018-03-26 14:44:53 UTC
Created attachment 14084 [details]
gdb backtrace w/ debug symbols and w/o -O

sorry about the missing debug symbols.
John
groenveld@acm.org
Comment 7 Ralph Böhme 2018-03-26 15:04:23 UTC
Comment on attachment 14084 [details]
gdb backtrace w/ debug symbols and w/o -O

Thanks, much better. :)

Have you configured "panic action" in smb.conf as suggested by Jeremy? We'll need a post-mortem full stack-backtrace that can be gathered from the sleeping crashed process with gbd:

# gdb -p PID
gdb> bt full
...

To work around the issue you can just remove catia from smb.conf. catia shouldn't be necessary on a timemachine share anyway.
Comment 8 groenveld 2018-03-26 16:21:07 UTC
Created attachment 14085 [details]
gdb backtrace full

gdb backtrace full