-
Notifications
You must be signed in to change notification settings - Fork 8.3k
net: samples: fixes for echo_client #8312
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8312 +/- ##
==========================================
- Coverage 64.53% 64.53% -0.01%
==========================================
Files 420 420
Lines 40122 40123 +1
Branches 6763 6763
==========================================
Hits 25893 25893
- Misses 11109 11110 +1
Partials 3120 3120
Continue to review full report at Codecov.
|
e2e5554 to
d3ccda6
Compare
|
While stressing the sample, I've encountered yet another crash, this time inside |
jukkar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Functions for per-interface statistics collection used a pointer to a packet that could've been deallocated in the net_conn callback function. In result, application could crash when interface related to the packet was referenced. To fix that, packet interface is stored earlier, so it can be used instead for statistics collection. Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Default stack size was too small for main thread in qemu_x86 configuration and resulted in stack overflow during initialization. Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Because per-interface statistics rely on interface pointer stored in a net_pkt, it should not be unreferenced before stats are updated. Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
d3ccda6 to
c884a91
Compare
|
@rlubos we have to increase the main stack size in "prj_qemu_x86_tls.conf" not in "prj_qemu_x86.conf". I missed this. |
Are you sure about this? I was hitting stack overflow in this configuration with default stack size. "prj_qemu_x86_tls.conf" needs increased stack as well though, no doubt about it. |
|
Functions for per-interface statistics collection used a pointer to a packet that could've been deallocated in the
net_conncallback function. In result, application could crash when interface related to the packet was referenced.To fix that, packet interface is stored earlier, so it can be used instead for statistics collection.
Additionally, increase main stack size for
echo_clientinprj_qemu_x86.conf, as the default one caused stack overflow during initialization.Fixes #7423
Signed-off-by: Robert Lubos robert.lubos@nordicsemi.no