Bug 14849 - smbd dumps core after upgrade to 4.15 on domain member
Summary: smbd dumps core after upgrade to 4.15 on domain member
Status: RESOLVED DUPLICATE of bug 14882
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: 4.15.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-29 09:00 UTC by Christian Naumer
Modified: 2021-11-18 17:10 UTC (History)
2 users (show)

See Also:


Attachments
backtrace from gdb (32.75 KB, text/plain)
2021-09-29 09:00 UTC, Christian Naumer
no flags Details
smb.conf (1.79 KB, text/plain)
2021-09-29 09:01 UTC, Christian Naumer
no flags Details
Backtrace with glic-debuginfo (34.97 KB, text/plain)
2021-09-30 12:46 UTC, Christian Naumer
no flags Details
samba error log 4.15.x (34.55 KB, text/plain)
2021-10-31 12:00 UTC, thomas.schwark
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Naumer 2021-09-29 09:00:45 UTC
Created attachment 16832 [details]
backtrace from gdb

smbd crashes if files/directorys are created on a Windows 10 client.
Samba version is 4.15.0 from the Sernet Packages. This is on Rocky Linux 8.4.

This is in the Logs:
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]: [2021/09/27 09:24:19.318422,  0] ../../lib/util/fault.c:172(smb_panic_log)
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:   ===============================================================
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]: [2021/09/27 09:24:19.318483,  0] ../../lib/util/fault.c:176(smb_panic_log)
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:   INTERNAL ERROR: Signal 6: Aborted in pid 2056 (4.15.0-SerNet-RedHat-4.el8)
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]: [2021/09/27 09:24:19.318509,  0] ../../lib/util/fault.c:181(smb_panic_log)
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:   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
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]: [2021/09/27 09:24:19.318533,  0] ../../lib/util/fault.c:182(smb_panic_log)
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:   ===============================================================
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]: [2021/09/27 09:24:19.318554,  0] ../../lib/util/fault.c:184(smb_panic_log)
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:   PANIC (pid 2056): Signal 6: Aborted in 4.15.0-SerNet-RedHat-4.el8
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]: [2021/09/27 09:24:19.319757,  0] ../../lib/util/fault.c:288(log_stack_trace)
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:   BACKTRACE: 54 stack frames:
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #0 /usr/lib64/samba/libsamba-util.so.0(log_stack_trace+0x30) [0x7fe57b59c19d]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #1 /usr/lib64/samba/libsamba-util.so.0(smb_panic_log+0x5b) [0x7fe57b59c2cf]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #2 /usr/lib64/samba/libsamba-util.so.0(smb_panic+0x9) [0x7fe57b59c417]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #3 /usr/lib64/samba/libsamba-util.so.0(+0xe4b0) [0x7fe57b59c4b0]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #4 /lib64/libpthread.so.0(+0x12b30) [0x7fe577ed7b30]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #5 /lib64/libc.so.6(gsignal+0x10f) [0x7fe577b3738f]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #6 /lib64/libc.so.6(abort+0x127) [0x7fe577b21dc5]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #7 /lib64/libc.so.6(+0x7a4f7) [0x7fe577b7a4f7]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #8 /lib64/libc.so.6(+0x815fc) [0x7fe577b815fc]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #9 /lib64/libc.so.6(+0x81e56) [0x7fe577b81e56]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #10 /lib64/libc.so.6(+0x81fa7) [0x7fe577b81fa7]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #11 /lib64/libc.so.6(+0x84378) [0x7fe577b84378]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #12 /lib64/libc.so.6(__libc_malloc+0x8e) [0x7fe577b85b2e]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #13 /lib64/libc.so.6(_IO_file_doallocate+0x90) [0x7fe577b70620]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #14 /lib64/libc.so.6(_IO_doallocbuf+0x50) [0x7fe577b7e4d0]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #15 /lib64/libc.so.6(_IO_file_seekoff+0x133) [0x7fe577b7bd23]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #16 /lib64/libc.so.6(__fseeko64+0x7d) [0x7fe577b79c5d]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #17 /lib64/libnss_files.so.2(+0x8d1b) [0x7fe56369bd1b]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #18 /lib64/libnss_files.so.2(+0x3e2c) [0x7fe563696e2c]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #19 /lib64/libnss_files.so.2(_nss_files_gethostbyname4_r+0x50) [0x7fe563697bd0]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #20 /lib64/libc.so.6(+0xe5c7a) [0x7fe577be5c7a]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #21 /lib64/libc.so.6(getaddrinfo+0x12b) [0x7fe577be6d2b]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #22 /usr/lib64/samba/libsmbconf.so.0(name_to_fqdn+0x76) [0x7fe57a2d36ba]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #23 /usr/lib64/samba/libgse-samba4.so(+0x19d62) [0x7fe574a12d62]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #24 /usr/lib64/samba/libgse-samba4.so(gse_krb5_get_server_keytab+0x2d4) [0x7fe574a13562]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #25 /usr/lib64/samba/libgse-samba4.so(+0x1c2a2) [0x7fe574a152a2]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #26 /usr/lib64/samba/libgensec-samba4.so(+0x19271) [0x7fe5745ac271]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #27 /usr/lib64/samba/libgensec-samba4.so(gensec_start_mech_by_ops+0xc) [0x7fe5745acef6]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #28 /usr/lib64/samba/libgensec-samba4.so(+0x15c96) [0x7fe5745a8c96]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #29 /usr/lib64/samba/libgensec-samba4.so(+0x15f8a) [0x7fe5745a8f8a]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #30 /usr/lib64/samba/libgensec-samba4.so(+0x1797a) [0x7fe5745aa97a]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #31 /usr/lib64/samba/libgensec-samba4.so(gensec_update_send+0x111) [0x7fe5745ab234]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #32 /usr/lib64/samba/libsmbd-base-samba4.so(smbd_smb2_request_process_sesssetup+0x4b4) [0x7fe57b95ea54]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #33 /usr/lib64/samba/libsmbd-base-samba4.so(smbd_smb2_request_dispatch+0x14b1) [0x7fe57b95795e]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #34 /usr/lib64/samba/libsmbd-base-samba4.so(+0x15a902) [0x7fe57b959902]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #35 /usr/lib64/samba/libtevent.so.0(tevent_common_invoke_fd_handler+0x95) [0x7fe57a91794d]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #36 /usr/lib64/samba/libtevent.so.0(+0xd054) [0x7fe57a91e054]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #37 /usr/lib64/samba/libtevent.so.0(+0xac6f) [0x7fe57a91bc6f]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #38 /usr/lib64/samba/libtevent.so.0(_tevent_loop_once+0xa2) [0x7fe57a916f66]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #39 /usr/lib64/samba/libtevent.so.0(tevent_common_loop_wait+0x21) [0x7fe57a917161]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #40 /usr/lib64/samba/libtevent.so.0(+0xac1d) [0x7fe57a91bc1d]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #41 /usr/lib64/samba/libtevent.so.0(_tevent_loop_wait+0xa) [0x7fe57a9171bd]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #42 /usr/lib64/samba/libsmbd-base-samba4.so(smbd_process+0x9b7) [0x7fe57b94588a]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #43 /usr/sbin/smbd(+0xcc6b) [0x5624889c4c6b]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #44 /usr/lib64/samba/libtevent.so.0(tevent_common_invoke_fd_handler+0x95) [0x7fe57a91794d]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #45 /usr/lib64/samba/libtevent.so.0(+0xd054) [0x7fe57a91e054]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #46 /usr/lib64/samba/libtevent.so.0(+0xac6f) [0x7fe57a91bc6f]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #47 /usr/lib64/samba/libtevent.so.0(_tevent_loop_once+0xa2) [0x7fe57a916f66]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #48 /usr/lib64/samba/libtevent.so.0(tevent_common_loop_wait+0x21) [0x7fe57a917161]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #49 /usr/lib64/samba/libtevent.so.0(+0xac1d) [0x7fe57a91bc1d]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #50 /usr/lib64/samba/libtevent.so.0(_tevent_loop_wait+0xa) [0x7fe57a9171bd]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #51 /usr/sbin/smbd(main+0x2021) [0x5624889c6e0e]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #52 /lib64/libc.so.6(__libc_start_main+0xf3) [0x7fe577b234a3]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:    #53 /usr/sbin/smbd(_start+0x2e) [0x5624889bedfe]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]: [2021/09/27 09:24:19.320276,  0] ../../source3/lib/util.c:693(smb_panic_s3)
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:   smb_panic(): calling panic action [/usr/share/samba/scripts/panic-action 2056]
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]: [2021/09/27 09:24:19.339502,  0] ../../source3/lib/util.c:701(smb_panic_s3)
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:   smb_panic(): action returned status 0
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]: [2021/09/27 09:24:19.339621,  0] ../../source3/lib/dumpcore.c:318(dump_core)
Sep 27 09:24:19 lx-sv-03.ad.domain.de smbd_audit[2056]:   coredump is handled by helper binary specified at /proc/sys/kernel/core_pattern
Comment 1 Christian Naumer 2021-09-29 09:01:10 UTC
Created attachment 16833 [details]
smb.conf
Comment 2 Ralph Böhme 2021-09-30 11:31:19 UTC
(In reply to Christian Naumer from comment #0)
Looks like the crash is happening inside libc getaddrdinfo() -> malloc(), so this doesn't look like a generic Samba problem.
Comment 3 Christian Naumer 2021-09-30 11:33:59 UTC
As this does not happen on the same server with 4.14 is there anything that can be done?
Comment 4 Ralph Böhme 2021-09-30 12:08:41 UTC
(In reply to Christian Naumer from comment #3)
Sure, but not sure what exactly. Someone with the right expertise would have to take a closer look I guess. You could try installing libc-debug (and samba-debug while you're at it), maybe a stack backtrace with libc debug symbols rings someones bell.
Comment 5 Christian Naumer 2021-09-30 12:46:11 UTC
Created attachment 16834 [details]
Backtrace with glic-debuginfo
Comment 6 Christian Naumer 2021-09-30 12:49:35 UTC
samba-debuginfo was installed
glibc-debuginfo I installed now
Comment 7 Ralph Böhme 2021-09-30 13:05:21 UTC
(In reply to Christian Naumer from comment #5)
Hm, this is a different crash. The previous one was at the session setup (authentication) stage, this one is even earlier at the negprot stage (SMB connection setup, protocol negotitation).
Comment 8 Christian Naumer 2021-09-30 13:27:05 UTC
I actually get many dumps. Once I start the Lan-test (http://www.helios.de/web/EN/products/LanTest.html)

Do think this is something general with this host because it happens at multiple palces?
Comment 9 Christian Naumer 2021-09-30 13:28:31 UTC
What I also noticed after each crash in the logs I see this:

 winbindd case, sid_to_uid for S-1-5-21-xx-xx-xx-xx2658 failed. The SID here is the machine account of the workstation used for this test.
Comment 10 Ralph Böhme 2021-09-30 13:37:24 UTC
(In reply to Christian Naumer from comment #9)
You can try assigning a uid to the machine account in AD. Or use a different idmap backend like rid or autorid which will work with machine accounts out of the box.

Sometimes we've seen clients (especially Windows clients) opening additional connections to the SMB server using the machine account. With the idmap ad backend this will fail unless the machine account has a valid uid and gid assigned in AD.

I'm not sure how this would trigger the two crashes you've posted so far, but it's worth a try.
Comment 11 Christian Naumer 2021-09-30 14:17:36 UTC
So I dug deeper. The SID thing was a red herring... I disabled the recycle vfs module and it does not crash anymore.
The Lan-Test does create a number of files and then deletes them maybe this was to much. However, after such a test run and the first crashes I could crash the server also with normal Explorer files operations.

I was just testing the upgrade and I do not have any pressing need to debug this further. But if you have some tips I can certainly try.
Comment 12 thomas.schwark 2021-10-31 12:00:02 UTC
I don't know if this is the same error or helps in any way to track this issue down.

But after upgrading to samba 4.15.x I get an error that looks similar and makes samba unusable until restarting the service.

We use an archlinux server and macOS clients.

It happens quite often and makes samba 4.15.x unusable for us in the moment. Downgrading to 4.14.x fixes the issue.

Samba is configured to use vfs objects = catia fruit streams_xattr recycle.

I uploaded the log 2021-10-29_samba_log.txt.

Thanks for any help in advance.
Comment 13 thomas.schwark 2021-10-31 12:00:37 UTC
Created attachment 16903 [details]
samba error log 4.15.x
Comment 14 Ralph Böhme 2021-10-31 12:10:55 UTC
Comment on attachment 16903 [details]
samba error log 4.15.x

This is the same crash as in https://bugzilla.samba.org/show_bug.cgi?id=14882. I'm currently working on a fix.
Comment 15 thomas.schwark 2021-10-31 12:17:09 UTC
@Ralph Böhme: Thank you ;)
Comment 16 Björn Jacke 2021-11-18 17:10:35 UTC

*** This bug has been marked as a duplicate of bug 14882 ***