Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2052918

Summary: sdap_cli_resolve_done() aborts in talloc_free() with: Bad talloc magic value - unknown value
Product: Red Hat Enterprise Linux 8 Reporter: Anton Bobrov <abobrov>
Component: sssdAssignee: Alexey Tikhonov <atikhono>
Status: CLOSED INSUFFICIENT_DATA QA Contact: sssd-qe <sssd-qe>
Severity: low Docs Contact:
Priority: low    
Version: 8.3CC: aboscatt, atikhono, grajaiya, hartsjc, jhrozek, lslebodn, mzidek, pbrezina, pkettman, tmihinto, tscherf
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-09-16 15:02:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Anton Bobrov 2022-02-10 09:42:12 UTC
Description of problem:

sssd_be is aborting (roughly every couple of days) with the following back trace:

#0     __GI_raise                             (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  in __GI_abort                             () at abort.c:79
#2  in talloc_abort                           (reason=0x7ffff4320b48 "Bad talloc magic value - unknown value") at ../../talloc.c:505
#3  in talloc_abort_unknown_value             () at ../../talloc.c:534
#4     talloc_chunk_from_ptr                  () at ../../talloc.c:534
#5     _talloc_free                           ( at ../../talloc.c:1767
#6  in refcount_destructor                    () at src/util/refcount.c:40
#7     refcount_destructor                    () at src/util/refcount.c:36
#8  in _tc_free_internal                      () at ../../talloc.c:1157
#9     _tc_free_children_internal             () at ../../talloc.c:1666
#10 talloc_free_children                      () at ../../talloc.c:1712
#11 in _tc_free_internal                      () at ../../talloc.c:1183
#12    _talloc_free_internal                  () at ../../talloc.c:1247
#13    _talloc_free                           () at ../../talloc.c:1789
#14 in tevent_req_received                    () at ../../tevent_req.c:291
#15 in tevent_req_destructor                  () at ../../tevent_req.c:128
#16 in _tc_free_internal                      () at ../../talloc.c:1157
#17    _talloc_free_internal                  () at ../../talloc.c:1247
#18    _talloc_free                           () at ../../talloc.c:1789 
#19 in sdap_cli_resolve_done                  () at src/providers/ldap/sdap_async_connection.c:1563
#20 in _tevent_req_error                      () at ../../tevent_req.c:211
#21 in be_resolve_server_done                 () at src/providers/data_provider_fo.c:581
#22 in tevent_common_invoke_immediate_handler () at ../../tevent_immediate.c:166
#23 in tevent_common_loop_immediate           () at ../../tevent_immediate.c:203
#24 in epoll_event_loop_once                  () at ../../tevent_epoll.c:917
#25 in std_event_loop_once                    () at ../../tevent_standard.c:110
#26 in _tevent_loop_once                      () at ../../tevent.c:772
#27 in tevent_common_loop_wait                () at ../../tevent.c:895
#28 in std_event_loop_wait                    () at ../../tevent_standard.c:141
#29 in server_loop                            () at src/util/server.c:727
#30 in main                                   () at src/providers/data_provider_be.c:743


frame 19:

p *subreq
$2 = {async = {fn = 0x7fffeaa84b20 <sdap_cli_resolve_done>, private_data = 0x5555557ecac0}, 
  data = 0x5555558b73d0, private_print = 0x0, private_cancel = 0x0, private_cleanup = {fn = 0x0, 
    state = TEVENT_REQ_INIT}, internal = {private_type = 0x55555557a590 "struct be_resolve_server_state", 
    create_location = 0x55555557a568 "src/providers/data_provider_fo.c:515", 
    finish_location = 0x55555557a820 "src/providers/data_provider_fo.c:581", cancel_location = 0x0, 
    state = TEVENT_REQ_RECEIVED, error = 5, trigger = 0x0, defer_callback_ev = 0x0, timer = 0x0, 
    profile = 0x0}}

 
Version-Release number of selected component (if applicable):

sssd-2.3.0-9

How reproducible:

No reproducer available.

Additional info:

There are a core file and relevant sssd logs in the case attached.

Comment 7 Alexey Tikhonov 2022-02-23 20:03:59 UTC
`struct fo_server *` is allocated via `rc_alloc(server_owner, struct fo_server)` that does actual allocation on NULL context:
wrapper->ptr = talloc_named_const(NULL, size, type_name);

IIUC, the idea is that `fo_server` object should be only de-allocated when last wrapper is de-allocated (*wrapper->refcount == 0)

Maybe some of providers perform explicit de-allocation (by a mistake), but so far I wasn't able to spot such a place.

Comment 8 Alexey Tikhonov 2022-02-23 20:11:58 UTC
(In reply to Alexey Tikhonov from comment #7)
> 
> Maybe some of providers perform explicit de-allocation (by a mistake), but
> so far I wasn't able to spot such a place.

Ah, if this would be a case, then "free() location" would be different, but this is "src/util/refcount.c:40"

Comment 9 James Hartsock 2022-03-01 15:43:22 UTC
Customer is running sssd-2.3.0-9.el8, with same kernel on 800+ hosts ... but so far seeing this on 1 host.

Any test/scratch builds wanting them to try?

Comment 10 Alexey Tikhonov 2022-03-01 17:23:38 UTC
(In reply to James Hartsock from comment #9)
> Customer is running sssd-2.3.0-9.el8, with same kernel on 800+ hosts ... but
> so far seeing this on 1 host.

Any idea what makes this host special? Network conditions, maybe?
Is this a VM? Did customer try to re-deploy this host?


> Any test/scratch builds wanting them to try?

No ideas yet.

Comment 11 Alexey Tikhonov 2022-03-02 13:15:25 UTC
Might be the same as https://github.com/SSSD/sssd/issues/6007

Comment 12 James Hartsock 2022-03-07 14:50:09 UTC
> Any idea what makes this host special (Network or other)?

That's the weird thing, it's the only one of all those hosts that has this issue.

Even if you go a step further, among RHEL 8.3 hosts on VMs in this data centre, it's the only one that displays this issue. I'll look again, but I haven't found anything special about the settings or networking either thus far.


---

Above is directly from customer.  I have asked if they are able to leave the AD domain, reinstall sssd, rejoin.  But if that clears it we never know the cause!