Kernel panics and crashes with ipset on raspbian

Open
#3,578 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c, linux, raspberry-pi

Research direction

Start with the reported Raspberry Pi kernel 4.19.97-v7+ trace, especially ip_set_match_extensions and hash_net4_test, and reproduce the crash using an ipset with counters in the described Shorewall setup. Compare behavior with the same command on Debian and determine whether the fault can be reproduced reliably; done means the kernel no longer panics under that workload.

Written by the indexing model from the issue text.

Description

Is this the right place for my bug report?
Considering i only see this bug happening on my raspi's while the command seems to work fine in my virtualbox'ed debian buster images i kind of guess this is could be the right place to report this.

Description
There seems to be a crash related with ipsets on raspbian when the counters option is used.

  • Backstory:
    On one of my raspi's that i use as a gateway running shorewall i see some seemingly random crashes usually happening after a couple hours of usage. The shorewall configuration includes a couple dynamic zones that use ipset to populate. The kernel panic i encounter looks like this:
[52161.849507] Unhandled fault: alignment exception (0x001) at 0xb93f3b7c
[52161.858545] pgd = 40653c64
[52161.863621] [b93f3b7c] *pgd=3921141e(bad)
[52161.870076] Internal error: : 1 [#1] SMP ARM
[52161.876707] Modules linked in: tun fuse xt_recent ipt_REJECT nf_reject_ipv4 xt_iprange xt_comment xt_set xt_conntrack xt_hashlimit xt_addrtype nft_chain_route_ipv4 xt_mark nft_chain_nat_ipv4 xt_multiport xt_nat xt_REDIRECT ipt_MASQUERADE nf_nat_ipv4 nft_counter xt_CT xt_tcpudp nft_compat ip_set_hash_net ip_set nfnetlink_log xt_NFLOG nf_log_ipv4 nf_log_common xt_LOG nf_nat_tftp nf_nat_snmp_basic nf_conntrack_snmp nf_nat_sip nf_nat_pptp nf_nat_proto_gre nf_nat_irc nf_nat_h323 nf_nat_ftp nf_nat_amanda ts_kmp nf_conntrack_amanda nf_nat nf_conntrack_sane nf_conntrack_tftp nf_conntrack_sip nf_conntrack_pptp nf_conntrack_proto_gre nf_conntrack_netlink nf_conntrack_netbios_ns nf_conntrack_broadcast nf_conntrack_irc nf_conntrack_h323 nf_conntrack_ftp nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables nfnetlink
[52161.977012]  sg cdc_ether r8152 snd_bcm2835(C) snd_pcm snd_timer raspberrypi_hwmon hwmon bcm2835_codec(C) snd v4l2_mem2mem bcm2835_v4l2(C) bcm2835_mmal_vchiq(C) v4l2_common videobuf2_dma_contig videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common videodev media vc_sm_cma(C) uio_pdrv_genirq uas uio fixed ip_tables x_tables ipv6
[52162.023433] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G         C        4.19.97-v7+ #1294
[52162.035117] Hardware name: BCM2835
[52162.040359] PC is at ip_set_match_extensions+0xe4/0x20c [ip_set]
[52162.048237] LR is at 0xb6182700
[52162.053233] pc : [<7f494134>]    lr : [<b6182700>]    psr: 40000113
[52162.061420] sp : 80d01890  ip : 00000003  fp : 80d018b4
[52162.068535] r10: b795f800  r9 : b93f3b74  r8 : b93f3b7c
[52162.075626] r7 : 00000000  r6 : 00000034  r5 : 00000000  r4 : 80d019b0
[52162.084043] r3 : 00000000  r2 : 00000001  r1 : 80d01918  r0 : b6182700
[52162.092461] Flags: nZcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[52162.101487] Control: 10c5383d  Table: 3619006a  DAC: 00000055
[52162.109104] Process swapper/0 (pid: 0, stack limit = 0xe6cebfad)
[52162.116948] Stack: (0x80d01890 to 0x80d02000)
[52162.123107] 1880:                                     00000001 80d01910 b6182700 b93f3b40
[52162.134817] 18a0: b93f3b48 7f499cec 80d01904 80d018b8 7f4a6898 7f49405c b93f3b74 806812f0
[52162.146500] 18c0: b93f3b74 b795f900 b94bc000 80d019b0 80d01918 b795f800 b96608a0 80d04d48
[52162.158191] 18e0: 7f4a6708 00000000 00000000 00000002 00000034 80d01b84 80d01974 80d01908
[52162.169877] 1900: 7f4a42e0 7f4a6714 00000000 b97bad00 f10f1f34 20000000 00000000 00000000
[52162.181565] 1920: 00000000 00000000 00000001 00000000 00000034 00000000 00000000 00000000
[52162.193265] 1940: 00000000 00000000 00000000 05714382 b6182700 80d04d48 00000000 80d019a8
[52162.205049] 1960: b5b3e3c0 80d01b8c 80d019a4 80d01978 7f4950a0 7f4a41e4 80d019a8 80d019c0
[52162.216961] 1980: 00000000 80d04d48 00000000 00000000 00000002 05714382 80d01a0c 80d019a8
[52162.228980] 19a0: 7f5300a4 7f495000 00000102 00000000 00000000 00000000 00000000 00000000
[52162.241138] 19c0: 00000000 00000000 00000000 00000000 00000000 ffffffff 00000000 00000000
[52162.253428] 19e0: 80d01a0c 05714382 80d01b84 00000000 80d01a7c 7f32ed04 7f32fa64 7f332ac0
[52162.265785] 1a00: 80d01a2c 80d01a10 7f4b2150 7f52ffcc b25ec048 b25ec040 b25ec0a8 7f3328ac
[52162.278226] 1a20: 80d01a3c 80d01a30 7f4b21c0 7f4b2118 80d01b7c 80d01a40 7f31e164 7f4b21b0
[52162.290757] 1a40: 80d04d48 b6ce31a8 00000001 80d01ad4 00000001 b25b1e80 b261b58c b25ec000
[52162.303282] 1a60: 80d01aac 80d01a70 807d6144 807d48d8 00000002 b9677000 00000001 ffffffff
[52162.315813] 1a80: b25b41c0 05714382 b96eb100 30687465 00000000 00000000 00000000 00000000
[52162.328342] 1aa0: 80d01b8c 80d01ab0 80787538 80783d88 00000002 b9677000 b92ae300 80d01adc
[52162.340874] 1ac0: 00000001 1e01a8c0 00000000 b6ce31a8 b261b104 b25b1e80 b261b588 00000000
[52162.353397] 1ae0: 00000000 00000003 00000000 00000000 f10f1f34 00000000 00000000 00000000
[52162.365932] 1b00: 00000000 00000000 1e01a8c0 f10f1f34 00000000 b34b3310 80d01b94 80d01b28
[52162.378465] 1b20: 7f35b13c 80126bbc 00480020 05714382 80954de0 80d04d48 80d01b6c b34b3300
[52162.390994] 1b40: 00000000 00000001 80d01bbc 05714382 7f3fa588 80d04d48 05714382 b261ce48
[52162.403511] 1b60: b261ce40 b5b3e3c0 80d01bf8 b9677508 80d01bbc 80d01b80 7f32c204 7f31e050
[52162.416040] 1b80: 80d01bd4 b5b3e3c0 80780601 7f5323d4 b25ec048 80d01bf8 00000000 00000014
[52162.428567] 1ba0: 80794c00 05714382 00000001 00000001 80d01bec 80d01bc0 807813ec 7f32c198
[52162.441089] 1bc0: b5adc018 b9677508 b5b3e3c0 80d04d48 8078bcfc 80d7fec0 00000000 b5adc018
[52162.453604] 1be0: 80d01c3c 80d01bf0 8078c300 807813ac b611d900 b966ac00 00000002 05714302
[52162.466131] 1c00: b9677000 b97ba800 00000000 80d7fec0 8078bcfc 05714382 b9677000 b5b3e3c0
[52162.478659] 1c20: b9677000 00000000 80d7fec0 00000046 80d01c5c 80d01c40 8078a0c0 8078be08
[52162.491185] 1c40: 80d04d48 80d7fec0 00000002 b5b3e3c0 80d01c9c 80d01c60 8078aa70 8078a024
[52162.503700] 1c60: 00000000 b5b3e302 b9677000 00000000 00000000 80d7fec0 8078a018 05714382
[52162.516229] 1c80: 80d04d48 b5b3e3c0 b9677000 b5b3e3c0 80d01cc4 80d01ca0 80732a58 8078aa28
[52162.528755] 1ca0: 80d07150 05714382 0669a299 80d04d48 b5b3e3c0 b9677508 80d01cdc 80d01cc8
[52162.541278] 1cc0: 80732ab4 80732a04 00ffffff 80d04d48 80d01d04 80d01ce0 80731c7c 80732aa0
[52162.553794] 1ce0: b5b3e3c0 b9677508 b5b3e3c0 05714382 00000003 b5b3e3c0 80d01d24 80d01d08
[52162.566322] 1d00: 8073363c 80731c48 00000040 00000042 b5adc000 b9677000 80d01dc4 80d01d28
[52162.578852] 1d20: 7f2f2174 80733554 00000000 20000193 b9677508 80c92ad8 806466f8 00000000
[52162.591379] 1d40: 00000000 b9677754 80d04d48 b9677784 80d01d84 00000000 b9677774 00000040
[52162.603899] 1d60: 00000000 b96776ac 80d01d84 b7891280 8020336c 80204570 60000113 80c92ad8
[52162.616429] 1d80: 80733c40 80d01d84 80d01d84 b9c32000 0000012c 05714382 80d01dc4 ffffffff
[52162.628957] 1da0: b9677508 00000001 00000000 00000040 0000012c 00000008 80d01e2c 80d01dc8
[52162.641486] 1dc0: 80733e50 7f2f1dc4 80d04d48 80d05c4c 396c2000 80c94e40 ba356e40 80d00008
[52162.654004] 1de0: 80d03d00 004f227f 80102374 80d01dec 80d01dec 80d01df4 80d01df4 05714382
[52162.666535] 1e00: 80d01e2c 80d0308c 00000003 80d00030 00000100 b9c32000 0000000c 00000008
[52162.679064] 1e20: 80d01e94 80d01e30 80102410 80733b4c 80d01e54 80d01e40 00000001 00200102
[52162.691597] 1e40: 80d03d00 004f227f 00000009 80c93fc0 80d8f518 80d04d70 80c8c308 80d03080
[52162.704121] 1e60: 80d01e30 00000004 8017fae8 80c93fa8 00000000 00000000 00000001 b9c32000
[52162.716656] 1e80: 80d00000 80c64a38 80d01ea4 80d01e98 80126e24 8010228c 80d01ecc 80d01ea8
[52162.729188] 1ea0: 8018023c 80126d34 80d01ee8 00000000 40000013 ffffffff 80d01f1c 80d8efbe
[52162.741722] 1ec0: 80d01ee4 80d01ed0 801021b4 801801d8 00000000 80109ae8 80d01f44 80d01ee8
[52162.754244] 1ee0: 801019bc 80102160 80109ae4 00000000 40000093 40000093 80d04d70 80d00000
[52162.766780] 1f00: 80d04db8 00000001 80d8efbe babff900 80c64a38 80d01f44 80d0517c 80d01f38
[52162.779314] 1f20: 00000000 80109ae8 40000013 ffffffff 80109ae4 00000000 80d01f54 80d01f48
[52162.791848] 1f40: 80863014 80109ac0 80d01f7c 80d01f58 80152e80 80862fec 80c8c24c 000000c7
[52162.804371] 1f60: 80da3640 80d04d40 ffffffff 80da3640 80d01f8c 80d01f80 801531c0 80152da0
[52162.816910] 1f80: 80d01fa4 80d01f90 8085c6c0 801531a4 80c8c230 80da369c 80d01ff4 80d01fa8
[52162.829447] 1fa0: 80c00fb0 8085c610 ffffffff ffffffff 00000000 80c00858 00000000 80c64a38
[52162.841982] 1fc0: 057550e3 00000000 00000000 80c00330 00000055 10c0387d 00000c42 2eff9400
[52162.854505] 1fe0: 410fd034 10c5387d 00000000 80d01ff8 00000000 80c00b38 00000000 00000000
[52162.867090] [<7f494134>] (ip_set_match_extensions [ip_set]) from [<7f4a6898>] (hash_net4_test+0x190/0x30c [ip_set_hash_net])
[52162.882818] [<7f4a6898>] (hash_net4_test [ip_set_hash_net]) from [<7f4a42e0>] (hash_net4_kadt+0x108/0x184 [ip_set_hash_net])
[52162.898485] [<7f4a42e0>] (hash_net4_kadt [ip_set_hash_net]) from [<7f4950a0>] (ip_set_test+0xac/0x16c [ip_set])
[52162.912986] [<7f4950a0>] (ip_set_test [ip_set]) from [<7f5300a4>] (set_match_v4+0xe4/0x11c [xt_set])
[52162.926541] [<7f5300a4>] (set_match_v4 [xt_set]) from [<7f4b2150>] (__nft_match_eval+0x44/0x78 [nft_compat])
[52162.940774] [<7f4b2150>] (__nft_match_eval [nft_compat]) from [<7f4b21c0>] (nft_match_eval+0x1c/0x20 [nft_compat])
[52162.955561] [<7f4b21c0>] (nft_match_eval [nft_compat]) from [<7f31e164>] (nft_do_chain+0x120/0x47c [nf_tables])
[52162.970118] [<7f31e164>] (nft_do_chain [nf_tables]) from [<7f32c204>] (nft_do_chain_ipv4+0x78/0x94 [nf_tables])
[52162.984663] [<7f32c204>] (nft_do_chain_ipv4 [nf_tables]) from [<807813ec>] (nf_hook_slow+0x4c/0xd0)
[52162.998132] [<807813ec>] (nf_hook_slow) from [<8078c300>] (ip_forward+0x504/0x530)
[52163.010109] [<8078c300>] (ip_forward) from [<8078a0c0>] (ip_rcv_finish+0xa8/0xc0)
[52163.021993] [<8078a0c0>] (ip_rcv_finish) from [<8078aa70>] (ip_rcv+0x54/0xd0)
[52163.031379] [<8078aa70>] (ip_rcv) from [<80732a58>] (__netif_receive_skb_one_core+0x60/0x7c)
[52163.044193] [<80732a58>] (__netif_receive_skb_one_core) from [<80732ab4>] (__netif_receive_skb+0x20/0x7c)
[52163.058146] [<80732ab4>] (__netif_receive_skb) from [<80731c7c>] (netif_receive_skb_internal+0x40/0xec)
[52163.071921] [<80731c7c>] (netif_receive_skb_internal) from [<8073363c>] (napi_gro_receive+0xf4/0x120)
[52163.085542] [<8073363c>] (napi_gro_receive) from [<7f2f2174>] (r8152_poll+0x3bc/0x101c [r8152])
[52163.098642] [<7f2f2174>] (r8152_poll [r8152]) from [<80733e50>] (net_rx_action+0x310/0x494)
[52163.111378] [<80733e50>] (net_rx_action) from [<80102410>] (__do_softirq+0x190/0x3f0)
[52163.123581] [<80102410>] (__do_softirq) from [<80126e24>] (irq_exit+0xfc/0x120)
[52163.133122] [<80126e24>] (irq_exit) from [<8018023c>] (__handle_domain_irq+0x70/0xc4)
[52163.145296] [<8018023c>] (__handle_domain_irq) from [<801021b4>] (bcm2836_arm_irqchip_handle_irq+0x60/0xa4)
[52163.159398] [<801021b4>] (bcm2836_arm_irqchip_handle_irq) from [<801019bc>] (__irq_svc+0x5c/0x7c)
[52163.172608] Exception stack(0x80d01ee8 to 0x80d01f30)
[52163.179818] 1ee0:                   80109ae4 00000000 40000093 40000093 80d04d70 80d00000
[52163.192243] 1f00: 80d04db8 00000001 80d8efbe babff900 80c64a38 80d01f44 80d0517c 80d01f38
[52163.204659] 1f20: 00000000 80109ae8 40000013 ffffffff
[52163.211837] [<801019bc>] (__irq_svc) from [<80109ae8>] (arch_cpu_idle+0x34/0x4c)
[52163.223431] [<80109ae8>] (arch_cpu_idle) from [<80863014>] (default_idle_call+0x34/0x48)
[52163.235728] [<80863014>] (default_idle_call) from [<80152e80>] (do_idle+0xec/0x16c)
[52163.247590] [<80152e80>] (do_idle) from [<801531c0>] (cpu_startup_entry+0x28/0x2c)
[52163.259362] [<801531c0>] (cpu_startup_entry) from [<8085c6c0>] (rest_init+0xbc/0xc0)
[52163.271299] [<8085c6c0>] (rest_init) from [<80c00fb0>] (start_kernel+0x484/0x4b4)
[52163.282985] Code: 1a000011 f598f000 e1c161d8 e1b82f9f (e0922006)
[52163.291356] ---[ end trace 148e61b764eb9cf2 ]---
[52163.308218] CPU2: stopping
[52163.312963] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G      D  C        4.19.97-v7+ #1294
[52163.324969] Hardware name: BCM2835
[52163.330323] [<801120c0>] (unwind_backtrace) from [<8010d5f4>] (show_stack+0x20/0x24)
[52163.342014] [<8010d5f4>] (show_stack) from [<80845f28>] (dump_stack+0xe0/0x124)
[52163.351360] [<80845f28>] (dump_stack) from [<801104d8>] (handle_IPI+0x388/0x3a8)
[52163.362676] [<801104d8>] (handle_IPI) from [<801021f4>] (bcm2836_arm_irqchip_handle_irq+0xa0/0xa4)
[52163.375633] [<801021f4>] (bcm2836_arm_irqchip_handle_irq) from [<801019bc>] (__irq_svc+0x5c/0x7c)
[52163.388498] Exception stack(0xb9d4ff38 to 0xb9d4ff80)
[52163.395533] ff20:                                                       80109ae4 00000000
[52163.407539] ff40: 40000093 40000093 80d04d70 b9d4e000 80d04db8 00000004 80d8efbe 410fd034
[52163.419485] ff60: 00000000 b9d4ff94 80d0517c b9d4ff88 00000000 80109ae8 40000013 ffffffff
[52163.431431] [<801019bc>] (__irq_svc) from [<80109ae8>] (arch_cpu_idle+0x34/0x4c)
[52163.442587] [<80109ae8>] (arch_cpu_idle) from [<80863014>] (default_idle_call+0x34/0x48)
[52163.454491] [<80863014>] (default_idle_call) from [<80152e80>] (do_idle+0xec/0x16c)
[52163.466056] [<80152e80>] (do_idle) from [<801531c0>] (cpu_startup_entry+0x28/0x2c)
[52163.477620] [<801531c0>] (cpu_startup_entry) from [<8010fedc>] (secondary_start_kernel+0x134/0x140)
[52163.490788] [<8010fedc>] (secondary_start_kernel) from [<0010270c>] (0x10270c)
[52163.500109] CPU1: stopping
[52163.504868] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G      D  C        4.19.97-v7+ #1294
[52163.517007] Hardware name: BCM2835
[52163.522415] [<801120c0>] (unwind_backtrace) from [<8010d5f4>] (show_stack+0x20/0x24)
[52163.534165] [<8010d5f4>] (show_stack) from [<80845f28>] (dump_stack+0xe0/0x124)
[52163.543517] [<80845f28>] (dump_stack) from [<801104d8>] (handle_IPI+0x388/0x3a8)
[52163.554903] [<801104d8>] (handle_IPI) from [<801021f4>] (bcm2836_arm_irqchip_handle_irq+0xa0/0xa4)
[52163.568021] [<801021f4>] (bcm2836_arm_irqchip_handle_irq) from [<801019bc>] (__irq_svc+0x5c/0x7c)
[52163.581057] Exception stack(0xb9d4df38 to 0xb9d4df80)
[52163.588175] df20:                                                       80109ae4 00000000
[52163.600352] df40: 40000093 40000093 80d04d70 b9d4c000 80d04db8 00000002 80d8efbe 410fd034
[52163.612466] df60: 00000000 b9d4df94 80d0517c b9d4df88 00000000 80109ae8 40000013 ffffffff
[52163.624567] [<801019bc>] (__irq_svc) from [<80109ae8>] (arch_cpu_idle+0x34/0x4c)
[52163.635877] [<80109ae8>] (arch_cpu_idle) from [<80863014>] (default_idle_call+0x34/0x48)
[52163.647896] [<80863014>] (default_idle_call) from [<80152e80>] (do_idle+0xec/0x16c)
[52163.659487] [<80152e80>] (do_idle) from [<801531c0>] (cpu_startup_entry+0x28/0x2c)
[52163.671056] [<801531c0>] (cpu_startup_entry) from [<8010fedc>] (secondary_start_kernel+0x134/0x140)
[52163.684249] [<8010fedc>] (secondary_start_kernel) from [<0010270c>] (0x10270c)
[52163.693578] CPU3: stopping
[52163.698319] CPU: 3 PID: 282 Comm: rs:main Q:Reg Tainted: G      D  C        4.19.97-v7+ #1294
[52163.710951] Hardware name: BCM2835
[52163.716338] [<801120c0>] (unwind_backtrace) from [<8010d5f4>] (show_stack+0x20/0x24)
[52163.728055] [<8010d5f4>] (show_stack) from [<80845f28>] (dump_stack+0xe0/0x124)
[52163.737386] [<80845f28>] (dump_stack) from [<801104d8>] (handle_IPI+0x388/0x3a8)
[52163.748752] [<801104d8>] (handle_IPI) from [<801021f4>] (bcm2836_arm_irqchip_handle_irq+0xa0/0xa4)
[52163.761843] [<801021f4>] (bcm2836_arm_irqchip_handle_irq) from [<801019bc>] (__irq_svc+0x5c/0x7c)
[52163.774846] Exception stack(0xb5939d78 to 0xb5939dc0)
[52163.781948] 9d60:                                                       808635c4 00000000
[52163.794097] 9d80: 40000093 40000093 a0000013 b96a5000 00000001 b9162400 b96b5c40 b255ac01
[52163.806177] 9da0: 00000000 b5939ddc 80d0517c b5939dc8 00000000 808635d8 40000013 ffffffff
[52163.818262] [<801019bc>] (__irq_svc) from [<808635d8>] (_raw_spin_unlock_irqrestore+0x50/0x70)
[52163.830787] [<808635d8>] (_raw_spin_unlock_irqrestore) from [<805b1d88>] (uart_write+0x108/0x1f4)
[52163.843575] [<805b1d88>] (uart_write) from [<80596b74>] (n_tty_write+0x1e0/0x480)
[52163.854956] [<80596b74>] (n_tty_write) from [<805943fc>] (tty_write+0x13c/0x2f8)
[52163.866345] [<805943fc>] (tty_write) from [<802d0680>] (__vfs_write+0x48/0x170)
[52163.875748] [<802d0680>] (__vfs_write) from [<802d0990>] (vfs_write+0xb4/0x1bc)
[52163.885126] [<802d0990>] (vfs_write) from [<802d0c64>] (ksys_write+0x74/0xe8)
[52163.894311] [<802d0c64>] (ksys_write) from [<802d0cf0>] (sys_write+0x18/0x1c)
[52163.903455] [<802d0cf0>] (sys_write) from [<80101000>] (ret_fast_syscall+0x0/0x28)
[52163.915009] Exception stack(0xb5939fa8 to 0xb5939ff0)
[52163.922039] 9fa0:                   0000009b 755059e0 0000000d 755059e0 0000009b 00000000
[52163.934114] 9fc0: 0000009b 755059e0 0000000d 00000004 000ac848 00000901 755059e0 000ac98c
[52163.946188] 9fe0: 00000002 760fe238 00000000 76f1b1bc
[52163.953214] ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---

Based on the above kernel panic i guessed here this may have something to do with ipset so i ran some tests to see if i could reliably reproduce a crash.. and i found something.

Reproduction
Reproduction with a freshly installed "Raspbian Buster Lite" with all available updates applied below:

  • Model: tested on pi3b and 3b+
    $cat /proc/device-tree/model
    Raspberry Pi 3 Model B Rev 1.2
    $ cat /proc/device-tree/model
    Raspberry Pi 3 Model B Plus Rev 1.

  • OS version:
    $ cat /etc/rpi-issue
    Raspberry Pi reference 2020-02-13
    Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 5f884374b6ac6e155330c58caa1fb7249b8badf1, stage2

  • Firmware:
    $ vcgencmd version
    Feb 12 2020 12:38:08
    Copyright (c) 2012 Broadcom
    version 53a54c770c493957d99bf49762dfabc4eee00e45 (clean) (release) (start)

  • Kernel:
    $ uname -a
    Linux raspberrypi 4.19.97-v7+ #1294 SMP Thu Jan 30 13:15:58 GMT 2020 armv7l GNU/Linux

  • Connected extra hardware:
    none

  • Powersupply: original
    $ vcgencmd get_throttled
    throttled=0x0

  • Reproduction steps:
    $apt-get install ipset
    sudo ./crashme

  • crashme script:

Some bash script that creates an ipset with the counters option and adds 60 ip's to it and then tries to output the list of ips in the ipset.
Crash on output.

#!/bin/bash

echo Step1: create ipset
echo ipset create foo hash:ip timeout 0 counters
ipset create foo hash:ip timeout 0 counters

echo Step2: add 60 ips
counter=1
while [ $counter -le 60 ]
do
  ipset add foo 10.3.0.$counter
  echo ipset add foo 10.3.0.$counter
  ((counter++))
done
echo All done, running ipset list foo

ipset list foo
  • Crashlog:
[  386.016198] Unhandled fault: alignment exception (0x001) at 0xb6494c3c
[  386.024988] pgd = 71c3d3ed
[  386.029738] [b6494c3c] *pgd=3641141e(bad)
[  386.035443] Internal error: : 1 [#1] SMP ARM
[  386.040751] Modules linked in: ip_set_hash_ip ip_set nfnetlink bnep hci_uart btbcm serdev bluetooth ecdh_generic 8021q garp stp llc brcmfmac brcmutil sha256_generic snd_bcm2835(C) raspberrypi_hwmon cfg80211 snd_pcm hwmon snd_timer rfkill snd bcm2835_v4l2(C) bcm2835_co
dec(C) v4l2_mem2mem v4l2_common bcm2835_mmal_vchiq(C) videobuf2_vmalloc videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_common videodev media vc_sm_cma(C) uio_pdrv_genirq uio fixed ip_tables x_tables ipv6
[  386.091100] CPU: 0 PID: 696 Comm: ipset Tainted: G         C        4.19.97-v7+ #1294
[  386.101672] Hardware name: BCM2835
[  386.106464] PC is at ip_set_put_extensions+0x8c/0x294 [ip_set]
[  386.113761] LR is at   (null)
[  386.118135] pc : [<7f64cb44>]    lr : [<00000000>]    psr: 20000013
[  386.125893] sp : b422faa8  ip : b6494c3c  fp : b422faf4
[  386.132578] r10: b2cd1180  r9 : b6494c08  r8 : b57209e4
[  386.139233] r7 : b2cd1180  r6 : b6494c34  r5 : b9e7a000  r4 : 80d04d48
[  386.147224] r3 : 00000000  r2 : 00000003  r1 : b422fabc  r0 : 00000000
[  386.155220] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[  386.163842] Control: 10c5383d  Table: 32ce006a  DAC: 00000055
[  386.171043] Process ipset (pid: 696, stack limit = 0x6bab373f)
[  386.178355] Stack: (0xb422faa8 to 0xb4230000)
[  386.184168] faa0:                   805403bc 807181fc 00000004 b422fb20 00000000 b9e7a000
[  386.195231] fac0: b57209e4 68794d2f 00000004 00000001 b6494c00 b57209e0 b9e7a000 b57209e4
[  386.206266] fae0: b6494c08 b2cd1180 b422fb54 b422faf8 7f65cdcc 7f64cac4 b422fb24 b572007c
[  386.217300] fb00: 80d04d48 00000000 b96d2000 b57209b0 b970ce40 80d03d00 2a00030a b6494c34
[  386.228344] fb20: 2a00030a 68794d2f b96d2000 b970ce40 80d04d48 b57b1ac0 b2cd1180 b5720000
[  386.239508] fb40: 00000000 00000002 b422fbdc b422fb58 7f64eb04 7f65cb80 00000007 00000000
[  386.250793] fb60: b422fb94 00000000 b9e7a000 00000000 00000000 b9e7a000 00000f40 000459f4
[  386.262199] fb80: 00000000 b968ed14 b968ed1c 00000000 00000000 00000000 00000000 00000000
[  386.273775] fba0: 00000000 00000000 00000000 68794d2f 8085e11c b970cc00 b2cd1180 00000f40
[  386.285430] fbc0: b970ce40 00000f40 b970ce40 00000006 b422fc0c b422fbe0 8077b4cc 7f64e5e8
[  386.297169] fbe0: 8085e11c 801903b4 b422fc0c b970cc00 b968ed00 b2cd1000 b422fc3c 00000000
[  386.308968] fc00: b422fc34 b422fc10 8077bc4c 8077b3dc 80d04d48 7f64e5dc 7f65309c b422fd5c
[  386.320783] fc20: 7f6512e4 80d7fec0 b422fc6c b422fc38 7f64ec2c 8077bafc b422fc54 00000000
[  386.332601] fc40: 7f64e5dc 7f64efe0 00000000 7f653100 00000000 68794d2f b968ed00 7f651258
[  386.344416] fc60: b422fd54 b422fc70 7f643410 7f64eb90 b422fca0 b422fd5c b422fd94 0000000c
[  386.356223] fc80: 7f645280 80d04d48 00000006 7f645310 7f645320 b2cd1000 0000008c 00000007
[  386.368037] fca0: 00000000 b968ed14 b968ed1c 00000000 00000000 00000000 00000000 00000000
[  386.379853] fcc0: 00000000 00000000 00000000 b422fd98 b422fcf8 b422fd4c b422fdc8 80d04d48
[  386.391663] fce0: 8071188c 80c92ad8 808635c4 b422fd58 00000000 00000000 00000001 b5f86380
[  386.403479] fd00: b422fd2c b422fd10 8020336c 80204570 60000013 00000001 b422fd58 00000000
[  386.415297] fd20: b422fd44 68794d2f 808635c4 00000000 80d04d48 7f6431d4 b2cd1000 b968ed00
[  386.427113] fd40: 00000000 80d04d48 b422fda4 b422fd58 8077e06c 7f6431e0 8012b790 00000000
[  386.438922] fd60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 68794d2f
[  386.450737] fd80: 80d04d48 80d04d48 00000000 b2cd1000 b968ed00 b422fde8 b422fde4 b422fda8
[  386.462554] fda0: 7f643b44 8077df74 b422feac 8077d780 00000024 8077d6c8 00000024 68794d2f
[  386.474361] fdc0: b970cc00 b57f0400 b970cc00 b2cd1000 00000024 b422fde8 b422fe1c b422fde8
[  386.486180] fde0: 8077d78c 7f643ab8 7fffffff 68794d2f 0000000c 80d04d48 b2cd1000 00000024
[  386.497998] fe00: b970cc00 b422feb4 00000000 00000000 b422fe84 b422fe20 8077dbb0 8077d5e8
[  386.509815] fe20: b422ff2c b422fe30 8070d9ec 802bb4f4 b422fe54 00000000 00000000 00000024
[  386.521626] fe40: b420e040 00000000 000002b8 00000000 00000000 68794d2f 00000000 00000000
[  386.533444] fe60: 80d04d48 b5f86380 76d32b30 00000000 b422e000 00000122 b422fe94 b422fe88
[  386.545262] fe80: 8070d040 8077d8e0 b422ff8c b422fe98 8070e46c 8070d028 b422febc 801772b8
[  386.557069] fea0: 0000000c 00000000 00000000 015df5bc 00000024 b422fee4 0000000c 00000001
[  386.568886] fec0: 00000000 00000000 b422feb4 00000000 80d04d48 00000000 00000000 00000000
[  386.580702] fee0: b422ffb0 00000010 00000000 00000000 801167fc 802f111c b422ff14 68794d2f
[  386.592513] ff00: 802f111c 80d04d48 b5f86380 00000000 7ed0d350 801011c4 b422e000 00000129
[  386.604326] ff20: b422ff94 b422ff30 8070ebe0 8070d8c0 00000000 b422ff40 8070b9d0 00000000
[  386.616143] ff40: 0000001c b422fe7c 0000000c 00000000 0000001c 000000e4 b422fe3c 00000001
[  386.627958] ff60: 802a0168 68794d2f 00000000 76d32b30 0000000c 00001000 00000122 801011c4
[  386.639766] ff80: b422ffa4 b422ff90 8070e4d8 8070e3a4 76d32b30 0000000c 00000000 b422ffa8
[  386.651581] ffa0: 80101000 8070e4b8 76d32b30 0000000c 00000003 015df5bc 00000024 00000000
[  386.663398] ffc0: 76d32b30 0000000c 00001000 00000122 00024e18 ffffffff 00000005 00000000
[  386.675207] ffe0: 00000000 7ed0d450 76e91290 76e1ca48 60000010 00000003 00000000 00000000
[  386.687064] [<7f64cb44>] (ip_set_put_extensions [ip_set]) from [<7f65cdcc>] (hash_ip4_list+0x258/0x370 [ip_set_hash_ip])
[  386.701671] [<7f65cdcc>] (hash_ip4_list [ip_set_hash_ip]) from [<7f64eb04>] (ip_set_dump_start+0x528/0x5a8 [ip_set])
[  386.715927] [<7f64eb04>] (ip_set_dump_start [ip_set]) from [<8077b4cc>] (netlink_dump+0xfc/0x29c)
[  386.728470] [<8077b4cc>] (netlink_dump) from [<8077bc4c>] (__netlink_dump_start+0x15c/0x198)
[  386.740570] [<8077bc4c>] (__netlink_dump_start) from [<7f64ec2c>] (ip_set_dump+0xa8/0xb0 [ip_set])
[  386.753230] [<7f64ec2c>] (ip_set_dump [ip_set]) from [<7f643410>] (nfnetlink_rcv_msg+0x23c/0x254 [nfnetlink])
[  386.766875] [<7f643410>] (nfnetlink_rcv_msg [nfnetlink]) from [<8077e06c>] (netlink_rcv_skb+0x104/0x138)
[  386.780074] [<8077e06c>] (netlink_rcv_skb) from [<7f643b44>] (nfnetlink_rcv+0x98/0x15c [nfnetlink])
[  386.792830] [<7f643b44>] (nfnetlink_rcv [nfnetlink]) from [<8077d78c>] (netlink_unicast+0x1b0/0x234)
[  386.805682] [<8077d78c>] (netlink_unicast) from [<8077dbb0>] (netlink_sendmsg+0x2dc/0x364)
[  386.817653] [<8077dbb0>] (netlink_sendmsg) from [<8070d040>] (sock_sendmsg+0x24/0x34)
[  386.829184] [<8070d040>] (sock_sendmsg) from [<8070e46c>] (__sys_sendto+0xd4/0x114)
[  386.840525] [<8070e46c>] (__sys_sendto) from [<8070e4d8>] (sys_sendto+0x2c/0x34)
[  386.851620] [<8070e4d8>] (sys_sendto) from [<80101000>] (ret_fast_syscall+0x0/0x28)
[  386.862971] Exception stack(0xb422ffa8 to 0xb422fff0)
[  386.869871] ffa0:                   76d32b30 0000000c 00000003 015df5bc 00000024 00000000
[  386.881668] ffc0: 76d32b30 0000000c 00001000 00000122 00024e18 ffffffff 00000005 00000000
[  386.893429] ffe0: 00000000 7ed0d450 76e91290 76e1ca48
[  386.900273] Code: 0a00001b e595c048 e086c00c e1bc8f9f (e3a0a01e)
[  386.908287] ---[ end trace 7b304a9c44ec411d ]---
Dominant language
C
Stars
13.2k
Forks
5.5k
Avg merge
2d 21h
Merged PRs (30d)
21

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raspberrypi/linux

All issues in raspberrypi/linux

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.