Boost logo

Boost Users :

From: sean chang (sean_at_[hidden])
Date: 2020-03-10 13:12:39


Hi ,

Here comes look like a boost library connection problem on a mobile device.
The SSL handshake connection problem failures happen on a new smart phone device: Samsung A71 with Android 10.
Compare Devices: Pixel 3a (Android 10), Samsung A51(Android 10) or lower than Android 10 devices—> working great without problem
We are design an SDK integrated Boost C++ Library with openssl for API calls, but not sure what happen on this mobile phone about boost library connection problem and reason, we are looking for solution or work around to fix this problem.

Thanks a lot.

below is the information what we get from boost debug.

Tested Boost version: 1.67.0~1.71.0
Tested openssl: 1.0.2h and 1.1.1

Situation(1):
The SSL connection is possible make connection wait for 30 sec, then we will receive system: 125 error code.
attached Log file:
2020-03-10 21:02:10.794 32722-390/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/detail/impl/engine.ipp][handshake][146]: Arthur: SSL
2020-03-10 21:02:10.794 32722-390/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/detail/impl/engine.ipp][perform][249]: Arthur: SSL
2020-03-10 21:02:10.794 32722-390/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/detail/impl/engine.ipp][do_connect][339]: Arthur: SSL
2020-03-10 21:02:10.794 32722-390/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/detail/impl/engine.ipp][perform][258]: Arthur: SSL, error(2)
2020-03-10 21:02:10.794 32722-390/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/detail/impl/engine.ipp][perform][298]: Arthur: SSL
2020-03-10 21:02:10.795 32722-390/com.keypasco.vaktensample D/vakten: Canceled 1 number of waiters
2020-03-10 21:02:10.795 32722-390/com.keypasco.vaktensample V/vakten: /
2020-03-10 21:02:10.795 32722-390/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/detail/impl/engine.ipp][handshake][146]: Arthur: SSL
2020-03-10 21:02:10.795 32722-390/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/detail/impl/engine.ipp][perform][249]: Arthur: SSL
2020-03-10 21:02:10.795 32722-390/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/detail/impl/engine.ipp][do_connect][339]: Arthur: SSL
2020-03-10 21:02:10.795 32722-390/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/detail/impl/engine.ipp][perform][258]: Arthur: SSL, error(2)
2020-03-10 21:02:10.795 32722-390/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/detail/impl/engine.ipp][perform][304]: Arthur: SSL
2020-03-10 21:02:10.795 32722-390/com.keypasco.vaktensample V/vakten: + void kp::web::ClientConnection::handle_connect_timeout(const boost::system::error_code&)
2020-03-10 21:02:10.795 32722-390/com.keypasco.vaktensample D/vakten: Connect timeout aborted
2020-03-10 21:02:10.795 32722-390/com.keypasco.vaktensample V/vakten: /
2020-03-10 21:02:12.722 32722-32730/com.keypasco.vaktensample I/co.vaktensampl: Compiler allocated 4266KB to compile void android.view.ViewRootImpl.performTraversals()
2020-03-10 21:02:13.811 32722-390/com.keypasco.vaktensample V/vakten: + void kp::web::ClientConnection::handle_handshake_timeout(const boost::system::error_code&)
2020-03-10 21:02:13.811 32722-390/com.keypasco.vaktensample D/vakten: Handshake timed out
2020-03-10 21:02:13.813 32722-390/com.keypasco.vaktensample V/vakten: /
2020-03-10 21:02:13.814 32722-390/com.keypasco.vaktensample V/vakten: + void kp::web::ClientConnection::close()
2020-03-10 21:02:13.814 32722-390/com.keypasco.vaktensample V/vakten: + void kp::web::Socket::shutdown(boost::system::error_code&)
2020-03-10 21:02:13.814 32722-390/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/detail/impl/engine.ipp][shutdown][153]: Arthur: SSL
2020-03-10 21:02:13.814 32722-390/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/detail/impl/engine.ipp][perform][249]: Arthur: SSL
2020-03-10 21:02:13.814 32722-390/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/detail/impl/engine.ipp][do_shutdown][345]: Arthur: SSL
2020-03-10 21:02:13.814 32722-390/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/detail/impl/engine.ipp][perform][258]: Arthur: SSL, error(1)
2020-03-10 21:02:13.814 32722-390/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/detail/impl/engine.ipp][perform][262]: Arthur: SSL
2020-03-10 21:02:13.814 32722-390/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/detail/impl/engine.ipp][map_error_code][209]: Arthur: SSL
2020-03-10 21:02:13.814 32722-390/com.keypasco.vaktensample V/vakten: /
2020-03-10 21:02:13.814 32722-390/com.keypasco.vaktensample D/vakten: error:140E0197:lib(20):func(224):reason(407)
2020-03-10 21:02:13.815 32722-390/com.keypasco.vaktensample D/vakten: Socket.shutdown error asio.ssl error
2020-03-10 21:02:13.815 32722-390/com.keypasco.vaktensample V/vakten: + boost::asio::basic_socket<boost::asio::ip::tcp, boost::asio::executor>::lowest_layer_type& kp::web::Socket::lowest_layer()
2020-03-10 21:02:13.815 32722-390/com.keypasco.vaktensample V/vakten: /
2020-03-10 21:02:13.815 32722-390/com.keypasco.vaktensample V/vakten: + kp::web::Socket::~Socket()
2020-03-10 21:02:13.815 32722-390/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/detail/impl/engine.ipp][~engine][66]: Arthur: SSL
2020-03-10 21:02:13.815 32722-390/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/detail/impl/engine.ipp][~engine][74]: Arthur: SSL_free
2020-03-10 21:02:13.816 32722-390/com.keypasco.vaktensample V/vakten: /
2020-03-10 21:02:13.816 32722-390/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/impl/context.ipp][~context][394]: Arthur: SSL
2020-03-10 21:02:13.816 32722-390/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/impl/context.ipp][~context][428]: Arthur: SSL_CTX_free
2020-03-10 21:02:13.816 32722-390/com.keypasco.vaktensample V/vakten: /
2020-03-10 21:02:13.818 32722-390/com.keypasco.vaktensample V/vakten: + void kp::web::ClientConnection::invoke_handler(boost::exception_ptr)
2020-03-10 21:02:13.818 32722-390/com.keypasco.vaktensample V/vakten: + void kp::web::WebClientImpl::handle_connect(boost::exception_ptr)
2020-03-10 21:02:13.819 32722-390/com.keypasco.vaktensample V/vakten: | + void kp::web::WebClientImpl::invoke_handler(boost::exception_ptr)
2020-03-10 21:02:13.819 32722-390/com.keypasco.vaktensample V/vakten: | | + void kp::web::ClientConnection::close()
2020-03-10 21:02:13.819 32722-390/com.keypasco.vaktensample V/vakten: | | /
2020-03-10 21:02:13.819 32722-390/com.keypasco.vaktensample V/vakten: | /
2020-03-10 21:02:13.819 32722-390/com.keypasco.vaktensample V/vakten: /
2020-03-10 21:02:13.819 32722-390/com.keypasco.vaktensample V/vakten: /
2020-03-10 21:02:13.820 32722-390/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/detail/impl/engine.ipp][map_error_code][209]: Arthur: SSL
2020-03-10 21:02:13.820 32722-390/com.keypasco.vaktensample V/vakten: + void kp::web::ClientConnection::handle_handshake(const boost::system::error_code&)
2020-03-10 21:02:13.820 32722-390/com.keypasco.vaktensample D/vakten: Canceled 0 number of waiters
2020-03-10 21:02:13.820 32722-390/com.keypasco.vaktensample E/vakten: system:125
2020-03-10 21:02:13.820 32722-390/com.keypasco.vaktensample V/vakten: + void kp::web::ClientConnection::close()
2020-03-10 21:02:13.821 32722-390/com.keypasco.vaktensample V/vakten: /
2020-03-10 21:02:13.822 32722-390/com.keypasco.vaktensample V/vakten: /
2020-03-10 21:02:13.823 32722-390/com.keypasco.vaktensample V/vakten: + void kp::web::ClientConnection::close()
2020-03-10 21:02:13.823 32722-390/com.keypasco.vaktensample V/vakten: /
2020-03-10 21:02:13.824 32722-390/com.keypasco.vaktensample V/vakten: + void kp::web::ClientConnection::invoke_handler(boost::exception_ptr)
2020-03-10 21:02:13.824 32722-390/com.keypasco.vaktensample V/vakten: /
2020-03-10 21:02:13.825 32722-390/com.keypasco.vaktensample V/vakten: + boost::asio::io_service& kp::web::WebClientImpl::get_io_service()
2020-03-10 21:02:13.825 32722-390/com.keypasco.vaktensample V/vakten: + boost::asio::io_service& kp::web::ClientConnection::get_io_service()
2020-03-10 21:02:13.825 32722-390/com.keypasco.vaktensample V/vakten: /
2020-03-10 21:02:13.825 32722-390/com.keypasco.vaktensample V/vakten: /
2020-03-10 21:02:13.827 32722-390/com.keypasco.vaktensample I/vakten: KspNetworkException: SSL Connect_timeout(30).
2020-03-10 21:02:13.830 32722-390/com.keypasco.vaktensample V/vakten: + kp::client_api::v5::AppClient::~AppClient()
2020-03-10 21:02:13.830 32722-390/com.keypasco.vaktensample V/vakten: /
2020-03-10 21:02:13.830 32722-390/com.keypasco.vaktensample V/vakten: + kp::client_api::ApiClient::~ApiClient()
2020-03-10 21:02:13.830 32722-390/com.keypasco.vaktensample V/vakten: /
2020-03-10 21:02:13.831 32722-390/com.keypasco.vaktensample V/vakten: + kp::web::WebClient::~WebClient()
2020-03-10 21:02:13.831 32722-390/com.keypasco.vaktensample V/vakten: /
2020-03-10 21:02:13.831 32722-390/com.keypasco.vaktensample V/vakten: + kp::web::WebClientImpl::~WebClientImpl()
2020-03-10 21:02:13.831 32722-390/com.keypasco.vaktensample V/vakten: /
2020-03-10 21:02:13.831 32722-390/com.keypasco.vaktensample V/vakten: + kp::web::ClientConnection::~ClientConnection()
2020-03-10 21:02:13.831 32722-390/com.keypasco.vaktensample V/vakten: + void kp::web::ClientConnection::close()
2020-03-10 21:02:13.832 32722-390/com.keypasco.vaktensample V/vakten: /
2020-03-10 21:02:13.832 32722-390/com.keypasco.vaktensample V/vakten: /
2020-03-10 21:02:13.842 32722-32722/com.keypasco.vaktensample D/GetTasksFragment: Task list: []



Situation(2)
When a launched app been SSL connection success. Press power button and turn on again. then the boost library will happen connection problem with system 2 error code, it can be happen many times until boost re-initial.
attached Log:

2020-03-09 18:09:53.309 11748-11800/com.keypasco.vaktensample V/vakten: + void kp::web::ClientConnection::handle_connect(const boost::system::error_code&)
2020-03-09 18:09:53.309 11748-11800/com.keypasco.vaktensample V/vakten: + kp::web::ProxySetting::Type kp::web::ProxySetting::get_type() const
2020-03-09 18:09:53.310 11748-11800/com.keypasco.vaktensample V/vakten: /
2020-03-09 18:09:53.310 11748-11800/com.keypasco.vaktensample V/vakten: + static boost::shared_ptr<kp::web::WebProxy> kp::web::WebProxy::create(kp::web::ProxySetting::Type)
2020-03-09 18:09:53.310 11748-11800/com.keypasco.vaktensample V/vakten: | + kp::web::NullProxy::NullProxy()
2020-03-09 18:09:53.310 11748-11800/com.keypasco.vaktensample V/vakten: | /
2020-03-09 18:09:53.310 11748-11800/com.keypasco.vaktensample V/vakten: /
2020-03-09 18:09:53.310 11748-11800/com.keypasco.vaktensample V/vakten: + boost::asio::ip::tcp::socket& kp::web::Socket::get_socket()
2020-03-09 18:09:53.310 11748-11800/com.keypasco.vaktensample V/vakten: /
2020-03-09 18:09:53.310 11748-11800/com.keypasco.vaktensample V/vakten: + virtual void kp::web::NullProxy::connect(boost::asio::ip::tcp::socket&, const kp::web::ProxySetting&, const kp::web::Uri&)
2020-03-09 18:09:53.310 11748-11800/com.keypasco.vaktensample V/vakten: /
2020-03-09 18:09:53.310 11748-11800/com.keypasco.vaktensample V/vakten: + bool kp::web::Socket::is_ssl_socket() const
2020-03-09 18:09:53.310 11748-11800/com.keypasco.vaktensample V/vakten: /
2020-03-09 18:09:53.310 11748-11800/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/detail/impl/engine.ipp][handshake][146]
2020-03-09 18:09:53.310 11748-11800/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/detail/impl/engine.ipp][perform][249]
2020-03-09 18:09:53.310 11748-11800/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/detail/impl/engine.ipp][do_connect][339]
2020-03-09 18:09:53.311 11748-11800/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/detail/impl/engine.ipp][perform][258]: Arthur: SSL, error(2)
2020-03-09 18:09:53.311 11748-11800/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/detail/impl/engine.ipp][perform][298]
2020-03-09 18:09:53.311 11748-11800/com.keypasco.vaktensample D/vakten: Canceled 1 number of waiters
2020-03-09 18:09:53.311 11748-11800/com.keypasco.vaktensample V/vakten: /
2020-03-09 18:09:53.311 11748-11800/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/detail/impl/engine.ipp][map_error_code][209]
2020-03-09 18:09:53.311 11748-11800/com.keypasco.vaktensample V/vakten: + void kp::web::ClientConnection::handle_handshake(const boost::system::error_code&)
2020-03-09 18:09:53.311 11748-11800/com.keypasco.vaktensample D/vakten: Canceled 1 number of waiters
2020-03-09 18:09:53.311 11748-11800/com.keypasco.vaktensample E/vakten: system:2
2020-03-09 18:09:53.311 11748-11800/com.keypasco.vaktensample V/vakten: + void kp::web::ClientConnection::close()
2020-03-09 18:09:53.311 11748-11800/com.keypasco.vaktensample V/vakten: | + void kp::web::Socket::shutdown(boost::system::error_code&)
2020-03-09 18:09:53.311 11748-11800/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/detail/impl/engine.ipp][shutdown][153]
2020-03-09 18:09:53.311 11748-11800/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/detail/impl/engine.ipp][perform][249]
2020-03-09 18:09:53.311 11748-11800/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/detail/impl/engine.ipp][do_shutdown][345]
2020-03-09 18:09:53.311 11748-11800/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/detail/impl/engine.ipp][perform][258]: Arthur: SSL, error(1)
2020-03-09 18:09:53.311 11748-11800/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/detail/impl/engine.ipp][perform][262]
2020-03-09 18:09:53.311 11748-11800/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/detail/impl/engine.ipp][map_error_code][209]
2020-03-09 18:09:53.312 11748-11800/com.keypasco.vaktensample V/vakten: | /
2020-03-09 18:09:53.312 11748-11800/com.keypasco.vaktensample D/vakten: | error:140E0197:lib(20):func(224):reason(407)
2020-03-09 18:09:53.312 11748-11800/com.keypasco.vaktensample D/vakten: | Socket.shutdown error asio.ssl error
2020-03-09 18:09:53.312 11748-11800/com.keypasco.vaktensample V/vakten: | + boost::asio::basic_socket<boost::asio::ip::tcp, boost::asio::executor>::lowest_layer_type& kp::web::Socket::lowest_layer()
2020-03-09 18:09:53.312 11748-11800/com.keypasco.vaktensample V/vakten: | /
2020-03-09 18:09:53.312 11748-11800/com.keypasco.vaktensample V/vakten: | + kp::web::Socket::~Socket()
2020-03-09 18:09:53.312 11748-11800/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/detail/impl/engine.ipp][~engine][66]: Arthur: SSL
2020-03-09 18:09:53.312 11748-11800/com.keypasco.vaktensample D/Boost: [/home/arthur/project/boost_for_android/svn/vakten-lib/trunk/target/dependency/include/boost/asio/ssl/detail/impl/engine.ipp][~engine][74]: Arthur: SSL_free
2020-03-09 18:09:53.312 11748-11800/com.keypasco.vaktensample V/vakten: | /




Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net