Bug 1055778

Summary: Pass 4 failure on RHEL7 for examples netfilter_summary and netfilter_drop
Product: Red Hat Enterprise Linux 7 Reporter: Jonathan Lebon <jlebon>
Component: systemtapAssignee: Frank Ch. Eigler <fche>
Status: CLOSED CURRENTRELEASE QA Contact: qe-baseos-tools-bugs
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: mbenitez, mcermak, mjw
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: systemtap-2.4-4.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1074541 1248159 (view as bug list) Environment:
Last Closed: 2014-06-13 12:32:47 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: 1074541, 1248159    

Description Jonathan Lebon 2014-01-20 22:01:54 UTC
Description of problem:

Both the example files netfilter_summary and netfilter_drop fail at pass-4 with the same failure:

[jlebon build]$ ../install/bin/stap -p4 ../systemtap/testsuite/systemtap.examples/network/netfilter_drop.stp -v -g TCP 1
Pass 1: parsed user script and 100 library script(s) using 210376virt/28188res/2920shr/25580data kb, in 230usr/20sys/265real ms.
Pass 2: analyzed script: 3 probe(s), 6 function(s), 5 embed(s), 1 global(s) using 447492virt/121880res/4312shr/117848data kb, in 4320usr/2630sys/10387real ms.
Pass 3: translated to C into "/tmp/stapYgNAPZ/stap_d2f6d3820a3a54c44062e8f6ceffdbb1_6411_src.c" using 447492virt/122216res/4648shr/117848data kb, in 10usr/0sys/2real ms.
/tmp/stapYgNAPZ/stap_d2f6d3820a3a54c44062e8f6ceffdbb1_6411_src.c:1200:1: error: initialization from incompatible pointer type [-Werror]
 .hook = enter_netfilter_probe_0,
 ^
/tmp/stapYgNAPZ/stap_d2f6d3820a3a54c44062e8f6ceffdbb1_6411_src.c:1200:1: error: (near initialization for ‘netfilter_opts_0.hook’) [-Werror]
cc1: all warnings being treated as errors
make[1]: *** [/tmp/stapYgNAPZ/stap_d2f6d3820a3a54c44062e8f6ceffdbb1_6411_src.o] Error 1
make: *** [_module_/tmp/stapYgNAPZ] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compiled C into "stap_d2f6d3820a3a54c44062e8f6ceffdbb1_6411.ko" in 8950usr/2510sys/15507real ms.
Pass 4: compilation failed.  [man error::pass4]
[jlebon build]$

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

SystemTap v2.4
Also fails on git HEAD (as of today, commit release-2.4-155-g4f9203efc673).

Additional information:

This error does not occur on Fedora 19.

Comment 1 Jonathan Lebon 2014-01-20 22:13:40 UTC
Related testsuite failures include:

Running ../../systemtap/testsuite/systemtap.examples/check.exp ...
FAIL: systemtap.examples/network/netfilter_drop build
FAIL: systemtap.examples/network/netfilter_summary build
Running ../../systemtap/testsuite/systemtap.pass1-4/buildok.exp ...
FAIL: buildok/netfilter01.stp
FAIL: buildok/netfilter02.stp
FAIL: buildok/netfilter03.stp
FAIL: buildok/netfilter04.stp

Comment 3 Frank Ch. Eigler 2014-01-21 16:36:22 UTC
This change comes from a backport of the linux 3.13 upstream
commit 795aa6ef6a1aba99050735eadd0c2341b789b53b

which changes the netfilter callback function's signature:

diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index 61223c52414f..fef7e67f7101 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -42,7 +42,8 @@ int netfilter_init(void);
 
 struct sk_buff;
 
-typedef unsigned int nf_hookfn(unsigned int hooknum,
+struct nf_hook_ops;
+typedef unsigned int nf_hookfn(const struct nf_hook_ops *ops,
                               struct sk_buff *skb,
                               const struct net_device *in,
                               const struct net_device *out,

We'll need a runtime/autoconf widget to detect this.

Comment 4 Frank Ch. Eigler 2014-01-21 18:38:19 UTC
Fixed upstream in commit 4d914c37bbe0

Comment 7 Ludek Smid 2014-06-13 12:32:47 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.