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

net shell "net tcp send" command failed when repeated many times #15594

Closed
chinli opened this issue Apr 22, 2019 · 2 comments
Closed

net shell "net tcp send" command failed when repeated many times #15594

chinli opened this issue Apr 22, 2019 · 2 comments
Assignees
Labels
area: Networking bug The issue is a bug, or the PR is fixing a bug

Comments

@chinli
Copy link

chinli commented Apr 22, 2019

we used net shell of zephyr phylogenetic (version of 1.14.0-rc3-465),and PC create TCP server, devices use command of "net tcp connect 192.168.1.107 8000" to connected, then successfully, send data by "net tcp send "hello world"" cmd, and repeate it dozens of times. shell will report a error about failed to get free buffer. the detail information as below:

uart:~$ net tcp send "hello world "
##context_alloc_pkt##: pkt=0
Cannot send msg (-12)
[00:04:11.510,000] net_buf.test_mem: (0x0010659c) 0x00120048 32 30 TX DATA (tx_bufs)

[00:04:11.510,000] net_buf.net_buf_alloc_len_debug: (0x0010659c) pkt_alloc_buffer():867: pool 0x00120048 size 256 timeout 1000
[00:04:11.570,000] net_buf: net_pkt_get_reserve_data_debug():381: Failed to get free buffer
[00:04:11.570,000] net_buf.test_mem: (0x0010b2b8) Fragment length 256 bytes

[00:04:11.570,000] net_buf.test_mem: (0x0010b2b8) Network buffer pools:

[00:04:11.570,000] net_buf.test_mem: (0x0010b2b8) Address Total Avail Name

[00:04:11.570,000] net_buf.test_mem: (0x0010b2b8) 0x0011fea4 16 16 RX

[00:04:11.570,000] net_buf.test_mem: (0x0010b2b8) 0x0011fec0 16 14 TX

[00:04:11.570,000] net_buf.test_mem: (0x0010b2b8) 0x0012001c 32 32 RX DATA (rx_bufs)

[00:04:11.570,000] net_buf.test_mem: (0x0010b2b8) 0x00120048 32 30 TX DATA (tx_bufs)

[00:04:12.520,000] net_buf: pkt_alloc_buffer():867: Failed to get free buffer
[00:04:12.520,000] net_buf.test_mem: (0x0010659c) Fragment length 256 bytes

[00:04:12.520,000] net_buf.test_mem: (0x0010659c) Network buffer pools:

[00:04:12.520,000] net_buf.test_mem: (0x0010659c) Address Total Avail Name

[00:04:12.520,000] net_buf.test_mem: (0x0010659c) 0x0011fea4 16 16 RX

[00:04:12.520,000] net_buf.test_mem: (0x0010659c) 0x0011fec0 16 14 TX

[00:04:12.520,000] net_buf.test_mem: (0x0010659c) 0x0012001c 32 32 RX DATA (rx_bufs)

[00:04:12.520,000] net_buf.test_mem: (0x0010659c) 0x00120048 32 30 TX DATA (tx_bufs)

[00:04:12.520,000] net_buf.net_buf_alloc_len_debug: (0x0010659c) pkt_alloc_buffer():867: pool 0x00120048 size 256 timeout 1000
[00:04:13.530,000] net_buf: pkt_alloc_buffer():867: Failed to get free buffer
[00:04:13.530,000] net_buf.test_mem: (0x0010659c) Fragment length 256 bytes

[00:04:13.530,000] net_buf.test_mem: (0x0010659c) Network buffer pools:

[00:04:13.530,000] net_buf.test_mem: (0x0010659c) Address Total Avail Name

[00:04:13.530,000] net_buf.test_mem: (0x0010659c) 0x0011fea4 16 16 RX

[00:04:13.530,000] net_buf.test_mem: (0x0010659c) 0x0011fec0 16 14 TX

[00:04:13.530,000] net_buf.test_mem: (0x0010659c) 0x0012001c 32 32 RX DATA (rx_bufs)

[00:04:13.530,000] net_buf.test_mem: (0x0010659c) 0x00120048 32 30 TX DATA (tx_bufs)

[00:04:14.670,000] net_buf.net_buf_alloc_len_debug: (0x0010b2b8) net_pkt_get_reserve_data_debug():381: pool 0x00120048 size 256 timeout 100
Message sent
[00:04:14.720,000] net_buf.net_buf_alloc_len_debug: (0x00107248) pkt_alloc_buffer():867: pool 0x0012001c size 256 timeout 100
[00:04:14.720,000] net_buf.net_buf_alloc_len_debug: (0x00107248) allocated buf 0x0011aba0
[00:04:14.720,000] net_buf.net_buf_alloc_len_debug: (0x00107248) pkt_alloc_buffer():867: pool 0x0012001c size 256 timeout 100
[00:04:14.720,000] net_buf.net_buf_alloc_len_debug: (0x00107248) allocated buf 0x0011ab58
[00:04:14.720,000] net_buf.net_buf_unref_debug: (0x0010b220) buf 0x0011aba0 ref 1 pool_id 2 frags 0x0011ab58
[00:04:14.720,000] net_buf.net_buf_unref_debug: (0x0010b220) buf 0x0011ab58 ref 1 pool_id 2 frags 0x00000000
[00:04:14.720,000] net_buf.net_buf_alloc_len_debug: (0x00107248) pkt_alloc_buffer():867: pool 0x0012001c size 256 timeout 100
[00:04:14.720,000] net_buf.net_buf_alloc_len_debug: (0x00107248) allocated buf 0x0011ab58
[00:04:14.720,000] net_buf.net_buf_alloc_len_debug: (0x00107248) pkt_alloc_buffer():867: pool 0x0012001c size 256 timeout 100
[00:04:14.720,000] net_buf.net_buf_alloc_len_debug: (0x00107248) allocated buf 0x0011aba0
[00:04:14.720,000] net_buf.net_buf_unref_debug: (0x0010b220) buf 0x0011ab58 ref 1 pool_id 2 frags 0x0011aba0
[00:04:14.720,000] net_buf.net_buf_unref_debug: (0x0010b220) buf 0x0011aba0 ref 1 pool_id 2 frags 0x00000000
[00:04:14.720,000] net_buf.net_buf_alloc_len_debug: (0x00107248) pkt_alloc_buffer():867: pool 0x0012001c size 256 timeout 100
[00:04:14.720,000] net_buf.net_buf_alloc_len_debug: (0x00107248) allocated buf 0x0011aba0
[00:04:14.720,000] net_buf.net_buf_unref_debug: (0x0010b220) buf 0x0011aba0 ref 1 pool_id 2 frags 0x00000000

@chinli chinli added the bug The issue is a bug, or the PR is fixing a bug label Apr 22, 2019
@pfalcon pfalcon changed the title net: socket send failed when sent many times net shell "net tcp send" command failed when sent many times Apr 22, 2019
@pfalcon
Copy link
Contributor

pfalcon commented Apr 22, 2019

(version of 1.14.0-rc3-465)

Please use 1.14.0 release, or master.

Beyond that, how reproducible is this? (I.e. of e.g. 20 runs of a board (which board?) after hardware reset, how many runs exhibit this issue?)

@pfalcon pfalcon changed the title net shell "net tcp send" command failed when sent many times net shell "net tcp send" command failed when repeated many times Apr 22, 2019
@chinli
Copy link
Author

chinli commented Apr 23, 2019

@pfalcon tks for your caution! I upgrade the code, it's fixed! ^_^

@chinli chinli closed this as completed Apr 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Networking bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

No branches or pull requests

3 participants