Skip to content

Recording with AWS-S3 (YAML segfaults) #39

Closed
rslifka opened this Issue Jan 21, 2011 · 3 comments

2 participants

@rslifka
rslifka commented Jan 21, 2011

(on the latest version of VCR and Webmock)

We're using Paperclip's built-in S3 support to store files and query for file existence. We sometimes see a segfault as described in Issue #4 - (https://github.com/myronmarston/vcr/issues/closed#issue/4.

We're wondering if it's because of the many YAML references in the cassettes generated from S3 traffic?

Thanks!

- !ruby/struct:VCR::HTTPInteraction 
  request: !ruby/struct:VCR::Request 
    method: :delete
    uri: !ruby/regexp /.*amazonaws\.com.*\/str_paperclip_testing\/videos\/\d+\/thumbnails\/image.jpg/
    body: 
    headers: 
      user-agent: 
      - AWS::S3/0.6.2
      authorization: 
      - &id002 !str:AWS::S3::Authentication::Header 
          "@request": &id001 !ruby/object:Net::HTTP::Delete 
            body: 
            body_stream: 
            header: 
              - binary/octet-stream
              authorization: 
              - *id002
              date: 
        "@request": *id001
      content-length: 
      - "0"
      host: 
      - s3.amazonaws.com
@myronmarston
VCR member

We're wondering if it's because of the many YAML references in the cassettes generated from S3 traffic?

I don't know for sure but it seems likely. The extra references in the response body were causing YAML seg faults before so it seems likely that's the problem here, too.

I just pushed a commit that I hope will fix the problem for you into a branch:

https://github.com/myronmarston/vcr/tree/issue_39

Can you try it out and see if that fixes the problem for you? Note that my fix only affects recording, and not playback, so you'll need to re-record your S3 cassettes for this to make any difference.

@rslifka
rslifka commented Jan 21, 2011

Verified! Amazing response time my man, thanks so much!

@myronmarston
VCR member

I just released 1.5.1 with this fix.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.