Closed vadz closed 7 years ago
So I tried the following patch:
diff --git a/lib/OpenSSL.pm6 b/lib/OpenSSL.pm6
index 7c3d96c..3840f8d 100644
--- a/lib/OpenSSL.pm6
+++ b/lib/OpenSSL.pm6
@@ -35,8 +35,14 @@ method new(Bool :$client = False, ProtocolVersion :$version = -1) {
# can't find the required libeay32.dll anywhere in the path, and so fails to load the dll
OpenSSL::EVP::EVP_aes_128_cbc();
- OpenSSL::SSL::SSL_library_init();
- OpenSSL::SSL::SSL_load_error_strings();
+ try {
+ CATCH {
+ # The mask is OPENSSL_INIT_LOAD_SSL_STRINGS | OPENSSL_INIT_LOAD_CRYPTO_STRINGS.
+ default { OpenSSL::SSL::OPENSSL_init_ssl(0x00300000, Nil); }
+ }
+ OpenSSL::SSL::SSL_library_init();
+ OpenSSL::SSL::SSL_load_error_strings();
+ }
my $method;
given $version {
diff --git a/lib/OpenSSL/SSL.pm6 b/lib/OpenSSL/SSL.pm6
index b3c3e79..4faf6a9 100644
--- a/lib/OpenSSL/SSL.pm6
+++ b/lib/OpenSSL/SSL.pm6
@@ -37,6 +37,7 @@ class SSL is repr('CStruct') {
}
our sub SSL_library_init() is native(&ssl-lib) { ... }
+our sub OPENSSL_init_ssl(uint64, OpaquePointer) is native(&ssl-lib) { ... }
our sub SSL_load_error_strings() is native(&ssl-lib) { ... }
our sub SSL_new(OpenSSL::Ctx::SSL_CTX) returns SSL is native(&ssl-lib) { ... }
but, as expected, this is not enough, it now crashes later in t/02-socket.t
:
(gdb) r
Starting program: /usr/bin/moar --execname=-zsh --libpath=/usr/share/nqp/lib --libpath=/usr/lib/perl6/runtime --libpath=/usr/share/perl6/lib --libpath=/usr/share/perl6/runtime /usr/share/perl6/runtime/perl6.moarvm -Ilib t/02-socket.t
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
1..4
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff410be30 in SSL_get_rbio () from /usr/lib/x86_64-linux-gnu/libssl.so
(gdb) bt
#0 0x00007ffff410be30 in SSL_get_rbio () from /usr/lib/x86_64-linux-gnu/libssl.so
#1 0x00007ffff410be78 in SSL_set_bio () from /usr/lib/x86_64-linux-gnu/libssl.so
#2 0x00007ffff71fe038 in ffi_call_unix64 () from /usr/lib/x86_64-linux-gnu/libffi.so.6
#3 0x00007ffff71fda9a in ffi_call () from /usr/lib/x86_64-linux-gnu/libffi.so.6
#4 0x00007ffff791e3d0 in MVM_nativecall_invoke () from //usr/lib/moar/libmoar.so
#5 0x00007ffff78f5c4b in MVM_interp_run () from //usr/lib/moar/libmoar.so
#6 0x00007ffff79a0e01 in MVM_vm_run_file () from //usr/lib/moar/libmoar.so
#7 0x00005555555550d8 in ?? ()
#8 0x00007ffff74212b1 in __libc_start_main (main=0x555555554d20, argc=9, argv=0x7fffffffe678, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe668) at ../csu/libc-start.c:291
#9 0x000055555555514a in ?? ()
I'm afraid I have to abandon now, all I wanted was to write a small script making parallel HTTPS requests and unfortunately this just seems to be impossible currently :-(
Thanks to vadz for doing most of the legwork. I have had success using the following. The only change was the values used in the call to OPENSSL_init_ssl:
diff --git a/lib/OpenSSL.pm6 b/lib/OpenSSL.pm6
index 7c3d96c..d4d401e 100644
--- a/lib/OpenSSL.pm6
+++ b/lib/OpenSSL.pm6
@@ -34,9 +34,14 @@ method new(Bool :$client = False, ProtocolVersion :$version = -1) {
# if we're using our bundled .dll files, and we try to load ssleay32.dll first, LoadLibrary
# can't find the required libeay32.dll anywhere in the path, and so fails to load the dll
OpenSSL::EVP::EVP_aes_128_cbc();
-
- OpenSSL::SSL::SSL_library_init();
- OpenSSL::SSL::SSL_load_error_strings();
+
+ try {
+ CATCH {
+ default { OpenSSL::SSL::OPENSSL_init_ssl(0, OpaquePointer); }
+ }
+ OpenSSL::SSL::SSL_library_init();
+ OpenSSL::SSL::SSL_load_error_strings();
+ }
my $method;
given $version {
@@ -185,7 +190,7 @@ multi method write(Blob $b) {
my $ret;
loop {
- $ret = OpenSSL::SSL::SSL_write($!ssl, $b, $n);
+ $ret = OpenSSL::SSL::SSL_write($.ssl, $b, $n);
my $e = $.handle-error($ret);
last unless $e > 0;
diff --git a/lib/OpenSSL/SSL.pm6 b/lib/OpenSSL/SSL.pm6
index b3c3e79..4faf6a9 100644
--- a/lib/OpenSSL/SSL.pm6
+++ b/lib/OpenSSL/SSL.pm6
@@ -37,6 +37,7 @@ class SSL is repr('CStruct') {
}
our sub SSL_library_init() is native(&ssl-lib) { ... }
+our sub OPENSSL_init_ssl(uint64, OpaquePointer) is native(&ssl-lib) { ... }
our sub SSL_load_error_strings() is native(&ssl-lib) { ... }
our sub SSL_new(OpenSSL::Ctx::SSL_CTX) returns SSL is native(&ssl-lib) { ... }
I've added this as a PR for convenience.
Thanks @Xliff! I can confirm that not loading strings indeed avoids the crash (I don't know OpenSSL API, so I have no idea if it has any drawbacks -- perhaps it means we're not going to get user-readable error messages?).
I could now install this module and IO::Socket::SSL
but, sadly, using it from multiple threads in parallel still corrupts memory and crashes moar. I am not sure if it's a problem in this module or moar itself, so I don't even know where to report it but, just for the record, here is the crashing example:
use v6;
use HTTP::UserAgent;
use HTTP::Request;
use URI;
my Str @urls = "https://www.google.com/",
"https://www.yahoo.com/",
"https://www.microsoft.com/";
my Promise @p = (for @urls -> $url {
start {
say "Making request to $url...";
my URI $uri .= new($url);
my HTTP::UserAgent $ua .= new;
my HTTP::Response $res = $ua.request(HTTP::Request.new(GET => $uri));
say "Got response from $url with status code: {$res.code}";
"URL: $url (Code: {$res.code})";
}
});
await @p;
Odd. I don't get SEGVs on my end, but I do get that error I attempted to describe here:
At least I have a use case for it, now.
Can you verify this result on your end?
$ perl6 -I projects/openssl/lib -e 'use HTTP::UserAgent; use
HTTP::Response; say HTTP::UserAgent.get("https://www.yahoo.com")'
Cannot look up attributes in a HTTP::UserAgent type object
in method cookies at
/home/cbwood/.perl6/precomp/8FF61B5347AE00E22398C736A9772394F7A1CB63.1479167686.10775/78/7832D241B22D7300557CD06C3C2168504E548626
line 1
in method request at
/home/cbwood/.rakudobrew/moar-nom/install/share/perl6/site/sources/7832D241B22D7300557CD06C3C2168504E548626
(HTTP::UserAgent) line 152
in method get at
/home/cbwood/.rakudobrew/moar-nom/install/share/perl6/site/sources/7832D241B22D7300557CD06C3C2168504E548626
(HTTP::UserAgent) line 129
in method get at
/home/cbwood/.rakudobrew/moar-nom/install/share/perl6/site/sources/7832D241B22D7300557CD06C3C2168504E548626
(HTTP::UserAgent) line 132
in block
Thanks!
On Fri, Nov 18, 2016 at 8:04 AM, VZ notifications@github.com wrote:
Thanks @Xliff https://github.com/Xliff! I can confirm that not loading strings indeed avoids the crash (I don't know OpenSSL API, so I have no idea if it has any drawbacks -- perhaps it means we're not going to get user-readable error messages?).
I could now install this module and IO::Socket::SSL but, sadly, using it from multiple threads in parallel still corrupts memory and crashes moar. I am not sure if it's a problem in this module or moar itself, so I don't even know where to report it but, just for the record, here is the crashing example:
use v6;use HTTP::UserAgent;use HTTP::Request;use URI; my Str @urls = "https://www.google.com/", "https://www.yahoo.com/", "https://www.microsoft.com/"; my Promise @p = (for @urls -> $url { start { say "Making request to $url..."; my URI $uri .= new($url); my HTTP::UserAgent $ua .= new; my HTTP::Response $res = $ua.request(HTTP::Request.new(GET => $uri)); say "Got response from $url with status code: {$res.code}"; "URL: $url (Code: {$res.code})"; } }); await @p;
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sergot/openssl/issues/34#issuecomment-261527109, or mute the thread https://github.com/notifications/unsubscribe-auth/AAlOwi9cjw5HMdUXmcS3XSMRgCq_HH-Vks5q_aJ1gaJpZM4KxmGk .
Yes, I'm getting the same thing (with different hashes, of course). However I don't get it if I use my HTTP::UserAgent $ua .= new; $ua.get("https://www.yahoo.com")'
, so it looks like this problem is due to calling .get
on the module object directly?
Nevermind. I forgot the .new when I did "HTTP::UserAgent.get" /o\
Nevertheless, when I now run the script, I am getting:
Making request to https://www.google.com...
Making request to https://www.yahoo.com...
Making request to https://www.microsoft.com...
===SORRY!===
Please install IO::Socket::SSL in order to fetch https sites
Which is weird, since I am not getting that in my larger script.
I had to use an explicit -I ~/.perl6
to make it find the modules installed by zef.
Spoke too soon. Making a simple change (well, reverting rather):
use v6;
use HTTP::UserAgent;
use HTTP::Request;
use URI;
my Str @urls = "https://www.google.com",
"https://www.yahoo.com",
"https://www.microsoft.com";
my Promise @p = (for @urls -> $url {
start {
say "Making request to $url...";
my $ua = HTTP::UserAgent.new;
my $res = $ua.get($url);
say "Got response from $url with status code: {$res.code}";
"URL: $url (Code: {$res.code})";
}
});
await @p;
Made it go kablewy!
Making request to https://www.google.com...
Making request to https://www.yahoo.com...
Making request to https://www.microsoft.com...
*** Error in `/home/cbwood/.rakudobrew/moar-nom/install/bin/moar': double free or corruption (fasttop): 0xb0310d00 ***
======= Backtrace: =========
/lib/i386-linux-gnu/libc.so.6(+0x6733a)[0xb723233a]
/lib/i386-linux-gnu/libc.so.6(+0x6df77)[0xb7238f77]
/lib/i386-linux-gnu/libc.so.6(+0x6e736)[0xb7239736]
/lib/i386-linux-gnu/libc.so.6(+0x70c97)[0xb723bc97]
/lib/i386-linux-gnu/libc.so.6(realloc+0x12e)[0xb723d07e]
//home/cbwood/.rakudobrew/moar-nom/install/lib/libmoar.so(MVM_sc_set_object+0x178)[0xb74adf28]
//home/cbwood/.rakudobrew/moar-nom/install/lib/libmoar.so(MVM_interp_run+0x113dc)[0xb743f63c]
//home/cbwood/.rakudobrew/moar-nom/install/lib/libmoar.so(+0xab91e)[0xb745191e]
//home/cbwood/.rakudobrew/moar-nom/install/lib/libmoar.so(+0x179075)[0xb751f075]
/lib/i386-linux-gnu/libpthread.so.0(+0x62da)[0xb715f2da]
/lib/i386-linux-gnu/libc.so.6(clone+0x6e)[0xb72b291e]
======= Memory map: ========
08048000-0804a000 r-xp 00000000 08:01 141051 /home/cbwood/.rakudobrew/moar-nom/install/bin/moar
0804a000-0804b000 r--p 00001000 08:01 141051 /home/cbwood/.rakudobrew/moar-nom/install/bin/moar
0804b000-0804c000 rw-p 00002000 08:01 141051 /home/cbwood/.rakudobrew/moar-nom/install/bin/moar
09d52000-0cf96000 rw-p 00000000 00:00 0 [heap]
b0100000-b014e000 rw-p 00000000 00:00 0
b014e000-b0200000 ---p 00000000 00:00 0
b0200000-b0221000 rw-p 00000000 00:00 0
b0221000-b0300000 ---p 00000000 00:00 0
b0300000-b03ff000 rw-p 00000000 00:00 0
b03ff000-b0400000 ---p 00000000 00:00 0
b0400000-b0431000 rw-p 00000000 00:00 0
b0431000-b0500000 ---p 00000000 00:00 0
b0500000-b05f3000 rw-p 00000000 00:00 0
b05f3000-b0600000 ---p 00000000 00:00 0
b0600000-b06fe000 rw-p 00000000 00:00 0
b06fe000-b0700000 ---p 00000000 00:00 0
b0700000-b0800000 rw-p 00000000 00:00 0
b0800000-b08fb000 rw-p 00000000 00:00 0
b08fb000-b0900000 ---p 00000000 00:00 0
b0900000-b0a00000 rw-p 00000000 00:00 0
b0afd000-b1700000 rw-p 00000000 00:00 0
b1700000-b17e8000 rw-p 00000000 00:00 0
b17e8000-b1800000 ---p 00000000 00:00 0
b1800000-b18ef000 rw-p 00000000 00:00 0
b18ef000-b1900000 ---p 00000000 00:00 0
b1900000-b19ee000 rw-p 00000000 00:00 0
b19ee000-b1a00000 ---p 00000000 00:00 0
b1a00000-b1a8b000 rw-p 00000000 00:00 0
b1a8b000-b1b00000 ---p 00000000 00:00 0
b1b00000-b1beb000 rw-p 00000000 00:00 0
b1beb000-b1c00000 ---p 00000000 00:00 0
b1c00000-b1cff000 rw-p 00000000 00:00 0
b1cff000-b1d00000 ---p 00000000 00:00 0
b1d00000-b1dfd000 rw-p 00000000 00:00 0
b1dfd000-b1e00000 ---p 00000000 00:00 0
b1e00000-b1efa000 rw-p 00000000 00:00 0
b1efa000-b1f00000 ---p 00000000 00:00 0
b1f00000-b1ff0000 rw-p 00000000 00:00 0
b1ff0000-b2000000 ---p 00000000 00:00 0
b2000000-b20fe000 rw-p 00000000 00:00 0
b20fe000-b2100000 ---p 00000000 00:00 0
b2100000-b2200000 rw-p 00000000 00:00 0
b2200000-b2300000 rw-p 00000000 00:00 0
b2300000-b2400000 rw-p 00000000 00:00 0
b2400000-b2500000 rw-p 00000000 00:00 0
b2500000-b25f6000 rw-p 00000000 00:00 0
b25f6000-b2600000 ---p 00000000 00:00 0
b2600000-b2700000 rw-p 00000000 00:00 0
b2700000-b2800000 rw-p 00000000 00:00 0
b2800000-b28fc000 rw-p 00000000 00:00 0
b28fc000-b2900000 ---p 00000000 00:00 0
b2900000-b2a00000 rw-p 00000000 00:00 0
b2a00000-b2b00000 rw-p 00000000 00:00 0
b2b00000-b2c00000 rw-p 00000000 00:00 0
b2cfe000-b2cff000 ---p 00000000 00:00 0
b2cff000-b34ff000 rwxp 00000000 00:00 0
b34ff000-b3900000 rw-p 00000000 00:00 0
b3900000-b3a00000 rw-p 00000000 00:00 0
b3afe000-b3aff000 ---p 00000000 00:00 0
b3aff000-b42ff000 rwxp 00000000 00:00 0
b42ff000-b4700000 rw-p 00000000 00:00 0
b4700000-b47fd000 rw-p 00000000 00:00 0
b47fd000-b4800000 ---p 00000000 00:00 0
b4849000-b4865000 r-xp 00000000 08:01 1053013 /lib/i386-linux-gnu/libgcc_s.so.1
b4865000-b4866000 r--p 0001b000 08:01 1053013 /lib/i386-linux-gnu/libgcc_s.so.1
b4866000-b4867000 rw-p 0001c000 08:01 1053013 /lib/i386-linux-gnu/libgcc_s.so.1
b488b000-b488c000 ---p 00000000 00:00 0
b488c000-b508c000 rwxp 00000000 00:00 0
b508c000-b548d000 rw-p 00000000 00:00 0
b548d000-b54c6000 r--p 00000000 08:01 155142 /home/cbwood/.perl6/precomp/8FF61B5347AE00E22398C736A9772394F7A1CB63.1479167686.10775/78/7832D241B22D7300557CD06C3C2168504E548626
b54c6000-b54d6000 r--p 00000000 08:01 155020 /home/cbwood/.perl6/precomp/8FF61B5347AE00E22398C736A9772394F7A1CB63.1479167686.10775/AB/ABC2BE03ECE07BFE6E2858BFA91C2AF8086C324E
b54d6000-b54da000 r--p 00000000 08:01 155018 /home/cbwood/.perl6/precomp/8FF61B5347AE00E22398C736A9772394F7A1CB63.1479167686.10775/93/9348C8241DCB23010628352BB28803635DAB3C87
b54da000-b54df000 r--p 00000000 08:01 302603 /home/cbwood/.rakudobrew/moar-nom/install/share/perl6/site/precomp/8FF61B5347AE00E22398C736A9772394F7A1CB63.1479167686.10775/CE/CE9E1CF8A333BDAC8D8832540D865386E8045647
b54df000-b54fa000 r--p 00000000 08:01 155138 /home/cbwood/.perl6/precomp/8FF61B5347AE00E22398C736A9772394F7A1CB63.1479167686.10775/18/189913E7F23F839725CDF9FA71FA9AA1BC1D8FDD
b54fa000-b5510000 r--p 00000000 08:01 155009 /home/cbwood/.perl6/precomp/8FF61B5347AE00E22398C736A9772394F7A1CB63.1479167686.10775/54/5425CDCCE658BCBBB2E5F5174D8982C79978320A
b5510000-b5516000 r--p 00000000 08:01 302583 /home/cbwood/.rakudobrew/moar-nom/install/share/perl6/site/precomp/8FF61B5347AE00E22398C736A9772394F7A1CB63.1479167686.10775/53/5360B1D758D5EB0EDE33C80453AD851036DFE535
b5516000-b5532000 r--p 00000000 08:01 155133 /home/cbwood/.perl6/precomp/8FF61B5347AE00E22398C736A9772394F7A1CB63.1479167686.10775/91/91F35695793093FAD36F7B2F7DECFA0F15CEF65C
b5532000-b5554000 r--p 00000000 08:01 155131 /home/cbwood/.perl6/precomp/8FF61B5347AE00E22398C736A9772394F7A1CB63.1479167686.10775/1A/1A9559F7384ADC124CF892220C7D0494EB259AD9
b5554000-b555d000 r--p 00000000 08:01 154998 /home/cbwood/.perl6/precomp/8FF61B5347AE00E22398C736A9772394F7A1CB63.1479167686.10775/DC/DC23AE6AE755457D80D0B1A8A13BE49880BB2F9E
b555d000-b5564000 r--p 00000000 08:01 154996 /home/cbwood/.perl6/precomp/8FF61B5347AE00E22398C736A9772394F7A1CB63.1479167686.10775/C6/C6EA2610FADA4EE7DB6836AEADAFEC03E2DE945E
b5564000-b557c000 r--p 00000000 08:01 154992 /home/cbwood/.perl6/precomp/8FF61B5347AE00E22398C736A9772394F7A1CB63.1479167686.10775/E6/E6932313C3FA27F20E3F940809AFC1198E0EC2E5
b557c000-b5581000 r--p 00000000 08:01 154990 /home/cbwood/.perl6/precomp/8FF61B5347AE00E22398C736A9772394F7A1CB63.1479167686.10775/07/07EE6C07F38281215C37955BB3BC16CFA9604F8E
b5581000-b5587000 r--p 00000000 08:01 154987 /home/cbwood/.perl6/precomp/8FF61B5347AE00E22398C736A9772394F7A1CB63.1479167686.10775/A5/A541643C9AEAA4863E2FA70508DC38EF5D723F1C
b5587000-b5591000 r--p 00000000 08:01 154984 /home/cbwood/.perl6/precomp/8FF61B5347AE00E22398C736A9772394F7A1CB63.1479167686.10775/79/79F4576C6F752E5C28370FA9256C02F086F840C0
b5591000-b55b1000 r--p 00000000 08:01 154982 /home/cbwood/.perl6/precomp/8FF61B5347AE00E22398C736A9772394F7A1CB63.1479167686.10775/56/569303CDB803825561D6F68923690092DF2D9E36
b55b1000-b55bc000 r--p 00000000 08:01 154980 /home/cbwood/.perl6/precomp/8FF61B5347AE00E22398C736A9772394F7A1CB63.1479167686.10775/96/96AEF9B19208FDD3A6B7DBD51B04D01E9C0544AF
b55bc000-b55c1000 r--p 00000000 08:01 154973 /home/cbwood/.perl6/precomp/8FF61B5347AE00E22398C736A9772394F7A1CB63.1479167686.10775/B3/B33F2E3B03C10717E1F06B1FDBD617CEEFD83E06
b55c1000-b55de000 r--p 00000000 08:01 155129 /home/cbwood/.perl6/precomp/8FF61B5347AE00E22398C736A9772394F7A1CB63.1479167686.10775/57/5728ACF4E4B797CAFD7D72C74F7ABBC21D40658A
b55de000-b55ee000 r--p 00000000 08:01 154968 /home/cbwood/.perl6/precomp/8FF61B5347AE00E22398C736A9772394F7A1CB63.1479167686.10775/DD/DDDA9D349B9F5D8183E6F34AF999E9B172EA3211
b55ee000-b55f1000 r--p 00000000 08:01 154966 /home/cbwood/.perl6/precomp/8FF61B5347AE00E22398C736A9772394F7A1CB63.1479167686.10775/E3/E38D15AA75B2F9C901F41BF30D11B4394E5FEEF0
b55f1000-b55f3000 r--p 00000000 08:01 154963 /home/cbwood/.perl6/precomp/8FF61B5347AE00E22398C736A9772394F7A1CB63.1479167686.10775/B8/B849F5C37A6ED5E7D1CF42323A6FF47B71993C0F
b55f3000-b55f5000 r--p 00000000 08:01 154960 /home/cbwood/.perl6/precomp/8FF61B5347AE00E22398C736A9772394F7A1CB63.1479167686.10775/64/6459A7E8A8642A6A064BF62A744F8B1D150982C7
b55f5000-b5608000 r--p 00000000 08:01 302556 /home/cbwood/.rakudobrew/moar-nom/install/share/perl6/site/precomp/8FF61B5347AE00E22398C736A9772394F7A1CB63.1479167686.10775/0D/0D9577CFCF5C7B6F77726A86F5CD26C3F528A7F4
b5608000-b561f000 r--p 00000000 08:01 302514 /home/cbwood/.rakudobrew/moar-nom/install/share/perl6/site/precomp/8FF61B5347AE00E22398C736A9772394F7A1CB63.1479167686.10775/A7/A762796B5C52899BB2B91580DD64B0A9D64707B5
b561f000-b5623000 r--p 00000000 08:01 299416 /home/cbwood/.rakudobrew/moar-nom/install/share/perl6/site/precomp/8FF61B5347AE00E22398C736A9772394F7A1CB63.1479167686.10775/00/00BE8F80B70D3450430452A0D7DD5FB8A4491609
b5623000-b5ac4000 rw-p 00000000 00:00 0
b5ac4000-b5b0a000 r--p 00000000 08:01 131491 /home/cbwood/.rakudobrew/moar-nom/install/share/nqp/lib/Perl6/Metamodel.moarvm
b5b0a000-b5b36000 r--p 00000000 08:01 131492 /home/cbwood/.rakudobrew/moar-nom/install/share/nqp/lib/Perl6/BOOTSTRAP.moarvm
b5b36000-b661d000 r--p 00000000 08:01 131497 /home/cbwood/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm
b661d000-b6623000 r-xp 00000000 08:01 131503 /home/cbwood/.rakudobrew/moar-nom/install/share/perl6/runtime/dynext/libperl6_ops_moar.so
b6623000-b6624000 r--p 00005000 08:01 131503 /home/cbwood/.rakudobrew/moar-nom/install/share/perl6/runtime/dynext/libperl6_ops_moar.so
b6624000-b6625000 rw-p 00006000 08:01 131503 /home/cbwood/.rakudobrew/moar-nom/install/share/perl6/runtime/dynext/libperl6_ops_moar.so
b6625000-b664b000 r--p 00000000 08:01 131488 /home/cbwood/.rakudobrew/moar-nom/install/share/nqp/lib/Perl6/Optimizer.moarvm
b664b000-b664f000 r--p 00000000 08:01 131490 /home/cbwood/.rakudobrew/moar-nom/install/share/nqp/lib/Perl6/Compiler.moarvm
b664f000-b6690000 rw-p 00000000 00:00 0
b6690000-b66db000 r--p 00000000 08:01 131480 /home/cbwood/.rakudobrew/moar-nom/install/share/nqp/lib/Perl6/World.moarvm
b66db000-b66ec000 r--p 00000000 08:01 131482 /home/cbwood/.rakudobrew/moar-nom/install/share/nqp/lib/Perl6/Ops.moarvm
b66ec000-b6701000 r--p 00000000 08:01 131489 /home/cbwood/.rakudobrew/moar-nom/install/share/nqp/lib/Perl6/Pod.moarvm
b6701000-b67e2000 r--p 00000000 08:01 131487 /home/cbwood/.rakudobrew/moar-nom/install/share/nqp/lib/Perl6/Actions.moarvm
b67e2000-b681c000 r--p 00000000 08:01 131455 /home/cbwood/.rakudobrew/moar-nom/install/share/nqp/lib/NQPP5QRegex.moarvm
b681c000-b6bb4000 r--p 00000000 08:01 131481 /home/cbwood/.rakudobrew/moar-nom/install/share/nqp/lib/Perl6/Grammar.moarvm
b6bb4000-b6bcf000 r--p 00000000 08:01 130969 /home/cbwood/.rakudobrew/moar-nom/install/share/nqp/lib/MASTOps.moarvm
b6bcf000-b6c42000 r--p 00000000 08:01 130972 /home/cbwood/.rakudobrew/moar-nom/install/share/nqp/lib/QAST.moarvm
b6c42000-b6c96000 r--p 00000000 08:01 130967 /home/cbwood/.rakudobrew/moar-nom/install/share/nqp/lib/NQPHLL.moarvm
b6c96000-b6caf000 r--p 00000000 08:01 130964 /home/cbwood/.rakudobrew/moar-nom/install/share/nqp/lib/QASTNode.moarvm
b6caf000-b6cd2000 r--p 00000000 08:01 130965 /home/cbwood/.rakudobrew/moar-nom/install/share/nqp/lib/QRegex.moarvm
b6cd2000-b6d34000 r--p 00000000 08:01 131453 /home/cbwood/.rakudobrew/moar-nom/install/share/nqp/lib/NQPP6QRegex.moarvm
b6d34000-b6d48000 r--p 00000000 08:01 130959 /home/cbwood/.rakudobrew/moar-nom/install/share/nqp/lib/nqpmo.moarvm
b6d48000-b714b000 rw-p 00000000 00:00 0
b714b000-b714e000 r-xp 00000000 08:01 1053029 /lib/i386-linux-gnu/libdl-2.24.so
b714e000-b714f000 r--p 00002000 08:01 1053029 /lib/i386-linux-gnu/libdl-2.24.so
b714f000-b7150000 rw-p 00003000 08:01 1053029 /lib/i386-linux-gnu/libdl-2.24.so
b7150000-b7157000 r-xp 00000000 08:01 1053051 /lib/i386-linux-gnu/librt-2.24.so
b7157000-b7158000 r--p 00006000 08:01 1053051 /lib/i386-linux-gnu/librt-2.24.so
b7158000-b7159000 rw-p 00007000 08:01 1053051 /lib/i386-linux-gnu/librt-2.24.so
b7159000-b7172000 r-xp 00000000 08:01 1053047 /lib/i386-linux-gnu/libpthread-2.24.so
b7172000-b7173000 r--p 00018000 08:01 1053047 /lib/i386-linux-gnu/libpthread-2.24.so
b7173000-b7174000 rw-p 00019000 08:01 1053047 /lib/i386-linux-gnu/libpthread-2.24.so
b7174000-b7176000 rw-p 00000000 00:00 0
b7176000-b71c9000 r-xp 00000000 08:01 1053030 /lib/i386-linux-gnu/libm-2.24.so
b71c9000-b71ca000 r--p 00052000 08:01 1053030 /lib/i386-linux-gnu/libm-2.24.so
b71ca000-b71cb000 rw-p 00053000 08:01 1053030 /lib/i386-linux-gnu/libm-2.24.so
b71cb000-b737c000 r-xp 00000000 08:01 1053025 /lib/i386-linux-gnu/libc-2.24.so
b737c000-b737e000 r--p 001b0000 08:01 1053025 /lib/i386-linux-gnu/libc-2.24.so
b737e000-b737f000 rw-p 001b2000 08:01 1053025 /lib/i386-linux-gnu/libc-2.24.so
b737f000-b7382000 rw-p 00000000 00:00 0
b7383000-b7388000 r--p 00000000 08:01 131479 /home/cbwood/.rakudobrew/moar-nom/install/share/nqp/lib/Perl6/ModuleLoader.moarvm
b7388000-b7394000 r--p 00000000 08:01 130970 /home/cbwood/.rakudobrew/moar-nom/install/share/nqp/lib/MASTNodes.moarvm
b7394000-b73a0000 r--p 00000000 08:01 130963 /home/cbwood/.rakudobrew/moar-nom/install/share/nqp/lib/NQPCORE.setting.moarvm
b73a0000-b73a3000 r--p 00000000 08:01 130961 /home/cbwood/.rakudobrew/moar-nom/install/share/nqp/lib/ModuleLoader.moarvm
b73a3000-b73a6000 r--p 00000000 08:01 131500 /home/cbwood/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm
b73a6000-b76db000 r-xp 00000000 08:01 131012 /home/cbwood/.rakudobrew/moar-nom/install/lib/libmoar.so
b76db000-b772d000 r--p 00334000 08:01 131012 /home/cbwood/.rakudobrew/moar-nom/install/lib/libmoar.so
b772d000-b7737000 rw-p 00386000 08:01 131012 /home/cbwood/.rakudobrew/moar-nom/install/lib/libmoar.so
b7737000-b773a000 rw-p 00000000 00:00 0
b773a000-b773c000 r--p 00000000 00:00 0 [vvar]
b773c000-b773e000 r-xp 00000000 00:00 0 [vdso]
b773e000-b7760000 r-xp 00000000 08:01 1049113 /lib/i386-linux-gnu/ld-2.24.so
b7760000-b7761000 rw-p 00000000 00:00 0
b7761000-b7762000 r--p 00022000 08:01 1049113 /lib/i386-linux-gnu/ld-2.24.so
b7762000-b7763000 rw-p 00023000 08:01 1049113 /lib/i386-linux-gnu/ld-2.24.so
bf8f3000-bf913000 rwxp 00000000 00:00 0 [stack]
bf913000-bf914000 rw-p 00000000 00:00 0
Aborted
However my original version (slightly changed from yours):
use v6;
use HTTP::UserAgent;
use HTTP::Request;
use URI;
my Str @urls = "https://www.google.com",
"https://www.yahoo.com",
"https://www.microsoft.com";
my Promise @p = (for @urls -> $url {
start {
say "Making request to $url...";
my $res = HTTP::UserAgent.new.get($url);
say "Got response from $url with status code: {$res.code}";
"URL: $url (Code: {$res.code})";
}
});
await @p;
Didn't crash and caused the weird error message in my previous post!
On your "-I issue", it sounds like you might need to force a recomp. You may want to consider removing ~/.perl6/.precomp -- but that's the Nuclear Option!
Yes, the heap corruption looks to be the same one I'm seeing (and the "nice" thing is that I'm under amd64 and you're under i386, so it's not arch-specific).
Looking at OpenSSL docs it seems that an extra effort is needed to use it from multiple threads, so I guess it's time to open another issue for it...
More like .get being invoked from a container. It's the only thing I can think of.
@Xliff could you possibly reproduce the missing IO::Socket::SSL not installed error but with RAKUDO_MODULE_DEBUG=1 and gist the output?
Sure thing:
https://gist.github.com/Xliff/bd157adb0fb484ea50caa4f5c5aa683b
On Fri, Nov 18, 2016 at 12:29 PM, Nick Logan notifications@github.com wrote:
@Xliff https://github.com/Xliff could you possibly reproduce the missing IO::Socket::SSL not installed error but with RAKUDO_MODULE_DEBUG=1 and gist the output?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sergot/openssl/issues/34#issuecomment-261590728, or mute the thread https://github.com/notifications/unsubscribe-auth/AAlOwiLed75TOPwu-6_5y76xoy-iovpiks5q_eBogaJpZM4KxmGk .
This doesn't seem to work with OpenSSL 1.1.0, as included in Debian Sid, right now: the tests fail when installing it with error messages similar to this:
apparently because
SSL_library_init()
has been replaced withOPENSSL_ssl_init()
now (at least the former function is not in my/usr/lib/x86_64-linux-gnu/libssl.so.1.1
, but the latter is). I am probably going to try changing a local version to use the new function in desperation (because as it stands, HTTP::UserAgent is just completely unusable with HTTPS for me because of #1 under Jessie and this one in Sid.), but I guess this is not going to be enough as there are probably other API changes in 1.1.