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 2130624

Summary: ../../gdb/jit.c:1278: internal-error: void jit_event_handler(gdbarch*, objfile*): Assertion `jiter->jiter_data != nullptr' failed.
Product: Red Hat Enterprise Linux 9 Reporter: Ray Strode [halfline] <rstrode>
Component: gdbAssignee: Guinevere Larsen <guinevere>
gdb sub component: system-version QA Contact: Michal Kolar <mkolar>
Status: CLOSED ERRATA Docs Contact:
Severity: unspecified    
Priority: unspecified CC: gdb-bugs, keiths, ohudlick, rstrode
Version: 9.1Keywords: Bugfix, Triaged
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gdb-10.2-11.el9 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-07 08:28:46 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 Ray Strode [halfline] 2022-09-28 17:49:11 UTC
i'm using gdb-10.2-10.el9.x86_64 on a rhel 9.1 nightly and when i have breakpoints set up, sometimes gdb has an internal error like:

../../gdb/jit.c:1278: internal-error: void jit_event_handler(gdbarch*, objfile*): Assertion `jiter->jiter_data != nullptr' failed.

an example of the kind of breakpoint commands that can cause this is:

(gdb) commands
Type commands for breakpoint(s) 2, one per line.
End with a line saying just "end".
>p rectangles[0]
>p rectangles[1]
>p rectangles[2]
>p rectangles[3]
>cont
>end

doing that after the breakpoint has been hit a few times, the assertion gets blown. This is in gnome-shell by the way which has llvmpipe running and javascript.

I've seen the issue in fedora before too, but never filed it until now.

Comment 1 Keith Seitz 2022-09-28 19:51:15 UTC
(In reply to Ray Strode [halfline] from comment #0)
> 
> ../../gdb/jit.c:1278: internal-error: void jit_event_handler(gdbarch*,
> objfile*): Assertion `jiter->jiter_data != nullptr' failed.

This may have been addressed in an upstream commit that did not make 10.2:

commit 6d1a09b77a9ab52d9fc627b8f5eb952892c81f90
Author: Tom de Vries <tdevries>
Date:   Fri May 21 15:09:14 2021 +0200

    [gdb/breakpoint] Fix assert in jit_event_handler

I imagine this is not very easy to reproduce, but I can backport the
patch and provide you with a scratch build to try out.

Is that acceptable?

Comment 2 Ray Strode [halfline] 2022-09-28 20:50:19 UTC
sure. it's not actually hard to reproduce so testing shouldn't be an issue. thanks

Comment 3 Ray Strode [halfline] 2022-09-30 13:55:41 UTC
The scratch build you provided me in email with the fix from https://gitlab.com/keiths1/gdb/-/tree/2130624-jit_event_handler-assertion works great. Thank you.

Comment 4 Michal Kolar 2023-04-27 10:33:05 UTC
Tested with gdb-10.2-11.el9.

Comment 8 Michal Kolar 2023-04-27 11:47:49 UTC
Verified with gdb-10.2-11.el9.

Comment 10 errata-xmlrpc 2023-11-07 08:28:46 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Low: gdb security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:6372