ccp-project / ccp-kernel

A Linux Kernel module implementing support for CCP congestion control algorithms
https://ccp-project.github.io/
MIT License
21 stars 8 forks source link

using kp crashses kernel #11

Closed akshayknarayan closed 6 years ago

akshayknarayan commented 6 years ago

Starting iperf immediately crashes the kernel. Both on https://github.com/ngsrinivas/linux-fork/ and on Ubuntu 18.04 (kernel 4.15.0).

Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.637695] BUG: unable to handle kernel NULL pointer dereference at 0000000000000028
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.645218] IP: lfq_read+0x30/0x2f0 [ccp]
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.647679] PGD 0 P4D 0
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.649381] Oops: 0000 [#1] SMP PTI
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.651540] Modules linked in: ccp(OE) ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat xt_connmark nf_conntr
ack tcp_bbr serio_raw sch_fq_codel ib_iser rdma_cm iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi ip_tables x_tables autofs4 btrfs zstd_compress raid10 raid456 async_raid6_recov as
ync_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc aesni_intel aes_x86_64 crypto_simd glue_helper cryptd [last
unloaded: ccp]
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.682958] CPU: 1 PID: 13279 Comm: iperf Tainted: G           OE    4.15.0-1009-aws #9-Ubuntu
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.688134] Hardware name: Xen HVM domU, BIOS 4.2.amazon 08/24/2006
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.691908] RIP: 0010:lfq_read+0x30/0x2f0 [ccp]
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.694753] RSP: 0018:ffffb00c43c77b28 EFLAGS: 00010246
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.697847] RAX: 0000000000000000 RBX: ffff8ac8c6d48000 RCX: 0000000000000000
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.702033] RDX: 0000000000001000 RSI: ffffffffc0819520 RDI: 0000000000000008
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.706117] RBP: ffffb00c43c77ba8 R08: ffffb00c43c77c50 R09: ffffb00c43c77c68
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.710574] R10: fffff9a09ef88000 R11: 000000002135ac4e R12: 0000000000000008
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.715121] R13: 0000000000000000 R14: 000000002135ac4f R15: 000000002135ac4e
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.719497] FS:  00007f3ef6a59700(0000) GS:ffff8ac8ef240000(0000) knlGS:0000000000000000
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.725122] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.729497] CR2: 0000000000000028 CR3: 00000007d76e8006 CR4: 00000000001606e0
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.734010] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.738618] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.743179] Call Trace:
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.745179]  ? tcp_ack_update_rtt.isra.33+0xf5/0x270
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.748439]  ? tcp_clean_rtx_queue+0x33c/0x8d0
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.751768]  ccpkp_try_read+0x31/0x50 [ccp]
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.754746]  tcp_ccp_cong_control+0x1fe/0x220 [ccp]
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.758126]  tcp_ack+0x639/0xa20
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.760504]  ? ip_queue_xmit+0x160/0x3e0
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.763632]  tcp_rcv_state_process+0x169/0xe70
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.766994]  ? tcp_connect+0x7d5/0xc60
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.769762]  ? xen_clocksource_get_cycles+0x15/0x20
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.773173]  tcp_v4_do_rcv+0x135/0x1e0
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.775907]  ? tcp_v4_do_rcv+0x135/0x1e0
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.778822]  __release_sock+0x88/0xe0
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.781510]  release_sock+0x30/0xa0
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.784128]  __inet_stream_connect+0x172/0x350
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.787235]  ? do_wait_intr_irq+0x90/0x90
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.790204]  inet_stream_connect+0x3b/0x60
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.793604]  SYSC_connect+0x9e/0x120
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.796688]  ? tcp_setsockopt+0x34/0x40
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.799656]  ? SyS_setsockopt+0xbb/0xf0
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.802476]  SyS_connect+0xe/0x10
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.804977]  do_syscall_64+0x73/0x130
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.807650]  entry_SYSCALL_64_after_hwframe+0x3d/0xa2
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.810947] RIP: 0033:0x7f3ef706e777
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.813519] RSP: 002b:00007f3ef6a58e60 EFLAGS: 00000293 ORIG_RAX: 000000000000002a
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.818590] RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f3ef706e777
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.823146] RDX: 0000000000000010 RSI: 000055f5e0ae9f18 RDI: 0000000000000003
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.827766] RBP: 000055f5e0ae9f18 R08: 0000000000000000 R09: 0000000000000000
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.832317] R10: 000055f5e0aea0b0 R11: 0000000000000293 R12: 0000000000000010
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.836776] R13: 0000000000000000 R14: 000055f5e0ae9e70 R15: 00007ffe5a36d260
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.841134] Code: 55 48 89 e5 41 57 41 56 41 55 41 54 49 89 fc 53 48 83 ec 58 48 89 55 80 48 89 75 a0 65 48 8b 04 25 28 00 00 00 48 89 45 d0 31 c0 <80> 7f 20 00 44 0f b7 47 18 0f b7 57 1a 0f 85 c7 00 00 00 31 c0
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.852537] RIP: lfq_read+0x30/0x2f0 [ccp] RSP: ffffb00c43c77b28
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.856395] CR2: 0000000000000028
Jun 11 01:14:15 ip-172-31-31-234 kernel: [  863.859339] ---[ end trace 50ed042de7c42705 ]---
akshayknarayan commented 6 years ago

Run portus with: sudo ./portus/ccp_generic_cong_avoid/target/debug/reno --ipc=char --deficit_timeout=10