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

rspec segfault #140

Closed
krgn opened this issue Jun 8, 2012 · 8 comments
Closed

rspec segfault #140

krgn opened this issue Jun 8, 2012 · 8 comments

Comments

@krgn
Copy link

krgn commented Jun 8, 2012

I get a segfault when running my rspec tests with simplecov enabled. A gist with the stacktrace can be viewed here:

[GIST]https://gist.github.com/2895162

@dgm
Copy link

dgm commented Jul 1, 2012

I too am getting a similar segfault, but with the regular unit tests as well.

https://gist.github.com/1aafb37ed7d645eaa7fa

@dgm
Copy link

dgm commented Jul 1, 2012

Possibly related to: http://www.ruby-forum.com/topic/4402950

@colszowka
Copy link
Collaborator

Hi guys, any updates on this? Still having the problem? I would assume there is a problem within Ruby itself or the Coverage library you are bumping into though.

@matadon
Copy link

matadon commented Oct 3, 2012

Looks like anything that needs mathn triggers this.

@colszowka
Copy link
Collaborator

@dgm @krgn Can you confirm that this happens to you as well when using mathn?

@scotje
Copy link
Contributor

scotje commented Nov 2, 2012

I run into this as well if I try to run rspec with simplecov enabled on my Rails project that includes ruby-units (and thus mathn). This is on MRI 1.9.3-p286 with simplecov 0.6.4 and simplecov-html 0.5.3. If I comment ruby-units out of the Gemfile, the segfault goes away.

@colszowka
Copy link
Collaborator

Guys, this is obviously a segfault coming from a different project. Please discuss the matter with the mathn folks. Thanks :)

@dgm
Copy link

dgm commented Nov 4, 2012

Confirmed, removing ruby-unit allowed simplecov to work.

colszowka added a commit that referenced this issue Nov 7, 2012
Makes SimpleCov resilient to inclusion of mathn library. (Re: #140)
bf4 added a commit to bf4/simplecov that referenced this issue Sep 19, 2013
… Fixnum or Rational; fixes segfaults with mathn
bf4 added a commit to bf4/simplecov that referenced this issue Dec 4, 2013
… Fixnum or Rational; fixes segfaults with mathn
bf4 added a commit to bf4/simplecov that referenced this issue Dec 4, 2013
… Fixnum or Rational; fixes segfaults with mathn
jsonn pushed a commit to jsonn/pkgsrc that referenced this issue Mar 15, 2014
v0.8.2, 2013-11-20 ([changes](simplecov-ruby/simplecov@v0.8.1...v0.8.2))
=====================

## Bugfixes

  * Replaced the locking behaviour [via lockfile gem](simplecov-ruby/simplecov#185) with
    plain Ruby explicit file locking when merging results. This should make simplecov merging to behave well
    on Windows again.
    See [#258](simplecov-ruby/simplecov#258) and
    [#223](simplecov-ruby/simplecov#223) (thanks to @tomykaira)

v0.8.1, 2013-11-10 ([changes](simplecov-ruby/simplecov@v0.8.0...v0.8.1))
=====================

## Bugfixes

  * Fixed a regression introduced in 0.8.0 - the Forwardable STDLIB module is now required explicitly.
    See [#256](simplecov-ruby/simplecov#256) (thanks to @kylev)

v0.8.0, 2013-11-10 ([changes](simplecov-ruby/simplecov@v0.7.1...v0.8.0))
=====================

**Note: Yanked the same day because of the regression that 0.8.1 fixes, see above**

## TL;DR

It's been way too long since the last official release 0.7.1, but this was partly due to it proving itself
quite stable in most circumstances. This release brings various further stability improvements to result set merging
(especially when working with parallel_tests), the configuration, source file encodings, and command name guessing.

The 0.8 line is the last one to cooperate with Ruby < 1.9. Starting with 0.9, SimpleCov will assume to be running in
Ruby 1.9+, and will not try to detect or bail silently on older Ruby versions. An appropriate deprecation warning
has been added.

## Features

  * Configuration blocks now have access to variables and methods outside of the block's scope.
    See [#238](simplecov-ruby/simplecov#238) (thanks to @ms-tg)
  * You can now have a global `~/.simplecov` configuration file.
    See [#195](simplecov-ruby/simplecov#195) (thanks to @spagalloco)
  * simplecov-html now uses the MIT-licensed colorbox plugin. Some adjustments when viewing source files,
    including retaining the currently open file on refresh have been added.
    See [simplecov-html #15](simplecov-ruby/simplecov-html#15) (thanks to @chetan)
  * Adds support for Rails 4 command guessing, removes default group `vendor/plugins`.
    See [#181](simplecov-ruby/simplecov#181) and
    [#203](simplecov-ruby/simplecov#203) (thanks to @semanticart and @phallstrom)
  * You can now load simplecov without the default settings by doing `require 'simplecov/no_defaults'`
    or setting `ENV['SIMPLECOV_NO_DEFAULTS']`. Check `simplecov/defaults` to see what preconfigurations are getting
    dropped by using this. See [#209](simplecov-ruby/simplecov#209) (thanks to @ileitch)
  * The result set merging now uses the `lockfile` gem to avoid race conditions.
    See [#185](simplecov-ruby/simplecov#185) (thanks to @jshraibman-mdsol).
  * Automatically detect the usage of parallel_tests and adjust the command name with the test env number accordingly,
    See [#64](simplecov-ruby/simplecov#64) and
    [#185](simplecov-ruby/simplecov#185) (thanks to @jshraibman-mdsol).

## Enhancements

  * Rename adapters to "profiles" given that they are bundles of settings. The old adapter methods are
    deprecated, but remain available for now.
    See [#207](simplecov-ruby/simplecov#207) (thanks to @mikerobe)
  * Tweaks to the automatic test suite naming. In particular, `rspec/features` should now
    be correctly attributed to RSpec, not Cucumber.
    See [#212](simplecov-ruby/simplecov#212) (thanks to @ersatzryan and @betelgeuse)
  * MiniTest should now be identified correctly by the command name guesser.
    See [#244](simplecov-ruby/simplecov#244) (thanks to @envygeeks)
  * Makes SimpleCov resilient to inclusion of mathn library.
    See [#175](simplecov-ruby/simplecov#175) and
    [#140](simplecov-ruby/simplecov#140) (thanks to @scotje)
  * Allow coverage_dir to be an absolute path.
  * See [#190](simplecov-ruby/simplecov#190) (thanks to @jshraibman-mdsol)
  * The internal cucumber test suite now uses Capybara 2.
    See [#206](simplecov-ruby/simplecov#206) (thanks to @infertux)
  * Work-arounds for the Coverage library shipped in JRuby 1.6 to behave in line with MRI.
    See [#174](simplecov-ruby/simplecov#174) (thanks to @grddev)
  * Fix warning: instance variable @exit_status not initialized.
    See [#242](simplecov-ruby/simplecov#242) and
    [#213](simplecov-ruby/simplecov#213) (thanks to @sferik and @infertux)

## Bugfixes

  * Correct result calculations for people using :nocov: tags.
    See [#215](simplecov-ruby/simplecov#215) (thanks to @aokolish)
  * Average hits per line for groups of files is now computed correctly.
    See [#192](http://github.com/colszowka/simplecov/pull/192) and
    [#179](http://github.com/colszowka/simplecov/issues/179) (thanks to @Graysonwright)
  * Compatability with BINARY internal encoding.
    See [#194](simplecov-ruby/simplecov#194) and
    [#127](simplecov-ruby/simplecov#127) (thanks to @justfalter)
  * Special characters in `SimpleCov.root` are now correctly escaped before being used as a RegExp.
    See [#204](simplecov-ruby/simplecov#204) and
    [#237](simplecov-ruby/simplecov#237) (thanks to @rli9)
jsonn pushed a commit to jsonn/pkgsrc that referenced this issue Mar 17, 2014
v0.8.2, 2013-11-20 ([changes](simplecov-ruby/simplecov@v0.8.1...v0.8.2))
=====================

## Bugfixes

  * Replaced the locking behaviour [via lockfile gem](simplecov-ruby/simplecov#185) with
    plain Ruby explicit file locking when merging results. This should make simplecov merging to behave well
    on Windows again.
    See [#258](simplecov-ruby/simplecov#258) and
    [#223](simplecov-ruby/simplecov#223) (thanks to @tomykaira)

v0.8.1, 2013-11-10 ([changes](simplecov-ruby/simplecov@v0.8.0...v0.8.1))
=====================

## Bugfixes

  * Fixed a regression introduced in 0.8.0 - the Forwardable STDLIB module is now required explicitly.
    See [#256](simplecov-ruby/simplecov#256) (thanks to @kylev)

v0.8.0, 2013-11-10 ([changes](simplecov-ruby/simplecov@v0.7.1...v0.8.0))
=====================

**Note: Yanked the same day because of the regression that 0.8.1 fixes, see above**

## TL;DR

It's been way too long since the last official release 0.7.1, but this was partly due to it proving itself
quite stable in most circumstances. This release brings various further stability improvements to result set merging
(especially when working with parallel_tests), the configuration, source file encodings, and command name guessing.

The 0.8 line is the last one to cooperate with Ruby < 1.9. Starting with 0.9, SimpleCov will assume to be running in
Ruby 1.9+, and will not try to detect or bail silently on older Ruby versions. An appropriate deprecation warning
has been added.

## Features

  * Configuration blocks now have access to variables and methods outside of the block's scope.
    See [#238](simplecov-ruby/simplecov#238) (thanks to @ms-tg)
  * You can now have a global `~/.simplecov` configuration file.
    See [#195](simplecov-ruby/simplecov#195) (thanks to @spagalloco)
  * simplecov-html now uses the MIT-licensed colorbox plugin. Some adjustments when viewing source files,
    including retaining the currently open file on refresh have been added.
    See [simplecov-html #15](simplecov-ruby/simplecov-html#15) (thanks to @chetan)
  * Adds support for Rails 4 command guessing, removes default group `vendor/plugins`.
    See [#181](simplecov-ruby/simplecov#181) and
    [#203](simplecov-ruby/simplecov#203) (thanks to @semanticart and @phallstrom)
  * You can now load simplecov without the default settings by doing `require 'simplecov/no_defaults'`
    or setting `ENV['SIMPLECOV_NO_DEFAULTS']`. Check `simplecov/defaults` to see what preconfigurations are getting
    dropped by using this. See [#209](simplecov-ruby/simplecov#209) (thanks to @ileitch)
  * The result set merging now uses the `lockfile` gem to avoid race conditions.
    See [#185](simplecov-ruby/simplecov#185) (thanks to @jshraibman-mdsol).
  * Automatically detect the usage of parallel_tests and adjust the command name with the test env number accordingly,
    See [#64](simplecov-ruby/simplecov#64) and
    [#185](simplecov-ruby/simplecov#185) (thanks to @jshraibman-mdsol).

## Enhancements

  * Rename adapters to "profiles" given that they are bundles of settings. The old adapter methods are
    deprecated, but remain available for now.
    See [#207](simplecov-ruby/simplecov#207) (thanks to @mikerobe)
  * Tweaks to the automatic test suite naming. In particular, `rspec/features` should now
    be correctly attributed to RSpec, not Cucumber.
    See [#212](simplecov-ruby/simplecov#212) (thanks to @ersatzryan and @betelgeuse)
  * MiniTest should now be identified correctly by the command name guesser.
    See [#244](simplecov-ruby/simplecov#244) (thanks to @envygeeks)
  * Makes SimpleCov resilient to inclusion of mathn library.
    See [#175](simplecov-ruby/simplecov#175) and
    [#140](simplecov-ruby/simplecov#140) (thanks to @scotje)
  * Allow coverage_dir to be an absolute path.
  * See [#190](simplecov-ruby/simplecov#190) (thanks to @jshraibman-mdsol)
  * The internal cucumber test suite now uses Capybara 2.
    See [#206](simplecov-ruby/simplecov#206) (thanks to @infertux)
  * Work-arounds for the Coverage library shipped in JRuby 1.6 to behave in line with MRI.
    See [#174](simplecov-ruby/simplecov#174) (thanks to @grddev)
  * Fix warning: instance variable @exit_status not initialized.
    See [#242](simplecov-ruby/simplecov#242) and
    [#213](simplecov-ruby/simplecov#213) (thanks to @sferik and @infertux)

## Bugfixes

  * Correct result calculations for people using :nocov: tags.
    See [#215](simplecov-ruby/simplecov#215) (thanks to @aokolish)
  * Average hits per line for groups of files is now computed correctly.
    See [#192](http://github.com/colszowka/simplecov/pull/192) and
    [#179](http://github.com/colszowka/simplecov/issues/179) (thanks to @Graysonwright)
  * Compatability with BINARY internal encoding.
    See [#194](simplecov-ruby/simplecov#194) and
    [#127](simplecov-ruby/simplecov#127) (thanks to @justfalter)
  * Special characters in `SimpleCov.root` are now correctly escaped before being used as a RegExp.
    See [#204](simplecov-ruby/simplecov#204) and
    [#237](simplecov-ruby/simplecov#237) (thanks to @rli9)
bf4 added a commit to bf4/simplecov that referenced this issue May 2, 2014
… Fixnum or Rational; fixes segfaults with mathn
bf4 added a commit to bf4/simplecov that referenced this issue Jul 7, 2014
… Fixnum or Rational; fixes segfaults with mathn
bf4 added a commit that referenced this issue Jul 7, 2014
[#175][#140] Ensure we return Floats, not Fixnum or Rational; fixes segfaults with mathn
bf4 added a commit that referenced this issue Jul 13, 2014
jsonn pushed a commit to jsonn/pkgsrc that referenced this issue Oct 11, 2014
v0.8.2, 2013-11-20 ([changes](simplecov-ruby/simplecov@v0.8.1...v0.8.2))
=====================

## Bugfixes

  * Replaced the locking behaviour [via lockfile gem](simplecov-ruby/simplecov#185) with
    plain Ruby explicit file locking when merging results. This should make simplecov merging to behave well
    on Windows again.
    See [#258](simplecov-ruby/simplecov#258) and
    [#223](simplecov-ruby/simplecov#223) (thanks to @tomykaira)

v0.8.1, 2013-11-10 ([changes](simplecov-ruby/simplecov@v0.8.0...v0.8.1))
=====================

## Bugfixes

  * Fixed a regression introduced in 0.8.0 - the Forwardable STDLIB module is now required explicitly.
    See [#256](simplecov-ruby/simplecov#256) (thanks to @kylev)

v0.8.0, 2013-11-10 ([changes](simplecov-ruby/simplecov@v0.7.1...v0.8.0))
=====================

**Note: Yanked the same day because of the regression that 0.8.1 fixes, see above**

## TL;DR

It's been way too long since the last official release 0.7.1, but this was partly due to it proving itself
quite stable in most circumstances. This release brings various further stability improvements to result set merging
(especially when working with parallel_tests), the configuration, source file encodings, and command name guessing.

The 0.8 line is the last one to cooperate with Ruby < 1.9. Starting with 0.9, SimpleCov will assume to be running in
Ruby 1.9+, and will not try to detect or bail silently on older Ruby versions. An appropriate deprecation warning
has been added.

## Features

  * Configuration blocks now have access to variables and methods outside of the block's scope.
    See [#238](simplecov-ruby/simplecov#238) (thanks to @ms-tg)
  * You can now have a global `~/.simplecov` configuration file.
    See [#195](simplecov-ruby/simplecov#195) (thanks to @spagalloco)
  * simplecov-html now uses the MIT-licensed colorbox plugin. Some adjustments when viewing source files,
    including retaining the currently open file on refresh have been added.
    See [simplecov-html #15](simplecov-ruby/simplecov-html#15) (thanks to @chetan)
  * Adds support for Rails 4 command guessing, removes default group `vendor/plugins`.
    See [#181](simplecov-ruby/simplecov#181) and
    [#203](simplecov-ruby/simplecov#203) (thanks to @semanticart and @phallstrom)
  * You can now load simplecov without the default settings by doing `require 'simplecov/no_defaults'`
    or setting `ENV['SIMPLECOV_NO_DEFAULTS']`. Check `simplecov/defaults` to see what preconfigurations are getting
    dropped by using this. See [#209](simplecov-ruby/simplecov#209) (thanks to @ileitch)
  * The result set merging now uses the `lockfile` gem to avoid race conditions.
    See [#185](simplecov-ruby/simplecov#185) (thanks to @jshraibman-mdsol).
  * Automatically detect the usage of parallel_tests and adjust the command name with the test env number accordingly,
    See [#64](simplecov-ruby/simplecov#64) and
    [#185](simplecov-ruby/simplecov#185) (thanks to @jshraibman-mdsol).

## Enhancements

  * Rename adapters to "profiles" given that they are bundles of settings. The old adapter methods are
    deprecated, but remain available for now.
    See [#207](simplecov-ruby/simplecov#207) (thanks to @mikerobe)
  * Tweaks to the automatic test suite naming. In particular, `rspec/features` should now
    be correctly attributed to RSpec, not Cucumber.
    See [#212](simplecov-ruby/simplecov#212) (thanks to @ersatzryan and @betelgeuse)
  * MiniTest should now be identified correctly by the command name guesser.
    See [#244](simplecov-ruby/simplecov#244) (thanks to @envygeeks)
  * Makes SimpleCov resilient to inclusion of mathn library.
    See [#175](simplecov-ruby/simplecov#175) and
    [#140](simplecov-ruby/simplecov#140) (thanks to @scotje)
  * Allow coverage_dir to be an absolute path.
  * See [#190](simplecov-ruby/simplecov#190) (thanks to @jshraibman-mdsol)
  * The internal cucumber test suite now uses Capybara 2.
    See [#206](simplecov-ruby/simplecov#206) (thanks to @infertux)
  * Work-arounds for the Coverage library shipped in JRuby 1.6 to behave in line with MRI.
    See [#174](simplecov-ruby/simplecov#174) (thanks to @grddev)
  * Fix warning: instance variable @exit_status not initialized.
    See [#242](simplecov-ruby/simplecov#242) and
    [#213](simplecov-ruby/simplecov#213) (thanks to @sferik and @infertux)

## Bugfixes

  * Correct result calculations for people using :nocov: tags.
    See [#215](simplecov-ruby/simplecov#215) (thanks to @aokolish)
  * Average hits per line for groups of files is now computed correctly.
    See [#192](http://github.com/colszowka/simplecov/pull/192) and
    [#179](http://github.com/colszowka/simplecov/issues/179) (thanks to @Graysonwright)
  * Compatability with BINARY internal encoding.
    See [#194](simplecov-ruby/simplecov#194) and
    [#127](simplecov-ruby/simplecov#127) (thanks to @justfalter)
  * Special characters in `SimpleCov.root` are now correctly escaped before being used as a RegExp.
    See [#204](simplecov-ruby/simplecov#204) and
    [#237](simplecov-ruby/simplecov#237) (thanks to @rli9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants