• Bug#1100604: PANIC: assert failed at source3/smbd/smb2_oplock.c(156): s

    From Timo van Roermund@21:1/5 to All on Sun Mar 16 00:10:01 2025
    Package: samba
    Version: 2:4.22.0+dfsg-1+b1
    Severity: important

    Dear Maintainer,

    Since a recent update of the samba package, samba panics
    when one client (a HP Color LaserJet Pro MFP M477fdw printer) tries to access a share.

    Before, this worked without any issue.

    The panis log:

    [2025/03/15 23:41:09.323009, 0] source3/smbd/smb2_oplock.c:156(release_file_oplock)
    PANIC: assert failed at source3/smbd/smb2_oplock.c(156): sconn->oplocks.exclusive_open>=0
    [2025/03/15 23:41:09.323109, 0] lib/util/fault.c:178(smb_panic_log)
    ===============================================================
    [2025/03/15 23:41:09.323132, 0] lib/util/fault.c:179(smb_panic_log)
    INTERNAL ERROR: assert failed: sconn->oplocks.exclusive_open>=0 in smbd (smbd[192.168.10) (client [192.168.10.20]) pid 1500210 (4.22.0-Debian-4.22.0+dfsg-1)
    [2025/03/15 23:41:09.323153, 0] lib/util/fault.c:186(smb_panic_log)
    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
    [2025/03/15 23:41:09.323190, 0] lib/util/fault.c:191(smb_panic_log)
    ===============================================================
    [2025/03/15 23:41:09.323210, 0] lib/util/fault.c:192(smb_panic_log)
    PANIC (pid 1500210): assert failed: sconn->oplocks.exclusive_open>=0 in 4.22.0-Debian-4.22.0+dfsg-1
    [2025/03/15 23:41:09.324071, 0] lib/util/fault.c:303(log_stack_trace)
    BACKTRACE: 26 stack frames:
    #0 /usr/lib/x86_64-linux-gnu/samba/libgenrand-private-samba.so.0(log_stack_trace+0x2d) [0x7f9cc1a2e5bd]
    #1 /usr/lib/x86_64-linux-gnu/samba/libgenrand-private-samba.so.0(smb_panic+0xd) [0x7f9cc1a2e85d]
    #2 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base-private-samba.so.0(release_file_oplock+0xf5) [0x7f9cc1ec3f45]
    #3 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base-private-samba.so.0(close_file_smb+0x6f8) [0x7f9cc1e62ff8]
    #4 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base-private-samba.so.0(+0xc333e) [0x7f9cc1e9c33e]
    #5 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base-private-samba.so.0(smbd_smb2_request_process_close+0x1ee) [0x7f9cc1e9cd7e]
    #6 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base-private-samba.so.0(smbd_smb2_request_dispatch+0x1b04) [0x7f9cc1e8f184]
    #7 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base-private-samba.so.0(+0xb77f2) [0x7f9cc1e907f2]
    #8 /lib/x86_64-linux-gnu/libtevent.so.0(tevent_common_invoke_fd_handler+0x95) [0x7f9cc1b9c815]
    #9 /lib/x86_64-linux-gnu/libtevent.so.0(+0xfa76) [0x7f9cc1ba3a76]
    #10 /lib/x86_64-linux-gnu/libtevent.so.0(+0xd48b) [0x7f9cc1ba148b]
    #11 /lib/x86_64-linux-gnu/libtevent.so.0(_tevent_loop_once+0x93) [0x7f9cc1b9b953]
    #12 /lib/x86_64-linux-gnu/libtevent.so.0(tevent_common_loop_wait+0x1b) [0x7f9cc1b9bc4b]
    #13 /lib/x86_64-linux-gnu/libtevent.so.0(+0xd41b) [0x7f9cc1ba141b]
    #14 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base-private-samba.so.0(smbd_process+0x895) [0x7f9cc1e7d0e5]
    #15 smbd: client [192.168.10.20](+0xa1e7) [0x563947b541e7]
    #16 /lib/x86_64-linux-gnu/libtevent.so.0(tevent_common_invoke_fd_handler+0x95) [0x7f9cc1b9c815]
    #17 /lib/x86_64-linux-gnu/libtevent.so.0(+0xfa76) [0x7f9cc1ba3a76]
    #18 /lib/x86_64-linux-gnu/libtevent.so.0(+0xd48b) [0x7f9cc1ba148b]
    #19 /lib/x86_64-linux-gnu/libtevent.so.0(_tevent_loop_once+0x93) [0x7f9cc1b9b953]
    #20 /lib/x86_64-linux-gnu/libtevent.so.0(tevent_common_loop_wait+0x1b) [0x7f9cc1b9bc4b]
    #21 /lib/x86_64-linux-gnu/libtevent.so.0(+0xd41b) [0x7f9cc1ba141b]
    #22 smbd: client [192.168.10.20](main+0x14a0) [0x563947b51330]
    #23 /lib/x86_64-linux-gnu/libc.so.6(+0x29ca8) [0x7f9cc180cca8]
    #24 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x85) [0x7f9cc180cd65]
    #25 smbd: client [192.168.10.20](_start+0x21) [0x563947b51e31]
    [2025/03/15 23:41:09.324416, 0] source3/lib/util.c:700(call_panic_action)
    call_panic_action: Calling panic action [/usr/share/samba/panic-action 1500210]
    [2025/03/15 23:41:09.367958, 0] source3/lib/util.c:723(call_panic_action)
    call_panic_action: action returned status 0
    [2025/03/15 23:41:09.368245, 0] source3/lib/dumpcore.c:316(dump_core)
    dumping core in /var/log/samba/cores/smbd



    -- Package-specific info:
    * /etc/samba/smb.conf present, but not attached

    -- System Information:
    Debian Release: trixie/sid
    APT prefers testing
    APT policy: (990, 'testing'), (500, 'stable-security'), (500, 'stable'), (400, 'unstable')
    Architecture: amd64 (x86_64)

    Kernel: Linux 6.12.17-amd64 (SMP w/8 CPU threads; PREEMPT)
    Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
    Shell: /bin/sh linked to /usr/bin/dash
    Init: systemd (via /run/systemd/system)
    LSM: AppArmor: enabled

    Versions of packages samba depends on:
    ii init-system-helpers 1.68
    ii libbsd0 0.12.2-2
    ii libc6 2.41-4
    ii libcups2t64 2.4.10-2+b1
    ii libdbus-1-3 1.16.2-2
    ii libgnutls30t64 3.8.9-2
    ii libldap2 2.6.9+dfsg-1
    ii libldb2 2:2.11.0+samba4.22.0+dfsg-1+b1
    ii libpopt0 1.19+dfsg-2
    ii libtalloc2 2:2.4.3+samba4.22.0+dfsg-1+b1
    ii libtasn1-6 4.20.0-2
    ii libtdb1 2:1.4.13+samba4.22.0+dfsg-1+b1
    ii libtevent0t64 2:0.16.2+samba4.22.0+dfsg-1+b1
    ii libtirpc3t64 1.3.4+ds-1.3+b1
    ii liburing2 2.9-1
    ii passwd 1:4.17.3-1
    ii procps 2:4.0.4-7
    ii samba-common 2:4.22.0+dfsg-1
    ii samba-common-bin 2:4.22.0+dfsg-1+b1
    ii samba-libs [libndr6] 2:4.22.0+dfsg-1+b1

    Versions of packages samba recommends:
    ii attr 1:2.5.2-3
    ii python3-samba 2:4.22.0+dfsg-1+b1
    ii samba-ad-dc 2:4.22.0+dfsg-1+b1

    Versions of packages samba suggests:
    pn ctdb <none>
    pn samba-vfs-ceph <none>
    pn samba-vfs-glusterfs <none>
    pn ufw <none>
    ii winbind 2:4.22.0+dfsg-1+b1

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Etienne Dechamps@21:1/5 to All on Mon Mar 17 20:30:02 2025
    Control: severity -1 grave
    Control: found -1 2:4.22.0+dfsg-1+b1
    Control: fixed -1 2:4.21.4+dfsg-1

    Same issue here. I can reproduce with 2:4.22.0+dfsg-1+b1 within
    seconds just by playing some music with foobar2000 from a Windows 11
    client, and it breaks playback. Bumping severity due to multiple
    reports of severe breakage.

    I am unable to reproduce with 2:4.21.4+dfsg-1.

    Andre: you can get previous versions of packages from the Debian
    snapshot archive: https://snapshot.debian.org/

    Specifically, to downgrade to samba 2:4.21.4+dfsg-1, you can use this config:

    $ cat /etc/apt/sources.list.d/debian-20250306T211336Z.list
    # For samba 2:4.21.3+dfsg-6
    deb [check-valid-until=no] https://snapshot.debian.org/archive/debian/20250306T211336Z/ sid main
    $ apt-get update
    $ apt-get install samba=2:4.21.4+dfsg-1

    Then go through the conflict solutions until you get offered to bulk
    downgrade the dependencies.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael Tokarev@21:1/5 to All on Wed Mar 19 21:30:01 2025
    So. What's an easy way to reproduce this, having
    a test setup? I've some windows systems and linux.
    What should I do to trigger this issue?
    So far I can't find the way to trigger it.

    Thanks,

    /mjt

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Timo van Roermund@21:1/5 to All on Fri Mar 21 22:40:01 2025
    I'm currently traveling, with no access to my printer. Etienne, would
    you be able to produce such log in the coming days? Otherwise, I will
    look at it on my side when I'm back.

    I'm back home and managed to create log files. See: https://bugzilla.samba.org/show_bug.cgi?id=15836#c3

    Cheers,

    Timo

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)