Network - Count stops at 2048MB

Please post any bugs you have found
Post Reply
Message
Author
User avatar
OscarTalks
Posts: 2196
Joined: Mon 06 Feb 2012, 00:58
Location: London, England

Network - Count stops at 2048MB

#1 Post by OscarTalks »

Running Dpup Wheezy 3.5.2.11
Connected to the internet via eth0 to my router.
I noticed that sometimes the network_tray Blinky icon would stop blinking,
even though the internet connection was still working.
Restarting network_tray does not clear the problem,
nor does installing the newer network_tray 2.9 and icons.

Looking at the tooltip popup I see that the incoming Rx data count for the session freezes when it reaches 2048MB and it is at this point that the blinking also stops.
So I presume that this bug is not in network_tray itself, but in whatever application that count originates from. Where is this?

A reboot clears the Rx session count back to zero, the count for the month starts from the 2048MB number, the blinking works again, but the freeze will happen again when the session gets to another 2048MB.

Reproducing this issue requires having to download quite a lot of data so it is not easy to investgate. I will be testing to see if it also happens in other Puppies.

LATER:-
Count also freezes in Slacko 5.7 and the "incoming" part of the network_tray icon stops blinking.
Attachments
count-freeze-slacko.jpg
Count frozen at 2048MB in Slacko 5.7
(34.95 KiB) Downloaded 906 times
network-count-freeze.jpg
Why does this Rx count number freeze at 2048MB ?
(42.07 KiB) Downloaded 867 times
Last edited by OscarTalks on Tue 04 Nov 2014, 11:31, edited 1 time in total.
Oscar in England
Image

User avatar
OscarTalks
Posts: 2196
Joined: Mon 06 Feb 2012, 00:58
Location: London, England

#2 Post by OscarTalks »

Just wanted to give a little bump to this question.
Is there anyone out there who understands the code in the networking tools who might be able to fix this or explain it or something.

Am I overlooking something? Is it intentional that the count of the received (Rx) or transmitted (Tx) traffic stops when it reaches 2048 MB (2 GB)?

In this screenshot I am using Transmission to seed (upload) more data than I am downloading and you can see the Tx number (sent data) has reached 2048 and stopped there. The flashing of the rectangular part of the tray icon stops but the round globe bit still flashes because the Rx number has not hit 2048 yet.
Attachments
stopped-Tx-count.jpg
Uploaded data has reached its 2048 ceiling
(35.12 KiB) Downloaded 850 times
Oscar in England
Image

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#3 Post by Flash »

Huh. I just took a look at my network stats in Precise and it's stuck at 2048MB also. So the problem isn't peculiar to Wheezy.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#4 Post by rcrsn51 »

It looks like the counters are reaching the limits of a long integer. Read here.

In the code for network_tray, BK bumped these variables up to long-long integer. But it doesn't appear to be working.

The resident compiler experts will need to comment further.

scsijon
Posts: 1596
Joined: Thu 24 May 2007, 03:59
Location: the australian mallee
Contact:

#5 Post by scsijon »

it's been like this at least since wary4, and is still like this in wary/racy 5.5 and most others i've used or tested.

I've stopped taking notice as these stats seem to be a little ambiguous anyway as they relate to the current session and not the day.

Also the totals seem to not be the month but from when the particular day the port is initialized.

On top of that there seems to be no way the totals can be controlled, i.e. set which day they reset to zero and count from.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#6 Post by rcrsn51 »

This is another Puppy feature that falls under the category "If it doesn't do anything useful, maybe it's time to remove it".

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#7 Post by disciple »

But it would be useful if it worked...
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#8 Post by Iguleder »

I think I understand the problem - it's a signed long. Try to make it an unsigned long long.
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#9 Post by rcrsn51 »

Iguleder wrote:I think I understand the problem - it's a signed long. Try to make it an unsigned long long.
rcrsn51 (above) wrote:It looks like the counters are reaching the limits of a long integer. Read here. In the code for network_tray, BK bumped these variables up to long-long integer. But it doesn't appear to be working.
Does the Puppy environment recognize long-long? The only difference between signed long-long and unsigned long-long would be a power of 2.

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#10 Post by Iguleder »

Yes. GCC takes care of 64 bit math.

And a power of 2 is the explanation for this problem - this is the maximum value of a signed long.
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#11 Post by rcrsn51 »

Iguleder wrote:Yes. GCC takes care of 64 bit math.
Then I suspect the problem is that BK's code is using atol instead of atoll.

scsijon
Posts: 1596
Joined: Thu 24 May 2007, 03:59
Location: the australian mallee
Contact:

signed vs unsigned long-long

#12 Post by scsijon »

ok I sort of understand,

however 'is / has' anyone 'fixing / fixed' the problem in at least woof-ce.

It would even be nice to have a simple pet so the rest of those that wnat to could update and fix the problem, if users wanted too.

pretty please.

User avatar
OscarTalks
Posts: 2196
Joined: Mon 06 Feb 2012, 00:58
Location: London, England

#13 Post by OscarTalks »

First of all, many thanks to everyone who has replied to this thread so far. It seems that there are some people out there who have a handle on what the problem might be, but I have to confess that I did not understand the explanations as I am still a relative novice.

So I was wondering, is anyone able to put together a practical solution?

This bug is something that affects one of the key elements of the Puppy main desktop user interface. We lose the nice visual indication of network activity after a certain amount of data has been downloaded or uploaded.

I thought it would be nice if this could be resolved before the release of Slacko 6.0 and hopefully it will be something that can be installed in older Puppies too.
Oscar in England
Image

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#14 Post by rcrsn51 »

@OscarTalks:

There are two versions of network_tray, AKA Blinky. There is BK's standard version in Tahr and Mick's version in Slacko.

I got the standard sources from bkhome.org and just switched "atol" to "atoll".

I have no way of testing this with actual data.
Attachments
network_tray_rcrsn51_atoll-2.6.pet
(6.03 KiB) Downloaded 245 times

User avatar
OscarTalks
Posts: 2196
Joined: Mon 06 Feb 2012, 00:58
Location: London, England

#15 Post by OscarTalks »

Hi rcrsn51,

Thanks for doing that. So what you did was edit every instance of atol to atoll in the source code network_tray.c file, is this correct?

I did a test in Dpup Wheezy. The network_tray executable is in /root/Startup rather than /usr/bin so I substituted yours in place of the original and then proceeded to download 3 random Ubuntu .isos so as to exceed the 2048 MB.

The blinking and the counting has continued beyond the point at which it would usually stop, so it looks like you may have cracked it. I will try to do some more longer-term testing including the upload count and see how it goes.

I think 01micko's version in the latest Slacko is 2.9 using different icons so I guess that needs looking at as well. The source is in ibiblio I believe..
Attachments
blinky.jpg
Gone past 2048 and still blinking - is this a good sign?
(27.28 KiB) Downloaded 283 times
Oscar in England
Image

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#16 Post by rcrsn51 »

OscarTalks wrote:So what you did was edit every instance of atol to atoll in the source code network_tray.c file, is this correct?
Yes

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#17 Post by BarryK »

Thanks, I have fixed it for Quirky:
http://bkhome.org/news/?viewDetailed=00103

My network_tray 3.1 is simpler than those in the latest puppies. The source is here:
http://bkhome.org/sources/alphabetical/n/
(user: p#u#p#p#y pass: l#i#n#u#x)
[url]https://bkhome.org/news/[/url]

User avatar
rerwin
Posts: 2017
Joined: Wed 24 Aug 2005, 22:50
Location: Maine, USA

#18 Post by rerwin »

rcrsn51,
Thank you for fixing this problem. I have applied your solution to an updated "2.7" version, now "2.7.3". It can be installed in puppies lucid, precise, slacko, tahr and probably others. It is available here:
http://www.murga-linux.com/puppy/viewto ... 923#807923
Richard

Post Reply