389ds / 389-ds-base

The enterprise-class Open Source LDAP server for Linux
https://www.port389.org/
Other
210 stars 89 forks source link

Crash in suites/plugins/acceptance_test.py::test_referint #5064

Open vashirov opened 2 years ago

vashirov commented 2 years ago

Issue Description The crash is silent and doesn't generate test failure. Possibly it happens at the end of the test when we delete the config area.

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007ff1dd0ddfaa in referint_get_config (delay=delay@entry=0x7ff1b5bfca84, logfile=logfile@entry=0x7ff1b5bfcaa8)
    at ldap/servers/plugins/referint/referint.c:511
511             *delay = config->delay;
[Current thread is 1 (Thread 0x7ff1b5bff640 (LWP 5822))]
(gdb) bt
#0  0x00007ff1dd0ddfaa in referint_get_config (delay=delay@entry=0x7ff1b5bfca84, logfile=logfile@entry=0x7ff1b5bfcaa8)
    at ldap/servers/plugins/referint/referint.c:511
#1  0x00007ff1dd0df90e in referint_thread_func (arg=<optimized out>) at ldap/servers/plugins/referint/referint.c:1404
#2  0x00007ff1e155f524 in _pt_root (arg=0x7ff1e022f700) at ../../../../nspr/pr/src/pthreads/ptthread.c:201
#3  0x00007ff1e1820a87 in start_thread (arg=<optimized out>) at pthread_create.c:435
#4  0x00007ff1e18a5640 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
(gdb) x &config
0x7ff1dd0e5130 <config>:        0x00000000

Nightly run: https://github.com/389ds/389-ds-base/actions/runs/1580533593 Core file is at https://github.com/389ds/389-ds-base/suites/4659789345/artifacts/126617035 RPMs: https://github.com/389ds/389-ds-base/suites/4659789345/artifacts/126617077

progier389 commented 9 months ago

IMHO there is a race condition at shutdown time between referint_postop_close and referint_thread_func (referint_postop_close should wait that the thread has exited before freeing the config)