[erlang-bugs] Weird crypto:start() bug with 717cf073 / OTP-11408

Geoff Cant nem@REDACTED
Tue Dec 10 00:51:31 CET 2013


Hi all, I just updated my OTP install to today's master and ran into a really weird bug - running 'crypto:start()' in the first ~5s after starting erl would fail with the error:

> Erlang R17A (erts-5.11) [source-236b48c] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
> 
> Eshell V5.11  (abort with ^G)
> 1> crypto:start().
> ** exception error: undefined function crypto:start/0
> 2> 
> =ERROR REPORT==== 9-Dec-2013::13:55:59 ===
> Unable to load crypto library. Failed with error:
> "load, Library load-call unsuccessful."
> OpenSSL might not be installed on this system.
> 
> =ERROR REPORT==== 9-Dec-2013::13:55:59 ===
> The on_load function for module crypto returned {error,
>                                                 {load,
>                                                  "Library load-call unsuccessful."}}
> 2> crypto:start().
> ok
> 3> crypto:md5(term_to_binary(1)).
> <<67,214,80,204,205,119,185,209,192,165,163,106,79,236,31,
>  196>>


If I did any of: calling crypto:start() a second time, or waiting a few seconds before calling it, or evaluating another shell command before crypto:start() , it would work just fine.

This was particularly annoying with rebar, as rebar wants to start crypto at startup and this would continually fail.

Backing out the commit '717cf073' fixed my problem. I'm running OS X 10.9, 'Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64' etc.

Cheers,
--
Geoff Cant







More information about the erlang-bugs mailing list