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

Kernel fault with default tempesta config #312

Closed
vladtcvs opened this issue Oct 14, 2015 · 4 comments
Closed

Kernel fault with default tempesta config #312

vladtcvs opened this issue Oct 14, 2015 · 4 comments
Labels
Milestone

Comments

@vladtcvs
Copy link
Contributor

How to reproduce:

install tempesta
don't install backend and don't change config files
start tempesta
wget http://127.0.0.1:80

kernel falls with Invalid opcode 0000

@krizhanovsky krizhanovsky added this to the 0.5.0 Web Server milestone Oct 14, 2015
@vladtcvs
Copy link
Contributor Author

Log:

[tdb] Start Tempesta DB
[tempesta] Initializing Tempesta FW kernel module...
[tempesta] Registering new scheduler: hash
[tempesta] Registering new scheduler: http
[tempesta] Registering new scheduler: round-robin
[tempesta] got state via sysctl: start
[tempesta] starting all modules...
[tdb] Opened table /opt/tempesta/db/filter.tdb: size=16777216 rec_size=20 base=ffff88003d400000
[tdb] Opened table /opt/tempesta/db/cache.tdb: size=268435456 rec_size=0 base=ffff88002d400000
[tempesta] Open listen socket on: 0.0.0.0
[tempesta] modules are started
invalid opcode: 0000 [#1] SMP 
Modules linked in: tfw_sched_rr(O) tfw_sched_http(O) tfw_sched_hash(O) tempesta_fw(O) tempesta_db(O) ipv6 fuse ppdev e1000 floppy i2c_piix4 i2c_core serio_raw parport_pc pcspkr parport
CPU: 0 PID: 1781 Comm: wget Tainted: G           O 3.10.10+ #6
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014
task: ffff88001beee7f0 ti: ffff88001d1d2000 task.ti: ffff88001d1d2000
RIP: 0010:[<ffffffffa012a9d3>]  [<ffffffffa012a9d3>] tfw_hash_str+0xc3/0x100 [tempesta_fw]
RSP: 0018:ffff88003fc03a98  EFLAGS: 00010206
RAX: 00000000ffffffff RBX: ffff88001bc14020 RCX: 0000000000000048
RDX: ffff88001d1cd910 RSI: ffff88001d1cd910 RDI: ffff88001bc142f0
RBP: ffff88003fc03a98 R08: ffff88001d1cd916 R09: ffff88001bc14320
R10: ffff88001d1cd910 R11: ffff88001d1cd910 R12: ffff88001bc14020
R13: 0000000000000000 R14: ffff88001bc14020 R15: ffff88001db8aa08
FS:  00007f757169a780(0000) GS:ffff88003fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f75703ac280 CR3: 000000001d1e5000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Stack:
 ffff88003fc03ab8 ffffffffa012ad0f ffff88001bc14020 ffffffffa012b110
 ffff88003fc03ae8 ffffffffa01275cb 000000000000006b 0000000000000000
 ffff88001c12a608 ffff88001bc14020 ffff88003fc03b38 ffffffffa012b701
Call Trace:
 <IRQ> 
 [<ffffffffa012ad0f>] tfw_http_req_key_calc+0x2f/0x50 [tempesta_fw]
 [<ffffffffa012b110>] ? tfw_http_conn_msg_free+0x70/0x70 [tempesta_fw]
 [<ffffffffa01275cb>] tfw_cache_req_process+0x2b/0xe0 [tempesta_fw]
 [<ffffffffa012b701>] tfw_http_msg_process+0x301/0x3f0 [tempesta_fw]
 [<ffffffff8110a71e>] ? __get_free_pages+0xe/0x50
 [<ffffffffa012a6b7>] __gfsm_fsm_exec+0x67/0xa0 [tempesta_fw]
 [<ffffffffa012a904>] tfw_gfsm_dispatch+0x14/0x20 [tempesta_fw]
 [<ffffffffa0129e42>] tfw_connection_recv+0x32/0xc0 [tempesta_fw]
 [<ffffffffa0139675>] ss_tcp_process_data+0x165/0x350 [tempesta_fw]
 [<ffffffffa013a81f>] ss_tcp_data_ready+0x3f/0x80 [tempesta_fw]
 [<ffffffff81469b57>] tcp_data_queue+0x457/0xcd0
 [<ffffffff8146cdd7>] tcp_rcv_established+0x1b7/0x890
 [<ffffffff81478414>] tcp_v4_do_rcv+0x1b4/0x500
 [<ffffffffa011b8b7>] ? tdb_htrie_lookup+0x47/0x60 [tempesta_db]
 [<ffffffff81245407>] ? tempesta_sock_tcp_rcv+0x27/0x30
 [<ffffffff814796de>] tcp_v4_rcv+0x6fe/0x7f0
 [<ffffffff814529b4>] ip_local_deliver_finish+0xd4/0x210
 [<ffffffff81452cc8>] ip_local_deliver+0x88/0x90
 [<ffffffff81452633>] ip_rcv_finish+0x83/0x330
 [<ffffffff81452f40>] ip_rcv+0x270/0x340
 [<ffffffff8141a99a>] __netif_receive_skb_core+0x40a/0x8a0
 [<ffffffffa0062f2f>] ? e1000_clean+0x39f/0x9e0 [e1000]
 [<ffffffff8141ae4b>] __netif_receive_skb+0x1b/0x70
 [<ffffffff8141b9e4>] process_backlog+0xa4/0x160
 [<ffffffff8141b209>] net_rx_action+0x129/0x210
 [<ffffffff81048489>] __do_softirq+0x119/0x260
 [<ffffffff814f29bc>] call_softirq+0x1c/0x30
 <EOI> 
 [<ffffffff8100437d>] do_softirq+0x3d/0x80
 [<ffffffff81047e09>] local_bh_enable+0x99/0xa0
 [<ffffffff8145715b>] ip_finish_output+0x1bb/0x3b0
 [<ffffffff81458b10>] ip_output+0x90/0xa0
 [<ffffffff81458255>] ip_local_out+0x25/0x30
 [<ffffffff814585ab>] ip_queue_xmit+0x14b/0x3d0
 [<ffffffff81470430>] tcp_transmit_skb+0x410/0x8e0
 [<ffffffff81470a87>] tcp_write_xmit+0x187/0xb40
 [<ffffffff8147164e>] __tcp_push_pending_frames+0x2e/0xd0
 [<ffffffff8145fe93>] tcp_push+0x53/0xc0
 [<ffffffff81464d2b>] tcp_sendmsg+0x79b/0xc40
 [<ffffffff81105f8e>] ? find_get_page+0x1e/0xc0
 [<ffffffff8148bdc2>] inet_sendmsg+0x62/0xb0
 [<ffffffff814024df>] sock_aio_write+0x13f/0x160
 [<ffffffff8115de70>] do_sync_write+0x80/0xb0
 [<ffffffff8115e675>] vfs_write+0x1c5/0x1e0
 [<ffffffff8115ef59>] SyS_write+0x49/0xa0
 [<ffffffff814f1782>] system_call_fastpath+0x16/0x1b
Code: 48 8b 0a f2 48 0f 38 f1 c1 48 83 c2 08 48 39 d6 75 ee 49 8d 52 08 48 29 d6 48 83 e6 f8 4a 8d 54 16 08 49 39 d0 74 13 90 0f b6 0a <f2> 48 0f 38 f0 c1 48 83 c2 01 4c 39 c2 75 ee 48 83 c7 18 49 39 
RIP  [<ffffffffa012a9d3>] tfw_hash_str+0xc3/0x100 [tempesta_fw]
 RSP <ffff88003fc03a98>
---[ end trace fd887738b66c24f0 ]---
Kernel panic - not syncing: Fatal exception in interrup

@vladtcvs
Copy link
Contributor Author

$ objdump -Dr tempesta_fw.ko | grep -A 100 '<tfw_hash_str>'

dump.txt

@krizhanovsky
Copy link
Contributor

The code crashes at

        49d3:       f2 48 0f 38 f0 c1       crc32b %cl,%rax

So it seems the machine doesn't have SSE 4.2 extension. Please check, that

    grep -m 1 -c sse4_2 /proc/cpuinfo

prints 1.

Related to #241.

@krizhanovsky
Copy link
Contributor

This is unsupported 5 years old processor AMD Athlon(tm) II X2 250. The earliest supported AMD processors are Bulldzers (http://www.cpu-world.com/Glossary/S/SSE4.2.html).

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

2 participants