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

Seg Fault on Ubuntu 20.04 Arm64 #201

Open
cguess opened this issue Aug 18, 2021 · 4 comments
Open

Seg Fault on Ubuntu 20.04 Arm64 #201

cguess opened this issue Aug 18, 2021 · 4 comments

Comments

@cguess
Copy link

cguess commented Aug 18, 2021

Running on Ubuntu 20.04 Arm64 with Ruby 3.0.2 I'm getting a seg fault on what looks to be a free. See below for a stack trace:

/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/typhoeus-1.4.0/lib/typhoeus/request/actions.rb:22:in `get'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/typhoeus-1.4.0/lib/typhoeus/request/before.rb:26:in `run'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/typhoeus-1.4.0/lib/typhoeus/request/stubbable.rb:25:in `run'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/typhoeus-1.4.0/lib/typhoeus/request/block_connection.rb:31:in `run'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/typhoeus-1.4.0/lib/typhoeus/request/cacheable.rb:18:in `run'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/typhoeus-1.4.0/lib/typhoeus/request/operations.rb:16:in `run'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/ethon-0.14.0/lib/ethon/easy/operations.rb:44:in `perform'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/ethon-0.14.0/lib/ethon/easy/operations.rb:44:in `easy_perform'

-- Machine register context ------------------------------------------------
 "x0: 0x0000aaaad39685d0 "x1: 0x0000aaaad3e09e88 "x2: 0x0000000000000000
 "x3: 0x0000000001000000 "x4: 0x0054652e0223419b "x5: 0x000000000054652e
 "x6: 0x0209c5b1007ed27d "x7: 0x000000000209c5b1 "x1: 0x0000000000000003
 "x1: 0x0000000000000009 "x2: 0x0000aaaad39685c0 "x2: 0x0000aaaad3e09e68
 "x2: 0x0000000000000000 "x2: 0x0000ffffaa5a4800 "x2: 0x0000aaaad39685c0
 "x2: 0x00000000000003e9 "x2: 0x0000000000000001 "x2: 0x00000000000003e9
 "x2: 0x0000aaaad39684f0 "x2: 0x0000ffffe9c013e0 "sp: 0x0000ffffe9c013e0
 "fa: 0x0020ffffaa5a507c

-- C level backtrace information -------------------------------------------
Segmentation fault (core dumped)

@andremedeiros
Copy link
Member

Is this 100% reproducible? Can you include the code snippet that's causing the crash?

@cguess
Copy link
Author

cguess commented Aug 23, 2021

This is coming through using Capybara with a Selenium Chrome driver. The relevant code is as follows:

Capybara.default_driver = :selenium_chrome
Capybara.app_host = "https://instagram.com"
Capybara.default_max_wait_time = 15

module Zorki
  class Scraper
    include Capybara::DSL

    def login
      visit("/")
      # Check if we're redirected to a login page, if we aren't we're already logged in
      return unless page.has_xpath?('//*[@id="loginForm"]/div/div[3]/button')
    end
end

Specifically it's throwing the error at return unless page.has_xpath?('//*[@id="loginForm"]/div/div[3]/button')

Backtrace:

# Running:

/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/ethon-0.14.0/lib/ethon/easy/operations.rb:44: [BUG] Segmentation fault at 0x0020ffffab53807c
ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [aarch64-linux]

-- Control frame information -----------------------------------------------
c:0037 p:---- s:0216 e:000215 CFUNC  :easy_perform
c:0036 p:0014 s:0211 e:000210 METHOD /home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/ethon-0.14.0/lib/ethon/easy/operations.rb:44
c:0035 p:0020 s:0207 e:000206 METHOD /home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/typhoeus-1.4.0/lib/typhoeus/request/operations.rb:16
c:0034 p:0025 s:0202 e:000201 METHOD /home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/typhoeus-1.4.0/lib/typhoeus/request/cacheable.rb:18
c:0033 p:0033 s:0197 e:000196 METHOD /home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/typhoeus-1.4.0/lib/typhoeus/request/block_connection.rb:31
c:0032 p:0041 s:0193 e:000192 METHOD /home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/typhoeus-1.4.0/lib/typhoeus/request/stubbable.rb:25
c:0031 p:0020 s:0188 e:000187 METHOD /home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/typhoeus-1.4.0/lib/typhoeus/request/before.rb:26
c:0030 p:0025 s:0184 e:000183 METHOD /home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/typhoeus-1.4.0/lib/typhoeus/request/actions.rb:22
c:0029 p:0013 s:0178 e:000177 METHOD /home/parallels/Repositories/zorki/lib/zorki.rb:26
c:0028 p:0320 s:0170 e:000152 METHOD /home/parallels/Repositories/zorki/lib/zorki/scrapers/user_scraper.rb:37
c:0027 p:0020 s:0144 e:000143 BLOCK  /home/parallels/Repositories/zorki/lib/zorki/user.rb:47 [FINISH]
c:0026 p:---- s:0139 e:000138 CFUNC  :map
c:0025 p:0005 s:0135 e:000134 METHOD /home/parallels/Repositories/zorki/lib/zorki/user.rb:46
c:0024 p:0030 s:0130 e:000129 METHOD /home/parallels/Repositories/zorki/lib/zorki/user.rb:13
c:0023 p:0017 s:0125 e:000124 METHOD /home/parallels/Repositories/zorki/test/user_test.rb:9
c:0022 p:0019 s:0120 e:000119 BLOCK  /home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest/test.rb:98
c:0021 p:0002 s:0117 e:000116 METHOD /home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest/test.rb:195
c:0020 p:0005 s:0112 e:000111 BLOCK  /home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest/test.rb:95
c:0019 p:0015 s:0109 e:000108 METHOD /home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:272
c:0018 p:0005 s:0104 e:000103 BLOCK  /home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest/test.rb:94
c:0017 p:0030 s:0101 e:000100 METHOD /home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:367
c:0016 p:0045 s:0093 E:000a28 METHOD /home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest/test.rb:211
c:0015 p:0004 s:0086 E:001ed0 METHOD /home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest/test.rb:93
c:0014 p:0008 s:0082 e:000081 METHOD /home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:1029
c:0013 p:0026 s:0075 e:000073 METHOD /home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:341
c:0012 p:0010 s:0067 e:000066 BLOCK  /home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:328 [FINISH]
c:0011 p:---- s:0063 e:000062 CFUNC  :each
c:0010 p:0006 s:0059 e:000058 BLOCK  /home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:327
c:0009 p:0030 s:0056 e:000055 METHOD /home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:367
c:0008 p:0030 s:0048 E:0010d8 METHOD /home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:354
c:0007 p:0119 s:0041 E:002238 METHOD /home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:326
c:0006 p:0009 s:0032 e:000031 BLOCK  /home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:164 [FINISH]
c:0005 p:---- s:0028 e:000027 CFUNC  :map
c:0004 p:0037 s:0024 e:000023 METHOD /home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:164
c:0003 p:0142 s:0015 e:000014 METHOD /home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:141
c:0002 p:0074 s:0008 E:001900 BLOCK  /home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:68 [FINISH]
c:0001 p:0000 s:0003 E:000e30 (none) [FINISH]

-- Ruby level backtrace information ----------------------------------------
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:68:in `block in autorun'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:141:in `run'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:164:in `__run'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:164:in `map'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:164:in `block in __run'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:326:in `run'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:354:in `with_info_handler'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:367:in `on_signal'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:327:in `block in run'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:327:in `each'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:328:in `block (2 levels) in run'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:341:in `run_one_method'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:1029:in `run_one_method'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest/test.rb:93:in `run'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest/test.rb:211:in `with_info_handler'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:367:in `on_signal'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest/test.rb:94:in `block in run'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:272:in `time_it'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest/test.rb:95:in `block (2 levels) in run'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest/test.rb:195:in `capture_exceptions'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest/test.rb:98:in `block (3 levels) in run'
/home/parallels/Repositories/zorki/test/user_test.rb:9:in `test_a_username_returns_properly_when_scraped'
/home/parallels/Repositories/zorki/lib/zorki/user.rb:13:in `lookup'
/home/parallels/Repositories/zorki/lib/zorki/user.rb:46:in `scrape'
/home/parallels/Repositories/zorki/lib/zorki/user.rb:46:in `map'
/home/parallels/Repositories/zorki/lib/zorki/user.rb:47:in `block in scrape'
/home/parallels/Repositories/zorki/lib/zorki/scrapers/user_scraper.rb:37:in `parse'
/home/parallels/Repositories/zorki/lib/zorki.rb:26:in `retrieve_media'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/typhoeus-1.4.0/lib/typhoeus/request/actions.rb:22:in `get'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/typhoeus-1.4.0/lib/typhoeus/request/before.rb:26:in `run'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/typhoeus-1.4.0/lib/typhoeus/request/stubbable.rb:25:in `run'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/typhoeus-1.4.0/lib/typhoeus/request/block_connection.rb:31:in `run'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/typhoeus-1.4.0/lib/typhoeus/request/cacheable.rb:18:in `run'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/typhoeus-1.4.0/lib/typhoeus/request/operations.rb:16:in `run'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/ethon-0.14.0/lib/ethon/easy/operations.rb:44:in `perform'
/home/parallels/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/ethon-0.14.0/lib/ethon/easy/operations.rb:44:in `easy_perform'

-- Machine register context ------------------------------------------------
 "x0: 0x0000aaaafa7bc0f0 "x1: 0x0000aaaafabe7798 "x2: 0x0000000000000000
 "x3: 0x0000000001000000 "x4: 0x0037402002eebfd9 "x5: 0x0000000000374020
 "x6: 0x02e7f36a00c4834a "x7: 0x0000000002e7f36a "x1: 0x0000000000000002
 "x1: 0x0000000000000009 "x2: 0x0000aaaafa7bc0e0 "x2: 0x0000aaaafabe7778
 "x2: 0x0000000000000000 "x2: 0x0000ffffab537800 "x2: 0x0000aaaafa7bc0e0
 "x2: 0x00000000000003e9 "x2: 0x0000000000000001 "x2: 0x00000000000003e9
 "x2: 0x0000aaaafa7bc010 "x2: 0x0000ffffd5d12110 "sp: 0x0000ffffd5d12110
 "fa: 0x0020ffffab53807c

-- C level backtrace information -------------------------------------------
Segmentation fault (core dumped)
rake aborted!
Command failed with status (139)

@cguess
Copy link
Author

cguess commented Aug 23, 2021

FYI just attempted this with Firefox on the same machine, so it's definitely not related to the browser being used.

Further update: This seems to be an arm64 issue specifically. Running it on a Raspberry Pi running Debian Buster on an armHF works fine.

There's a possibility this could be caused from Parallels, which I'm using to run Ubuntu on a MacBook Pro M1, but that'd be exceptionally odd.

@Zapotek
Copy link
Contributor

Zapotek commented Jan 25, 2022

Try: #207

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants