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

Fixed sockindex left with non-default value when connection fails. #176

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nschurando
Copy link

I believe I have found an issue.

When a connection established through EthernetClient::connect fails, the stat variable will have a value of SnSR::CLOSED causing the function to return immediately with a value of 0 without resetting the sockindex variable to the default MAX_SOCK_NUM.

The problem manifests itself at least when the following chain of events happen:

  1. Object A holds an instance of EthernetClient. It tries to establish a TCP connection trough EthernetClient::connect which fails because the port is not open on the server. Its instance is left with sockindex at 0.

  2. Object B performs a UDP exchange (EthernetUDP::begin, EthernetUDP::beginPacket, EthernetUDP::write, EthernetUDP::endPacket, EthernetUDP::parsePacket, read but no EthernetUDP::stop yet). It is attributed sockindex of 0.

  3. Object A tries again to connect, his instance still has a sockindex of 0, which leads to chaos because it's referencing a completely different socket.

@github-actions
Copy link

Memory usage change @ 4519a30

Board flash % RAM for global variables %
arduino:avr:leonardo 🔺 0 - +2 0.0 - +0.01 0 - 0 0.0 - 0.0
arduino:avr:mega 🔺 0 - +2 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:avr:nano 💚 -2 - 0 -0.01 - 0.0 0 - 0 0.0 - 0.0
arduino:megaavr:nona4809 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:megaavr:uno2018 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:sam:arduino_due_x_dbg 🔺 0 - +16 0.0 - 0.0 N/A N/A
arduino:samd:arduino_zero_edbg 🔺 0 - +4 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkr1000 🔺 0 - +4 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrfox1200 🔺 0 - +4 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrgsm1400 🔺 0 - +4 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrnb1500 🔺 0 - +4 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrvidor4000 🔺 0 - +4 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrwan1300 🔺 0 - +4 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrwan1310 🔺 0 - +4 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrwifi1010 🔺 0 - +4 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrzero 🔺 0 - +4 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:nano_33_iot 🔺 0 - +4 0.0 - 0.0 0 - 0 0.0 - 0.0
Click for full report table
Board examples/AdvancedChatServer
flash
% examples/AdvancedChatServer
RAM for global variables
% examples/BarometricPressureWebServer
flash
% examples/BarometricPressureWebServer
RAM for global variables
% examples/ChatServer
flash
% examples/ChatServer
RAM for global variables
% examples/DhcpAddressPrinter
flash
% examples/DhcpAddressPrinter
RAM for global variables
% examples/DhcpChatServer
flash
% examples/DhcpChatServer
RAM for global variables
% examples/LinkStatus
flash
% examples/LinkStatus
RAM for global variables
% examples/TelnetClient
flash
% examples/TelnetClient
RAM for global variables
% examples/UDPSendReceiveString
flash
% examples/UDPSendReceiveString
RAM for global variables
% examples/UdpNtpClient
flash
% examples/UdpNtpClient
RAM for global variables
% examples/WebClient
flash
% examples/WebClient
RAM for global variables
% examples/WebClientRepeating
flash
% examples/WebClientRepeating
RAM for global variables
% examples/WebServer
flash
% examples/WebServer
RAM for global variables
%
arduino:avr:leonardo 2 0.01 0 0.0 2 0.01 0 0.0 2 0.01 0 0.0 0 0.0 0 0.0 2 0.01 0 0.0 0 0.0 0 0.0 2 0.01 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 2 0.01 0 0.0 2 0.01 0 0.0 2 0.01 0 0.0
arduino:avr:mega 2 0.0 0 0.0 2 0.0 0 0.0 2 0.0 0 0.0 0 0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krwifi1010 4 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0 0 0.0 0 0.0 4 0.0 0 0.0 0 0.0 0 0.0 4 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0
arduino:samd:mkrzero 4 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0 0 0.0 0 0.0 4 0.0 0 0.0 0 0.0 0 0.0 4 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0
arduino:samd:nano_33_iot 4 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0 0 0.0 0 0.0 4 0.0 0 0.0 0 0.0 0 0.0 4 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0 4 0.0 0 0.0
Click for full report CSV
Board,examples/AdvancedChatServer<br>flash,%,examples/AdvancedChatServer<br>RAM for global variables,%,examples/BarometricPressureWebServer<br>flash,%,examples/BarometricPressureWebServer<br>RAM for global variables,%,examples/ChatServer<br>flash,%,examples/ChatServer<br>RAM for global variables,%,examples/DhcpAddressPrinter<br>flash,%,examples/DhcpAddressPrinter<br>RAM for global variables,%,examples/DhcpChatServer<br>flash,%,examples/DhcpChatServer<br>RAM for global variables,%,examples/LinkStatus<br>flash,%,examples/LinkStatus<br>RAM for global variables,%,examples/TelnetClient<br>flash,%,examples/TelnetClient<br>RAM for global variables,%,examples/UDPSendReceiveString<br>flash,%,examples/UDPSendReceiveString<br>RAM for global variables,%,examples/UdpNtpClient<br>flash,%,examples/UdpNtpClient<br>RAM for global variables,%,examples/WebClient<br>flash,%,examples/WebClient<br>RAM for global variables,%,examples/WebClientRepeating<br>flash,%,examples/WebClientRepeating<br>RAM for global variables,%,examples/WebServer<br>flash,%,examples/WebServer<br>RAM for global variables,%
arduino:avr:leonardo,2,0.01,0,0.0,2,0.01,0,0.0,2,0.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,0.0,0,0.0
arduino:samd:mkrwan1310,4,0.0,0,0.0,4,0.0,0,0.0,4,0.0,0,0.0,0,0.0,0,0.0,4,0.0,0,0.0,0,0.0,0,0.0,4,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,4,0.0,0,0.0,4,0.0,0,0.0,4,0.0,0,0.0
arduino:samd:mkrwifi1010,4,0.0,0,0.0,4,0.0,0,0.0,4,0.0,0,0.0,0,0.0,0,0.0,4,0.0,0,0.0,0,0.0,0,0.0,4,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,4,0.0,0,0.0,4,0.0,0,0.0,4,0.0,0,0.0
arduino:samd:mkrzero,4,0.0,0,0.0,4,0.0,0,0.0,4,0.0,0,0.0,0,0.0,0,0.0,4,0.0,0,0.0,0,0.0,0,0.0,4,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,4,0.0,0,0.0,4,0.0,0,0.0,4,0.0,0,0.0
arduino:samd:nano_33_iot,4,0.0,0,0.0,4,0.0,0,0.0,4,0.0,0,0.0,0,0.0,0,0.0,4,0.0,0,0.0,0,0.0,0,0.0,4,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,4,0.0,0,0.0,4,0.0,0,0.0,4,0.0,0,0.0

@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Feb 21, 2022
@nschurando
Copy link
Author

Any update? I see no reason for not including this in the next release.

@nschurando
Copy link
Author

Could we please get this PR merged?

I submitted it more than 2 years ago, and the issue has been separately raised in a later PR #208.

@nschurando nschurando force-pushed the master branch 3 times, most recently from 47be3d9 to d0da988 Compare March 28, 2024 09:44
Copy link

Memory usage change @ d0da988

Board flash % RAM for global variables %
arduino:avr:leonardo 🔺 0 - +2 0.0 - +0.01 0 - 0 0.0 - 0.0
arduino:avr:mega 🔺 0 - +2 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:avr:nano 💚 -2 - 0 -0.01 - 0.0 0 - 0 0.0 - 0.0
arduino:megaavr:nona4809 🔺 0 - +12 0.0 - +0.02 0 - 0 0.0 - 0.0
arduino:megaavr:uno2018 🔺 0 - +12 0.0 - +0.02 0 - 0 0.0 - 0.0
arduino:sam:arduino_due_x_dbg 🔺 0 - +16 0.0 - 0.0 N/A N/A
arduino:samd:arduino_zero_edbg 🔺 0 - +4 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkr1000 🔺 0 - +4 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrfox1200 🔺 0 - +4 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrgsm1400 🔺 0 - +4 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrnb1500 🔺 0 - +4 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrvidor4000 🔺 0 - +4 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrwan1300 🔺 0 - +4 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrwan1310 🔺 0 - +4 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrwifi1010 🔺 0 - +4 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrzero 🔺 0 - +4 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:nano_33_iot 🔺 0 - +4 0.0 - 0.0 0 - 0 0.0 - 0.0
Click for full report table
Board examples/AdvancedChatServer
flash
% examples/AdvancedChatServer
RAM for global variables
% examples/BarometricPressureWebServer
flash
% examples/BarometricPressureWebServer
RAM for global variables
% examples/ChatServer
flash
% examples/ChatServer
RAM for global variables
% examples/DhcpAddressPrinter
flash
% examples/DhcpAddressPrinter
RAM for global variables
% examples/DhcpChatServer
flash
% examples/DhcpChatServer
RAM for global variables
% examples/LinkStatus
flash
% examples/LinkStatus
RAM for global variables
% examples/PagerServer
flash
% examples/PagerServer
RAM for global variables
% examples/TelnetClient
flash
% examples/TelnetClient
RAM for global variables
% examples/UDPSendReceiveString
flash
% examples/UDPSendReceiveString
RAM for global variables
% examples/UdpNtpClient
flash
% examples/UdpNtpClient
RAM for global variables
% examples/WebClient
flash
% examples/WebClient
RAM for global variables
% examples/WebClientRepeating
flash
% examples/WebClientRepeating
RAM for global variables
% examples/WebServer
flash
% examples/WebServer
RAM for global variables
%
arduino:avr:leonardo 2 0.01 0 0.0 2 0.01 0 0.0 2 0.01 0 0.0 0 0.0 0 0.0 2 0.01 0 0.0 0 0.0 0 0.0 2 0.01 0 0.0 2 0.01 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 2 0.01 0 0.0 2 0.01 0 0.0 2 0.01 0 0.0
arduino:avr:mega 2 0.0 0 0.0 2 0.0 0 0.0 2 0.0 0 0.0 0 0.0 0 0.0 2 0.0 0 0.0 0 0.0 0 0.0 2 0.0 0 0.0 2 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 2 0.0 0 0.0 2 0.0 0 0.0 2 0.0 0 0.0
arduino:avr:nano -2 -0.01 0 0.0 -2 -0.01 0 0.0 -2 -0.01 0 0.0 0 0.0 0 0.0 -2 -0.01 0 0.0 0 0.0 0 0.0 -2 -0.01 0 0.0 -2 -0.01 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 -2 -0.01 0 0.0 -2 -0.01 0 0.0 -2 -0.01 0 0.0
arduino:megaavr:nona4809 12 0.02 0 0.0 12 0.02 0 0.0 12 0.02 0 0.0 0 0.0 0 0.0 12 0.02 0 0.0 0 0.0 0 0.0 12 0.02 0 0.0 12 0.02 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 12 0.02 0 0.0 12 0.02 0 0.0 12 0.02 0 0.0
arduino:megaavr:uno2018 12 0.02 0 0.0 12 0.02 0 0.0 12 0.02 0 0.0 0 0.0 0 0.0 12 0.02 0 0.0 0 0.0 0 0.0 12 0.02 0 0.0 12 0.02 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 12 0.02 0 0.0 12 0.02 0 0.0 12 0.02 0 0.0
arduino:sam:arduino_due_x_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0 0 0.0
Click for full report CSV
Board,examples/AdvancedChatServer<br>flash,%,examples/AdvancedChatServer<br>RAM for global variables,%,examples/BarometricPressureWebServer<br>flash,%,examples/BarometricPressureWebServer<br>RAM for global variables,%,examples/ChatServer<br>flash,%,examples/ChatServer<br>RAM for global variables,%,examples/DhcpAddressPrinter<br>flash,%,examples/DhcpAddressPrinter<br>RAM for global variables,%,examples/DhcpChatServer<br>flash,%,examples/DhcpChatServer<br>RAM for global variables,%,examples/LinkStatus<br>flash,%,examples/LinkStatus<br>RAM for global variables,%,examples/PagerServer<br>flash,%,examples/PagerServer<br>RAM for global variables,%,examples/TelnetClient<br>flash,%,examples/TelnetClient<br>RAM for global variables,%,examples/UDPSendReceiveString<br>flash,%,examples/UDPSendReceiveString<br>RAM for global variables,%,examples/UdpNtpClient<br>flash,%,examples/UdpNtpClient<br>RAM for global variables,%,examples/WebClient<br>flash,%,examples/WebClient<br>RAM for global variables,%,examples/WebClientRepeating<br>flash,%,examples/WebClientRepeating<br>RAM for global variables,%,examples/WebServer<br>flash,%,examples/WebServer<br>RAM for global variables,%
arduino:avr:leonardo,2,0.01,0,0.0,2,0.01,0,0.0,2,0.01,0,0.0,0,0.0,0,0.0,2,0.01,0,0.0,0,0.0,0,0.0,2,0.01,0,0.0,2,0.01,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,2,0.01,0,0.0,2,0.01,0,0.0,2,0.01,0,0.0
arduino:avr:mega,2,0.0,0,0.0,2,0.0,0,0.0,2,0.0,0,0.0,0,0.0,0,0.0,2,0.0,0,0.0,0,0.0,0,0.0,2,0.0,0,0.0,2,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,2,0.0,0,0.0,2,0.0,0,0.0,2,0.0,0,0.0
arduino:avr:nano,-2,-0.01,0,0.0,-2,-0.01,0,0.0,-2,-0.01,0,0.0,0,0.0,0,0.0,-2,-0.01,0,0.0,0,0.0,0,0.0,-2,-0.01,0,0.0,-2,-0.01,0,0.0,0,0.0,0,0.0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,0,0.0,4,0.0,0,0.0,4,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,4,0.0,0,0.0,4,0.0,0,0.0,4,0.0,0,0.0
arduino:samd:mkrzero,4,0.0,0,0.0,4,0.0,0,0.0,4,0.0,0,0.0,0,0.0,0,0.0,4,0.0,0,0.0,0,0.0,0,0.0,4,0.0,0,0.0,4,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,4,0.0,0,0.0,4,0.0,0,0.0,4,0.0,0,0.0
arduino:samd:nano_33_iot,4,0.0,0,0.0,4,0.0,0,0.0,4,0.0,0,0.0,0,0.0,0,0.0,4,0.0,0,0.0,0,0.0,0,0.0,4,0.0,0,0.0,4,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,4,0.0,0,0.0,4,0.0,0,0.0,4,0.0,0,0.0

@nschurando
Copy link
Author

nschurando commented Mar 28, 2024

I have just rebased my PR branch.

@PaulStoffregen Since you wrote the code, could you take a look a tell us if the suggested change makes sense?

I would like to point out that the original code in 2013 handled the failure in a similar way. See below:

_sock = MAX_SOCK_NUM;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

_sockindex left with non-default value when connection fails
2 participants