Summary: | app-admin/conky-1.8.1-r2 down and upspeed keep remain high even when interface is idle | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Renato Alves <simpledark> |
Component: | Current packages | Assignee: | Daniel Pielmeier <billie> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | brenden, cesarg9, hwoarang, skrattaren |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | net_stat.addrs field size fix |
Description
Renato Alves
2011-09-26 03:27:51 UTC
I can confirm this one, in my case the shown download speed is halved. After removing conky-1.8.1-maxinterfaces.patch everything goes back to normal. Found the cause of why conky-1.8.1-maxinterfaces.patch gives wrong values. Since this patch isn't in upstream i am gonna describe the bug here. The bug occurs in src/linux.c:397 at this line memset(ns->addrs, 0, 17 * MAX_NET_INTERFACES + 1); /* Up to 17 chars per ip, max MAX_NET_INTERFACES interfaces. Nasty memory usage... */ The bug happens because in the declaration of the addrs field on the net_stat struct the field is char addrs[273], and that value can be read as "17 * 16 + 1" (16 is the unpatched value of MAX_NET_INTERFACES). Increasing the MAX_NET_INTERFACES causes a memset of "17*64+1" in a area of only "17*16+1" corrupting the array. Proposed fix in attached patch. Created attachment 290219 [details, diff]
net_stat.addrs field size fix
(In reply to comment #3) > Created attachment 290219 [details, diff] > net_stat.addrs field size fix The above mentioned patch fixes this problem for me too. Thank you! :) The provided patch also works here. I'd call it a final solution. Thanks to everyone involved. Can someone add the change to the maxinterfaces.patch file on the main tree? +*conky-1.8.1-r3 (25 Oct 2011) + + 25 Oct 2011; Daniel Pielmeier <billie@gentoo.org> -conky-1.8.1-r2.ebuild, + +conky-1.8.1-r3.ebuild, files/conky-1.8.1-maxinterfaces.patch: + Revison bump to fix bug #384505. Thanks to Renato Alves for the report and + Cesar Garcia for the fix. + With this match I can't start conky. I am having the usual error again Conky: desktop window (b4) is root window Conky: drawing to desktop window Conky: drawing to double buffer Conky: too many interfaces used (limit is 16) Conky: Error destroying thread I am using 1.8.1-r3 That is because you patched configure.ac.in and NOT configure.ac. You need to patch configure.ac.in and run eautoreconf Patching configure.ac fixed the problem Index: files/conky-1.8.1-maxinterfaces.patch =================================================================== RCS file: /var/cvsroot/gentoo-x86/app-admin/conky/files/conky-1.8.1-maxinterfaces.patch,v retrieving revision 1.2 diff -u -b -B -u -r1.2 conky-1.8.1-maxinterfaces.patch --- files/conky-1.8.1-maxinterfaces.patch 25 Oct 2011 17:28:42 -0000 1.2 +++ files/conky-1.8.1-maxinterfaces.patch 26 Oct 2011 22:53:42 -0000 @@ -12,8 +12,8 @@ diff --git a/configure.ac.in b/configure.ac.in index 0f00237..d52d998 100644 ---- a/configure.ac.in -+++ b/configure.ac.in +--- a/configure.ac ++++ b/configure.ac @@ -802,7 +802,7 @@ AC_DEFINE(CONFIG_FILE, "$HOME/.conkyrc", [Configfile of the user]) AC_DEFINE(MAX_SPECIALS_DEFAULT, 512, [Default maximum number of special things, e.g. fonts, offsets, aligns, etc.]) AC_DEFINE(MAX_USER_TEXT_DEFAULT, 16384, [Default maximum size of config TEXT buffer, i.e. below TEXT line.]) Conky from tree works now fine for me (on ~amd64). Thanks to Renato and Cesar, this bug was really getting on my nerves! Bugfix of the month for me and no mistake. Actually, I write here just to thank you for it. Cheers! (In reply to comment #8) > That is because you patched configure.ac.in and NOT configure.ac. You need to > patch configure.ac.in and run eautoreconf Thanks, you are right. I thought eautoreconf uses configure.ac.in. The patch now applies to configure.ac. |