Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic when using as a relay on 5.4.0 #37

Open
dezhin opened this issue Sep 1, 2024 · 3 comments
Open

Panic when using as a relay on 5.4.0 #37

dezhin opened this issue Sep 1, 2024 · 3 comments

Comments

@dezhin
Copy link

dezhin commented Sep 1, 2024

This may be similar to #19, but I tried the latest commit and it doesn't work. Handshakes and pings are fine, but when data transfer starts, the kernel panics with the stracktrace below.

Is relay compatible with old kernels? If so, it would be great to know the minimum required version.

[  245.989902] skbuff: skb_over_panic: text:000000004af1a33b len:628 put:8 head:0000000004b805c7 data:000000004c2a88f0 tail:0x2c2 end:0x2c0 dev:eth0
[  245.991511] kernel BUG at net/core/skbuff.c:109!
[  245.992058] invalid opcode: 0000 [#1] SMP NOPTI
[  245.992631] CPU: 1 PID: 58550 Comm: postgres Tainted: G           OE     5.4.0-193-generic #213-Ubuntu
[  245.993725] Hardware name: Selectel OpenStack Nova, BIOS 1.10.2-1ubuntu1 04/01/2014
[  245.994637] RIP: 0010:skb_panic+0x4c/0x4e
[  245.995114] Code: 4f 70 50 8b 87 bc 00 00 00 50 8b 87 b8 00 00 00 50 ff b7 c8 00 00 00 4c 8b 8f c0 00 00 00 48 c7 c7 f0 7f 80 a0 e8 c5 62 fb ff <0f> 0b 48 8b 55 08 48 c7 c1 20 1b 52 a0 48 89 7d f8 e8 9e ff ff ff
[  245.997286] RSP: 0018:ffffb466800b88c8 EFLAGS: 00010246
[  245.997919] RAX: 0000000000000085 RBX: 0000000000000008 RCX: 0000000000000000
[  245.998746] RDX: 0000000000000000 RSI: ffff960bafb1c8c8 RDI: ffff960bafb1c8c8
[  245.999553] RBP: ffffb466800b88e8 R08: ffff960bafb1c8c8 R09: 0000000000000000
[  246.000382] R10: 00000000ffffffff R11: 00000000ffffffff R12: ffff960a4fbe7a52
[  246.001208] R13: ffff960b74fd3100 R14: ffffb466800b8920 R15: 0000000000000008
[  246.002020] FS:  00007ff2ba04ab48(0000) GS:ffff960bafb00000(0000) knlGS:0000000000000000
[  246.002936] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  246.003565] CR2: 00007ff2abb66000 CR3: 00000002ca3d2000 CR4: 0000000000340ee0
[  246.004383] Call Trace:
[  246.004670]  <IRQ>
[  246.004951]  ? show_regs.cold+0x1a/0x1f
[  246.005380]  ? __die+0x90/0xd9
[  246.005750]  ? die+0x30/0x50
[  246.006113]  ? do_trap+0x85/0xf0
[  246.006486]  ? do_error_trap+0x7c/0xc0
[  246.006939]  ? skb_panic+0x4c/0x4e
[  246.007326]  ? do_invalid_op+0x3c/0x50
[  246.007756]  ? skb_panic+0x4c/0x4e
[  246.008167]  ? invalid_op+0x1e/0x30
[  246.008579]  ? skb_panic+0x4c/0x4e
[  246.008989]  ? skb_panic+0x4c/0x4e
[  246.009374]  skb_put.cold+0x14/0x1d
[  246.010485]  xt_obfs_udp_payload+0x161/0x320 [xt_WGOBFS]
[  246.011785]  xt_wg_obfs_target4+0x140/0x220 [xt_WGOBFS]
[  246.013087]  ipt_do_table+0x2e6/0x620 [ip_tables]
[  246.014271]  ? fib_validate_source+0x47/0xf0
[  246.015387]  ? ip_route_input_slow+0x410/0xbf0
[  246.016525]  iptable_mangle_hook+0x36/0xf0 [iptable_mangle]
[  246.017814]  nf_hook_slow+0x45/0xb0
[  246.018860]  ip_forward+0x491/0x4c0
[  246.019880]  ? ip4_key_hashfn+0xb0/0xb0
[  246.020933]  ip_sublist_rcv_finish+0x3d/0x50
[  246.022004]  ip_sublist_rcv+0x1c5/0x270
[  246.023012]  ? ip_rcv_finish_core.isra.0+0x3b0/0x3b0
[  246.024125]  ip_list_rcv+0x10b/0x130
[  246.025089]  __netif_receive_skb_list_core+0x228/0x250
[  246.026246]  netif_receive_skb_list_internal+0x1a1/0x2b0
[  246.027381]  gro_normal_list.part.0+0x1e/0x40
[  246.028430]  napi_complete_done+0x91/0x130
[  246.029423]  virtnet_poll+0x30d/0x450 [virtio_net]
[  246.030501]  net_rx_action+0x142/0x390
[  246.031439]  __do_softirq+0xd1/0x2c1
[  246.032352]  irq_exit+0xae/0xb0
[  246.033183]  do_IRQ+0x5a/0xf0
[  246.033987]  common_interrupt+0xf/0xf
[  246.034837]  </IRQ>
[  246.035606] RIP: 0010:mark_page_accessed+0x11/0x160
[  246.036634] Code: c6 d0 96 62 9f 4c 89 c7 48 89 e5 e8 29 f5 ff ff 5d c3 0f 1f 80 00 00 00 00 0f 1f 44 00 00 55 48 89 e5 48 83 ec 08 48 8b 47 08 <48> 8d 50 ff a8 01 48 0f 45 fa 48 8b 57 08 48 8d 42 ff 83 e2 01 48
[  246.040221] RSP: 0018:ffffb46680f476d8 EFLAGS: 00000296 ORIG_RAX: ffffffffffffffd4
[  246.041628] RAX: fffff401cc3a6988 RBX: ffff960a9670e5b0 RCX: 0000000000000000
[  246.042968] RDX: 00000000000028c0 RSI: 0000000000000000 RDI: fffff401cc70e540
[  246.044345] RBP: ffffb46680f476e0 R08: ffff960adc9d6b68 R09: ffff960adc9d6b90
[  246.045768] R10: 0000000000000000 R11: ffff960ba475ce70 R12: 0000000000000000
[  246.047169] R13: ffff960a9670e5d0 R14: 000000000000037d R15: 00000000002d7b5c
[  246.048693]  mark_extent_buffer_accessed+0x5f/0x70 [btrfs]
[  246.049919]  find_extent_buffer+0x4b/0x90 [btrfs]
[  246.051069]  read_block_for_search.isra.0+0xd0/0x370 [btrfs]
[  246.052363]  btrfs_search_slot+0x209/0x9a0 [btrfs]
[  246.053563]  btrfs_lookup_csum+0x74/0x170 [btrfs]
[  246.054723]  ? btrfs_alloc_path+0x1a/0x20 [btrfs]
[  246.055867]  __btrfs_lookup_bio_sums+0x26a/0x700 [btrfs]
[  246.057117]  ? btrfs_create_repair_bio+0x110/0x110 [btrfs]
[  246.058359]  ? btrfs_bio_wq_end_io+0x28/0x70 [btrfs]
[  246.059559]  btrfs_lookup_bio_sums+0x16/0x20 [btrfs]
[  246.060757]  btrfs_submit_bio_hook+0x108/0x180 [btrfs]
[  246.061957]  submit_one_bio+0x35/0x50 [btrfs]
[  246.063070]  extent_readpages+0x248/0x320 [btrfs]
[  246.064212]  ? get_page_from_freelist+0x2f6/0x3f0
[  246.065364]  ? handle_mm_fault+0xca/0x200
[  246.066439]  btrfs_readpages+0x16/0x20 [btrfs]
[  246.067574]  read_pages+0x71/0x1a0
[  246.068609]  __do_page_cache_readahead+0x180/0x1a0
[  246.069766]  ondemand_readahead+0x28f/0x2d0
[  246.070858]  page_cache_sync_readahead+0x78/0xc0
[  246.071992]  generic_file_buffered_read+0x5ba/0xbd0
[  246.073155]  ? aa_file_perm+0x1f9/0x380
[  246.074199]  ? file_fdatawait_range+0x30/0x30
[  246.075319]  generic_file_read_iter+0xdc/0x140
[  246.076465]  new_sync_read+0x122/0x1b0
[  246.077510]  __vfs_read+0x29/0x40
[  246.078503]  vfs_read+0xab/0x160
[  246.079491]  ksys_read+0x67/0xe0
[  246.080460]  __x64_sys_read+0x1a/0x20
[  246.081448]  do_syscall_64+0x57/0x190
[  246.082408]  entry_SYSCALL_64_after_hwframe+0x61/0xc6
[  246.083507] RIP: 0033:0x7ff2ba009413
[  246.084441] Code: c3 8b 07 85 c0 75 24 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> e9 8a d2 ff ff 41 54 b8 02 00 00 00 49 89 f4 be 00 88 08 00 55
[  246.088189] RSP: 002b:00007ffefe431cd8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
[  246.089615] RAX: ffffffffffffffda RBX: 00007ff2ba04ab48 RCX: 00007ff2ba009413
[  246.091000] RDX: 0000000000002000 RSI: 00007ff2abb66a00 RDI: 00000000000000a2
[  246.092395] RBP: 0000000000002000 R08: 0000000000000000 R09: 0000000000000000
[  246.093777] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
[  246.095131] R13: 0000000000000000 R14: 00007ffefe431de0 R15: 0000000000000000
[  246.096506] Modules linked in: xt_WGOBFS(OE) xt_REDIRECT xt_state ip_vs_rr xt_ipvs ip_vs vxlan xt_policy iptable_mangle xt_mark xt_bpf veth xt_nat xt_tcpudp xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink xfrm_user xfrm_algo iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xt_addrtype iptable_filter bpfilter br_netfilter bridge stp llc aufs wireguard ip6_udp_tunnel udp_tunnel overlay binfmt_misc kvm_amd ccp kvm crct10dif_pclmul ghash_clmulni_intel snd_pcsp snd_pcm snd_timer snd input_leds joydev soundcore serio_raw mac_hid qemu_fw_cfg isofs sch_fq_codel ramoops drm reed_solomon efi_pstore virtio_rng 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 hid crc32_pclmul aesni_intel glue_helper crypto_simd cryptd virtio_net psmouse net_failover failover virtio_scsi i2c_piix4 pata_acpi floppy
[  246.112516] ---[ end trace cb53d97ff7124c1b ]---
[  246.113842] RIP: 0010:skb_panic+0x4c/0x4e
[  246.115116] Code: 4f 70 50 8b 87 bc 00 00 00 50 8b 87 b8 00 00 00 50 ff b7 c8 00 00 00 4c 8b 8f c0 00 00 00 48 c7 c7 f0 7f 80 a0 e8 c5 62 fb ff <0f> 0b 48 8b 55 08 48 c7 c1 20 1b 52 a0 48 89 7d f8 e8 9e ff ff ff
[  246.119667] RSP: 0018:ffffb466800b88c8 EFLAGS: 00010246
[  246.121130] RAX: 0000000000000085 RBX: 0000000000000008 RCX: 0000000000000000
[  246.122767] RDX: 0000000000000000 RSI: ffff960bafb1c8c8 RDI: ffff960bafb1c8c8
[  246.124426] RBP: ffffb466800b88e8 R08: ffff960bafb1c8c8 R09: 0000000000000000
[  246.126057] R10: 00000000ffffffff R11: 00000000ffffffff R12: ffff960a4fbe7a52
[  246.127732] R13: ffff960b74fd3100 R14: ffffb466800b8920 R15: 0000000000000008
[  246.129424] FS:  00007ff2ba04ab48(0000) GS:ffff960bafb00000(0000) knlGS:0000000000000000
[  246.131199] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  246.132771] CR2: 00007ff2abb66000 CR3: 00000002ca3d2000 CR4: 0000000000340ee0
[  246.134496] Kernel panic - not syncing: Fatal exception in interrupt
[  246.136551] Kernel Offset: 0x1e400000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
[  246.139724] Rebooting in 15 seconds..
@infinet
Copy link
Owner

infinet commented Sep 7, 2024

I cannot reproduce the panic. I tested the lastest commit 4134a20 on Ubuntu 20.04 kernel 5.4.0-193-generic.

@dezhin
Copy link
Author

dezhin commented Sep 10, 2024

Thank for the reply. I've double checked that I'm using the same commit and the issue always reproduces. Should I share the output of iptables-save?

@infinet
Copy link
Owner

infinet commented Sep 17, 2024

Yes. And also could you try the same iptables rules on a fresh Ubuntu?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants