-
Notifications
You must be signed in to change notification settings - Fork 7.5k
mqtt_socket connect is hung on sam_e70_xplained #12945
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
Comments
@aurel32 can you take a look? |
@karthikprabhu17 Thanks for reporting the bug. I am using TCP/IP with this board, and for me this commit doesn't introduce new issues, although I haven't tried it with MQTT yet. I don't have an MQTT setup ready to try that, but i'll do that tomorrow. That said, I wonder if it is just another instance of issue #12560, which causes TCP to randomly work or not work. It might be worth trying to apply #12561 to check if the issue you observe disappear. Note that this PR introduces issues, however it should be enough to diagnose the issue. |
@aurel32: Applying that patch worked for me. Thanks. I had to chat about another issue. Will keep it brief. I realized the irc channels are no longer used. |
@karthikprabhu17: If #12561 fixed for you, please add comment there. IRC channel in welcome message should have a link to Slack channel: https://tinyurl.com/yarkuemx |
@pfalcon : Thanks..Done! |
@karthikprabhu17 try this patch #12711 |
@nashif: Tried this on top of master right now... mqtt_connect works fine. fifo_put still gives ***** BUS FAULT ***** |
@karthikprabhu17 I have no idea what fifo_put is, you really need to provide some more details, this is probably worth its own bug. |
Looking at the HAL changes, I have noticed this changed in gmac.h:
All the queue registers have been shifted by 4 bytes, I guess it's because the priority queues are numbered starting counting at 1, the queue 0 being the main queue. That way GMAC_ISRPQ[1] actually correspond to the queue 1 or the first priority queue. The previous version of the HAL probably numbered them starting counting at 0, that's why we have plenty of @nashif and @jukkar tested the patch from PR #12711 using this branch https://github.com/jukkar/zephyr/tree/try-sam-e70-rev-b which restore the previous numbering. I therefore believe we should remove the |
Well except those are still defined as an array of 2 entries (e.g |
Note that while resolving the merge conflict, I took the version that the PR #12711 was providing. Perhaps I should have used the one that was provided by the new HAL. My merge resolution was mainly mechanical when I was resolving the conflict in HAL. I can do more testing if you have a patch that needs to be run in rev A. |
The latest update of the SAM E70 HAL (commit 6ad7e13) shifted the GMAC priority queues related registers by 4 bytes. It is not cleared yet, if it is change is a mistake or a change from 0 based indexing to 1 based indexing. Indeed the main queue is the number 0, and the first priority queue is therefore the number 1. In the meantime revert that change, and use the old registers addresses matching the datasheet. Fixes zephyrproject-rtos#12945 Signed-off-by: Aurelien Jarno <[email protected]>
The latest update of the SAM E70 HAL (commit 6ad7e13) shifted the GMAC priority queues related registers by 4 bytes. It is not cleared yet, if it is change is a mistake or a change from 0 based indexing to 1 based indexing. Indeed the main queue is the number 0, and the first priority queue is therefore the number 1. In the meantime revert that change, and use the old registers addresses matching the datasheet. Fixes #12945 Signed-off-by: Aurelien Jarno <[email protected]>
Commit 0a7b45d ("ext: hal: atmel: sam: fix GMAC priority queues related registers") tried to correct register offsets, but failed to do so in the structure that is used by our driver to access the registers. Fixes: zephyrproject-rtos#12945 Signed-off-by: Daniel Glöckner <[email protected]>
I believe we need the changes from #13204 to really fix this |
Commit 0a7b45d ("ext: hal: atmel: sam: fix GMAC priority queues related registers") tried to correct register offsets, but failed to do so in the structure that is used by our driver to access the registers. Fixes: #12945 Signed-off-by: Daniel Glöckner <[email protected]>
Describe the bug
The mqtt socket connect is hung while trying to connect to a broker after this commit: 6ad7e13 on a sam_e70_xplained board. I did a git bisect and zeroed on the commit.
After this commit, the tcp_connect perpetually waits on a semaphore on sam_e70: thttps://github.com/zephyrproject-rtos/zephyr/blob/master/subsys/net/ip/tcp.c#L2655
commit 6ad7e13
Author: Aurelien Jarno [email protected]
Date: Mon Jan 28 23:04:54 2019 +0100
What have you tried to diagnose or workaround this issue?
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Mqtt connect should just not be hung and connect if broker_addr, username, password and client IP settings are right
Impact
This is a showstopper on sam_e70 board
Screenshots or console output
If applicable, add a screenshot (drag-and-drop an image), or console logs
(cut-and-paste text and put a code fence (```) before and after, to help
explain the issue.
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: