Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using Promises with WWW module #6225

Closed
p6rt opened this issue May 7, 2017 · 5 comments
Closed

When using Promises with WWW module #6225

p6rt opened this issue May 7, 2017 · 5 comments
Labels
SEGV Segmentation fault, bus error, etc.

Comments

@p6rt
Copy link

p6rt commented May 7, 2017

Migrated from rt.perl.org#131264 (status was 'rejected')

Searchable as RT131264$

@p6rt
Copy link
Author

p6rt commented May 7, 2017

From @zoffixznet

Haven't had the chance to golf this and unsure whether it's a problem with Perl 6 or some of the prereq modules, but this code segfaults at about 80% rate​:

  use WWW;
  await (start get 'perl6.org') xx 4

@p6rt
Copy link
Author

p6rt commented May 7, 2017

From @zoffixznet

Looks like the issue is something to do with redirects and HTTPS (IO​::Socket​::SSL / HTTP​::UserAgent ?)

- Accessing site over HTTP doesn't seem to have issues
- Accessing site over HTTPS appears to hang
- Accessing a site that forces HTTPS over HTTP causes the segfault

  $ perl6 -MWWW -e 'await (start get "https://perl6.org/") xx 4'
  ^C
  $ perl6 -MWWW -e 'await (start get "https://perl6.org/") xx 4'
  ^C

  $ perl6 -MWWW -e 'await (start get "http://perl6.org/") xx 4'
  Segmentation fault
  $ perl6 -MWWW -e 'await (start get "http://perl6.org/") xx 4'
  Segmentation fault
  $ perl6 -MWWW -e 'await (start get "http://perl6.org/") xx 4'
  Segmentation fault

  $ perl6 -MWWW -e 'await (start get "http://zoffix.com/") xx 4'
  $ perl6 -MWWW -e 'await (start get "http://zoffix.com/") xx 4'
  $ perl6 -MWWW -e 'await (start get "http://zoffix.com/") xx 4'

@p6rt
Copy link
Author

p6rt commented May 9, 2017

From @zoffixznet

A reply from original bug discoverer that's on the mailing list, but didn't get onto the ticket, it seems​:

Hello,

I reduced that one down to​:

  perl6 -MOpenSSL -e 'await (start OpenSSL​::SSL​::SSL_library_init) xx 4'

This outputs​:

  *** Error in `.../moar'​: double free or corruption (!prev)​: ... ***

or​:

  ssl_ciph.c(417)​: OpenSSL internal error, assertion failed​: ssl_mac_secret_size[SSL_MD_MD5_IDX] >= 0

or it hangs.

Regards,
Cédric.

@p6rt
Copy link
Author

p6rt commented May 9, 2017

From @zoffixznet

On extra examination, it looks like the issue is simply due to OpenSSL not being thread-safe and there's an open Issue on it for the topic as well​: sergot/openssl#31

So, I think there's no Perl 6 problems here, so I'll close the ticket.

As for WWW module, I'll see about converting it to something thread safe in the future.

@p6rt p6rt closed this as completed May 9, 2017
@p6rt
Copy link
Author

p6rt commented May 9, 2017

@zoffixznet - Status changed from 'new' to 'rejected'

@p6rt p6rt added the SEGV Segmentation fault, bus error, etc. label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SEGV Segmentation fault, bus error, etc.
Projects
None yet
Development

No branches or pull requests

1 participant