OpenWrt Forum Archive

Topic: [SOLVED] Kernel Warning in Syslog

The content of this topic has been archived on 25 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi all,
I see in the syslog the following warning:

Tue Nov 29 18:48:16 2016 kern.warn kernel: [ 6566.062858] WARNING: CPU: 0 PID: 3775 at net/netfilter/nf_conntrack_rtcache.c:199 0xffffffffa03cd365()
Tue Nov 29 18:48:16 2016 kern.warn kernel: [ 6566.072192] Modules linked in: pppoe ppp_async iptable_nat ath9k pppox ppp_generic nf_nat_ipv4 nf_conntrack_ipv6 nf_conntrack_ipv4 iwlmvm iwldvm ipt_REJECT ipt_MASQUERADE ath9k_htc ath9k_common xt_time xt_tcpudp xt_tcpmss xt_statistic xt_state xt_recent xt_nat xt_multiport xt_mark xt_mac xt_limit xt_length xt_id xt_hl xt_helper xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_HL xt_DSCP xt_CT xt_CLASSITue Nov 29 18:48:16 2016 kern.warn kernel: [ 6566.183335] CPU: 0 PID: 3775 Comm: mcproxy Tainted: G        W       4.4.14 #21
Tue Nov 29 18:48:16 2016 kern.warn kernel: [ 6566.190655] Hardware name: PC Engines APU/APU, BIOS 4.0 07/08/2014
Tue Nov 29 18:48:16 2016 kern.warn kernel: [ 6566.196843]  0000000000000000 ffffffff811faab2 0000000000000000 ffffffffa03cd520
Tue Nov 29 18:48:16 2016 kern.warn kernel: [ 6566.204355]  ffffffff810452b8 ffff8800d90c7c40 0000000000000002 ffff8800d8d01f00
Tue Nov 29 18:48:16 2016 kern.warn kernel: [ 6566.211867]  ffffffff81689298 ffff8800d93e9000 ffffffffa03cd365 ffff8800d90c7c40
Tue Nov 29 18:48:16 2016 kern.warn kernel: [ 6566.219381] Call Trace:
Tue Nov 29 18:48:16 2016 kern.warn kernel: [ 6566.221850]  [<ffffffff811faab2>] ? dump_stack+0x5c/0x7a
Tue Nov 29 18:48:16 2016 kern.warn kernel: [ 6566.227180]  [<ffffffff810452b8>] ? warn_slowpath_common+0x78/0xb0
Tue Nov 29 18:48:16 2016 kern.warn kernel: [ 6566.233376]  [<ffffffffa03cd365>] ? 0xffffffffa03cd365
Tue Nov 29 18:48:16 2016 kern.warn kernel: [ 6566.238532]  [<ffffffff813c03a4>] ? nf_iterate+0x54/0x60
Tue Nov 29 18:48:16 2016 kern.warn kernel: [ 6566.243852]  [<ffffffff813c0408>] ? nf_hook_slow+0x58/0xb0
Tue Nov 29 18:48:16 2016 kern.warn kernel: [ 6566.249348]  [<ffffffff81407178>] ? ipmr_queue_xmit.isra.4.constprop.13+0x248/0x4e0
Tue Nov 29 18:48:16 2016 kern.warn kernel: [ 6566.257015]  [<ffffffff81405530>] ? ipmr_cache_find_any+0xa0/0xa0
Tue Nov 29 18:48:16 2016 kern.warn kernel: [ 6566.263119]  [<ffffffff81407d11>] ? ip_mroute_setsockopt+0x631/0x6c0
Tue Nov 29 18:48:16 2016 kern.warn kernel: [ 6566.269481]  [<ffffffff813cc88a>] ? do_ip_setsockopt.isra.4+0xaa/0xd10
Tue Nov 29 18:48:16 2016 kern.warn kernel: [ 6566.276022]  [<ffffffff81383e1d>] ? skb_dequeue+0x4d/0x60
Tue Nov 29 18:48:16 2016 kern.warn kernel: [ 6566.281431]  [<ffffffff813875d6>] ? skb_queue_purge+0x16/0x20
Tue Nov 29 18:48:16 2016 kern.warn kernel: [ 6566.287187]  [<ffffffff8112bbff>] ? __inode_wait_for_writeback+0x5f/0xa0
Tue Nov 29 18:48:16 2016 kern.warn kernel: [ 6566.293902]  [<ffffffff81073dd0>] ? autoremove_wake_function+0x30/0x30
Tue Nov 29 18:48:16 2016 kern.warn kernel: [ 6566.300446]  [<ffffffff8111a61f>] ? __dentry_kill+0x12f/0x1d0
Tue Nov 29 18:48:16 2016 kern.warn kernel: [ 6566.306210]  [<ffffffff813cd512>] ? ip_setsockopt+0x22/0x90
Tue Nov 29 18:48:16 2016 kern.warn kernel: [ 6566.311799]  [<ffffffff8137fd57>] ? SyS_setsockopt+0x57/0xb0
Tue Nov 29 18:48:16 2016 kern.warn kernel: [ 6566.317476]  [<ffffffff8146446e>] ? entry_SYSCALL_64_fastpath+0x12/0x71
Tue Nov 29 18:48:16 2016 kern.warn kernel: [ 6566.324188] ---[ end trace 2d82855c338f9458 ]---
Tue Nov 29 18:48:16 2016 kern.warn kernel: [ 6566.328865] ------------[ cut here ]------------

Firmware Version installed:

OpenWrt Designated Driver 49871 / LuCI Master (git-16.211.48508-f9e5d11) 

Kernel-Version:

4.4.14

Is the warning message critical?

Kind regards, Stefan Harbich

(Last edited by sharbich on 20 Dec 2016, 00:27)

Glancing at the code, I don't think it is critical. It's a warning message produced by the WARN_ON macro in the following code

static unsigned int nf_rtcache_forward(u_int8_t pf,
                       struct sk_buff *skb,
                       const struct nf_hook_state *state)
{
    struct nf_conn_rtcache *rtc;
    enum ip_conntrack_info ctinfo;
    enum ip_conntrack_dir dir;
    struct nf_conn *ct;
    struct dst_entry *dst = skb_dst(skb);
    int iif;

    ct = nf_ct_get(skb, &ctinfo);
    if (!ct)
        return NF_ACCEPT;

    if (dst && dst_xfrm(dst))
        return NF_ACCEPT;

    if (!nf_ct_is_confirmed(ct)) {
        if (WARN_ON(nf_ct_rtcache_find(ct)))
            return NF_ACCEPT;
        nf_ct_rtcache_ext_add(ct);
        return NF_ACCEPT;
    }

    rtc = nf_ct_rtcache_find_usable(ct);
    if (!rtc)
        return NF_ACCEPT;

    dir = CTINFO2DIR(ctinfo);
    iif = nf_conn_rtcache_iif_get(rtc, dir);
    pr_debug("ct %p, skb %p, dir %d, iif %d, cached iif %d\n",
         ct, skb, dir, iif, state->in->ifindex);
    if (likely(state->in->ifindex == iif))
        return NF_ACCEPT;

    nf_conn_rtcache_dst_set(pf, rtc, skb_dst(skb), dir, state->in->ifindex);
    return NF_ACCEPT;
}


static inline
struct nf_conn_rtcache *nf_ct_rtcache_find(const struct nf_conn *ct)
{
#if IS_ENABLED(CONFIG_NF_CONNTRACK_RTCACHE)
    return nf_ct_ext_find(ct, NF_CT_EXT_RTCACHE);
#else
    return NULL;
#endif
}

This code is added by the following patch: https://dev.openwrt.org/browser/trunk/t … ?rev=44514

The kernel isn't finding a cached route entry in the internal hash table and will just consult the FIB instead. The code caches routing information for each conntrack connection that is being forwarded to avoid having to do constant FIB lookups.

I note that you have nf_conntrack modules loaded but don't have the module nf_conntrack_rtcache.ko loaded, which would cause this.

Hi dl12345,
however, an excerpt from lsmod shows the following message:

nf_conntrack           53961 14 nf_nat_ipv4,nf_conntrack_ipv6,nf_conntrack_ipv4,xt_state,xt_helper,xt_conntrack,xt_connmark,xt_connlimit,xt_connbytes,xt_CT,nf_nat_masquerade_ipv4,nf_nat,nf_conntrack_rtcache,act_connmark

If I try to load the module I get the following error message:

insmod nf_conntrack_rtcache
module is already loaded - nf_conntrack_rtcache

Still don't think it's a serious problem....

Where do I have to look for the problem?

I already explained what the problem is in my initial reply to your question

dl12345 wrote:

I already explained what the problem is in my initial reply to your question

In my second Post you can see the Modul "nf_conntrack_rtcache" is loaded.
This does not seem to be the problem. Any Idea?

(Last edited by sharbich on 5 Dec 2016, 23:00)

dl12345 wrote:

The kernel isn't finding a cached route entry in the internal hash table and will just consult the FIB instead. The code caches routing information for each conntrack connection that is being forwarded to avoid having to do constant FIB lookups.

It's just a warning. Ignore it

The discussion might have continued from here.