tempesta-tech / tempesta

All-in-one solution for high performance web content delivery and advanced protection against DDoS and web attacks
https://tempesta-tech.com/
GNU General Public License v2.0
618 stars 103 forks source link

BUG() at tempesta_db/core/main.c:108 #136

Closed keshonok closed 9 years ago

keshonok commented 9 years ago

Test environment:

Tempesta starts fine. Then, the Firefox client is started in the same VM in order to issue a request. It is started with the following command: ssh root@192.168.10.230 -Y firefox, where 192.168.10.230 is the IP address on the Centos 7 VM with Tempesta. Tempesta crashes before the Firefox window can be seen.

[   63.890042] [tdb] Start Tempesta DB
[   63.899278] [tempesta] Initializing Tempesta FW kernel module...
[   63.899853] [tempesta] init: cfg_if
[   63.900213] [tempesta] init: tls
[   63.900534] [tempesta] init: http
[   63.900861] [tempesta] init: http_sticky
[   63.904767] [tempesta] init: server
[   63.905184] [tempesta] init: client
[   63.905536] [tempesta] init: sock_srv
[   63.905895] [tempesta] init: sock_clnt
[   63.906383] [tempesta]   register cfg: filter
[   63.906900] [tempesta]   register cfg: cache
[   63.907420] [tempesta]   register cfg: http_sticky
[   63.907971] [tempesta]   register cfg: sock_srv
[   63.908514] [tempesta]   register cfg: sock_clnt
[   63.911222] [tempesta] Registering new scheduler: dummy
[   63.914642] [tempesta]   tfw_sched_hash: init
[   63.915218] [tempesta] Registering new scheduler: hash
[   63.919715] [tempesta]   tfw_sched_http: init
[   63.920289] [tempesta]   register cfg: tfw_sched_http
[   63.920890] [tempesta] Registering new scheduler: http
[   63.924083] [tempesta]   tfw_sched_rr: init
[   63.924629] [tempesta] Registering new scheduler: round-robin
[   63.928572] [tempesta] got state via sysctl: start
[   63.929195] [tempesta]   reading configuration file...
[   63.929773] [tempesta]   reading file: /root/tempesta/etc/tempesta_fw.conf
[   63.930705] [tempesta]   file size: 5746 bytes
[   63.931260] [tempesta]   read by offset: 0
[   63.932860] [tempesta]   read by offset: 4096
[   63.933755] [tempesta]   read by offset: 5746
[   63.934536] [tempesta] starting all modules...
[   63.935113] [tempesta]   parsing configuration and pushing it to modules...
[   63.935855] [tempesta]   use default entry: 'filter_tbl_size 16777216;'
[   63.936559] [tempesta]   spec handle: 'filter_tbl_size'
[   63.937154] [tempesta]   use default entry: 'filter_db /opt/tempesta/db/filter.tdb;'
[   63.938042] [tempesta]   spec handle: 'filter_db'
[   63.938577] [tempesta]   use default entry: 'cache on;'
[   63.939156] [tempesta]   spec handle: 'cache'
[   63.939658] [tempesta]   use default entry: 'cache_size 268435456;'
[   63.940377] [tempesta]   spec handle: 'cache_size'
[   63.940943] [tempesta]   use default entry: 'cache_db /opt/tempesta/db/cache.tdb;'
[   63.941825] [tempesta]   spec handle: 'cache_db'
[   63.942369] [tempesta]   use default entry: 'listen 80;'
[   63.942955] [tempesta]   spec handle: 'listen'
[   63.943998] [tempesta]   starting modules...
[   63.944591] [tempesta]   mod_start(): filter
[   63.974826] [tdb] Opened table /opt/tempesta/db/filter.tdb: size=16777216 rec_size=20 base=ffff880073000000
[   63.976000] [tempesta]   mod_start(): cache
[   64.435450] [tdb] Opened table /opt/tempesta/db/cache.tdb: size=268435456 rec_size=0 base=ffff880063000000
[   64.437034] [tempesta]   mod_start(): http_sticky
[   64.437606] [tempesta]   mod_start(): sock_srv
[   64.438191] [tempesta]   mod_start(): sock_clnt
[   64.438733] [tempesta] Open listen socket on: 0.0.0.0
[   64.439388] [tempesta]   start listening on socket: sk=ffff880041050100
[   64.440120] [tempesta]   mod_start(): tfw_sched_http
[   64.440705] [tempesta] modules are started
[   74.982439] ------------[ cut here ]------------
[   74.983001] kernel BUG at /root/tempesta/tempesta_db/core/main.c:108!
[   74.983008] invalid opcode: 0000 [#1] SMP 
[   74.983008] Modules linked in: tfw_sched_rr(O) tfw_sched_http(O) tfw_sched_hash(O) tfw_sched_dummy(O) tempesta_fw(O) tempesta_db(O) fuse ext3 jbd ext2 nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT xt_CHECKSUM iptable_mangle bridge stp llc ip6table_filter ip6_tables iptable_filter ip_tables ebtable_nat ebtables xfs exportfs ppdev microcode virtio_balloon serio_raw pcspkr parport_pc i2c_piix4 i2c_core parport dm_mirror dm_region_hash dm_log dm_mod uinput btrfs xor zlib_deflate raid6_pq libcrc32c ata_generic pata_acpi virtio_net virtio_pci virtio_ring virtio ata_piix floppy ipv6 autofs4
[   74.983008] CPU: 0 PID: 4316 Comm: mozilla-xremote Tainted: G           O 3.10.10+ #1
[   74.983008] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
[   74.983008] task: ffff88007b0d48c0 ti: ffff880079b54000 task.ti: ffff880079b54000
[   74.983008] RIP: 0010:[<ffffffffa040f58f>]  [<ffffffffa040f58f>] tdb_rec_put+0xf/0x30 [tempesta_db]
[   74.983008] RSP: 0018:ffff88007fc03cb0  EFLAGS: 00010246
[   74.983008] RAX: 0000000000000000 RBX: ffff88007fc03d80 RCX: 0000000000000000
[   74.983008] RDX: 0000000000000000 RSI: ffff88007fc03c70 RDI: 0000000000000000
[   74.983008] RBP: ffff88007fc03d00 R08: 0000000000000000 R09: 0000000000000004
[   74.983008] R10: ffff88007fc03c6c R11: 0000000000000000 R12: 0000000000000000
[   74.983008] R13: ffff880078536000 R14: 0000000000000000 R15: ffff880042134e88
[   74.983008] FS:  00007f1adca9d740(0000) GS:ffff88007fc00000(0000) knlGS:0000000000000000
[   74.983008] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   74.983008] CR2: 00007f1adc68c510 CR3: 00000000102bf000 CR4: 00000000000006f0
[   74.983008] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   74.983008] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[   74.983008] Stack:
[   74.983008]  ffffffffa041ceda ffffffffa0013700 0000000000000000 ffff880078536000
[   74.983008]  ffff880042134e88 0000000000000000 ffff88007fc03d48 ffff88007925d480
[   74.983008]  0000000001000000 0000000000000000 ffff88007fc03d48 ffffffff8145da43
[   74.983008] Call Trace:
[   74.983008]  <IRQ> 
[   74.983008]  [<ffffffffa041ceda>] ? tfw_ipv6_nf_hook+0xcc/0xfc [tempesta_fw]
[   74.983008]  [<ffffffffa0013700>] ? ipv6_is_mld+0xb0/0xb0 [ipv6]
[   74.983008]  [<ffffffff8145da43>] nf_iterate+0x73/0xc0
[   74.983008]  [<ffffffffa0013700>] ? ipv6_is_mld+0xb0/0xb0 [ipv6]
[   74.983008]  [<ffffffff8145db3c>] nf_hook_slow+0xac/0x190
[   74.983008]  [<ffffffffa0013700>] ? ipv6_is_mld+0xb0/0xb0 [ipv6]
[   74.983008]  [<ffffffffa00143b5>] ipv6_rcv+0x4b5/0x5c0 [ipv6]
[   74.983008]  [<ffffffff8142e131>] __netif_receive_skb_core+0x771/0x8b0
[   74.983008]  [<ffffffff8142db2a>] ? __netif_receive_skb_core+0x16a/0x8b0
[   74.983008]  [<ffffffff810a2a4e>] ? mark_held_locks+0x10e/0x130
[   74.983008]  [<ffffffff8142e2c7>] __netif_receive_skb+0x57/0x70
[   74.983008]  [<ffffffff8142efc4>] process_backlog+0xc4/0x190
[   74.983008]  [<ffffffff8142e750>] net_rx_action+0xe0/0x270
[   74.983008]  [<ffffffff81048036>] __do_softirq+0x126/0x290
[   74.983008]  [<ffffffff8151290c>] call_softirq+0x1c/0x30
[   74.983008]  <EOI> 
[   74.983008]  [<ffffffff81004248>] do_softirq+0x38/0x90
[   74.983008]  [<ffffffffa0010c54>] ? ip6_finish_output2+0x494/0x5c0 [ipv6]
[   74.983008]  [<ffffffff810479a0>] local_bh_enable+0xb0/0xf0
[   74.983008]  [<ffffffffa0010c54>] ip6_finish_output2+0x494/0x5c0 [ipv6]
[   74.983008]  [<ffffffffa0010a58>] ? ip6_finish_output2+0x298/0x5c0 [ipv6]
[   74.983008]  [<ffffffffa001342e>] ip6_finish_output+0x17e/0x1f0 [ipv6]
[   74.983008]  [<ffffffffa00135ae>] ip6_output+0x10e/0x1b0 [ipv6]
[   74.983008]  [<ffffffffa00111a6>] ip6_xmit+0x426/0x5b0 [ipv6]
[   74.983008]  [<ffffffffa00420f1>] inet6_csk_xmit+0xe1/0x140 [ipv6]
[   74.983008]  [<ffffffffa0042080>] ? inet6_csk_xmit+0x70/0x140 [ipv6]
[   74.983008]  [<ffffffff81485582>] tcp_transmit_skb+0x792/0x820
[   74.983008]  [<ffffffff81487be7>] tcp_connect+0x4c7/0x5b0
[   74.983008]  [<ffffffff81427080>] ? secure_tcpv6_sequence_number+0x80/0x90
[   74.983008]  [<ffffffffa00397b6>] tcp_v6_connect+0x526/0x5b0 [ipv6]
[   74.983008]  [<ffffffff814a1281>] __inet_stream_connect+0x91/0x310
[   74.983008]  [<ffffffff810a2c7d>] ? trace_hardirqs_on+0xd/0x10
[   74.983008]  [<ffffffff810479b5>] ? local_bh_enable+0xc5/0xf0
[   74.983008]  [<ffffffff814a1538>] inet_stream_connect+0x38/0x50
[   74.983008]  [<ffffffff81416e53>] SYSC_connect+0x93/0xe0
[   74.983008]  [<ffffffff81509109>] ? retint_swapgs+0xe/0x13
[   74.983008]  [<ffffffff810a2bdd>] ? trace_hardirqs_on_caller+0x16d/0x200
[   74.983008]  [<ffffffff8129efee>] ? trace_hardirqs_on_thunk+0x3a/0x3f
[   74.983008]  [<ffffffff814173fe>] SyS_connect+0xe/0x10
[   74.983008]  [<ffffffff81511582>] system_call_fastpath+0x16/0x1b
[   74.983008] Code: 1f 44 00 00 49 8d 7c 24 08 e8 ce 94 0f e1 31 c0 5b 41 5c 41 5d 5d c3 0f 1f 44 00 00 0f 1f 44 00 00 48 83 c7 7f 48 83 e7 80 75 09 <0f> 0b 0f 1f 80 00 00 00 00 55 48 83 c7 08 48 89 e5 e8 9b 94 0f 
[   74.983008] RIP  [<ffffffffa040f58f>] tdb_rec_put+0xf/0x30 [tempesta_db]
[   74.983008]  RSP <ffff88007fc03cb0>
[   75.042836] ---[ end trace e7fc3ec580ca32e4 ]---
[   75.043381] Kernel panic - not syncing: Fatal exception in interrupt
`
keshonok commented 9 years ago

Fixed with 803b531