Closed Nathan-Jordan closed 4 months ago
Is there a callstack??
[New Thread 0xb6ffc2f0 (LWP 5687)]
Thread 3 "Test" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb6ffc2f0 (LWP 5687)] 0xb67db48c in internal_getent (stream=0xb6300470, result=result@entry=0xb6ffb65c, buffer=buffer@entry=0xb6ffb838 "gateway-prod-gw-northeur127.0.0.1 localhost Moxa\n", buflen=buflen@entry=1024, errnop=errnop@entry=0xb6ffb74c, herrnop=herrnop@entry=0xb6ffb75c, af=af@entry=0, flags=flags@entry=0) at nss_files/files-XXX.c:251 251 nss_files/files-XXX.c: No such file or directory.
(gdb) backtrace
buflen=buflen@entry=1024, errnop=errnop@entry=0xb6ffb74c, herrnop=herrnop@entry=0xb6ffb75c, af=af@entry=0, flags=flags@entry=0) at nss_files/files-XXX.c:251
buffer=0xb6ffb838 "gateway-prod-gw-northeur127.0.0.1 localhost Moxa\n", buflen=1024, errnop=0xb6ffb74c, herrnop=0xb6ffb75c, ttlp=0x0) at nss_files/files-hosts.c:392
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
May not be relavant but I was trying valgrind and it said this. ==3842== Massif, a heap profiler ==3842== Copyright (C) 2003-2015, and GNU GPL'd, by Nicholas Nethercote ==3842== Using Valgrind-3.12.0.SVN and LibVEX; rerun with -h for copyright info ==3842== Command: ./Test ==3842==
valgrind: m_transtab.c:2459 (vgPlain_init_tt_tc): Assertion 'sizeof(TTEntryC) <= 88' failed. Segmentation fault
This might be related to https://github.com/Azure/azure-iot-sdk-c/issues/2554 ?
AFAIK this was fixed in the Repo, but there is no updated release yet
Can you verify the main branch?
Seemed to have fixed it, I was statically linking the libs. Dynamically linking fixed the issue
Found various mentions of this in similar posts: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1613067 https://sourceforge.net/p/iperf2/tickets/83/ https://sourceware.org/bugzilla/show_bug.cgi?id=10652 https://sourceware.org/bugzilla/show_bug.cgi?id=19341
After this I still had a crash with:
Adding the below code fixed this:
#include <curl/curl.h>
curl_global_init(CURL_GLOBAL_SSL);
Ref: https://stackoverflow.com/questions/166617/curle-out-of-memory-error-when-posting-via-https
ARM32 controller armv7. Cross Compiled on Ubuntu-17 4.13.0-46-generic using:
Cross Compiled Statically Linked:
Compiling only the iothub_client_sample_upload_to_blob sample on my Linux VM works and it successfully uploads (with just the azure sdk compiled). However when I cross compile the same code to my arm32 controller I get a segmentation fault when 'IoTHubDeviceClient_LL_UploadToBlob' is called.
Log output:
< HTTP/1.1 200 OK < content-length: 392 < content-type: application/json < date: Tue, 27 Feb 2024 16:28:08 GMT <