-
Notifications
You must be signed in to change notification settings - Fork 70
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
Segmentation fault when initialize aws iot device client binary and also cannot compile the test binary #428
Comments
Hello @JosepTeruel , thank you for reaching out to us. From the logs are data you have shared it is not clear what the issue can be. I will try to reproduce the same to identify and resolve the issue. |
Hey @JosepTeruel , I see that you do not have endpoint value in your config? Did you miss adding it or did you remove it before sharing the logs with us? Also can you tell us the OS name and its version you are using on your device? |
I have tested the client on Ubuntu 18 on x86 device, it works fine. It is possible that this is a OS or architecture specific issue. |
Hello @HarshGandhi-AWS, Thanks for your reply, I removed the endpoint value before sharing the logs. Actually, the OS is the Ubuntu 22.04.2 x86. |
Hey @JosepTeruel , from the logs and other information you have shared with us, it looks like there are two issues you are facing using device client.
For the first one, I was able to root cause the issue. The issue is in the google-test library we use for unit testing. Google-test is treating warning messages as fatal errors because of which the build is failing. This issue is resolved in the newer version of google-test, we will try to update the version to resolve this issue. google/googletest#3024 For the second one, I was not able to reproduce the issue. I tested device client on Ubuntu 22 and it works fine for me. Here are the logs for your reference.
|
Hello @JosepTeruel , I am still not able to reproduce the issue where you are getting segmentation fault. Can you try updating the device client version and using it? Also please use root permissions to start the client to see if it is not failing because of some permission issues. |
Hi Harsh,
The issue was to do with file permissions on the DC certificates. The errors/warnings that we were receiving from AWS Device Client made us change the permissions to certain values. After having done this, the messages did not appear anymore and it seemed we had gotten past the issue.
However, it seems the suggested values from AWS DC were incorrect and did not reflect what is in the documentation from AWS for the DC. I would suggest reviewing these error messages.
We do not have the capacity at the moment to figure out the exact permissions that were given. If you would like to leave this ticket open, maybe we can have a look when we get some free time.
Otherwise, you just need to follow the "iot-tutorials-dc-intro<https://docs.aws.amazon.com/iot/latest/developerguide/iot-tutorials-dc-intro.html>" documentation with device client.
Thank you,
Keith
Building demos with the AWS IoT Device Client - AWS IoT Core<https://docs.aws.amazon.com/iot/latest/developerguide/iot-tutorials-dc-intro.html>
The tutorials in this learning path walk you through the steps to develop demonstration software by using the AWS IoT Device Client. The AWS IoT Device Client provides software that runs on your IoT device to test and demonstrate aspects of an IoT solution that's built on AWS IoT.
docs.aws.amazon.com
…________________________________
From: Harsh Gandhi ***@***.***>
Sent: Saturday, October 14, 2023 3:19 AM
To: awslabs/aws-iot-device-client ***@***.***>
Cc: Keith Davis ***@***.***>; Manual ***@***.***>
Subject: Re: [awslabs/aws-iot-device-client] Segmentation fault when initialize aws iot device client binary and also cannot compile the test binary (Issue #428)
Hello @JosepTeruel<https://github.com/JosepTeruel> , I am still not able to reproduce the issue where you are getting segmentation fault. Can you try updating the device client version and using it? Also please use root permissions to start the client to see if it is not failing because of some permission issues.
—
Reply to this email directly, view it on GitHub<#428 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A7NMFXIA5WZ7YB5RATLJDB3X7HSD3ANCNFSM6AAAAAA5SREDGA>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Here is an example: 2023-10-16T09:22:56.623Z [WARN] {FileUtils.cpp}: Permissions to given file/dir path 'configs/config.json' is not set to recommended value... {Permissions: {desired: 640, actual: 644}} However your documentation says to do the following: |
I think you were following the documentation from the workshop @kdaviscellect shared earlier. I can work with the documentation team to update the permissions written on the workshop page. Device Client repo Readme is upto date and you can refer it for everything. I will close this ticket and cut another one with the documentation team to update the workshop. Thank you, |
Hello, Actually i am trying to initialize the aws-iot-device-client binary but when I execute always appear error messages and a segmentation fault (core dumped). Also trying to fix this error I try to run the test binary but when I try to compile appears compilation errors. I will upload the screenshots of the problems
To Reproduce
Steps to reproduce the behavior:
Building
To see the error in the test section we type the following command
8. cmake --build . --target test-aws-iot-device-client
Expected behavior
I expect to have the aws iot device client working as usual.
Actual behavior
After execute the step 7 appears some errors and a segmentation fault (core dumped)
Logs
Config.json file
![configFile](https://private-user-images.githubusercontent.com/130444158/272570674-23ebf1ee-8d55-4045-9142-57a9355c8ef3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MzgwMjcsIm5iZiI6MTczOTUzNzcyNywicGF0aCI6Ii8xMzA0NDQxNTgvMjcyNTcwNjc0LTIzZWJmMWVlLThkNTUtNDA0NS05MTQyLTU3YTkzNTVjOGVmMy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNFQxMjU1MjdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zZjRiNDA0NzYyNWMwMTAyMzMzNTk3Yjk0Y2M5ODJiZWU5YzI2Zjg4ZjExNjlkM2M2YWYzNGY2ZGU1NDBhZWYwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.x_Y9vlO7-FbhU2YbAiBU8dwHRy0RGJ2aUjVjxJbenGI)
Executing aws-iot-device-client binary with the config.json and getting error message with Segmentation Fault (core dumped)
![aws-iot-device-complete](https://private-user-images.githubusercontent.com/130444158/272571041-8c91cfc4-c61c-4894-8620-55ba7c5cfe69.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MzgwMjcsIm5iZiI6MTczOTUzNzcyNywicGF0aCI6Ii8xMzA0NDQxNTgvMjcyNTcxMDQxLThjOTFjZmM0LWM2MWMtNDg5NC04NjIwLTU1YmE3YzVjZmU2OS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNFQxMjU1MjdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xMDlmYjM0MWJlNmZlMTY0NTIyYTkwMjBlM2YxNjgwNDM5MzkzMWIxMTZhMGNhY2E4MzY4ZjQyNGUxNjI3YzU2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.xSDYgBdPvAEZGUaG2y4Cthun0Nm36KuQ9pfro8ZAOPw)
Executing aws-iot-device-client alone and getting error message and Segmentation Fault (core dumped)
![aws-iot-device-client-alone](https://private-user-images.githubusercontent.com/130444158/272571433-498c1c58-abbd-4688-89c5-a53e685a8b50.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MzgwMjcsIm5iZiI6MTczOTUzNzcyNywicGF0aCI6Ii8xMzA0NDQxNTgvMjcyNTcxNDMzLTQ5OGMxYzU4LWFiYmQtNDY4OC04OWM1LWE1M2U2ODVhOGI1MC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNFQxMjU1MjdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01YzY4N2JjYzM1N2JlOTU5MWJhNjI0YzBmZGFmNGIxZTFkODYwMWQzMmE0MTk4MjkyZTY0NzA2MzYyYjgwMjIwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.QieLgzJPWqhtHF6f42atPtYsK0_W3oLlYCy9lYR2IGU)
Compiling the test cmake and getting errors
![testErrorMessage](https://private-user-images.githubusercontent.com/130444158/272571578-a5f72089-6613-4ea3-8856-e970ade9d57c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MzgwMjcsIm5iZiI6MTczOTUzNzcyNywicGF0aCI6Ii8xMzA0NDQxNTgvMjcyNTcxNTc4LWE1ZjcyMDg5LTY2MTMtNGVhMy04ODU2LWU5NzBhZGU5ZDU3Yy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNFQxMjU1MjdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yNDcwNzAyYTk1YjdkZTFmZGIwMDhjNDEyY2YyM2Q4Yjg1ZjI5YTlhMmJmMThlZGQ2ZmM1OWE2MTU1NjdiNzQ0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.KykCZRQe1VUF1f7DxkuY5CV4CFQ1mom8NPp60c6e18k)
Environment (please complete the following information):
Thanks in advance,
Josep
The text was updated successfully, but these errors were encountered: