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 1939696

Summary: function pointers that return pointer to struct fails to print member offset
Product: Red Hat Enterprise Linux 8 Reporter: John Pittman <jpittman>
Component: crashAssignee: lijiang
Status: CLOSED ERRATA QA Contact: Jie Li <jieli>
Severity: low Docs Contact:
Priority: low    
Version: 8.3CC: lijiang, xiawu
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: crash-7.3.0-2.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 1951991 (view as bug list) Environment:
Last Closed: 2021-11-09 18:08:37 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:
Bug Depends On:    
Bug Blocks: 1951991    

Description John Pittman 2021-03-16 20:12:33 UTC
Description of problem:

function pointers that return pointer to struct fails to print member offset

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

crash-7.2.7-3.el8

How reproducible:

Every time

Steps to Reproduce:

Print struct that has in it a function pointer that returns a pointer to a struct

Actual results:

crash> struct ib_device -ox
struct ib_device {
    [0x0] struct device *dma_device;
    [0x8] char name[64];
   [0x48] struct list_head event_handler_list;
   [0x58] spinlock_t event_handler_lock;
   [0x5c] spinlock_t client_data_lock;
   [0x60] struct list_head core_list;
   [0x70] struct list_head client_data_list;
   [0x80] struct ib_cache cache;
   [0xb0] struct ib_port_immutable *port_immutable;
   [0xb8] int num_comp_vectors;
   [0xc0] struct ib_port_pkey_list *port_pkey_list;
   [0xc8] struct iw_cm_verbs *iwcm;
          struct rdma_hw_stats *(*alloc_hw_stats)(struct ib_device *, u8);   <===== Note
   [0xd8] int (*get_hw_stats)(struct ib_device *, struct rdma_hw_stats *, u8, int);
   [0xe0] int (*query_device)(struct ib_device *, struct ib_device_attr *, struct ib_udata *);
   [0xe8] int (*query_port)(struct ib_device *, u8, struct ib_port_attr *);
   [0xf0] enum rdma_link_layer (*get_link_layer)(struct ib_device *, u8);
          struct net_device *(*get_netdev)(struct ib_device *, u8);

Expected results:

The offset should be printed

Additional info:

Comment 2 John Pittman 2021-03-26 16:57:30 UTC
potential fix posted at https://listman.redhat.com/archives/crash-utility/2021-March/msg00121.html

Comment 3 lijiang 2021-04-15 08:00:43 UTC
Thank you, John Pittman. Patch is ready on upstream: 8dfc228b29ae ("symbols: fix offset print for function pointers that return pointers")

Comment 8 errata-xmlrpc 2021-11-09 18:08:37 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 (crash bug fix and enhancement 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/RHBA-2021:4199