milabs / drop-tcp-sock

This module allows one to kill TCP sockets (including TIME-WAIT state).
72 stars 23 forks source link

Crash #5

Open tbarbette opened 5 years ago

tbarbette commented 5 years ago

When using the module with a large amount of sockets, I eventually end up in soft lockup:

[93492.433061] Call Trace:
[93492.433061]  in4_pton+0x3f/0x160
[93492.433061]  dts_pton+0x3d/0xd0 [drop_tcp_sock]
[93492.433061]  dts_proc_release+0x143/0x360 [drop_tcp_sock]
[93492.433061]  close_pdeo+0x58/0x100
[93492.433061]  proc_reg_release+0x6b/0x70
[93492.433061]  __fput+0xea/0x220
[93492.433061]  ____fput+0xe/0x10
[93492.433061]  task_work_run+0x9d/0xc0
[93492.433061]  exit_to_usermode_loop+0xc0/0xd0
[93492.433061]  do_syscall_64+0x115/0x130
[93492.433061]  entry_SYSCALL_64_after_hwframe+0x3d/0xa2
[93492.433061] RIP: 0033:0x7f15aad96947
[93492.433061] RSP: 002b:00007ffd06de2df8 EFLAGS: 00000206 ORIG_RAX: 0000000000000003
[93492.433061] RAX: 0000000000000000 RBX: 00005636a5885460 RCX: 00007f15aad96947
[93492.433061] RDX: 00007f15ab06d760 RSI: 00005636a58854e3 RDI: 0000000000000003
[93492.433061] RBP: 00007f15ab06e2a0 R08: 00007f15ab28e540 R09: 00007f15ab28e540
[93492.433061] R10: 00000000000001b6 R11: 0000000000000206 R12: 0000000000000000
[93492.433061] R13: 00005636a4a4317c R14: 0000000000000000 R15: 00007ffd06de4fb0
[93492.433061] Code: c2 01 80 3a 00 75 f7 48 83 c6 01 0f b6 4e ff 48 83 c2 01 84 c9 88 4a ff 75 ed 5d c3 0f 1f 00 80 3f 00 55 48 89 e5 74 14 48 89 f8 <48> 83 c7 01 80 3f 00 75 f7 48 29 c7 48 89 f8 5d c3 31 c0 5d c3

Maybe unrelated, but sometimes I get "Cannot allocate memory" when writing a big chunk to /dev/... . My system has 256G of memory. Maybe kmalloc is not necessary?

milabs commented 5 years ago

Could you provide the full dump? Also, kmalloc is not strictly required and can be replaced with vmalloc...