Bug 14392 - vfs_fuit: using fruit:locking=netatalk causes kernel panic
Summary: vfs_fuit: using fruit:locking=netatalk causes kernel panic
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: VFS Modules (show other bugs)
Version: 4.12.3
Hardware: All All
: P5 major (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-23 12:03 UTC by Rouven
Modified: 2020-05-23 12:03 UTC (History)
0 users

See Also:


Attachments
error logs. (1.67 MB, application/x-gzip)
2020-05-23 12:03 UTC, Rouven
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rouven 2020-05-23 12:03:34 UTC
Created attachment 16006 [details]
error logs.

As a follow up on bug 14352 I found another bug related to the steps I did to reproduce the issue.

As explained by Ralph Boehme, removing fruit:locking=netatalk helps to avoid that issue. 

Steps were:
0. Delete time machine backup in MacOS X app.
1. Stop smb server.
2. clean logs.
3. start smb server.
4. connect with the Time Machine app in MacOS 10.15.4.
4.1. choose share (FileVault) from list in Time Machine app.
4.2. type credentials.
4.3. receive segfault.
5. stop smb server.

Backtrace is:
[2020/05/23 13:25:31.099770, 10, pid=1782, effective(500, 500), real(0, 0), class=locking] ../../source3/locking/share_mode_lock.c:658(get_share_mode_lock)
 get_share_mode_lock: get_static_share_mode_data failed: NT_STATUS_NOT_FOUND
[2020/05/23 13:25:31.099945,  0, pid=1782, effective(500, 500), real(0, 0)] ../../source3/lib/popt_common.c:68(popt_s3_talloc_log_fn)
 Bad talloc magic value - unknown value
[2020/05/23 13:25:31.100352,  0, pid=1782, effective(500, 500), real(0, 0)] ../../source3/lib/util.c:830(smb_panic_s3)
 PANIC (pid 1782): Bad talloc magic value - unknown value
[2020/05/23 13:25:31.102042,  0, pid=1782, effective(500, 500), real(0, 0)] ../../lib/util/fault.c:265(log_stack_trace)
 BACKTRACE: 37 stack frames:
  #0 /usr/lib/samba/amd64/libsamba-util.so.0.0.1'log_stack_trace+0x26 [0xfffffc7fee6b6626]
  #1 /usr/lib/samba/amd64/libsmbconf.so.0'smb_panic_s3+0x26 [0xfffffc7fee0f6a16]
  #2 /usr/lib/samba/amd64/libsamba-util.so.0.0.1'smb_panic+0x1f [0xfffffc7fee6b66ff]
  #3 /usr/lib/samba/private/amd64/libtalloc.so.2.3.1'_talloc_free+0x3b2 [0xfffffc7fed884482]
  #4 /usr/lib/samba/private/amd64/libsmbd-base-samba4.so'get_share_mode_lock+0x1a1 [0xfffffc7fee7f9bb1]
  #5 /usr/lib/samba/private/amd64/libsmbd-base-samba4.so'smbd_contend_level2_oplocks_begin+0xa1 [0xfffffc7fee9009b1]
  #6 /usr/lib/samba/private/amd64/libsmbd-base-samba4.so'brl_lock+0x635 [0xfffffc7fee7f1495]
  #7 /usr/lib/samba/private/amd64/libsmbd-base-samba4.so'do_lock_fn+0xa4 [0xfffffc7fee7eda84]
  #8 /usr/lib/samba/private/amd64/libsmbd-base-samba4.so'share_mode_do_locked_fn+0x86 [0xfffffc7fee7f7a06]
  #9 /usr/lib/samba/amd64/libsmbconf.so.0'dbwrap_watched_do_locked_fn+0xfa [0xfffffc7fee0dc43a]
  #10 /usr/lib/samba/private/amd64/libdbwrap-samba4.so'db_tdb_do_locked+0x12f [0xfffffc7fed0f95cf]
  #11 /usr/lib/samba/private/amd64/libdbwrap-samba4.so'dbwrap_do_locked+0x48 [0xfffffc7fed0f69a8]
  #12 /usr/lib/samba/amd64/libsmbconf.so.0'dbwrap_watched_do_locked+0x6f [0xfffffc7fee0daeef]
  #13 /usr/lib/samba/private/amd64/libdbwrap-samba4.so'dbwrap_do_locked+0x48 [0xfffffc7fed0f69a8]
  #14 /usr/lib/samba/private/amd64/libsmbd-base-samba4.so'share_mode_do_locked+0xd2 [0xfffffc7fee7fa0e2]
  #15 /usr/lib/samba/private/amd64/libsmbd-base-samba4.so'do_lock+0xf0 [0xfffffc7fee7ee530]
  #16 /usr/lib/samba/amd64/vfs/fruit.so'fruit_create_file+0x7ba [0xfffffc7fe88d55aa]
  #17 /usr/lib/samba/private/amd64/libsmbd-base-samba4.so'smbd_smb2_request_process_create+0xa07 [0xfffffc7fee8dc437]
  #18 /usr/lib/samba/private/amd64/libsmbd-base-samba4.so'smbd_smb2_request_dispatch+0xc8f [0xfffffc7fee8d2a5f]
  #19 /usr/lib/samba/private/amd64/libsmbd-base-samba4.so'smbd_smb2_connection_handler+0x621 [0xfffffc7fee8d39e1]
  #20 /usr/lib/samba/private/amd64/libtevent.so.0.10.2'tevent_common_invoke_fd_handler+0x80 [0xfffffc7fed17a580]
  #21 /usr/lib/samba/private/amd64/libtevent.so.0.10.2'epoll_event_loop_once+0x22c [0xfffffc7fed18180c]
  #22 /usr/lib/samba/private/amd64/libtevent.so.0.10.2'std_event_loop_once+0x40 [0xfffffc7fed17f8f0]
  #23 /usr/lib/samba/private/amd64/libtevent.so.0.10.2'_tevent_loop_once+0x95 [0xfffffc7fed179bd5]
  #24 /usr/lib/samba/private/amd64/libtevent.so.0.10.2'tevent_common_loop_wait+0x23 [0xfffffc7fed179e43]
  #25 /usr/lib/samba/private/amd64/libtevent.so.0.10.2'std_event_loop_wait+0x40 [0xfffffc7fed17f870]
  #26 /usr/lib/samba/private/amd64/libsmbd-base-samba4.so'smbd_process+0x777 [0xfffffc7fee8c18f7]
  #27 /usr/lib/samba/sbin/amd64/smbd'smbd_accept_connection+0x189 [0x40dda9]
  #28 /usr/lib/samba/private/amd64/libtevent.so.0.10.2'tevent_common_invoke_fd_handler+0x80 [0xfffffc7fed17a580]
  #29 /usr/lib/samba/private/amd64/libtevent.so.0.10.2'epoll_event_loop_once+0x22c [0xfffffc7fed18180c]
  #30 /usr/lib/samba/private/amd64/libtevent.so.0.10.2'std_event_loop_once+0x40 [0xfffffc7fed17f8f0]
  #31 /usr/lib/samba/private/amd64/libtevent.so.0.10.2'_tevent_loop_once+0x95 [0xfffffc7fed179bd5]
  #32 /usr/lib/samba/private/amd64/libtevent.so.0.10.2'tevent_common_loop_wait+0x23 [0xfffffc7fed179e43]
  #33 /usr/lib/samba/private/amd64/libtevent.so.0.10.2'std_event_loop_wait+0x40 [0xfffffc7fed17f870]
  #34 /usr/lib/samba/sbin/amd64/smbd'main+0x1a0f [0x4101ef]
  #35 /usr/lib/samba/sbin/amd64/smbd'_start_crt+0x83 [0x408e73]
  #36 /usr/lib/samba/sbin/amd64/smbd'_start+0x18 [0x408dd8]
[2020/05/23 13:25:31.104063,  4, pid=1782, effective(500, 500), real(0, 0)] ../../source3/smbd/sec_ctx.c:216(push_sec_ctx)
 push_sec_ctx(500, 500) : sec_ctx_stack_ndx = 1