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 2054534

Summary: radiusd in RHEL8.5 crashes with general protection fault in request_done().
Product: Red Hat Enterprise Linux 8 Reporter: kyoneyama <kyoneyam>
Component: freeradiusAssignee: Antonio Torres <antorres>
Status: CLOSED NOTABUG QA Contact: Filip Dvorak <fdvorak>
Severity: high Docs Contact:
Priority: unspecified    
Version: 8.5CC: fdvorak, nikolai.kondrashov
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-06-21 09:46:00 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:
Attachments:
Description Flags
coredump none

Description kyoneyama 2022-02-15 07:16:09 UTC
Created attachment 1861150 [details]
coredump

Created attachment 1861150 [details]
coredump

Description of problem:

radiusd crashes with general protection fault(GPF).

  -- messages --
  Feb  8 17:01:32 ips2020-radm1 kernel: traps: radiusd[75686] general protection fault ip:55cfbed09b0b sp:7fdb43ffee50 error:0 in radiusd[55cfbecd1000+6e000]
  Feb  8 17:01:42 ips2020-radm1 systemd[1]: radiusd.service: Main process exited, code=killed, status=11/SEGV
  Feb  8 17:01:42 ips2020-radm1 systemd[1]: radiusd.service: Failed with result 'signal'.

I have debugged and identified the following GPF occurrence point.
I didn't find any similar cases, so it seems to be a new bug.


  # db -c core.1589 radiusd
  :
  :
  (gdb) disas $rip
  Dump of assembler code for function request_done:
     0x000055cfbed09ad0 <+0>:	endbr64 
     0x000055cfbed09ad4 <+4>:	push   %r13
     0x000055cfbed09ad6 <+6>:	push   %r12
     0x000055cfbed09ad8 <+8>:	mov    %esi,%r12d
     0x000055cfbed09adb <+11>:	push   %rbp
     0x000055cfbed09adc <+12>:	push   %rbx
     0x000055cfbed09add <+13>:	mov    %rdi,%rbx
     0x000055cfbed09ae0 <+16>:	sub    $0x38,%rsp
     0x000055cfbed09ae4 <+20>:	mov    %fs:0x28,%rax
     0x000055cfbed09aed <+29>:	mov    %rax,0x28(%rsp)
     0x000055cfbed09af2 <+34>:	xor    %eax,%eax
     0x000055cfbed09af4 <+36>:	lea    -0x2b(%rip),%rax        # 0x55cfbed09ad0 <request_done>
     0x000055cfbed09afb <+43>:	mov    %rax,0x88(%rdi)
     0x000055cfbed09b02 <+50>:	mov    0x18(%rdi),%rax
     0x000055cfbed09b06 <+54>:	test   %rax,%rax
     0x000055cfbed09b09 <+57>:	je     0x55cfbed09b15 <request_done+69>
  => 0x000055cfbed09b0b <+59>:	cmpl   $0x4,0x8(%rax)

  (gdb) bt
  #0  0x000055cfbed09b0b in request_done (request=0x55cfc0d8f250, action=1) at src/main/process.c:652
  #1  0x000055cfbed06482 in request_handler_thread (arg=0x55cfc0ee8500) at src/main/threads.c:826
  #2  0x00007fdb70f1a17a in start_thread (arg=<optimized out>) at pthread_create.c:479
  #3  0x00007fdb707d1dc3 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

  (gdb) p/x $rax
  $1 = 0x39332d62352d6366

  (gdb) l
  647	
  648	#ifdef WITH_DETAIL
  649		/*
  650		 *	Tell the detail listener that we're done.
  651		 */
  652		if (request->listener &&
  653		    (request->listener->type == RAD_LISTEN_DETAIL) &&
  654		    (request->simul_max != 1)) {
  655			request->simul_max = 1;
  656			request->listener->send(request->listener,

  (gdb) p *request
  $3 = {number = 520093696, timestamp = 3774629162156647987, data = 0x131e31352d66332d, 
    listener = 0x39332d62352d6366, client = 0x652d62322d36662d, packet = 0x55cfc0d8f030, 
    username = 0xb6abe278, password = 0x0, reply = 0x0, config = 0x55cfc0d8efa0, 
    state_ctx = 0x55cfc0d90f50, state = 0x0, proxy_listener = 0x7fdb725baec0 <_request_free>, 
    proxy = 0x7fdb725c9c6e, proxy_reply = 0x148, home_server = 0x0, home_pool = 0x55cfc0d8ef80, 
    process = 0x55cfbed09ad0 <request_done>, response_delay = {tv_sec = 14319450, tv_usec = 1644307292}, 
    timer_action = FR_ACTION_INVALID, ev = 0x55cfc0d1f0c0, handle = 0x55cfc0cdb180, rcode = 3235442784, 
    module = 0x55cfbed29823 "", component = 0x55cfbed2684c "<core>", delay = -1059523440, 
    master_state = 21967, child_state = REQUEST_RUNNING, child_pid = 140579715413760, root = 0x0, 
    simul_max = 0, simul_count = 0, simul_mpp = 0, priority = RAD_LISTEN_NONE, in_request_hash = false, 
    in_proxy_hash = false, num_proxied_requests = 0, num_proxied_responses = 0, server = 0x0, 
    parent = 0x55cfbed09ad0 <request_done>, log = {func = 0x0, lvl = L_DBG_LVL_OFF, indent = 0 '\000'}, 
    options = 4, coa = 0x55cfc0dc5de0, num_coa_requests = 3201202240}

  (gdb) p *(request->listener)
  Cannot access memory at address 0x39332d62352d6366


- GPF occurs in the request_done() function
- There is a problem request->listener non-accessable variable


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

- Red Hat Enterprise Linux 8.5
- kernel
- freeradius-3.0.20-10.module+el8.5.0+13440+b1b7f3c7.x86_64
- glibc-2.28-164.el8.x86_64


How reproducible:

Sometime reproduce.
This problem is not reproducible.