attribute_normalizer icon indicating copy to clipboard operation
attribute_normalizer copied to clipboard

Crashes Ruby when used with mutant gem

Open tjchambers opened this issue 9 years ago • 4 comments

Just an FYI I started to use this gem latest version yesterday and was pleased with it's benefits.

However I am heavily using mutation testing (mbj/mutant) of whom @dkubb is a contributor as well. I am a relative noobie. When I run my test suite after installing this gem it crashes Ruby 2.2 (appears to run out of stack). I have 100's of crash dumps and misbehavior documented in my mutation logs. When I remove the gem from the bundle normal behavior returns. It does not appear to be related to adding "normalize_attributes" statements. I spent a couple hours trying to get a simplified reproducible repo, but was not able too.

I am not blaming this gem as I don't know whether it is concurrency in mutant, or something this gem is doing inside a forked environment. I just really do not know.

I can say that in resurveying the landscape of gem's with this ones' functionality I ran across normalizr and replaced attribute_normalizer with that gem and got satisfactory functionality as well as it did not crash Ruby when running mutation testing.

Just a caution. If you want more detail I would be more than happy to add some gists with the crash dumps. I just wanted to make you aware of this.

tjchambers avatar Aug 18 '15 21:08 tjchambers

Thanks for the heads up. I would love play around with a repository having these issues to dig around myself as I am planning a rewrite in the not to distant future. I have used this gem on projects in the past that also include mutant but I can not recall what version of either I was running.

mdeering avatar Aug 19 '15 17:08 mdeering

I spent a lot of time trying to get a simple reproduction, and for my limited knowledge I was unable to get it to repro with something I could push for you to test. I feel badly since I hate leaving these issues - especially a ruby crash - as unreproducible and mysterious. However if you do get a chance to try it on your test suite yourself (I did not) under mutant it may surface. If you think I can help or want my crash info, I will be happy to provide.

tjchambers avatar Aug 19 '15 17:08 tjchambers

One piece of information is that mutant went from killing mutations to reporting unkilled specs on unmutated values with the test output = "marshal data too short". That was the only information from mutant itself, but my console was reporting crash dumps once per second.

tjchambers avatar Aug 19 '15 17:08 tjchambers

I have run many projects with these two gems alongside each other without issue.

I will add look at adding mutant to this test suite as it is pretty fast and could potentially add some value to the suite as well.

mdeering avatar Dec 04 '19 16:12 mdeering