-
Notifications
You must be signed in to change notification settings - Fork 1.1k
crash with the SDK library #71
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
-fno-builtin-malloc is the likely problem. The default memory handler if you are using custom memory management does malloc under the hood. You can either build the library with custom memory management turned off, or provide a memory allocation strategy that goes through your allocators (what I'm guessing you'll want to do, otherwise you wouldn't have turned malloc off). Info is in the readme. Also, I do a live coding demo on this in the video posted in the readme. |
I am unable to fix this
then CMakelist.txt has set(CMAKE_CXX_FLAGS "-Wall -std=c++0x -g -mtune=core2 -l aws_dynamo -pedantic-errors -Wall -Wno-long-long -O1 -L/usr/lib -lstdc++ -lm -laws-cpp-sdk-dynamodb -laws-cpp-sdk-core -laws-cpp-sdk-sdb -DAWS_CUSTOM_MEMORY_MANAGEMENT=1") Core was generated by `./../../build/bin/Dig_CP_1 conf/Dig_CP_MainConf.xml'. |
DO you have any suggestion for this ? |
I'm looking now. |
-Wno-long-long .... we use long long, I doubt that's the issue but something to be aware of. It looks like it's failing in the construction of the default credentials provider chain. |
Thanks for your suggestion but I am still unable to solve the issue #0 0x0000000000000000 in ?? () |
A couple of thoughts. a.) It looks like you ran 9 minutes before the segfault (that would have been useful to know as I thought it was failing on the first call). |
Additionally, this appears to be a run of a Release build. Perhaps things would be clearer running a Debug build. |
running valgrind is not possible we tried some time back with no success |
i am using GNU Make 3.82 |
Without running some sort of memory analyzer, we will be looking for a needle in a haystack.... I can try pulling it down and running valgrind if you would like. All it takes is one buffer being overwritten or one bad alias and we would get this behavior--and the code base is large. Valgrind will find it in about 30 seconds. |
valgrind ./../../build/bin/Dig_CP_1 conf/Dig_CP_MainConf.xml --tool=memcheck -v |
==9793== Memcheck, a memory error detector |
Hi Thanks |
Looks like we have a bug in the logger. Have you ever run this with logging turned off? |
Do you want me to buid aws libraries with cmake -DCMAKE_BUILD_TYPE=Release |
no, no need for that, I'm just asking if you have ever run your program without the logging turned on? |
Yes I did run without logging also earlier but I will try again and send you the valgrind trace I hope this may help you |
yes, if it is the logging then you shouldn't have this: Thread 36: |
With log OFF this is the core valgrind output |
We are overwriting a stack function return pointer somewhere. Do you have anywhere in your code where you memcpy or memmove etc..., any chance I could take a peek at those places? |
Yes we are doing memmove and memcpy Oh this old code.. I will forward you the codes if it helps |
I didnt hear from you do you want me to share code |
5 0x00007f0d06096e20 in ?? () |
Finally I managed to fix Finally this did the trick. |
wierd. Do you remember which version of curl you were using and with which options so that we can advise customers when they encounter similar problems? Thanks for the update and I'm sorry you had such a hard time getting things working. |
* Added clang-format linter * Fixed cJSON
I am sending the stack trace also code is attached
build options
-Wall -std=c++0x -g -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -mtune=core2 -l aws_dynamo -pedantic-errors -Wall -Wno-long-long -O1 -L/usr/lib -lstdc++ -lm -laws-cpp-sdk-dynamodb -laws-cpp-sdk-core -laws-cpp-sdk-sdb -DAWS_CUSTOM_MEMORY_MANAGEMENT=1"
Stack trace:
Program terminated with signal 11, Segmentation fault.
#0 std::basic_string<char, std::char_traits, Aws::Allocator >::_Rep::_S_create (__capacity=__capacity@entry=5,
609 __p->_M_capacity = __capacity;
Missing separate debuginfos, use: debuginfo-install glibc-2.17-55.145.amzn1.x86_64 gperftools-libs-2.0-11.5.amzn1.x86_64 keyutils-libs-1.5.8-3.12.amzn1.x86_64 krb5-libs-1.13.2-10.39.amzn1.x86_64 libcom_err-1.42.12-4.40.amzn1.x86_64 libevent-2.0.18-1.11.amzn1.x86_64 libselinux-2.1.10-3.22.amzn1.x86_64 openssl-1.0.1k-13.88.amzn1.x86_64 zlib-1.2.8-7.18.amzn1.x86_64
(gdb) where
#0 std::basic_string<char, std::char_traits, Aws::Allocator >::_Rep::_S_create (__capacity=__capacity@entry=5,
#1 0x0000000000823f91 in _S_construct<char const*> (__a=..., __end=,
#2 _S_construct_aux<char const*> (__a=..., __end=,
#3 _S_construct<char const*> (__a=..., __end=,
#4 std::basic_string<char, std::char_traits, Aws::Allocator >::basic_string (this=0x7f4cbee59b60,
#5 0x00007f4ccac06d2b in Aws::Utils::StringUtils::LTrim(char const*) ()
from /home/boss/awsnew/aws-cpp-sdk-core/libaws-cpp-sdk-core.so
#6 0x00007f4ccac06f5c in Aws::Utils::StringUtils::Trim(char const*) ()
from /home/boss/awsnew/aws-cpp-sdk-core/libaws-cpp-sdk-core.so
#7 0x00007f4ccac05415 in getSysCommandOutput(char const*) () from /home/boss/awsnew/aws-cpp-sdk-core/libaws-cpp-sdk-core.so
#8 0x00007f4ccac054ae in Aws::Utils::OSVersionInfo::ComputeOSVersionString() const ()
from /home/boss/awsnew/aws-cpp-sdk-core/libaws-cpp-sdk-core.so
#9 0x00007f4ccabf1b5e in Aws::Client::ComputeUserAgentString() ()
from /home/boss/awsnew/aws-cpp-sdk-core/libaws-cpp-sdk-core.so
#10 0x00007f4ccabf1eec in Aws::Client::ClientConfiguration::ClientConfiguration() ()
from /home/boss/awsnew/aws-cpp-sdk-core/libaws-cpp-sdk-core.so
#11 0x00000000008201ae in boss::Dig_CP::getScores::retrieveScore (this=this@entry=0x7f4cbee5a770, tableName="good_wtp",
#12 0x0000000000821e7a in boss::Dig_CP::getScores::getScoresWRTWTP (this=this@entry=0x7f4cbee5a770,
Dig_CP_getScores.txt
The text was updated successfully, but these errors were encountered: