s4/param: py_sid shouldn't be decref'ed after insertion into dict
authorNoel Power <noel.power@suse.com>
Mon, 16 Mar 2020 16:00:24 +0000 (16:00 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 19 Mar 2020 22:23:52 +0000 (22:23 +0000)
commit2321b11f1fcde41d58d3381437118b8b726ab6d5
tree62b9c62fa83c5abd0e01116e2a7e44e6e3ebe855
parent9e84f1e5767c23c0e75a0954ac9c3668d18baa30
s4/param: py_sid shouldn't be decref'ed after insertion into dict

This was causing samba.tests.net_join_no_spnego(ad_dc) to
core dumps sometimes on tumbleweed with python3.8

with...

===============================================================
INTERNAL ERROR: Signal 11 in pid 1781 (4.12.0)
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
===============================================================
smb_panic_default: PANIC (pid 1781): internal error
BACKTRACE: 64 stack frames:

7128  #0 bin/shared/libsamba-util.so.0(log_stack_trace+0x1f) [0x7fa541c5b220]
7129  #1 bin/shared/libsamba-util.so.0(+0x1efc8) [0x7fa541c5afc8]
7130  #2 bin/shared/libsamba-util.so.0(log_stack_trace+0) [0x7fa541c5b201]
7131  #3 bin/shared/libsamba-util.so.0(+0x1eed9) [0x7fa541c5aed9]
7132  #4 bin/shared/libsamba-util.so.0(+0x1eeee) [0x7fa541c5aeee]
7133  #5 /lib64/libc.so.6(+0x3bf20) [0x7fa542631f20]
7134  #6 /usr/lib64/libpython3.8.so.1.0(PyObject_GC_UnTrack+0xd) [0x7fa542386c1d]
7135  #7 /usr/lib64/libpython3.8.so.1.0(+0x12d599) [0x7fa542387599]
7136  #8 /usr/lib64/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x4d6d) [0x7fa5424269ed]
7137  #9 /usr/lib64/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0x30c) [0x7fa5423eaf5c]
7138  #10 /usr/lib64/libpython3.8.so.1.0(_PyFunction_Vectorcall+0x18e) [0x7fa5423ebcbe]
7139  #11 /usr/lib64/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x4a3a) [0x7fa5424266ba]
etc....

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Mar 19 22:23:52 UTC 2020 on sn-devel-184
source4/param/provision.c