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

Deadlock on TLS w/o a certificate #852

Closed
krizhanovsky opened this issue Oct 30, 2017 · 0 comments
Closed

Deadlock on TLS w/o a certificate #852

krizhanovsky opened this issue Oct 30, 2017 · 0 comments
Assignees
Labels

Comments

@krizhanovsky
Copy link
Contributor

If Tempesta is configured to listen at HTTPS socket, but no certificate path was configured, then it goes to deadlock under some circumstances

[  263.947205] [tempesta] ERROR: TLS:ffff9e97c6074350 no certificate specified
[  263.949179] [tempesta] ERROR: conn_init() hook returned error
[  284.960829] INFO: rcu_sched detected stalls on CPUs/tasks:
[  284.961208]  0-...: (1 GPs behind) idle=753/1/0 softirq=3462/3462 fqs=2626 
[  284.961633]  (detected by 2, t=5252 jiffies, g=2037, c=2036, q=2315)
[  284.962029] Task dump for CPU 0:
[  284.962230] swapper/0       R  running task        0     0      0 0x00000008
[  284.962677]  0000000000000000 0000000000000000 ffff9e9a8a0f10c0 0000000000000000
[  284.963161]  0000000000000000 0100000000000000 0000000000000000 0000000000000000
[  284.963630]  0000000000000000 0000000000000000 0000000000000000 ffffffffffffffae
[  284.964099] Call Trace:
[  284.964269]  [<ffffffff9e608412>] ? native_safe_halt+0x2/0x10
[  284.964612]  [<ffffffff9e608158>] ? default_idle+0x18/0xd0
[  284.964947]  [<ffffffff9e0bd721>] ? cpu_startup_entry+0x1c1/0x230
[  284.965317]  [<ffffffff9ed38f7a>] ? start_kernel+0x46b/0x48b
[  284.965654]  [<ffffffff9ed38120>] ? early_idt_handler_array+0x120/0x120
[  284.966045]  [<ffffffff9ed38413>] ? x86_64_start_kernel+0x14c/0x170
[  288.384796] NMI watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [swapper/0:0]
[  288.385249] Modules linked in: tfw_sched_ratio(O) tfw_sched_http(O) tfw_sched_hash(O) tempesta_fw(O) hid_generic usbhid hid tempesta_db(O) tempesta_tls(O) kvm_intel kvm i
rqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel aes_x86_64 lrw gf128mul snd_pcm glue_helper ablk_helper snd_timer cryptd snd soundcore ppdev joydev ev
dev pcspkr serio_raw virtio_balloon virtio_console cirrus ttm drm_kms_helper drm parport_pc parport button ip_tables x_tables autofs4 ext4 crc16 jbd2 fscrypto mbcache ata_ge
neric virtio_blk virtio_net ehci_pci crc32c_intel ata_piix i2c_piix4 psmouse libata scsi_mod uhci_hcd floppy ehci_hcd virtio_pci virtio_ring virtio usbcore
[  288.389374] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G           O    4.9.35+ #1
[  288.389793] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014
[  288.390340] task: ffffffff9ec0e500 task.stack: ffffffff9ec00000
[  288.390684] RIP: 0010:[<ffffffff9e0c4fa1>]  [<ffffffff9e0c4fa1>] native_queued_spin_lock_slowpath+0x21/0x190
[  288.391269] RSP: 0018:ffff9e9abfc03b80  EFLAGS: 00000206
[  288.391577] RAX: 000000002ace70ff RBX: ffff9e97c6074298 RCX: 000000000000083f
[  288.391990] RDX: 0000000000000001 RSI: 000000002ace70ff RDI: ffff9e97c6074528
[  288.392403] RBP: ffff9e97c6074528 R08: 00000000000e7bbb R09: 0000000000000005
[  288.392815] R10: 0000000000000000 R11: ffffffff9f6ac4ad R12: 00000000ffffffea
[  288.393228] R13: ffff9e9a8cba6e70 R14: 0000000000000000 R15: ffff9e9a8ceb4040
[  288.393640] FS:  0000000000000000(0000) GS:ffff9e9abfc00000(0000) knlGS:0000000000000000
[  288.394106] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  288.394440] CR2: 00007fe903b309b0 CR3: 0000000105a07000 CR4: 00000000003406f0
[  288.394855] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  288.395277] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  288.395690] Stack:
[  288.395814]  ffffffff9e608a4d ffffffffc091fb9f 00000000ffffdc73 ffff9e97c6074298
[  288.396273]  ffff9e9a8cbf1040 ffffffffc08f83a2 ffff9e97c6074298 ffffffffc09189b0
[  288.396731]  ffff9e9a8cbf1040 ffff9e9a8cbf1040 ffff9e9a8ceb4040 ffff9e9a8a259c00
[  288.397190] Call Trace:
[  288.397338]  <IRQ> [  288.397458]  [<ffffffff9e608a4d>] ? _raw_spin_lock+0x1d/0x20
[  288.397803]  [<ffffffffc091fb9f>] ? tfw_tls_conn_drop+0x2f/0x50 [tempesta_fw]
[  288.398222]  [<ffffffffc08f83a2>] ? tfw_connection_drop+0x22/0x30 [tempesta_fw]
[  288.398650]  [<ffffffffc09189b0>] ? tfw_sock_clnt_new+0x150/0x1f0 [tempesta_fw]
[  288.399081]  [<ffffffffc0917769>] ? ss_tcp_state_change+0xe9/0x1d0 [tempesta_fw]
[  288.399518]  [<ffffffff9e55e478>] ? tcp_rcv_state_process+0x798/0xda0
[  288.399893]  [<ffffffff9e54f715>] ? inet_csk_complete_hashdance+0x45/0x80
[  288.400289]  [<ffffffff9e56aa9e>] ? tcp_check_req+0x3ae/0x510
[  288.400623]  [<ffffffff9e56a22c>] ? tcp_child_process+0x7c/0x170
[  288.400973]  [<ffffffff9e5696ef>] ? tcp_v4_rcv+0x6df/0xa20
[  288.401296]  [<ffffffffc08f865a>] ? tfw_filter_check_ip+0x4a/0xc0 [tempesta_fw]
[  288.401722]  [<ffffffff9e542fc7>] ? ip_local_deliver_finish+0x97/0x1d0
[  288.402102]  [<ffffffff9e54329b>] ? ip_local_deliver+0x6b/0xf0
[  288.402442]  [<ffffffff9e542bf5>] ? ip_rcv_finish+0xa5/0x3e0
[  288.402773]  [<ffffffff9e5435a6>] ? ip_rcv+0x286/0x3e0
[  288.403084]  [<ffffffff9e542b50>] ? inet_del_offload+0x40/0x40
[  288.403428]  [<ffffffff9e5026ab>] ? __netif_receive_skb_core+0x50b/0xa40
[  288.403820]  [<ffffffff9e503d72>] ? process_backlog+0x92/0x130
[  288.404161]  [<ffffffff9e503440>] ? net_rx_action+0x240/0x370
[  288.404498]  [<ffffffff9e60b694>] ? __do_softirq+0xf4/0x28e
[  288.404826]  [<ffffffff9e0810ce>] ? irq_exit+0xae/0xb0
[  288.405127]  [<ffffffff9e60b3ef>] ? do_IRQ+0x4f/0xd0
[  288.405638]  [<ffffffff9e609502>] ? common_interrupt+0x82/0x82
[  288.405979]  <EOI> [  288.406098]  [<ffffffff9e608412>] ? native_safe_halt+0x2/0x10
[  288.406441]  [<ffffffff9e608158>] ? default_idle+0x18/0xd0
[  288.406762]  [<ffffffff9e0bd721>] ? cpu_startup_entry+0x1c1/0x230
[  288.407123]  [<ffffffff9ed38f7a>] ? start_kernel+0x46b/0x48b
[  288.407455]  [<ffffffff9ed38120>] ? early_idt_handler_array+0x120/0x120
[  288.407840]  [<ffffffff9ed38413>] ? x86_64_start_kernel+0x14c/0x170
[  288.408204] Code: 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 0f 1f 44 00 00 ba 01 00 00 00 8b 07 85 c0 75 0a f0 0f b1 17 85 c0 75 f2 f3 c3 f3 90 <eb> ec 81 fe 00 01 00 00 0f 84 91 00 00 00 41 b8 01 01 00 00 b9 
[  316.384899] NMI watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [swapper/0:0]
@krizhanovsky krizhanovsky added this to the 0.5.0 Web Server milestone Oct 30, 2017
@krizhanovsky krizhanovsky self-assigned this Oct 30, 2017
@krizhanovsky krizhanovsky modified the milestones: 1.0 Web Server, 0.6 KTLS Jan 8, 2018
krizhanovsky added a commit that referenced this issue May 13, 2018
Fix #852: don't drop a connection if it coulnd't be created due to an error
Move non-configured certificate error to start phase.
Cleanups and more user-friendly error messages.
krizhanovsky added a commit that referenced this issue May 14, 2018
Fix #852: don't drop a connection if it coulnd't be created due to an error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant