[random_device] App crash on boost::ramdom::random_device

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[random_device] App crash on boost::ramdom::random_device

Boost - Users mailing list

Hi there!

 

My app crash on customer's site. It crashes everytime the app is starting.

It happens on Chinese Windows7 (64bit) OS but it runs well on my PC with Korean Windows7 OS and English Windows7 OS.

My app is built on VisualStudio 2010 (x86 build, C++) using websocketpp library and boost 1.55.

The call-stack from the dump file shows my app(TMSClient100) called websocketpp::endpoint, then it called boost::random::random_device then ThrowException. Here's the call-stack info:

14 001cf6ac 7113872d e06d7363 00000001 00000003 KERNELBASE!RaiseException+0x58

15 001cf6e4 713b7c5a 001cf704 713d9350 b621b77b msvcr100!_CxxThrowException+0x48 [f:\dd\vctools\crt_bld\self_x86\crt\prebuild\eh\throw.cpp @ 157]

16 001cf814 713b7da3 001cf840 b621b9a7 002a19bc TMSClient100!boost::random::random_device::impl::error+0x15a

17 001cf8b8 713b7f7b 001cf8dc b621b94b 00000000 TMSClient100!boost::random::random_device::impl::impl+0x143

18 001cf904 71383901 b621b8ab 001cfac4 002a17e8 TMSClient100!boost::random::random_device::random_device+0x8b

19 001cf928 7137eb2c 002a17e8 b621b8ef 001cfac4 TMSClient100!websocketpp::endpoint<websocketpp::connection<websocketpp::config::asio_client>,websocketpp::config::asio_client>::endpoint<websocketpp::connection<websocketpp::config::asio_client>,websocketpp::config::asio_client>+0x191 [d:\dev\tms\trunk\library\library_c++_3\websocketpp\websocketpp\endpoint.hpp @ 101]

1a 001cf96c 713598c2 002a1790 b621b83b 001cfa08 TMSClient100!TMS::CWebSocketClient::CWebSocketClient+0x9c [d:\dev\tms\trunk\library\library_c++_3\tmsclient100\websocketclient.cpp @ 15]

1b 001cf9b8 010316cd b620327e 00388fa8 0103c908 TMSClient100!TMS::CTMSClient::CTMSClient+0xf2 [d:\dev\tms\trunk\library\library_c++_3\src\tmsclient.cpp @ 25]

 

Any suggestion how to debug this problem will be greatly appreciated.

 

Harry Park

 


_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [random_device] App crash on boost::ramdom::random_device

Boost - Users mailing list


On Fri, 17 Apr 2020 at 16:29, 박형근(HYUNGGUN PARK) via Boost-users <[hidden email]> wrote:

Hi there!

 

My app crash on customer's site. It crashes everytime the app is starting.


Are you catching the exception?

It is permissible for:

* random_device not to be available on all systems
* random_device's constructor to throw if there was a problem connecting to the (implementation defined) stochastic process.

In other words, you cannot rely on it not throwing. If it does, you'll have to fall back to another method of generating random seeds for your pseudo-random generators.


 

It happens on Chinese Windows7 (64bit) OS but it runs well on my PC with Korean Windows7 OS and English Windows7 OS.

My app is built on VisualStudio 2010 (x86 build, C++) using websocketpp library and boost 1.55.

The call-stack from the dump file shows my app(TMSClient100) called websocketpp::endpoint, then it called boost::random::random_device then ThrowException. Here's the call-stack info:

14 001cf6ac 7113872d e06d7363 00000001 00000003 KERNELBASE!RaiseException+0x58

15 001cf6e4 713b7c5a 001cf704 713d9350 b621b77b msvcr100!_CxxThrowException+0x48 [f:\dd\vctools\crt_bld\self_x86\crt\prebuild\eh\throw.cpp @ 157]

16 001cf814 713b7da3 001cf840 b621b9a7 002a19bc TMSClient100!boost::random::random_device::impl::error+0x15a

17 001cf8b8 713b7f7b 001cf8dc b621b94b 00000000 TMSClient100!boost::random::random_device::impl::impl+0x143

18 001cf904 71383901 b621b8ab 001cfac4 002a17e8 TMSClient100!boost::random::random_device::random_device+0x8b

19 001cf928 7137eb2c 002a17e8 b621b8ef 001cfac4 TMSClient100!websocketpp::endpoint<websocketpp::connection<websocketpp::config::asio_client>,websocketpp::config::asio_client>::endpoint<websocketpp::connection<websocketpp::config::asio_client>,websocketpp::config::asio_client>+0x191 [d:\dev\tms\trunk\library\library_c++_3\websocketpp\websocketpp\endpoint.hpp @ 101]

1a 001cf96c 713598c2 002a1790 b621b83b 001cfa08 TMSClient100!TMS::CWebSocketClient::CWebSocketClient+0x9c [d:\dev\tms\trunk\library\library_c++_3\tmsclient100\websocketclient.cpp @ 15]

1b 001cf9b8 010316cd b620327e 00388fa8 0103c908 TMSClient100!TMS::CTMSClient::CTMSClient+0xf2 [d:\dev\tms\trunk\library\library_c++_3\src\tmsclient.cpp @ 25]

 

Any suggestion how to debug this problem will be greatly appreciated.

 

Harry Park

 

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users


--
Richard Hodges
office: +442032898513
home: +376841522
mobile: +376380212


_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [random_device] App crash on boost::ramdom::random_device

Boost - Users mailing list
In reply to this post by Boost - Users mailing list
On Fri, Apr 17, 2020 at 10:29 AM 박형근(HYUNGGUN PARK) via Boost-users
<[hidden email]> wrote:

>
> My app crash on customer's site. It crashes everytime the app is starting.
> It happens on Chinese Windows7 (64bit) OS but it runs well on my PC with Korean Windows7 OS and English Windows7 OS.
> My app is built on VisualStudio 2010 (x86 build, C++) using websocketpp library and boost 1.55.
> The call-stack from the dump file shows my app(TMSClient100) called websocketpp::endpoint, then it called boost::random::random_device then ThrowException. Here's the call-stack info:
>
> 14 001cf6ac 7113872d e06d7363 00000001 00000003 KERNELBASE!RaiseException+0x58
> 15 001cf6e4 713b7c5a 001cf704 713d9350 b621b77b msvcr100!_CxxThrowException+0x48 [f:\dd\vctools\crt_bld\self_x86\crt\prebuild\eh\throw.cpp @ 157]
> 16 001cf814 713b7da3 001cf840 b621b9a7 002a19bc TMSClient100!boost::random::random_device::impl::error+0x15a
> 17 001cf8b8 713b7f7b 001cf8dc b621b94b 00000000 TMSClient100!boost::random::random_device::impl::impl+0x143

Check the exception message. Is it failing because it:
1. Could not find a provider name
2. Could not acquire CSP context

If #1, this might be solved by upgrading from Boost 1.55 to a newer
version. This fix in particular:
https://github.com/boostorg/random/commit/dc2fdeac443fb56c87a03a0887c9e7c8e1d3296d
went into Boost 1.56.

Glen
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [random_device] App crash on boost::ramdom::random_device

Boost - Users mailing list
In reply to this post by Boost - Users mailing list
> On Fri, Apr 17, 2020 at 10:29 AM 박형근(HYUNGGUN PARK) via Boost-users
> <[hidden email]> wrote:
> >
> > My app crash on customer's site. It crashes everytime the app is
> starting.
> > It happens on Chinese Windows7 (64bit) OS but it runs well on my PC
> > with
> Korean Windows7 OS and English Windows7 OS.
> > My app is built on VisualStudio 2010 (x86 build, C++) using
> > websocketpp
> library and boost 1.55.
> > The call-stack from the dump file shows my app(TMSClient100) called
> websocketpp::endpoint, then it called boost::random::random_device
> then ThrowException. Here's the call-stack info:
> >
> > 14 001cf6ac 7113872d e06d7363 00000001 00000003
> > KERNELBASE!RaiseException+0x58
> > 15 001cf6e4 713b7c5a 001cf704 713d9350 b621b77b
> > msvcr100!_CxxThrowException+0x48
> > [f:\dd\vctools\crt_bld\self_x86\crt\prebuild\eh\throw.cpp @ 157]
> > 16 001cf814 713b7da3 001cf840 b621b9a7 002a19bc
> > TMSClient100!boost::random::random_device::impl::error+0x15a
> > 17 001cf8b8 713b7f7b 001cf8dc b621b94b 00000000
> > TMSClient100!boost::random::random_device::impl::impl+0x143
>
> Check the exception message. Is it failing because it:
> 1. Could not find a provider name
> 2. Could not acquire CSP context
>
> If #1, this might be solved by upgrading from Boost 1.55 to a newer
> version. This fix in particular:
> https://github.com/boostorg/random/commit/dc2fdeac443fb56c87a03a0887c9
> e7c8
> e1d3296d
> went into Boost 1.56.
>
> Glen

Glen,
Thank you for your reply.
Thanks to your suggestion, upgrade from Boost 1.55 to 1.56 solved this problem.
Thank you very much.

Harry

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users