G120 and Sockets, reliability problem - Need help!

Good news! By crashing do you mean the G120HDR stopped responding and the device hangs at socket.accept() ?
If it is so, this is great, now just need to find why it does that…
I’m pretty sure the higher the sent packet size, the higher the chance that the bug occurs.
Is there a limit on the packet size, beside the g120 memory limit ?
Could you send a packet of 64kb for example or even more?

Thanks for trying it, just to make sure, did you put the interfval time between requests at 0ms ?

@ PhilM - It’s a pity but until saturday I can’t make this interesting test.
Past week I noted that the problem change radically among different ethernet switch. I’ve attached G120 to a low cost d-link switch and my program get locked in 30min. Same happens to a no-brand chinese switch. Instead, attached to an HP managed switch it works for 2-3 days, same program, same board. The program uses socket and send/receive data from PC every 10sec.

I need to test with this bench program.

No problem, let me know your results.
So different brands gives you different results? But in the end the bug still occurs eventually?

@ PhilM - The test is running and keep it going while i go to sleep :slight_smile: Will share the results tomorrow.

@ PhilM -

Hello, a fixed version has sent to you.
let me know if you can reproduce it.

Edit: what I know about the buffer size is 4K transmit and 4K receive but it is not related to your problem.

G120 starts to get mature :slight_smile:

I don’t know what you did, but the network seems super fast now!
Like 5x to 10x faster and very constant.

With 150 lines (packet size of 5290bytes) it did not bug yet!

I just tried at 250 lines (packet size of ~8k) and I made it bug.

Currently I’m testing at 200 lines (packet size 7090kb) and so far so good.

Thanks a lot trying to make this stable, I think network needs to be very bulletproof :slight_smile:

@ PhilM - Now that you received a fix its maybe not so significant anymore. My test run for 53 minutes and then stopped. I’m looking forward to receive the fix.

Which firmware are you running on G120, I’m using the May 1st 2013 (last public 4.2.10.1) and can’t run the test. I get lot of exceptions… often I need to reflesh config.hex

PS: I got a problem on the PC due to the damned AVAST that is cousing request timeout… no words …

Paquet @ 5290bytes it took 594 seconds to hang, with a total number of 5159 requests.

There is an improvement but the bug still occurs.

I just tested the old (last public) firmware.
And it is way slower, it hangs quickly (36 seconds this time at 5290bytes), but the test program ran fine.

Avast might detect this test as a strange behavior ? Maybe you can specify an exception on avast…

After disabling Avast Web Protection the application works fine on G120 and on PC. With Norton AV this is not an issue.
I got this times for G120 Cobra II (150 lines 5290bytes):

  • D-Link switch : 223sec then crash.
  • HP procurve switch: still running (8 h till now)

On G400HDR (150 lines 5290bytes):

  • HP Procurve switch: still running (7 1/2 h till now)

I didn’t write down the speed in line-blocks/sec…

@ Dat
When the packets are 1740bytes (50 lines), I cannot make it bug yet.
I`m at 106450 requests, 3:45 hours spent so far, and it is very stable.
I can also spam it with a browser (CTRL-R) WHILE running the stresstest program, and it does not hang. It does not even make exceptions. It is very smooth and fast.

But if I increase the packet size, then it starts bugging again. Whats different when the packet size is bigger ? Maybe splits starts occuring and other stuff? And the received packet size in bytes I list in the stresstest is just the message size, but I understand theres overhead (start and end frame) that will make the total length per request bigger… Something to consider to determine why it bugs with bigger packet size?

I will continue to run the test @ 1740bytes and see if it can stay up for more than 24hours.

Interesting that the switch seems to make a difference. Can you try to put 250 lines for the cobraII, and make sure the period between requests are at 0ms.
This should make it hang pretty quick…

With the new firmware, at packet size 1740, almost 18 hours in, and it never failed!
Almost 1 million requests done!
I even tried to spam it from 3 different computers, 10 tabs open, each connecting to the G120 every 100ms. It gets a bit slower but it stays up.
No exceptions, everything runs smooth, no hang.
So we might have something there… It never been so stable ever.

I will try to increase the packet size next monday, and try to determine the exact number where it fails?

@ dat maybe this gives ideas of where the problem might be ?
If it would be possible to manually reset the ENC28J60 maybe we could even make a workaround … something like ethInterface.ReInit() or something like that…

But finding the real problem would be even better.

would this update also affect Cobra 2 with wifi performance? I assume its MF 4.2?

The same test, 34 hours later, still runs!
Seems very stable at 1740bytes packet size with the new firmware!
I`m very happy to see it still running today.

Now if the bug would be fixed for even greater packet size, this would be awesome:)
Thanks for the ongoing support!

I’m going to start by admitting that I have not read the 12 pages of this thread. However, I’m wondering if this problem is the same that I have been trying to track down the past 3 days. In trying to fix another problem with a client’s Cobra-II device, I setup the Cobra-II to constantly reboot after establishing a network connection. The problem they reported was that it would occasionally come back with a default IP… What I quickly discovered after setting this test up was that after 40+ successful connections and reboots, the firmware would get corrupted. If I eliminated the code that was setting up the network then it would reboot all day long w/o any problems. So, there is a network related problem and I’ve spent most of today trying to narrow down the app to just the part causing the problem. Based on the title of this thread and your last few posts, I’m wondering if its the same.

Could someone send me this new firmware update to test?

@ ianlee74 - i think its more related to http://www.ghielectronics.com/community/forum/topic?id=12619 What is your email address?

1 Like