Closed hotice closed 5 years ago
I just realized that I have forgotten to do dkms build so I have installed again the module from your package @hotice.
So I did the following:
sudo rmmod douane
sudo dkms uninstall -m douane -v 0.8.3
sudo dkms remove -m douane -v 0.8.3 --all
cd /usr/src/douane-0.8.3/
sudo mv douane.c douane.c.orig
sudo wget https://raw.githubusercontent.com/Douane/douane-dkms/903c26a621d84308675e4ec249bee46f2d04eb42/douane.c
sudo dkms build -m douane -v 0.8.3
sudo dkms install -m douane -v 0.8.3
sudo modprobe douane
Then in order to ensure that there's no kernel panic, I've opened 2 terminals with the following commands:
The last command will show if a kernel bug occur somewhere. @hotice can you please try and let me know ?
Now since half an hour, with Birdie, firefox, apt-get and no kernel bug/panic. :)
Is the fix now in git here or do I still have to replace that file manually?
I'm waiting your validation before to revert the code in master. In the other hand I have created a tag 0.8.2 which is the 'fixed' version if you validate.
@zedtux Hmmm your commands are wrong. You move douane.c to douane.c.orig twice. And then you move douane.c.1 to douane.c but douane.c.1 doesn't exist. Please fix them.
Mmmm sorry my bad... I have updated my commands.
Well, opening GitHub in Chromium didn't result in any kernel panics. So far so good.
This is in no way associated with latest fixes :)
Well, there were no more kernel panics / desktop freezes. So whatever caused it doesn't happen any more with that commit.
Great news ! So could you please build a package with the 0.8.2 tag ? (Maybe you should create a new PPA ... sorry for this. (The 0.8.2 version is frozen so there will be no more commit for this tag).
Sorry, can we consider to close this issue ?
Yes, I'll create a new PPA. Closing this.
@hotice You have a computer, sorry, zoo: Virtualbox, samba, Apparmor, systemd...
So, I think panics still appear
@pavlinux are you using your fork on your machine ?
If yes, which are the services you're using ?
@pavlinux I maintain a blog (www.webupd8.org) and hundreds of PPA packages and I test a lot of things for both so I have to have lot of things installed.
And besides VirtualBox, you mentioned standard stuff that's installed by default in Ubuntu... samba, apparmor, systemd (well, Ubuntu didn't switch to it yet but there are parts of it implemented already).
@zedtux Debian 7, kernels: 3.2.57, 3.14.2, Not constantly running services, only system: alsa, cron, dbus, syslog, udev, acpid. No SeLinux, apparmor, grsecirity, etc. ... I do not have paranoid delusions of persecution :)
When testing applications, then work: MySQL, Samba, DHCP, Bind, tftp, Postgres, Vmware, stunnel, openvpn, qemu,... NTP, XBT torrrent tracker, torrent client
@zedtux I built a new PPA and I'm not using the packages from there. So far so good. Here's the PPA: https://launchpad.net/~nilarimogard/+archive/test2/ - can you please use it too and see if everything is ok? (douane-dkms is no longer built with debugging enabled; I built douane-dkms-dbg for that but don't install it for now, I have to change some dependencies for some other packages to get it to install properly).
OK I will install them this evening when I will be home and let you know.
I had another kernel panic so it's not fixed. I didn't have debugging enabled unfortunately...
:-(
Then can you please install your -dgb
package (and I will do the same) ?
I installed it now. But now all I can do is wait, it happened after a few hours the last time...
Hmmm my douane-dkms-dbg package doesn't work. Here's a douane-dkms deb with debugging enabled: https://dl.dropboxusercontent.com/u/1113424/douane-dkms_0.8.2-1%7Ewebupd8%7Etrusty0_amd64.deb
Of course ... Then we will see.
OK So I have installed your package @hotice. Let's see.
Do you have news on your side ? Can't you try to grep in your kern.log file ?
Here is my modinfo:
modinfo douane
filename: /lib/modules/3.13.0-24-generic/updates/dkms/douane.ko
license: GPL
version: 0.8.2
author: Guillaume Hain <zedtux@zedroot.org>
description: Douane
srcversion: A8F1BF0FD4C46D373F924F5
depends:
vermagic: 3.13.0-24-generic SMP mod_unload modversions
Can you please post yours ?
Just few remarks for your packaging:
Edit: Sorry ... I have double checked for the license, and the license is wrong in the tag ... I'm going to change it.
Edit 2: I can't update the license in the tag. Can you checkout a specific branch in LP ? If yes, then I could create a branch per versions instead of a tag.
It is now about hours I'm using the package from your link and no kernel panic/bug/freeze. I have running since the hours Spotify (so a lot of activities non-stop) and I'm using Firefox. I'm going now to also open Birdie... but I'm not sure to have any freezes...
Finally, some hours later I got a kernel panic, but unfortunately it wasn't saved in the kern.log file ... :-(
Test my fork https://github.com/pavlinux/douane-dkms
Yes, I'm going to do it now.
I got 2 freezes in less than 15 minutes (with Spotify, Firefox opened with jolicould.com and birdie) where I don't see any kernel panic in the logs (while with the other version we see a kernel panic).
So the compute freezes and you can't do anything else than a reset.
I'm now checking the kernel module with the KEDR framework. I'm copying a file of 4.7GB from my NAS to my localhost.
Without the daemon enable, I have the following output (and no freeze):
May 3 14:12:34 zUbuntu kernel: [15256.929009] douane:1162:exit_module: Kernel module removed!
May 3 14:12:34 zUbuntu kernel: [15256.929130] [leak_check] Target module: "douane", init area at ffffffffa0005000, core area at ffffffffa04e4000
May 3 14:12:34 zUbuntu kernel: [15256.929144] [leak_check] Totals:
May 3 14:12:34 zUbuntu kernel: [15256.929148] [leak_check] Allocations: 1786674
May 3 14:12:34 zUbuntu kernel: [15256.929151] [leak_check] Possible leaks: 0
May 3 14:12:34 zUbuntu kernel: [15256.929154] [leak_check] Unallocated frees: 0
May 3 14:12:34 zUbuntu kernel: [15256.929156] [leak_check] ======== end of LeakCheck report ========
With the daemon enable (and no freeze):
May 3 14:25:56 zUbuntu kernel: [16059.298246] douane:1162:exit_module: Kernel module removed!
May 3 14:25:56 zUbuntu kernel: [16059.298384] [leak_check] Target module: "douane", init area at ffffffffa0005000, core area at ffffffffa04ea000
May 3 14:25:56 zUbuntu kernel: [16059.298398] [leak_check] Totals:
May 3 14:25:56 zUbuntu kernel: [16059.298402] [leak_check] Allocations: 1789431
May 3 14:25:56 zUbuntu kernel: [16059.298406] [leak_check] Possible leaks: 0
May 3 14:25:56 zUbuntu kernel: [16059.298409] [leak_check] Unallocated frees: 0
May 3 14:25:56 zUbuntu kernel: [16059.298411] [leak_check] ======== end of LeakCheck report ========
So it looks like there's no memory leaks in the kernel module for now. In the other hand I saw that the daemon process was using 50% of a core of my CPU during the copy, and the memory increased a lot, so we have to fix this also.
@pavlinux in the case you would like to use KEDR framework while working on the LKM here is a blog article from my blog which explain how I make it working: http://blog.zedroot.org/debug-your-linux-kernel-module/.
For exapmle, leaks before this commit https://github.com/Douane/douane-dkms/commit/881dbec26d145ae24de66008f76a92e146a30c94 difficult catching. Without intentional attack probability occurrence empty TCP or UDP header, with the already established IP connection, about a little less than zero. :)
About leaks in push() function:
Thank you @pavlinux for the details.
I have installed now everything in order to debug the kernel module. I'm going to work on it in order to make the douane crashing and find the issue. (I invite you to do the same when patching the kernel module).
I had another panic but the kernel log is pretty large (about 120mb). If you still need this, I can post it here...
As for the packaging, what package has the wrong license? I don't use Launchpad recipes to build the packages, I upload them myself... And about the daemon, indeed it should be stopped when it's uninstalled, but it shouldn't be started when it's installed since it's started by the Configurator... I'll fix the packaging after this bug is fixed...
@hotice How does this relate douane? In previous logs you falls avahi and apparmor, nmdb and apparmor, ... And turn off the flag -DEBUG in module. There's nothing useful.
Well, if I stop the Douane daemon and uninstall douane-dkms, I don't get any kernel panics so... Besides, zedtux was able to reproduce it too.
@hotice You can work, one day, without apparmor? Apparmor uses a subsystem "audit", which also uses the Netlink. I think they are in conflict.
Ubuntu uses Apparmor by default but I'll disable it and see if this still occurs. Completely removing apparmor is not possible because many Ubuntu packages depend on it...
No kernel panics so far but my laptop froze twice. The last time, I was using Firefox and downloading 2 torrents using Transmission.
Because this is also my work laptop and I don't have another computer, I can't continue testing this... I simply can't work with my laptop freezing and gettting kernel panics all day long so I had to completely remove douane for now.
Ok, on my side, I'm going to check the kernel panic/freezes thanks to kdump... I'll let you know when I have some news.
@hotice sorry for this ...
@zedtux I don't have to take @pavlinux 's crap so I will stop posting comments here or report any other bug. If you fix this, you have my email...
By the way, the file was so large because Douane with debugging enabled spammed the hell out of the log files.
@hotice ok ok, no problem. For me the same, with the debug enabled, I had a kern.log file with a size of 7.5Go !
As soon as I have some news, I'll come back to you guys.
@pavlinux if you're interested, here is my blog article about kdump: http://blog.zedroot.org/linux-kernel-debuging-using-kdump-and-crash/.
@zedtux Why kdump, why crash, why KEDR, you have the source code. :) There you can see everything.
@pavlinux well I see what you mean :) But when my computer freeze, if I can't see the issue, it's then harder to fix it, isn't it ?
douane-dkms causes Kernel panics in Ubuntu 14.04 64bit. This seems to occur randomly, while browsing some websites in Firefox for instance (so not on boot).
I'm using the Ubuntu Linux 3.13.0-24-generic Kernel.