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 2042238 - [bcc-tools] compactsnoop aborted with "Error at line 82: Unsupport signed division..."
Summary: [bcc-tools] compactsnoop aborted with "Error at line 82: Unsupport signed div...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: bcc
Version: 8.6
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jerome Marchand
QA Contact: Ziqian SUN (Zamir)
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-19 05:14 UTC by Shizhao Chen
Modified: 2023-11-14 16:59 UTC (History)
3 users (show)

Fixed In Version: bcc-0.25.0-5.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-11-14 15:34:38 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-108645 0 None None None 2022-01-19 05:16:33 UTC
Red Hat Product Errata RHBA-2023:7001 0 None None None 2023-11-14 15:34:44 UTC

Description Shizhao Chen 2022-01-19 05:14:15 UTC
Description of problem:
`compactsnoop' aborted when executed.

Version-Release number of selected component (if applicable):
kernel-devel-4.18.0-359.el8.x86_64
bcc-0.19.0-5.el8.x86_64
bcc-tools-0.19.0-5.el8.x86_64

How reproducible:
always

Steps to Reproduce:
1. /usr/share/bcc/tools/compactsnoop
2.
3.

Actual results:
[root@ci-vm-10-0-139-181 tools]# ./compactsnoop 
Error at line 82: Unsupport signed division for DAG: 0x563f86a77fa0: i64 = sdiv exact 0x563f85704ea8, Constant:i64<1472>, /virtual/main.c:82:17 @[ /virtual/main.c:159:17 @[ /virtual/main.c:192:5 ] ]Please convert to unsigned div/mod.
LLVM ERROR: Cannot select: 0x563f86a77fa0: i64 = sdiv exact 0x563f85704ea8, Constant:i64<1472>, /virtual/main.c:82:17 @[ /virtual/main.c:159:17 @[ /virtual/main.c:192:5 ] ]
  0x563f85704ea8: i64 = sub 0x563f86a77b28, 0x563f86a780d8, /virtual/main.c:82:17 @[ /virtual/main.c:159:17 @[ /virtual/main.c:192:5 ] ]
    0x563f86a77b28: i64,ch = CopyFromReg 0x563f844640e8, Register:i64 %0, /virtual/main.c:168:25
      0x563f86a77d30: i64 = Register %0
    0x563f86a780d8: i64,ch = load<(dereferenceable load (s64) from %ir.2, !tbaa !2713)> 0x563f85705320, FrameIndex:i64<0>, undef:i64, /virtual/main.c:82:19 @[ /virtual/main.c:159:17 @[ /virtual/main.c:192:5 ] ]
      0x563f86a776b0: i64 = FrameIndex<0>
      0x563f86a77920: i64 = undef
  0x563f86a77f38: i64 = Constant<1472>
In function: raw_tracepoint__mm_compaction_suitable
Aborted (core dumped)

Expected results:
Proceed without error.

Additional info:
An identical bug for rhel9 filed at bz2042236.

Comment 2 Shizhao Chen 2022-05-17 06:09:27 UTC
FYI, 84z has the same issue:

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Error messages generated for './compactsnoop --timestamp --duration 10 --kernel-stack --extended_fields'
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

In file included from <built-in>:2:
In file included from /virtual/include/bcc/bpf.h:12:
In file included from include/linux/types.h:6:
In file included from include/uapi/linux/types.h:14:
In file included from include/uapi/linux/posix_types.h:5:
In file included from include/linux/stddef.h:5:
In file included from include/uapi/linux/stddef.h:2:
In file included from include/linux/compiler_types.h:78:
include/linux/compiler-clang.h:29:9: warning: '__no_sanitize_address' macro redefined [-Wmacro-redefined]
#define __no_sanitize_address
        ^
include/linux/compiler-gcc.h:339:9: note: previous definition is here
#define __no_sanitize_address __attribute__((no_sanitize_address))
        ^
1 warning generated.
bpf: Failed to load program: Permission denied
; int ret = (int)ctx->args[2];
0: (79) r2 = *(u64 *)(r1 +16)
; int ret = (int)ctx->args[2];
1: (67) r2 <<= 32
2: (77) r2 >>= 32
; if(ret != COMPACT_CONTINUE)
3: (55) if r2 != 0x4 goto pc+123
 R1=ctx(id=0,off=0,imm=0) R2_w=inv4 R10=fp0
;
4: (79) r2 = *(u64 *)(r1 +8)
5: (7b) *(u64 *)(r10 -104) = r2
6: (79) r6 = *(u64 *)(r1 +0)
; id = bpf_get_current_pid_tgid();
7: (85) call bpf_get_current_pid_tgid#14
; id = bpf_get_current_pid_tgid();
8: (7b) *(u64 *)(r10 -16) = r0
; struct val_t *valp = bpf_map_lookup_elem((void *)bpf_pseudo_fd(1, -1), &id);
9: (18) r1 = 0xffff9585c6b6ac00
11: (bf) r2 = r10
;
12: (07) r2 += -16
; struct val_t *valp = bpf_map_lookup_elem((void *)bpf_pseudo_fd(1, -1), &id);
13: (85) call bpf_map_lookup_elem#1
14: (bf) r8 = r0
;
15: (bf) r7 = r8
16: (07) r7 += 4
R7 pointer arithmetic on map_value_or_null prohibited, null-check it first
processed 16 insns (limit 1000000) max_states_per_insn 0 total_states 1 peak_states 1 mark_read 1

Traceback (most recent call last):
  File "./compactsnoop", line 291, in <module>
    b = BPF(text=bpf_text)
  File "/usr/lib/python3.6/site-packages/bcc/__init__.py", line 372, in __init__
    self._trace_autoload()
  File "/usr/lib/python3.6/site-packages/bcc/__init__.py", line 1243, in _trace_autoload
    fn = self.load_func(func_name, BPF.RAW_TRACEPOINT)
  File "/usr/lib/python3.6/site-packages/bcc/__init__.py", line 412, in load_func
    (func_name, errstr))
Exception: Failed to load BPF program b'raw_tracepoint__mm_compaction_suitable': Permission denied

Comment 11 errata-xmlrpc 2023-11-14 15:34:38 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 (bcc 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-2023:7001


Note You need to log in before you can comment on or make changes to this bug.