Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EtherCard buffer overflow results in sending garbage to Cosm #2

Open
smulube opened this issue Nov 27, 2012 · 0 comments
Open

EtherCard buffer overflow results in sending garbage to Cosm #2

smulube opened this issue Nov 27, 2012 · 0 comments

Comments

@smulube
Copy link

smulube commented Nov 27, 2012

Hi,

I'm one of the devs at Cosm, and we were trying to figure out an issue we were having which we realised was due to a feed on our system containing 50000 datastreams. When we investigated further we realised that this feed is coming from an Air Quality Egg.

On looking into it further I think the issue is the one discussed in the comments here: http://jeelabs.org/2012/04/11/ethercard-improvements/#comments

What possibly seems to be happening is that when sending data to Cosm, the stash space gets used up and not freed, and when it is all used up the library does some weird buffer overflow thing, and starts sending random snippets of the last response from Cosm instead of the data it's supposed to be sending. We had a bug in our system which then created new datastreams for every incoming random snippet which lead to the problems we were seeing.

I don't have an AQE to test with, but I do have a AQE shield running on a Nanode. One of the comments in that thread suggested a solution which I've been running for the last 24 hours, which seems to have solved the problem locally for me, but maybe you have a better solution?

This was the comment:

http://jeelabs.org/2012/04/11/ethercard-improvements/#comment-5081

so in the function I have that actually posts the data to Cosm I do something like this:

if (stash.freeCount() < 10) {
  stash.initMap(56);
}

Here's the feed I have running: https://cosm.com/feeds/84633 and you can see that the freeCount does drop steadily throughout the day, and doing this reset has so far managed to keep the shield running normally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant