Git Product home page Git Product logo

web10g's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

web10g's Issues

General Protection Fault in tcp_estats_read_connection_spec.isra

We sometimes experience General Protection Faults after which all invokations of web10g-listconns just hang forever. I'm not 100% sure if the call to web10g-listconns actually triggers the error or if the error just stays unnoticed for a while as the web10g-listconns is called somewhen by a script.

The system is a Debian 8.0 with kernel 3.18.0-trunk-web10g-amd64 (Debian linux-3.18.5-1~exp1 kernel with web10g-0.11-3.18.tar.gz).

Here are two examples of the error message from syslog:

Apr 07 18:20:38 tacho kernel: general protection fault: 0000 [#1] SMP 
Apr 07 18:20:38 tacho kernel: Modules linked in: btrfs xor raid6_pq ufs qnx4 hfsplus hfs minix ntfs vfat msdos fat jfs cpuid xt_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp nf_log_ipv4 nf_log_common xt_LOG nf_nat_ftp nf_conntrack_ftp ip
Apr 07 18:20:38 tacho kernel:  uhci_hcd ehci_pci ehci_hcd libata megaraid_sas usbcore scsi_mod usb_common bnx2
Apr 07 18:20:38 tacho kernel: CPU: 3 PID: 10760 Comm: web10g-listconn Tainted: G          I    3.18.0-trunk-web10g-amd64 #1 Debian 3.18.5-1~exp1a~web10g
Apr 07 18:20:38 tacho kernel: Hardware name: Dell Inc. PowerEdge R610/086HF8, BIOS 6.4.0 07/23/2013
Apr 07 18:20:38 tacho kernel: task: ffff88003682abc0 ti: ffff8800c9a88000 task.ti: ffff8800c9a88000
Apr 07 18:20:38 tacho kernel: RIP: 0010:[<ffffffffa0335db3>]  [<ffffffffa0335db3>] tcp_estats_read_connection_spec.isra.8+0x13/0x70 [tcp_estats_nl]
Apr 07 18:20:38 tacho kernel: RSP: 0018:ffff8800c9a8bad8  EFLAGS: 00010286
Apr 07 18:20:38 tacho kernel: RAX: 0000000061747365 RBX: ffff880036a76b00 RCX: 0000000000000000
Apr 07 18:20:38 tacho kernel: RDX: 0000000061747365 RSI: 00041080f8efd594 RDI: ffff8800c9a8bb18
Apr 07 18:20:38 tacho kernel: RBP: 0000000000000010 R08: 0000000000000000 R09: 00000000ffffffff
Apr 07 18:20:38 tacho kernel: R10: 0000000000ffffff R11: 0000000000000001 R12: 0000000000000000
Apr 07 18:20:38 tacho kernel: R13: 0000000000000000 R14: 0000000000000000 R15: ffff88012f845000
Apr 07 18:20:38 tacho kernel: FS:  00007fb70c116700(0000) GS:ffff88012fc20000(0000) knlGS:0000000000000000
Apr 07 18:20:38 tacho kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Apr 07 18:20:38 tacho kernel: CR2: 00007fb70c123000 CR3: 00000000b7e70000 CR4: 00000000000007e0
Apr 07 18:20:38 tacho kernel: Stack:
Apr 07 18:20:38 tacho kernel:  ffff880036a76b00 ffffffffa0336454 ffff88012ac50c00 0000000000000000
Apr 07 18:20:38 tacho kernel:  ffff8800c9a8bba0 ffff88012aa3bc00 0000000100000000 ffffffff81153fff
Apr 07 18:20:38 tacho kernel:  ffffffff818cdcc0 0000000000000246 00000000c9a8bbf0 ffffffff000280da
Apr 07 18:20:38 tacho kernel: Call Trace:
Apr 07 18:20:38 tacho kernel:  [<ffffffffa0336454>] ? genl_list_conns+0x164/0x430 [tcp_estats_nl]
Apr 07 18:20:38 tacho kernel:  [<ffffffff81153fff>] ? get_page_from_freelist+0x62f/0xa30
Apr 07 18:20:38 tacho kernel:  [<ffffffff8147c193>] ? genl_family_rcv_msg+0x193/0x360
Apr 07 18:20:38 tacho kernel:  [<ffffffff8143b7e7>] ? __alloc_skb+0x47/0x1e0
Apr 07 18:20:38 tacho kernel:  [<ffffffff8147c360>] ? genl_family_rcv_msg+0x360/0x360
Apr 07 18:20:38 tacho kernel:  [<ffffffff8147c3d9>] ? genl_rcv_msg+0x79/0xc0
Apr 07 18:20:38 tacho kernel:  [<ffffffff8147baa0>] ? netlink_rcv_skb+0xb0/0xd0
Apr 07 18:20:38 tacho kernel:  [<ffffffff8147bfe4>] ? genl_rcv+0x24/0x40
Apr 07 18:20:38 tacho kernel:  [<ffffffff8147b1e7>] ? netlink_unicast+0x107/0x1a0
Apr 07 18:20:38 tacho kernel:  [<ffffffff8147b59b>] ? netlink_sendmsg+0x31b/0x660
Apr 07 18:20:38 tacho kernel:  [<ffffffff8117dba9>] ? vma_adjust+0x3f9/0x7d0
Apr 07 18:20:38 tacho kernel:  [<ffffffff81432d13>] ? sock_sendmsg+0x83/0xc0
Apr 07 18:20:38 tacho kernel:  [<ffffffff81433244>] ? SYSC_sendto+0xf4/0x180
Apr 07 18:20:38 tacho kernel:  [<ffffffff8117e65e>] ? SyS_mmap_pgoff+0xfe/0x280
Apr 07 18:20:38 tacho kernel:  [<ffffffff81546fed>] ? system_call_fast_compare_end+0xc/0x11
Apr 07 18:20:38 tacho kernel: Code: e8 33 ff ff ff 48 83 c4 48 89 c5 89 e8 5b 5d c3 0f 1f 84 00 00 00 00 00 66 66 66 66 90 48 83 ec 08 48 85 f6 74 3e 48 85 ff 74 48 <48> 8b 46 14 48 89 47 04 48 8b 46 1c 48 89 47 0c 0f b7 46 26 66 
Apr 07 18:20:38 tacho kernel: RIP  [<ffffffffa0335db3>] tcp_estats_read_connection_spec.isra.8+0x13/0x70 [tcp_estats_nl]
Apr 07 18:20:38 tacho kernel:  RSP <ffff8800c9a8bad8>
Apr 07 18:20:38 tacho kernel: ---[ end trace 5001876b82b2bcd7 ]---
Mai 19 13:05:06 tacho kernel: general protection fault: 0000 [#1] SMP 
Mai 19 13:05:06 tacho kernel: Modules linked in: binfmt_misc nfnetlink_queue nfnetlink_log nfnetlink bluetooth rfkill xt_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp nf_log_ipv4 nf_log_common xt_LOG nf_nat_ftp nf_conntrack_ftp iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_filter ip_tables x_tables joydev iTCO_wdt coretemp kvm_intel kvm ttm drm_kms_helper drm iTCO_vendor_support lpc_ich evdev i2c_algo_bit i2c_core psmouse serio_raw acpi_power_meter mfd_core dcdbas i7core_edac shpchp edac_core 8250_fintek wmi pcspkr tpm_tis tpm button processor thermal_sys tcp_estats_nl loop ipmi_watchdog ipmi_si ipmi_poweroff ipmi_devintf ipmi_msghandler fuse autofs4 xfs libcrc32c ext4 crc16 mbcache jbd2 dm_mod sr_mod cdrom ata_generic hid_generic usbhid hid sg sd_mod crc32c_intel ata_piix uhci_hcd
Mai 19 13:05:06 tacho kernel:  ehci_pci ehci_hcd libata megaraid_sas usbcore scsi_mod usb_common bnx2
Mai 19 13:05:06 tacho kernel: CPU: 0 PID: 5359 Comm: web10g-listconn Tainted: G          I    3.18.0-trunk-web10g-amd64 #1 Debian 3.18.5-1~exp1a~web10g
Mai 19 13:05:06 tacho kernel: Hardware name: Dell Inc. PowerEdge R610/086HF8, BIOS 6.4.0 07/23/2013
Mai 19 13:05:06 tacho kernel: task: ffff88012adaacc0 ti: ffff8800362a4000 task.ti: ffff8800362a4000
Mai 19 13:05:06 tacho kernel: RIP: 0010:[<ffffffffa033ddb3>]  [<ffffffffa033ddb3>] tcp_estats_read_connection_spec.isra.8+0x13/0x70 [tcp_estats_nl]
Mai 19 13:05:06 tacho kernel: RSP: 0018:ffff8800362a7ad8  EFLAGS: 00010286
Mai 19 13:05:06 tacho kernel: RAX: 000000006572662f RBX: ffff88020631c700 RCX: 0000000000000000
Mai 19 13:05:06 tacho kernel: RDX: 000000006572662f RSI: 5e011080556d8263 RDI: ffff8800362a7b18
Mai 19 13:05:06 tacho kernel: RBP: 0000000000000010 R08: 0000000000000000 R09: 00000000ffffffff
Mai 19 13:05:06 tacho kernel: R10: 0000000000ffffff R11: 0000000000000001 R12: 0000000000000000
Mai 19 13:05:06 tacho kernel: R13: 0000000000000000 R14: 0000000000000000 R15: ffff88003629c000
Mai 19 13:05:06 tacho kernel: FS:  00007fe0d8300700(0000) GS:ffff88022fc00000(0000) knlGS:0000000000000000
Mai 19 13:05:06 tacho kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Mai 19 13:05:06 tacho kernel: CR2: 00007fe0d830d000 CR3: 0000000202fb2000 CR4: 00000000000007f0
Mai 19 13:05:06 tacho kernel: Stack:
Mai 19 13:05:06 tacho kernel:  ffff88020631c700 ffffffffa033e454 ffff88012ac50c00 0000000000000000
Mai 19 13:05:06 tacho kernel:  ffff8800362a7ba0 ffff88020631c900 0000000100000000 ffffffff81153fff
Mai 19 13:05:06 tacho kernel:  ffffffff818cdcc0 0000000000000246 00000000362a7bf0 ffffffff000280da
Mai 19 13:05:06 tacho kernel: Call Trace:
Mai 19 13:05:06 tacho kernel:  [<ffffffffa033e454>] ? genl_list_conns+0x164/0x430 [tcp_estats_nl]
Mai 19 13:05:06 tacho kernel:  [<ffffffff81153fff>] ? get_page_from_freelist+0x62f/0xa30
Mai 19 13:05:06 tacho kernel:  [<ffffffff8147c193>] ? genl_family_rcv_msg+0x193/0x360
Mai 19 13:05:06 tacho kernel:  [<ffffffff8143b7e7>] ? __alloc_skb+0x47/0x1e0
Mai 19 13:05:06 tacho kernel:  [<ffffffff8147c360>] ? genl_family_rcv_msg+0x360/0x360
Mai 19 13:05:06 tacho kernel:  [<ffffffff8147c3d9>] ? genl_rcv_msg+0x79/0xc0
Mai 19 13:05:06 tacho kernel:  [<ffffffff8147baa0>] ? netlink_rcv_skb+0xb0/0xd0
Mai 19 13:05:06 tacho kernel:  [<ffffffff8147bfe4>] ? genl_rcv+0x24/0x40
Mai 19 13:05:06 tacho kernel:  [<ffffffff8147b1e7>] ? netlink_unicast+0x107/0x1a0
Mai 19 13:05:06 tacho kernel:  [<ffffffff8147b59b>] ? netlink_sendmsg+0x31b/0x660
Mai 19 13:05:06 tacho kernel:  [<ffffffff8117dba9>] ? vma_adjust+0x3f9/0x7d0
Mai 19 13:05:06 tacho kernel:  [<ffffffff81432d13>] ? sock_sendmsg+0x83/0xc0
Mai 19 13:05:06 tacho kernel:  [<ffffffff81433244>] ? SYSC_sendto+0xf4/0x180
Mai 19 13:05:06 tacho kernel:  [<ffffffff8117e65e>] ? SyS_mmap_pgoff+0xfe/0x280
Mai 19 13:05:06 tacho kernel:  [<ffffffff81546fed>] ? system_call_fast_compare_end+0xc/0x11
Mai 19 13:05:06 tacho kernel: Code: e8 33 ff ff ff 48 83 c4 48 89 c5 89 e8 5b 5d c3 0f 1f 84 00 00 00 00 00 66 66 66 66 90 48 83 ec 08 48 85 f6 74 3e 48 85 ff 74 48 <48> 8b 46 14 48 89 47 04 48 8b 46 1c 48 89 47 0c 0f b7 46 26 66 
Mai 19 13:05:06 tacho kernel: RIP  [<ffffffffa033ddb3>] tcp_estats_read_connection_spec.isra.8+0x13/0x70 [tcp_estats_nl]
Mai 19 13:05:06 tacho kernel:  RSP <ffff8800362a7ad8>
Mai 19 13:05:06 tacho kernel: ---[ end trace 2799a13a2e5b595c ]---

Any idea how to further track down the bug or what may have caused it?

best regards,

-christian-

Raspberry Pi 4 - kernel panics

Hello. I am trying to make web10g work on a RPI4, but am experiencing kernel panics whenever I load the web10g kernel module and start logging. I will explain how I have installed web10g first. I am a bit new to Linux in general and C, so bear with me.

I am using Raspbian Buster Lite for the OS for RPI4. I have then cloned this repo, and checked out the kis-0.13-5.5 tag since linux mainline kernel 5.5.0 now supports the latest Raspberry Pi 4. Then I did a local build as specified by the raspberry pi guide. But in addition, I downloaded the bcm2711_defconfig needed for RPI4, and added the line CONFIG_TCP_ESTATS=y to it for web10g feature. During the initial build, the following errors appeared:

ERROR: "tcp_estats_update_finish_segrecv" [net/ipv6/ipv6.ko] unde
fined!
ERROR: "tcp_estats_create" [net/ipv6/ipv6.ko] undefined!
ERROR: "tcp_estats_update_segrecv" [net/ipv6/ipv6.ko] undefined! 
scripts/Makefile.modpost:103: recipe for target 'modules-modpost'
failed
make[1]: *** [modules-modpost] Error 1
Makefile:1301: recipe for target 'modules' failed
make: *** [modules] Error 2

I did not manage to fix these errors, but since I am not going to need ipv6, I simply commented out the function calls and then the build succeeded. Then I built the kernel module (dlkm), which resulted in WARNING: "__aeabi_ldivmod" undefined. To fix this, I removed the u64 division cast as follows:

--- web10g-dlkm/tcp_estats_mib_var.c
+++ web10g-dlkm-arm/tcp_estats_mib_var.c
@@ -99,8 +99,8 @@
 static void read_StartTimeStamp(void *buf, struct tcp_estats *stats,
 				struct tcp_estats_var *vp)
 {
-	u64 msecs = (u64)stats->start_tv.tv_sec * 1000000; /* convert to msecs */
-	msecs = msecs + (u64)stats->start_tv.tv_nsec/1000; /* convert nsec to msec */
+	u64 msecs = stats->start_tv.tv_sec * 1000000; /* convert to msecs */
+	msecs = msecs + stats->start_tv.tv_nsec/1000; /* convert nsec to msec */
 	memcpy(buf, &msecs, 8);
 }

After that, the kernel module (dlkm) was built successfully. The web10g userland tools was built successfully with no modifications.

With everything installed, I enabled web10g with sudo modprobe tcp_estats_nl followed by sudo sysctl -w net.ipv4.tcp_estats=127. No kernel panics yet. However, if I now ssh into (or out of) the web10g computer from another computer, a kernel panic occurs. I can't find the log for the panic in either /var/log og /var/crash, but have an image if that is of any help.

I would appreciate some help for this problem. Is there something I am doing very wrong? Or is there something more specific I need ebto do for w10g to work on ARM architecture?

Limit netlink communication length

In some cases, where lots of connections are present, netlink can run out of buffer space. By providing a max number of sockets to return, and a start connection id, the userspace can manage the netlink buffer better, and can keep receiving messages until none are returned (or the kernel can send a special end-of-list message).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.