More test results:
* This issue can be reproduced with 5.4.0-59.65~18.04.1 and 5.4.0-58.64~18.04.1, and even with 5.4.0-52.57~18.04.1 on node entei.
* This issue cannot be reproduced when you run these two tests directly with "sudo ./reuseport_bpf_cpu" and "sudo ./reuseport_bpf_numa"
* This issue cannot be reproduced when you run the whole net test suite with "sudo make run_tests TARGETS=net in tools/testing/selftests/ of the source tree.
* This issue can be reproduced when you run the whole ubuntu_kernel_selftest suite with "AUTOTEST_PATH=/home/ubuntu/autotest sudo -E autotest/client/autotest-local --verbose autotest/client/tests/ubuntu_kernel_selftests/control", so it looks like some test before the net test ('setup','breakpoints','cpu-hotplug','efivarfs','memfd','memory-hotplug','mount') will make the net test crash with this.
And I managed to get the kernel panic log when this happens:
More test results: 64~18.04. 1, and even with 5.4.0-52.57~18.04.1 on node entei. bpf_cpu" and "sudo ./reuseport_ bpf_numa" selftests/ of the source tree. kernel_ selftest suite with "AUTOTEST_ PATH=/home/ ubuntu/ autotest sudo -E autotest/ client/ autotest- local --verbose autotest/ client/ tests/ubuntu_ kernel_ selftests/ control" , so it looks like some test before the net test ('setup' ,'breakpoints' ,'cpu-hotplug' ,'efivarfs' ,'memfd' ,'memory- hotplug' ,'mount' ) will make the net test crash with this.
* This issue can be reproduced with 5.4.0-59.65~18.04.1 and 5.4.0-58.
* This issue cannot be reproduced when you run these two tests directly with "sudo ./reuseport_
* This issue cannot be reproduced when you run the whole net test suite with "sudo make run_tests TARGETS=net in tools/testing/
* This issue can be reproduced when you run the whole ubuntu_
And I managed to get the kernel panic log when this happens:
entei login: [ 3062.665272] BUG: Unable to handle kernel instruction fetch iscsi ip_tables x_tables autofs4 btrfs zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear hid_generic usbhid ast drm_vram_helper i2c_algo_bit ttm drm_kms_helper crct10dif_vpmsum orientation_ quirks tg3 [last unloaded: notifier_ error_inject] EE,ME,IR, DR,RI,LE> CR: 24002228 XER: 20000000 select_ sock+0x104/ 0x420 lookup+ 0x1fc/0x210 lookup_ listener+ 0x1ec/0x1f0 rcv+0x800/ 0xd00 deliver_ rcu+0x68/ 0x2d0 deliver_ finish+ 0x70/0x90 deliver+ 0x9c/0x130 finish+ 0xc8/0x100 receive_ skb_one_ core+0x74/ 0xb0 backlog+ 0xc8/0x200 action+ 0x1ec/0x540 0x158/0x3c4 softirq+ 0x14/0x24 own_stack+ 0x38/0x50 part.17+ 0x80/0xb0 bh_enable_ ip+0xdc/ 0xf0 output2+ 0x1e8/0x710 0xd4/0x190 out+0x68/ 0x90 xmit+0x170/ 0x4a0 xmit+0x1c/ 0x30 skb+0x604/ 0xd80 0xc58/0x10a0 connect+ 0x478/0x5b0 stream_ connect+ 0x160/0x4f0 connect+ 0x5c/0x90 0xb8/0x160 0x28/0x40 call+0x5c/ 0x68
[ 3062.665461] Faulting instruction address: 0x7fe000087fe00008
[ 3062.665507] Oops: Kernel access of bad area, sig: 11 [#1]
[ 3062.665566] LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA PowerNV
[ 3062.665705] Modules linked in: sch_fq dccp_ipv6 dccp_ipv4 dccp ip6table_filter xt_conntrack nf_conntrack nf_defrag_ipv4 ip6_tables nf_defrag_ipv6 ip_vti ip6_vti fou6 sit ipip tunnel4 geneve act_mirred cls_basic esp6 authenc echainiv xt_policy iptable_filter bpfilter veth esp4_offload esp4 xfrm_user xfrm_algo macsec fou vxlan ip6_udp_tunnel udp_tunnel vrf 8021q garp mrp bridge stp llc ip6_gre ip6_tunnel tunnel6 ip_gre ip_tunnel gre cls_u32 sch_htb dummy tls binfmt_misc input_leds joydev mac_hid ofpart cmdlinepart powernv_flash at24 ipmi_powernv ipmi_devintf mtd ipmi_msghandler uio_pdrv_genirq uio opal_prd powernv_rng vmx_crypto sch_fq_codel ib_iser rdma_cm iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_
[ 3062.665793] crc32c_vpmsum syscopyarea sysfillrect sysimgblt fb_sys_fops drm hid ahci libahci drm_panel_
[ 3062.666150] CPU: 0 PID: 53591 Comm: reuseport_bpf_c Tainted: G W 5.4.0-58-generic #64~18.04.1-Ubuntu
[ 3062.666181] NIP: 7fe000087fe00008 LR: c000000000d20004 CTR: 7fe000087fe00008
[ 3062.666208] REGS: c0000007ff6f7580 TRAP: 0480 Tainted: G W (5.4.0-58-generic)
[ 3062.666235] MSR: 9000000000009033 <SF,HV,
[ 3062.666265] CFAR: c000000000d20000 IRQMASK: 0
[ 3062.666265] GPR00: c000000000da196c c0000007ff6f7810 c000000001abf800 c000000662e546e0
[ 3062.666265] GPR04: c008000003cd0038 c000000662e546e0 0000000000000028 000000006a17a667
[ 3062.666265] GPR08: fffffffe031e7987 7fe000087fe00008 c0000007666a5158 0000000000000000
[ 3062.666265] GPR12: 7fe000087fe00008 c0000007ff7fee00 0000000000000000 00000000000022b8
[ 3062.666265] GPR16: 000000000100007f 0000000000007fdb 000000000100007f c0000000019ef800
[ 3062.666265] GPR20: 0000000000007fdb 0000000000000000 0000000000000000 00000000000022b8
[ 3062.666265] GPR24: 0000000000000000 0000000000000080 c0000000019ef800 0000000000000028
[ 3062.666265] GPR28: c008000003cd0000 c000000662e546e0 00000000750c5235 c000000005987800
[ 3062.666564] NIP [7fe000087fe00008] 0x7fe000087fe00008
[ 3062.666590] LR [c000000000d20004] reuseport_
[ 3062.666612] Call Trace:
[ 3062.666629] [c0000007ff6f7810] [c0000007ff6f78c0] 0xc0000007ff6f78c0 (unreliable)
[ 3062.666658] [c0000007ff6f78b0] [c000000000da196c] inet_lhash2_
[ 3062.666684] [c0000007ff6f7930] [c000000000da215c] __inet_
[ 3062.666914] [c0000007ff6f7a00] [c000000000dcff60] tcp_v4_
[ 3062.666938] [c0000007ff6f7b20] [c000000000d94988] ip_protocol_
[ 3062.666965] [c0000007ff6f7b70] [c000000000d94c60] ip_local_
[ 3062.666991] [c0000007ff6f7b90] [c000000000d94d1c] ip_local_
[ 3062.667174] [c0000007ff6f7c00] [c000000000d94058] ip_rcv_
[ 3062.667198] [c0000007ff6f7c40] [c000000000d94ec0] ip_rcv+0x110/0x120
[ 3062.667223] [c0000007ff6f7cc0] [c000000000ce0764] __netif_
[ 3062.667250] [c0000007ff6f7d10] [c000000000ce0b58] process_
[ 3062.667317] [c0000007ff6f7d80] [c000000000ce311c] net_rx_
[ 3062.667452] [c0000007ff6f7ea0] [c000000000f1f518] __do_softirq+
[ 3062.667478] [c0000007ff6f7f90] [c000000000032fa8] call_do_
[ 3062.667503] [c000000668043790] [c00000000001d928] do_softirq_
[ 3062.667531] [c0000006680437b0] [c00000000014e010] do_softirq.
[ 3062.667713] [c0000006680437e0] [c00000000014e11c] __local_
[ 3062.667739] [c000000668043800] [c000000000d99e68] ip_finish_
[ 3062.667766] [c0000006680438a0] [c000000000d9c4c4] ip_output+
[ 3062.667790] [c000000668043930] [c000000000d9b948] ip_local_
[ 3062.667887] [c000000668043970] [c000000000d9bd50] __ip_queue_
[ 3062.667992] [c000000668043a00] [c000000000dca81c] ip_queue_
[ 3062.668016] [c000000668043a20] [c000000000dc1e34] __tcp_transmit_
[ 3062.668043] [c000000668043ad0] [c000000000dc3208] tcp_connect+
[ 3062.668258] [c000000668043bc0] [c000000000dccb98] tcp_v4_
[ 3062.668812] [c000000668043c50] [c000000000df22b0] __inet_
[ 3062.669144] [c000000668043cf0] [c000000000df269c] inet_stream_
[ 3062.669404] [c000000668043d30] [c000000000cab098] __sys_connect+
[ 3062.669662] [c000000668043e00] [c000000000cab168] sys_connect+
[ 3062.669932] [c000000668043e20] [c00000000000b378] system_
[ 3062.670460] Instruction dump:
[ 3062.670479] XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
[ 3062.671011] XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
[ 3062.690989] ---[ end trace e0c764d7ab8c7cc2 ]---
[ 3062.856563]
[ 3063.856744] Kernel panic - not syncing: Aiee, killing interrupt handler!