Our system suffers SIGSEGV when trying to access a non-existing Storage Account. This can happen when the SA is deleted e.g. using the Azure portal. Protecting the access with try-catch does not work. I can reproduce this using the simple example program in this blob tutorial. If the SA name and key are valid, the code (see attached) works. But if you replace the SA name with one that does not exist, we get a SIGSEGV.
Two questions:
What is the best way to test if an SA exist or not
How to avoid this SIGSEGV
The stack trace showed that the host is not valid which is correct because the SA does not exist. But the len passed to strncpy is garbage: 93,824,992,380,586
?? ()boost::system::error_category::message (this=0x55555558c490 <boost::asio::error::get_netdb_category()::instance>, ev=1, buffer=0x7ffff317a9a0 \"Host not found (authoritative)\", len=93824992380586)web::http::client::details::asio_context::report_error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::system::error_code const&, web::http::client::details::httpclient_errorcode_context) ()?? ()
Update:
It turned out that this was caused by version mismatch of Boost when we built the cpprest library. After fixing that, the crash problem went away.
Our system suffers SIGSEGV when trying to access a non-existing Storage Account. This can happen when the SA is deleted e.g. using the Azure portal. Protecting the access with try-catch does not work. I can reproduce this using the simple example program in this blob tutorial. If the SA name and key are valid, the code (see attached) works. But if you replace the SA name with one that does not exist, we get a SIGSEGV.
Two questions:
The stack trace showed that the host is not valid which is correct because the SA does not exist. But the len passed to strncpy is garbage: 93,824,992,380,586
?? ()
boost::system::error_category::message (this=0x55555558c490 <boost::asio::error::get_netdb_category()::instance>, ev=1, buffer=0x7ffff317a9a0 \"Host not found (authoritative)\", len=93824992380586)
web::http::client::details::asio_context::report_error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::system::error_code const&, web::http::client::details::httpclient_errorcode_context) ()
?? ()
Thank you. -santo