"Cannot allocate memory" or kernel backtrace in "qdisc_create" when running "tc"

Solution Verified - Updated -

Issue

  • I have written a script which runs several thousand invocations of the linux tc application. When I run the script, I get a kernel oops. It is quite reproducible.
  • Running tc traffic control returns RTNETLINK answers: Cannot allocate memory
  • Kernel BUG or OOPS with backtrace similar to the following when running tc:
kernel: Call Trace:
kernel: [<ffffffff8143d6ac>] qdisc_create+0x1ac/0x370
kernel: [<ffffffff811f489a>] ? avc_has_perm_flags+0x7a/0xa0
kernel: [<ffffffff81258f64>] ? nla_parse+0x34/0x110
kernel: [<ffffffff8143ee5d>] tc_modify_qdisc+0x18d/0x490
kernel: [<ffffffff8142c617>] rtnetlink_rcv_msg+0x2b7/0x320
kernel: [<ffffffff8142c360>] ? rtnetlink_rcv+0x40/0x40
kernel: [<ffffffff814462e9>] netlink_rcv_skb+0xa9/0xd0
kernel: [<ffffffff8142c345>] rtnetlink_rcv+0x25/0x40
kernel: [<ffffffff81445f8e>] netlink_unicast+0x2de/0x2f0
kernel: [<ffffffff81446b15>] netlink_sendmsg+0x225/0x340
kernel: [<ffffffff81407eaf>] sock_sendmsg+0xef/0x120
kernel: [<ffffffff81107a72>] ? filemap_fault+0xd2/0x4b0
kernel: [<ffffffff8110685a>] ? unlock_page+0x2a/0x40
kernel: [<ffffffff8112e4e1>] ? __do_fault+0x481/0x5a0
kernel: [<ffffffff81407095>] ? move_addr_to_kernel+0x65/0x70
kernel: [<ffffffff81414415>] ? verify_iovec+0x85/0xf0
kernel: [<ffffffff81409baa>] __sys_sendmsg+0x41a/0x440
kernel: [<ffffffff8112e9e5>] ? handle_mm_fault+0x1d5/0x350
kernel: [<ffffffff814ea020>] ? do_page_fault+0x1e0/0x460
kernel: [<ffffffff81409dd9>] sys_sendmsg+0x49/0x90
kernel: [<ffffffff814ee802>] system_call_fastpath+0x16/0x1b

Environment

  • Red Hat Enterprise Linux 6.2 or earlier
  • Red Hat Enterprise Linux 5.8 or earlier

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.