Date   

Re: Debugging NRF51822 (OpenOCD + GDB)

Chettimada, Vinayak Kariappa
 

Ah… I see your revision is older than a controller regression fix done in cb90fbe56.
The symptom was the exact assert as you see, around ~8 mins interval from power up.

Please use latest revision and let me know if you still see assert.
But its weird you don’t get logs from your application.

On 25 Aug 2017, at 15:38, Scott Nelson <scott@scottnelson.co> wrote:

I’m using an unmodified master as of revision 2de5902. Here’s the full code for the project I’m working on: https://github.com/scttnlsn/bms

Thanks!

-Scott

On Aug 25, 2017, at 9:31 AM, Chettimada, Vinayak Kariappa <vinayak.kariappa.chettimada@nordicsemi.no> wrote:

I forced an assert in radio_event_adv_prepare by setting
"_radio.tocker_id_prepare = 1”. All I see is:

***** HARD FAULT *****
Executing thread ID (thread): 0x200007a8
Faulting instruction address: 0xbc76

No additional logging.
[vich]
Are you using the upstream master as-is? Or you have modified the default configurations?
BT_ERR message when ASSERTing should be printed out on UART by default for the peripheral sample.


Re: Debugging NRF51822 (OpenOCD + GDB)

Scott Nelson <scott@...>
 

Updating the Zephyr code seemed to have resolved the issue entirely. Thanks!

-Scott

On Aug 25, 2017, at 10:28 AM, Chettimada, Vinayak Kariappa <vinayak.kariappa.chettimada@nordicsemi.no> wrote:

Ah… I see your revision is older than a controller regression fix done in cb90fbe56.
The symptom was the exact assert as you see, around ~8 mins interval from power up.

Please use latest revision and let me know if you still see assert.
But its weird you don’t get logs from your application.

On 25 Aug 2017, at 15:38, Scott Nelson <scott@scottnelson.co> wrote:

I’m using an unmodified master as of revision 2de5902. Here’s the full code for the project I’m working on: https://github.com/scttnlsn/bms

Thanks!

-Scott

On Aug 25, 2017, at 9:31 AM, Chettimada, Vinayak Kariappa <vinayak.kariappa.chettimada@nordicsemi.no> wrote:

I forced an assert in radio_event_adv_prepare by setting
"_radio.tocker_id_prepare = 1”. All I see is:

***** HARD FAULT *****
Executing thread ID (thread): 0x200007a8
Faulting instruction address: 0xbc76

No additional logging.
[vich]
Are you using the upstream master as-is? Or you have modified the default configurations?
BT_ERR message when ASSERTing should be printed out on UART by default for the peripheral sample.


Re: Debugging NRF51822 (OpenOCD + GDB)

Carles Cufi
 

Hi Scott,

-----Original Message-----
From: zephyr-users-bounces@lists.zephyrproject.org [mailto:zephyr-users-
bounces@lists.zephyrproject.org] On Behalf Of Scott Nelson
Sent: 28 August 2017 15:15
To: Chettimada, Vinayak Kariappa
<vinayak.kariappa.chettimada@nordicsemi.no>
Cc: zephyr-users@lists.zephyrproject.org
Subject: Re: [Zephyr-users] Debugging NRF51822 (OpenOCD + GDB)

Updating the Zephyr code seemed to have resolved the issue entirely.
Thanks!
That's good news, we fixed this issue, which also affected the nRF52 ICs that Linaro use for their distributed testing, in preparation for the 1.9 release, and was hoping that this would be the same. Sorry for the initial confusion.

Carles


How to choice CONFIG_GPIO_QMSI_0_NAME and CONFIG_GPIO_QMSI_1_NAME?

kk <pinganddu90@...>
 

Hi 

When programming based on arduino 101, 
1. How to choice the gpio? 
2. What is the different between CONFIG_GPIO_QMSI_0_NAME and CONFIG_GPIO_QMSI_1_NAME?

Thanks


qemu_x86 zephyr bluetooth beacon sample error

Priyanka
 

Hi 


While running the bluetooth sample "beacon" for the target qemu_x86, 

I get the following error


Starting Beacon Demo


Bluetooth initialized
Beacon started
[bt] [ERR] read_payload: Not enough space in buffer
[bt] [WRN] hci_cmd_done: pool id 1 pool 0x00405098 != &hci_cmd_pool 0x00405078

Is this a known issue? Could someone please tell me the possible cause of this error and how to fix it possibly? Thanks.

Thanks
Priyanka



Re: qemu_x86 zephyr bluetooth beacon sample error

Johan Hedberg
 

Hi Priyanka,

On Tue, Sep 05, 2017, Priyanka Rawat wrote:
While running the bluetooth sample "beacon" for the target qemu_x86,

I get the following error

Starting Beacon Demo

Bluetooth initialized
Beacon started
[bt] [ERR] read_payload: Not enough space in buffer
[bt] [WRN] hci_cmd_done: pool id 1 pool 0x00405098 != &hci_cmd_pool 0x00405078

Is this a known issue? Could someone please tell me the possible cause
of this error and how to fix it possibly? Thanks.
What version of Zephyr is this with? I've noticed that sometimes there
seems to be some garbage data inserted to the virtual UART between
btproxy and qemu, and restarting qemu usually helps with that. I've at
least seen the first error when that happens.

Johan


Re: qemu_x86 zephyr bluetooth beacon sample error

Priyanka
 

Hi Johan


Thanks for the reply.
The error is with the (recent) master branch of zephyr.
Yes, I did try restarting Qemu, but it didn't resolve the issue.

Just to give you a sense of how I test this sample with BlueZ emulator and tools (in case I am missing or doing something wrong here) :

I have following running in different terminals.

$ sudo ./btvirt -l2
Bluetooth emulator ver 5.46

$ sudo btmon
Bluetooth monitor ver 5.46

$ sudo tools/btproxy -u
Listening on /tmp/bt-server-bredr
Opening user channel for hci0
New client connected

# zephyr/samples/bluetooth/beacon$ make run

Starting Beacon Demo
[bt] [INF] show_dev_info: Identity: 00:aa:01:00:00:23 (public)
[bt] [INF] show_dev_info: HCI: version 5.0 (0x09) revision 0x0000, manufacturer 0x003f
[bt] [INF] show_dev_info: LMP: version 5.0 (0x09) subver 0x0000
Bluetooth initialized
Beacon started
[bt] [ERR] read_payload: Not enough space in buffer
[bt] [WRN] hci_cmd_done: pool id 1 pool 0x00405098 != &hci_cmd_pool 0x00405078

I try this with the basic proj.conf  provided in the sample "beacon"

$ hciconfig -a

gives me the following
Can't read class of device on hci0: Connection timed out (110)


hci0: Type: BR/EDR Bus: VIRTUAL

BD Address: 00:AA:01:00:00:23 ACL MTU: 192:1 SCO MTU: 0:0

UP RUNNING

RX bytes:0 acl:0 sco:0 events:203 errors:0

TX bytes:7024 acl:0 sco:0 commands:636 errors:0

Features: 0xa4 0x08 0x08 0xc0 0x58 0x1e 0x7b 0x83

Packet type: DM1 DH1 HV1

Link policy: RSWITCH SNIFF

Link mode: SLAVE ACCEPT

Name: 'xxxxxx #1'

Can't read class of device on hci0: Connection timed out (110)


Thanks
Priyanka


From: Johan Hedberg <johan.hedberg@...>
Sent: Tuesday, September 5, 2017 2:45 PM
To: Priyanka Rawat
Cc: zephyr-users@...
Subject: Re: [Zephyr-users] qemu_x86 zephyr bluetooth beacon sample error
 
Hi Priyanka,

On Tue, Sep 05, 2017, Priyanka Rawat wrote:
> While running the bluetooth sample "beacon" for the target qemu_x86,
>
> I get the following error
>
> Starting Beacon Demo
>
> Bluetooth initialized
> Beacon started
> [bt] [ERR] read_payload: Not enough space in buffer
> [bt] [WRN] hci_cmd_done: pool id 1 pool 0x00405098 != &hci_cmd_pool 0x00405078
>
> Is this a known issue? Could someone please tell me the possible cause
> of this error and how to fix it possibly? Thanks.

What version of Zephyr is this with? I've noticed that sometimes there
seems to be some garbage data inserted to the virtual UART between
btproxy and qemu, and restarting qemu usually helps with that. I've at
least seen the first error when that happens.

Johan


Help with compiling for qemu ARM cortex m3

Priyanka
 

Hi 


I tried to compile my sample application code for the target
BOARD ?= qemu_cortex_m3

It compiles for qemu_x86 however for qemu_cortex_m3 it gives me errors related to SRAM overflowed.

$zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-zephyr-eabi/gcc/arm-zephyr-eabi/6.2.0/real-ld: zephyr_prebuilt.elf section `noinit' will not fit in region `SRAM'
$zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-zephyr-eabi/gcc/arm-zephyr-eabi/6.2.0/real-ld: section .intList VMA [0000000020010000,0000000020010043] overlaps section noinit VMA [000000002000d5a0,000000002002413b]
$zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-zephyr-eabi/gcc/arm-zephyr-eabi/6.2.0/real-ld: region `SRAM' overflowed by 82236 bytes
collect2: error: ld returned 1 exit status
$zephyr/Makefile:878: recipe for target 'zephyr_prebuilt.elf' failed


I test with the recent zephyr version (master branch).
In dts/arm/ti/lm3s6965.dtsi the SRAM for qemu_cortex_m3 defined is 64 KB.

I can manage to compile for qemu_cortex_m3  by increasing the value of SRAM from 64 KB to 128 KB in
dts/arm/ti/lm3s6965.dtsi

sram0: memory@20000000 {
        device_type = "memory";
        compatible = "mmio-sram";
        reg = <0x20000000 (64*1024)>;    
};

However, I want to test with the same
SRAM value as in real hardware (e.g., eventually I want to test with KW41Z board). So instead of increasing the current SRAM value, I would rather modify proj.conf.
 
Could someone please tell me what would be the right approach to address this issue of SRAM overflow for qemu ARM ?

Thanks
Priyanka



Re: Help with compiling for qemu ARM cortex m3

Kumar Gala
 

On Sep 7, 2017, at 4:37 AM, Priyanka Rawat <priyanka.rawat@nxp.com> wrote:

Hi

I tried to compile my sample application code for the target
BOARD ?= qemu_cortex_m3

It compiles for qemu_x86 however for qemu_cortex_m3 it gives me errors related to SRAM overflowed.

$zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-zephyr-eabi/gcc/arm-zephyr-eabi/6.2.0/real-ld: zephyr_prebuilt.elf section `noinit' will not fit in region `SRAM'
$zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-zephyr-eabi/gcc/arm-zephyr-eabi/6.2.0/real-ld: section .intList VMA [0000000020010000,0000000020010043] overlaps section noinit VMA [000000002000d5a0,000000002002413b]
$zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-zephyr-eabi/gcc/arm-zephyr-eabi/6.2.0/real-ld: region `SRAM' overflowed by 82236 bytes
collect2: error: ld returned 1 exit status
$zephyr/Makefile:878: recipe for target 'zephyr_prebuilt.elf' failed


I test with the recent zephyr version (master branch).
In dts/arm/ti/lm3s6965.dtsi the SRAM for qemu_cortex_m3 defined is 64 KB.

I can manage to compile for qemu_cortex_m3 by increasing the value of SRAM from 64 KB to 128 KB in
dts/arm/ti/lm3s6965.dtsi

sram0: memory@20000000 {
device_type = "memory";
compatible = "mmio-sram";
reg = <0x20000000 (64*1024)>;
};

However, I want to test with the same SRAM value as in real hardware (e.g., eventually I want to test with KW41Z board). So instead of increasing the current SRAM value, I would rather modify proj.conf.

Could someone please tell me what would be the right approach to address this issue of SRAM overflow for qemu ARM ?

Thanks
Priyanka
I don’t believe there is a way to change the amount of memory in qemu. Even with switching to the KW41Z guess you are going to run into memory issues (as it has 128k). So are you building your own application or one of the samples/tests? You can try and remove config options to reduce memory, but if you are 82K overflowing than I’m guessing you need to look at how your application is utilizing memory and see if you can reduce that.

- k


Re: Help with compiling for qemu ARM cortex m3

Boie, Andrew P
 

However, I want to test with the same SRAM value as in real hardware (e.g.,
eventually I want to test with KW41Z board). So instead of increasing the current
SRAM value, I would rather modify proj.conf.

Could someone please tell me what would be the right approach to address
this issue of SRAM overflow for qemu ARM ?
"make ram_report" and "make rom_report" dump out some helpful information to see what in your code is using so much memory.

Andrew


Re: Help with compiling for qemu ARM cortex m3

Vakul Garg <vakul.garg@...>
 

Hi Andrew

The suggested commands are very useful.
Thanks for your advice.

Regards, Vakul

-----Original Message-----
From: zephyr-users-bounces@lists.zephyrproject.org [mailto:zephyr-users-bounces@lists.zephyrproject.org] On Behalf Of Boie, Andrew P
Sent: Thursday, September 07, 2017 9:39 PM
To: Kumar Gala <kumar.gala@linaro.org>; Priyanka Rawat <priyanka.rawat@nxp.com>
Cc: zephyr-users@lists.zephyrproject.org
Subject: Re: [Zephyr-users] Help with compiling for qemu ARM cortex m3

However, I want to test with the same SRAM value as in real hardware
(e.g.,
eventually I want to test with KW41Z board). So instead of increasing
the current SRAM value, I would rather modify proj.conf.

Could someone please tell me what would be the right approach to
address
this issue of SRAM overflow for qemu ARM ?
"make ram_report" and "make rom_report" dump out some helpful information to see what in your code is using so much memory.

Andrew
_______________________________________________
Zephyr-users mailing list
Zephyr-users@lists.zephyrproject.org
https://lists.zephyrproject.org/mailman/listinfo/zephyr-users


TCP assert error logs

Vakul Garg <vakul.garg@...>
 

Hi

 

I have two threads on my system communicating using TCP over loopback interface.

I am getting following errors.

 

[net/tcp] [ERR] net_tcp_get_hdr: {assert: 'frag' failed}

[net/tcp] [ERR] net_tcp_send_pkt: Packet 0x20004664 does not contain TCP header

[net/tcp] [ERR] net_tcp_get_hdr: {assert: 'frag' failed}

[net/tcp] [ERR] net_tcp_send_pkt: Packet 0x20004664 does not contain TCP header

[net/tcp] [ERR] net_tcp_get_hdr: {assert: 'frag' failed}

[net/tcp] [ERR] net_tcp_send_pkt: Packet 0x20004664 does not contain TCP header

[net/buf] [ERR] net_buf_unref_debug: net_pkt_frag_unref():826: buf 0x200046a0 double free

[net/buf] [ERR] net_buf_unref_debug: net_pkt_frag_unref():826: buf 0x200046a0 double free

[net/buf] [ERR] net_buf_unref_debug: net_pkt_frag_unref():826: buf 0x20004830 double free

 

Can someone help?

 

Regards, Vakul


Re: TCP assert error logs

Paul Sokolovsky
 

Hello Vakul,

On Sat, 9 Sep 2017 06:47:35 +0000
Vakul Garg <vakul.garg@nxp.com> wrote:

Hi

I have two threads on my system communicating using TCP over loopback
interface. I am getting following errors.
To the best of my knowledge, there is (was) no loopback interface
support in Zephyr. So, I'd interested to know how to achieved the
setup above.


[net/tcp] [ERR] net_tcp_get_hdr: {assert: 'frag' failed}
[net/tcp] [ERR] net_tcp_send_pkt: Packet 0x20004664 does not contain
TCP header [net/tcp] [ERR] net_tcp_get_hdr: {assert: 'frag' failed}
[net/tcp] [ERR] net_tcp_send_pkt: Packet 0x20004664 does not contain
TCP header [net/tcp] [ERR] net_tcp_get_hdr: {assert: 'frag' failed}
[net/tcp] [ERR] net_tcp_send_pkt: Packet 0x20004664 does not contain
TCP header [net/buf] [ERR] net_buf_unref_debug:
net_pkt_frag_unref():826: buf 0x200046a0 double free [net/buf] [ERR]
net_buf_unref_debug: net_pkt_frag_unref():826: buf 0x200046a0 double
free [net/buf] [ERR] net_buf_unref_debug: net_pkt_frag_unref():826:
buf 0x20004830 double free

Can someone help?

Regards, Vakul

--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs
Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog


Re: TCP assert error logs

Vakul Garg <vakul.garg@...>
 

I just open a TCP server socket and let it listen for new connections on 127.0.0.1 on a given server port.

Then another thread creates a TCP client socket and connects to the 127.0.0.1 on the same server port.
After connection is successful, client sends one data message on the socket.

-----Original Message-----
From: Paul Sokolovsky [mailto:paul.sokolovsky@linaro.org]
Sent: Saturday, September 09, 2017 2:57 PM
To: Vakul Garg <vakul.garg@nxp.com>
Cc: zephyr-users@lists.zephyrproject.org
Subject: Re: [Zephyr-users] TCP assert error logs

Hello Vakul,

On Sat, 9 Sep 2017 06:47:35 +0000
Vakul Garg <vakul.garg@nxp.com> wrote:

Hi

I have two threads on my system communicating using TCP over loopback
interface. I am getting following errors.
To the best of my knowledge, there is (was) no loopback interface support in Zephyr. So, I'd interested to know how to achieved the setup above.


[net/tcp] [ERR] net_tcp_get_hdr: {assert: 'frag' failed} [net/tcp]
[ERR] net_tcp_send_pkt: Packet 0x20004664 does not contain TCP header
[net/tcp] [ERR] net_tcp_get_hdr: {assert: 'frag' failed} [net/tcp]
[ERR] net_tcp_send_pkt: Packet 0x20004664 does not contain TCP header
[net/tcp] [ERR] net_tcp_get_hdr: {assert: 'frag' failed} [net/tcp]
[ERR] net_tcp_send_pkt: Packet 0x20004664 does not contain TCP header
[net/buf] [ERR] net_buf_unref_debug:
net_pkt_frag_unref():826: buf 0x200046a0 double free [net/buf] [ERR]
net_buf_unref_debug: net_pkt_frag_unref():826: buf 0x200046a0 double
free [net/buf] [ERR] net_buf_unref_debug: net_pkt_frag_unref():826:
buf 0x20004830 double free

Can someone help?

Regards, Vakul

--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog


Re: TCP assert error logs

Paul Sokolovsky
 

Hello Vakul,

On Sat, 9 Sep 2017 09:31:14 +0000
Vakul Garg <vakul.garg@nxp.com> wrote:

I just open a TCP server socket and let it listen for new connections
on 127.0.0.1 on a given server port.
Right, that might work, thanks to
https://gerrit.zephyrproject.org/r/#/c/7007/ , and if you verified, it
apparently does (I don't remember if I ever using 127.0.0.1 address,
I usually tried to use a local interface address in such cases, i.e.
192.0.2.1 by default). But just to get terminology right, there's no
explicit loopback interface in Zephyr, it's just an adhoc check for
the conventional loopback address (though this note is probably
irrelevant for your usecase, so feel free to ignore it [for now]).

Then another thread creates a TCP client socket and connects to the
127.0.0.1 on the same server port. After connection is successful,
client sends one data message on the socket.
What can I say? With such scenario, you went farther than I. Last time I
tried, it wasn't possible to establish a TCP connection under such
conditions at all: https://jira.zephyrproject.org/browse/ZEP-2001 .

I'd suggest to add some comments to the above ticket, describing your
usecase. And ultimately, we'd need a typical small testcase to
reproduce the issue, so feel free to post your code to make a step
towards progress in that direction. I faced that issue when testing
networking support in Zephyr.JS and MicroPython projects, so there're
no readily available minimal testcases.



Thanks,
Paul



-----Original Message-----
From: Paul Sokolovsky [mailto:paul.sokolovsky@linaro.org]
Sent: Saturday, September 09, 2017 2:57 PM
To: Vakul Garg <vakul.garg@nxp.com>
Cc: zephyr-users@lists.zephyrproject.org
Subject: Re: [Zephyr-users] TCP assert error logs

Hello Vakul,

On Sat, 9 Sep 2017 06:47:35 +0000
Vakul Garg <vakul.garg@nxp.com> wrote:

Hi

I have two threads on my system communicating using TCP over
loopback interface. I am getting following errors.
To the best of my knowledge, there is (was) no loopback interface
support in Zephyr. So, I'd interested to know how to achieved the
setup above.


[net/tcp] [ERR] net_tcp_get_hdr: {assert: 'frag' failed} [net/tcp]
[ERR] net_tcp_send_pkt: Packet 0x20004664 does not contain TCP
header [net/tcp] [ERR] net_tcp_get_hdr: {assert: 'frag' failed}
[net/tcp] [ERR] net_tcp_send_pkt: Packet 0x20004664 does not
contain TCP header [net/tcp] [ERR] net_tcp_get_hdr: {assert: 'frag'
failed} [net/tcp] [ERR] net_tcp_send_pkt: Packet 0x20004664 does
not contain TCP header [net/buf] [ERR] net_buf_unref_debug:
net_pkt_frag_unref():826: buf 0x200046a0 double free [net/buf] [ERR]
net_buf_unref_debug: net_pkt_frag_unref():826: buf 0x200046a0
double free [net/buf] [ERR] net_buf_unref_debug:
net_pkt_frag_unref():826: buf 0x20004830 double free

Can someone help?

Regards, Vakul

--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs Follow Linaro:
http://www.facebook.com/pages/Linaro http://twitter.com/#!/linaroorg
- http://www.linaro.org/linaro-blog


--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs
Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog


Re: TCP assert error logs

Vakul Garg <vakul.garg@...>
 

Hello Paul

I have attached a test case with the given ticket.

Regards

Vakul

-----Original Message-----
From: Paul Sokolovsky [mailto:paul.sokolovsky@linaro.org]
Sent: Monday, September 11, 2017 4:52 PM
To: Vakul Garg <vakul.garg@nxp.com>
Cc: zephyr-users@lists.zephyrproject.org
Subject: Re: [Zephyr-users] TCP assert error logs

Hello Vakul,

On Sat, 9 Sep 2017 09:31:14 +0000
Vakul Garg <vakul.garg@nxp.com> wrote:

I just open a TCP server socket and let it listen for new connections
on 127.0.0.1 on a given server port.
Right, that might work, thanks to
https://gerrit.zephyrproject.org/r/#/c/7007/ , and if you verified, it apparently does (I don't remember if I ever using 127.0.0.1 address, I usually tried to use a local interface address in such cases, i.e.
192.0.2.1 by default). But just to get terminology right, there's no explicit loopback interface in Zephyr, it's just an adhoc check for the conventional loopback address (though this note is probably irrelevant for your usecase, so feel free to ignore it [for now]).

Then another thread creates a TCP client socket and connects to the
127.0.0.1 on the same server port. After connection is successful,
client sends one data message on the socket.
What can I say? With such scenario, you went farther than I. Last time I tried, it wasn't possible to establish a TCP connection under such conditions at all: https://jira.zephyrproject.org/browse/ZEP-2001 .

I'd suggest to add some comments to the above ticket, describing your usecase. And ultimately, we'd need a typical small testcase to reproduce the issue, so feel free to post your code to make a step towards progress in that direction. I faced that issue when testing networking support in Zephyr.JS and MicroPython projects, so there're no readily available minimal testcases.



Thanks,
Paul



-----Original Message-----
From: Paul Sokolovsky [mailto:paul.sokolovsky@linaro.org]
Sent: Saturday, September 09, 2017 2:57 PM
To: Vakul Garg <vakul.garg@nxp.com>
Cc: zephyr-users@lists.zephyrproject.org
Subject: Re: [Zephyr-users] TCP assert error logs

Hello Vakul,

On Sat, 9 Sep 2017 06:47:35 +0000
Vakul Garg <vakul.garg@nxp.com> wrote:

Hi

I have two threads on my system communicating using TCP over
loopback interface. I am getting following errors.
To the best of my knowledge, there is (was) no loopback interface
support in Zephyr. So, I'd interested to know how to achieved the
setup above.


[net/tcp] [ERR] net_tcp_get_hdr: {assert: 'frag' failed} [net/tcp]
[ERR] net_tcp_send_pkt: Packet 0x20004664 does not contain TCP
header [net/tcp] [ERR] net_tcp_get_hdr: {assert: 'frag' failed}
[net/tcp] [ERR] net_tcp_send_pkt: Packet 0x20004664 does not contain
TCP header [net/tcp] [ERR] net_tcp_get_hdr: {assert: 'frag'
failed} [net/tcp] [ERR] net_tcp_send_pkt: Packet 0x20004664 does not
contain TCP header [net/buf] [ERR] net_buf_unref_debug:
net_pkt_frag_unref():826: buf 0x200046a0 double free [net/buf] [ERR]
net_buf_unref_debug: net_pkt_frag_unref():826: buf 0x200046a0 double
free [net/buf] [ERR] net_buf_unref_debug:
net_pkt_frag_unref():826: buf 0x20004830 double free

Can someone help?

Regards, Vakul

--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs Follow Linaro:
http://www.facebook.com/pages/Linaro http://twitter.com/#!/linaroorg
- http://www.linaro.org/linaro-blog


--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog


Re: TCP assert error logs

Paul Sokolovsky
 

Hello Vakul,

On Tue, 12 Sep 2017 09:09:10 +0000
Vakul Garg <vakul.garg@nxp.com> wrote:

Hello Paul

I have attached a test case with the given ticket.
Thanks for that! It's on my todo list to look into that issue again,
the testcase will be helpful then. In the meantime, following may be
helpful for you:

1. UDP communication using a local interface works in Zephyr, we have
a testcase for that in tests/net/socket/udp/

2. If you need TCP communication, you would need to use HOST-Zephyr
communication. (Well, there is also a setup to allow 2 Zephyr QEMU
instances to communicate with each other, I didn't check it for a while
though).


Regards

Vakul


-----Original Message-----
From: Paul Sokolovsky [mailto:paul.sokolovsky@linaro.org]
Sent: Monday, September 11, 2017 4:52 PM
To: Vakul Garg <vakul.garg@nxp.com>
Cc: zephyr-users@lists.zephyrproject.org
Subject: Re: [Zephyr-users] TCP assert error logs

Hello Vakul,

On Sat, 9 Sep 2017 09:31:14 +0000
Vakul Garg <vakul.garg@nxp.com> wrote:

I just open a TCP server socket and let it listen for new
connections on 127.0.0.1 on a given server port.
Right, that might work, thanks to
https://gerrit.zephyrproject.org/r/#/c/7007/ , and if you verified,
it apparently does (I don't remember if I ever using 127.0.0.1
address, I usually tried to use a local interface address in such
cases, i.e. 192.0.2.1 by default). But just to get terminology right,
there's no explicit loopback interface in Zephyr, it's just an adhoc
check for the conventional loopback address (though this note is
probably irrelevant for your usecase, so feel free to ignore it [for
now]).

Then another thread creates a TCP client socket and connects to the
127.0.0.1 on the same server port. After connection is successful,
client sends one data message on the socket.
What can I say? With such scenario, you went farther than I. Last
time I tried, it wasn't possible to establish a TCP connection under
such conditions at all:
https://jira.zephyrproject.org/browse/ZEP-2001 .

I'd suggest to add some comments to the above ticket, describing your
usecase. And ultimately, we'd need a typical small testcase to
reproduce the issue, so feel free to post your code to make a step
towards progress in that direction. I faced that issue when testing
networking support in Zephyr.JS and MicroPython projects, so there're
no readily available minimal testcases.



Thanks,
Paul



-----Original Message-----
From: Paul Sokolovsky [mailto:paul.sokolovsky@linaro.org]
Sent: Saturday, September 09, 2017 2:57 PM
To: Vakul Garg <vakul.garg@nxp.com>
Cc: zephyr-users@lists.zephyrproject.org
Subject: Re: [Zephyr-users] TCP assert error logs

Hello Vakul,

On Sat, 9 Sep 2017 06:47:35 +0000
Vakul Garg <vakul.garg@nxp.com> wrote:

Hi

I have two threads on my system communicating using TCP over
loopback interface. I am getting following errors.
To the best of my knowledge, there is (was) no loopback interface
support in Zephyr. So, I'd interested to know how to achieved the
setup above.


[net/tcp] [ERR] net_tcp_get_hdr: {assert: 'frag' failed}
[net/tcp] [ERR] net_tcp_send_pkt: Packet 0x20004664 does not
contain TCP header [net/tcp] [ERR] net_tcp_get_hdr: {assert:
'frag' failed} [net/tcp] [ERR] net_tcp_send_pkt: Packet
0x20004664 does not contain TCP header [net/tcp] [ERR]
net_tcp_get_hdr: {assert: 'frag' failed} [net/tcp] [ERR]
net_tcp_send_pkt: Packet 0x20004664 does not contain TCP header
[net/buf] [ERR] net_buf_unref_debug: net_pkt_frag_unref():826:
buf 0x200046a0 double free [net/buf] [ERR] net_buf_unref_debug:
net_pkt_frag_unref():826: buf 0x200046a0 double free [net/buf]
[ERR] net_buf_unref_debug: net_pkt_frag_unref():826: buf
0x20004830 double free

Can someone help?

Regards, Vakul

--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs Follow Linaro:
http://www.facebook.com/pages/Linaro http://twitter.com/#!/linaroorg
- http://www.linaro.org/linaro-blog


--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs Follow Linaro:
http://www.facebook.com/pages/Linaro http://twitter.com/#!/linaroorg
- http://www.linaro.org/linaro-blog


--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs
Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog


Re: TCP assert error logs

Vakul Garg <vakul.garg@...>
 

Hi Paul

UDP loopback works and I can make progress with it for now.

(Ultimately, I need to move to some non-networking IPC such as mailbox or pipe.
The problem I face with that now is that I cannot multiplex these zephyr IPC in POSIX poll() along with socket descriptors.)

Thanks & Regards

Vakul

-----Original Message-----
From: Paul Sokolovsky [mailto:paul.sokolovsky@linaro.org]
Sent: Wednesday, September 13, 2017 1:08 PM
To: Vakul Garg <vakul.garg@nxp.com>
Cc: zephyr-users@lists.zephyrproject.org
Subject: Re: [Zephyr-users] TCP assert error logs

Hello Vakul,

On Tue, 12 Sep 2017 09:09:10 +0000
Vakul Garg <vakul.garg@nxp.com> wrote:

Hello Paul

I have attached a test case with the given ticket.
Thanks for that! It's on my todo list to look into that issue again, the testcase will be helpful then. In the meantime, following may be helpful for you:

1. UDP communication using a local interface works in Zephyr, we have a testcase for that in tests/net/socket/udp/

2. If you need TCP communication, you would need to use HOST-Zephyr communication. (Well, there is also a setup to allow 2 Zephyr QEMU instances to communicate with each other, I didn't check it for a while though).


Regards

Vakul


-----Original Message-----
From: Paul Sokolovsky [mailto:paul.sokolovsky@linaro.org]
Sent: Monday, September 11, 2017 4:52 PM
To: Vakul Garg <vakul.garg@nxp.com>
Cc: zephyr-users@lists.zephyrproject.org
Subject: Re: [Zephyr-users] TCP assert error logs

Hello Vakul,

On Sat, 9 Sep 2017 09:31:14 +0000
Vakul Garg <vakul.garg@nxp.com> wrote:

I just open a TCP server socket and let it listen for new
connections on 127.0.0.1 on a given server port.
Right, that might work, thanks to
https://gerrit.zephyrproject.org/r/#/c/7007/ , and if you verified, it
apparently does (I don't remember if I ever using 127.0.0.1 address, I
usually tried to use a local interface address in such cases, i.e.
192.0.2.1 by default). But just to get terminology right, there's no
explicit loopback interface in Zephyr, it's just an adhoc check for
the conventional loopback address (though this note is probably
irrelevant for your usecase, so feel free to ignore it [for now]).

Then another thread creates a TCP client socket and connects to the
127.0.0.1 on the same server port. After connection is successful,
client sends one data message on the socket.
What can I say? With such scenario, you went farther than I. Last time
I tried, it wasn't possible to establish a TCP connection under such
conditions at all:
https://jira.zephyrproject.org/browse/ZEP-2001 .

I'd suggest to add some comments to the above ticket, describing your
usecase. And ultimately, we'd need a typical small testcase to
reproduce the issue, so feel free to post your code to make a step
towards progress in that direction. I faced that issue when testing
networking support in Zephyr.JS and MicroPython projects, so there're
no readily available minimal testcases.



Thanks,
Paul



-----Original Message-----
From: Paul Sokolovsky [mailto:paul.sokolovsky@linaro.org]
Sent: Saturday, September 09, 2017 2:57 PM
To: Vakul Garg <vakul.garg@nxp.com>
Cc: zephyr-users@lists.zephyrproject.org
Subject: Re: [Zephyr-users] TCP assert error logs

Hello Vakul,

On Sat, 9 Sep 2017 06:47:35 +0000
Vakul Garg <vakul.garg@nxp.com> wrote:

Hi

I have two threads on my system communicating using TCP over
loopback interface. I am getting following errors.
To the best of my knowledge, there is (was) no loopback interface
support in Zephyr. So, I'd interested to know how to achieved the
setup above.


[net/tcp] [ERR] net_tcp_get_hdr: {assert: 'frag' failed} [net/tcp]
[ERR] net_tcp_send_pkt: Packet 0x20004664 does not contain TCP
header [net/tcp] [ERR] net_tcp_get_hdr: {assert:
'frag' failed} [net/tcp] [ERR] net_tcp_send_pkt: Packet
0x20004664 does not contain TCP header [net/tcp] [ERR]
net_tcp_get_hdr: {assert: 'frag' failed} [net/tcp] [ERR]
net_tcp_send_pkt: Packet 0x20004664 does not contain TCP header
[net/buf] [ERR] net_buf_unref_debug: net_pkt_frag_unref():826:
buf 0x200046a0 double free [net/buf] [ERR] net_buf_unref_debug:
net_pkt_frag_unref():826: buf 0x200046a0 double free [net/buf]
[ERR] net_buf_unref_debug: net_pkt_frag_unref():826: buf
0x20004830 double free

Can someone help?

Regards, Vakul

--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs Follow Linaro:
http://www.facebook.com/pages/Linaro http://twitter.com/#!/linaroorg
- http://www.linaro.org/linaro-blog


--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs Follow Linaro:
http://www.facebook.com/pages/Linaro http://twitter.com/#!/linaroorg
- http://www.linaro.org/linaro-blog


--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog


UDP recvfrom

Vakul Garg <vakul.garg@...>
 

Hi

 

I am using UDP sockets (posix flavor) in my app.

I need to determine the incoming UDP datagram’s source IP address and port.

For this, typically recvfrom() is used.

 

Since this call is not available, what are my options?

 

Can someone please advise?

 

Regards,

Vakul

 


Re: TCP assert error logs

Paul Sokolovsky
 

On Wed, 13 Sep 2017 08:50:02 +0000
Vakul Garg <vakul.garg@nxp.com> wrote:

UDP loopback works and I can make progress with it for now.

(Ultimately, I need to move to some non-networking IPC such as
mailbox or pipe. The problem I face with that now is that I cannot
multiplex these zephyr IPC in POSIX poll() along with socket
descriptors.)
Yes, POSIX bits is Zephyr are very initial and very bare so far - a bit
of threads and a bit of sockets support. There're neither
full-featured poll() implementation, nor fd's (file descriptors), nor
other POSIX IPC.

But there's definitely desire to extend POSIX support in Zephyr, so
any feedback is appreciated. (You may also want to route this feedback
via Maureen Helm, who's both on Zephyr and Linaro LITE TSCs, so with her
input, specific things may get planned and prioritized.)


Thanks & Regards

Vakul
[]

--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs
Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog

141 - 160 of 2727