{"action":"created","issue":{"url":"https://api.github.com/repos/iovisor/bcc/issues/1758","repository_url":"https://api.github.com/repos/iovisor/bcc","labels_url":"https://api.github.com/repos/iovisor/bcc/issues/1758/labels{/name}","comments_url":"https://api.github.com/repos/iovisor/bcc/issues/1758/comments","events_url":"https://api.github.com/repos/iovisor/bcc/issues/1758/events","html_url":"https://github.com/iovisor/bcc/issues/1758","id":322996904,"number":1758,"title":"Latest bcc package fails with \"invalid BPF_LD_IMM64 insn\" errors","user":{"login":"brendangregg","id":1101211,"avatar_url":"https://avatars3.githubusercontent.com/u/1101211?v=4","gravatar_id":"","url":"https://api.github.com/users/brendangregg","html_url":"https://github.com/brendangregg","followers_url":"https://api.github.com/users/brendangregg/followers","following_url":"https://api.github.com/users/brendangregg/following{/other_user}","gists_url":"https://api.github.com/users/brendangregg/gists{/gist_id}","starred_url":"https://api.github.com/users/brendangregg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendangregg/subscriptions","organizations_url":"https://api.github.com/users/brendangregg/orgs","repos_url":"https://api.github.com/users/brendangregg/repos","events_url":"https://api.github.com/users/brendangregg/events{/privacy}","received_events_url":"https://api.github.com/users/brendangregg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-05-14T21:58:58Z","updated_at":"2018-05-16T02:10:49Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I went to debug a prod issue but nothing works. Looks like the bcc packages have been updated in our BaseAMI, and now get invalid BPF_LD_IMM64 insn errors:\r\n\r\n```\r\n# /usr/share/bcc/tools/opensnoop\r\nbpf: Failed to load program: Unknown error 524\r\n0: (79) r7 = *(u64 *)(r1 +104)\r\n1: (b7) r1 = 0\r\n2: (7b) *(u64 *)(r10 -8) = r1\r\n3: (7b) *(u64 *)(r10 -16) = r1\r\n4: (7b) *(u64 *)(r10 -24) = r1\r\n5: (7b) *(u64 *)(r10 -32) = r1\r\n6: (7b) *(u64 *)(r10 -40) = r1\r\n7: (85) call 14\r\n8: (bf) r6 = r0\r\n9: (7b) *(u64 *)(r10 -48) = r6\r\n10: (bf) r1 = r10\r\n11: (07) r1 += -24\r\n12: (b7) r2 = 16\r\n13: (85) call 16\r\n14: (67) r0 <<= 32\r\n15: (77) r0 >>= 32\r\n16: (55) if r0 != 0x0 goto pc+12\r\n R0=imm0 R6=inv R7=inv R10=fp\r\n17: (7b) *(u64 *)(r10 -40) = r6\r\n18: (85) call 5\r\n19: (7b) *(u64 *)(r10 -32) = r0\r\n20: (7b) *(u64 *)(r10 -8) = r7\r\n21: (18) r1 = 0xffff880b034ef080\r\n23: (bf) r2 = r10\r\n24: (07) r2 += -48\r\n25: (bf) r3 = r10\r\n26: (07) r3 += -40\r\n27: (b7) r4 = 0\r\n28: (85) call 2\r\n29: (b7) r0 = 0\r\n30: (95) exit\r\n\r\nfrom 16 to 29: safe\r\n\r\nTraceback (most recent call last):\r\n  File \"/usr/share/bcc/tools/opensnoop\", line 138, in <module>\r\n    b.attach_kprobe(event=\"do_sys_open\", fn_name=\"trace_entry\")\r\n  File \"/usr/lib/python2.7/dist-packages/bcc/__init__.py\", line 569, in attach_kprobe\r\n    fn = self.load_func(fn_name, BPF.KPROBE)\r\n  File \"/usr/lib/python2.7/dist-packages/bcc/__init__.py\", line 368, in load_func\r\n    (func_name, errstr))\r\nException: Failed to load BPF program trace_entry: Unknown error 524\r\n\r\n# dmesg | tail\r\n[81841.522606] read cpu 12 ibrs val 0\r\n[81841.522608] read cpu 13 ibrs val 0\r\n[81841.522610] read cpu 14 ibrs val 0\r\n[81841.522611] read cpu 15 ibrs val 0\r\n[81880.803312] invalid BPF_LD_IMM64 insn\r\n[81880.805749] invalid BPF_LD_IMM64 insn\r\n[81880.920113] invalid BPF_LD_IMM64 insn\r\n[81880.922547] invalid BPF_LD_IMM64 insn\r\n[81916.707596] invalid BPF_LD_IMM64 insn\r\n[81916.710032] invalid BPF_LD_IMM64 insn\r\n\r\n# dpkg -l | grep bcc\r\nii  bcc-tools                           0.5.0-364.git.cf44278                      all          Command line tools for BPF Compiler Collection (BCC)\r\nii  libbcc                              0.5.0-364.git.cf44278                      amd64        Shared Library for BPF Compiler Collection (BCC)\r\nii  libcc1-0:amd64                      5.4.0-6ubuntu1~16.04.9                     amd64        GCC cc1 plugin for GDB\r\nii  python-bcc                          0.5.0-364.git.cf44278                      all          Python wrappers for BPF Compiler Collection (BCC)\r\n\r\n# uname -a\r\nLinux xxx 4.4.0-122-generic #146-Ubuntu SMP Mon Apr 23 15:34:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux\r\n```\r\n\r\ncf44278 is pretty recent: Apr 30. If this issue has already been fixed, I've been unable to find it so far."},"comment":{"url":"https://api.github.com/repos/iovisor/bcc/issues/comments/389372246","html_url":"https://github.com/iovisor/bcc/issues/1758#issuecomment-389372246","issue_url":"https://api.github.com/repos/iovisor/bcc/issues/1758","id":389372246,"user":{"login":"yonghong-song","id":12237474,"avatar_url":"https://avatars0.githubusercontent.com/u/12237474?v=4","gravatar_id":"","url":"https://api.github.com/users/yonghong-song","html_url":"https://github.com/yonghong-song","followers_url":"https://api.github.com/users/yonghong-song/followers","following_url":"https://api.github.com/users/yonghong-song/following{/other_user}","gists_url":"https://api.github.com/users/yonghong-song/gists{/gist_id}","starred_url":"https://api.github.com/users/yonghong-song/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yonghong-song/subscriptions","organizations_url":"https://api.github.com/users/yonghong-song/orgs","repos_url":"https://api.github.com/users/yonghong-song/repos","events_url":"https://api.github.com/users/yonghong-song/events{/privacy}","received_events_url":"https://api.github.com/users/yonghong-song/received_events","type":"User","site_admin":false},"created_at":"2018-05-16T02:10:49Z","updated_at":"2018-05-16T02:10:49Z","author_association":"COLLABORATOR","body":"Mostly a ubuntu issue. See https://github.com/iovisor/bcc/issues/1678.\r\nLooks like 4.4.0-122-generic has the issue. You may want to wait/try for 4.4.0-123."}}
{"actor":{"display_login":"yonghong-song"}}