profile
viewpoint
Benoit Daloze eregon Oracle Labs Zurich, Switzerland https://eregon.me/blog/ TruffleRuby lead, ruby/spec maintainer, researcher interested in Virtual Machines and concurrency

brainopia/symbolic 92

Symbolic math for ruby

blambeau/viiite 57

An alternative to ruby Benchmark

eregon/app2engine 32

Ease the conversion of a Rails 3 app in an Engine

blambeau/noe 21

Noe is a simple, general-purpose and extensible skeleton generator from project templates

eregon/adventofcode 4

My solutions in Ruby to http://adventofcode.com/

eregon/alf 1

Relational Algebra at your fingertips

eregon/awesome_print 1

Pretty print your Ruby objects with style -- in full color and with proper indentation

eregon/backports 1

The latest features of Ruby backported to older versions.

eregon/benchmark-ips 1

Provides iteration per second benchmarking for Ruby

pull request commentruby/setup-ruby

Add a new input to optionally update RubyGems

@MSP-Greg The rerun is all green indeed, thanks for the reply.

deivid-rodriguez

comment created time in 28 minutes

pull request commentruby/setup-ruby

Add a new input to optionally update RubyGems

  • gem --version gives 3.0.3.1 but then just below it says Default RubyGems version is 3.0.3. Is there a way to have the semver package handle versions with not exactly 3 components?

It seems the semver package doesn't handle this. Maybe it doesn't matter too much in practice, WDYT?

deivid-rodriguez

comment created time in 40 minutes

push eventdeivid-rodriguez/setup-ruby

Benoit Daloze

commit sha b1243c804d7c3032f9cf2d7279a89a7c5655556d

Small cleanup

view details

push time in an hour

Pull request review commentruby/setup-ruby

Add a new input to optionally update RubyGems

 and the [condition and expression syntax](https://help.github.com/en/actions/ref The `working-directory` input can be set to resolve `.ruby-version`, `.tool-versions` and `Gemfile.lock` if they are not at the root of the repository, see [action.yml](action.yml) for details. +## RubyGems++By default, the default RubyGems version that comes with each Ruby is used.+However, users can optionally customize the RubyGems version that they want by+setting the `rubygems` input. See
setting the `rubygems` input.
deivid-rodriguez

comment created time in an hour

PullRequestReviewEvent

pull request commentruby/setup-ruby

Add a new input to optionally update RubyGems

This is awesome, thank you!

Some things I noticed in https://github.com/ruby/setup-ruby/runs/4905624850?check_suite_focus=true

  • The output of updating RubyGems takes > 1000 lines, I can imagine that to be impractical when looking at the full log. Is there a way to avoid printing the changelog of all versions in between?
  • gem --version gives 3.0.3.1 but then just below it says Default RubyGems version is 3.0.3. Is there a way to have the semver package handle versions with not exactly 3 components?
deivid-rodriguez

comment created time in an hour

pull request commentruby/setup-ruby

Add a new input to optionally update RubyGems

cc @MSP-Greg for the windows failures (mingw & ucrt): https://github.com/ruby/setup-ruby/runs/4905624491?check_suite_focus=true https://github.com/ruby/setup-ruby/runs/4905624491?check_suite_focus=true https://github.com/ruby/setup-ruby/runs/4905624590?check_suite_focus=true https://github.com/ruby/setup-ruby/pull/258 might fix it but then I'd want to first do that only for mingw & ucrt builds.

deivid-rodriguez

comment created time in an hour

pull request commentpostmodern/chruby

Use the Ruby directory basename to decide the GEM_HOME

I just realized, this approach is not good enough for any head Ruby, e.g. ruby-head (while ruby-install doesn't support it, chruby doesn't say anything about head Rubies AFAIK), because the ABI then changes but the name does not if reinstalled. A workaround is users manually clean the GEM_HOME, but this feels impractical and easy to forget. There is work in CRuby to actually give a proper ABI version for CRuby dev builds.

So a combination of ruby-name + ABI version (RbConfig::CONFIG["ruby_version"]) would work, or of course simply not setting GEM_HOME: https://github.com/postmodern/chruby/pull/431

eregon

comment created time in a day

pull request commentgrpc/grpc

Make the gem build on TruffleRuby

cc @jtattermusch which I saw did some work in this area as well recently.

eregon

comment created time in a day

pull request commentgrpc/grpc

Make the gem build on TruffleRuby

@apolcyn @ctiller I just rebased, could you trigger the CI?

Rebasing is rather painful with the templates/src/ruby/ext/grpc/extconf.rb.template (which duplicates src/ruby/ext/grpc/extconf.rb in the repo), maybe the template could only define the version and just require a regular .rb file next to the extconf.rb, or the template could generate a version.rb file or something. Would you be interested in a PR doing that?

I would love to have some feedback on this PR or for it getting merged, it's been many months and very little feedback. AFAIK this PR does not affect building grpc on CRuby at all, so from that point of view it should be completely safe to merge.

eregon

comment created time in a day

push eventeregon/grpc

Jan Tattermusch

commit sha 6f2021c48f7b7abf5570ec77686a5f2cb56b93ba

Cleanup of bazel qps scenarios generator (#27622) * cleanup of bazel qps scenarios generator * regenerate bzl files * add back outstanding_rpc_divisor * regenerate * fix check_qps_scenario_changes.py

view details

Craig Tiller

commit sha 016ef6cede6edf769d5da837ecd1a0d37185602d

Change reclaimer function signature (#27649) * Fix fuzzer found leak in memory_quota * Make reclamation functions know about cancellation * fixes * fix race * Automated change: Fix sanity tests * fixes * Automated change: Fix sanity tests Co-authored-by: ctiller <ctiller@users.noreply.github.com>

view details

Jan Tattermusch

commit sha b3a1f68606e27df82579815b51136e4a8ce554b4

Reorganize docs for end2end benchmarks (#27484) * Reorganize docs for end2end benchmarks * Update README.md * Restore heading "gRPC OSS benchmarks" (#27646) This heading is used in cross-references from other repositories and sites. Also fix formatting. Co-authored-by: Paulo Castello da Costa <6579971+paulosjca@users.noreply.github.com>

view details

Craig Tiller

commit sha ee47e08f71e92f5fb24b3b42ea77dcf89fa73273

Deal with some namespacing issues (#27651)

view details

Craig Tiller

commit sha da2e8ddc4e6932ec1c92e36abd4f5d9e1447e8f5

Flush auto fixer cache once per week (#27650) * cache-invalidation * ?? * indent * Update pr-auto-fix.yaml

view details

Craig Tiller

commit sha 8d8d07139cde6cddb20e97bf8bf25b7432825f48

Fix client idle filter (#27611) * trial-change * compiles! * added test * Automated change: Fix sanity tests * update test * Fix slow idle detection * review feedback Co-authored-by: ctiller <ctiller@users.noreply.github.com>

view details

Craig Tiller

commit sha 3dc5528c50b3c16732c03c5d8600a466f3a3362a

Fix fuzzer found null-deref in memory_quota (#27648)

view details

Terry Wilson

commit sha 9ccec1f99e063ca15159957da6861fde531b0dc7

xds_k8s tests: Fix xlang install script sourcing. (#27658) This change sources the test driver install script correctly for the xlang tests. This fixes a mistake in #27462 where this was missed.

view details

Mark D. Roth

commit sha 0f050e6f7ad00de1733a49ec9e5540a4d48972de

clean up ServiceConfigCallData API (#27642)

view details

Ashitha Santhosh

commit sha a1db97be9094f20bc2d414621dc6b4487427faba

Revert "Revert "Revert "Revert "File watcher authorization policy provider implementation"" (#27605)" (#27644)" (#27645) This reverts commit b8e01f73a0deeba37b38b677354c10811d30dc19.

view details

Yash Tibrewal

commit sha 5e69ded6f56650bc97325962faef0661592f0656

XdsApi cleanup: Remove unused field (#27664)

view details

Jan Tattermusch

commit sha aae25e24432f733ed4c5f90287845af0113775ee

address review comments for #27622 (#27659)

view details

Paulo Castello da Costa

commit sha 5464c8ba061c968b0ebd05498f2c954dc4bf0272

Fetch only required commit from test-infra repo. (#27675) Full clone and submodules are not required for test-infra tools build.

view details

Mayuki Sawatari

commit sha ee5a6851111a882003e76123fb137f176fb9c839

Fix link error when building with Xamarin.iOS (#27345)

view details

Mark D. Roth

commit sha 9b4f5fd264076f0d24df7468bf544a237f26fa6c

change repo manager to nicolasnoble (#27578)

view details

Mark D. Roth

commit sha 1d765b28f0a081e86d2457db1ae56aa2f4736362

clean up subchannel logging (#27661)

view details

Eric Anderson

commit sha 07a84258491e414e0f9f2862a5135c71101dfd74

xds_k8s_test_driver: Add Authz interop tests (#27639) Tests defined in go/grpc-proxyless-authz-interop, but the purpose of each should be pretty obvious just by reading authz_test.py.

view details

Hannah Shi

commit sha 5acc4c40a118a53954a7ddb6130f13d1c3eabb7d

podfile cleanup (#27609)

view details

Craig Tiller

commit sha 3a78db6cdf283779739678efc5cb8fd2245dc980

Fix bug in memory quota fuzzer (#27670) * flush more thoroughly * add reproducer * fixes

view details

Vignesh Babu

commit sha fa43eadb8fadee1f4d869eaddf6347920c5005d8

Mark EventEngine timer test suite as `testonly` (#27638) * updating event engine test suite to fix internal build and test errors * undo changes and restore absl::InfiniteFuture

view details

push time in a day

pull request commentruby/setup-ruby

Add a new input to optionally update RubyGems

I think it's 3.0.0.beta2: rubygems/rubygems@b7995ca.

Thanks, so I think we should recommend rubygems: 3.0.0 for the psych issue (probably best to avoid referring to a beta, right?), we could mention that in the README in the RubyGems section.

deivid-rodriguez

comment created time in a day

pull request commentrmosolgo/graphql-ruby

Remove TruffleRuby from CI

@bjfish Maybe you can make a PR with that change once the digest fix is merged?

rmosolgo

comment created time in a day

pull request commentrmosolgo/graphql-ruby

Remove TruffleRuby from CI

As a quick note the delegation code mentioned above could use ruby2_keywords, that would avoid code duplication, work on all Ruby version and TruffleRuby, and as a bonus is also faster on CRuby >= 3 than the current code.

rmosolgo

comment created time in a day

pull request commentruby/setup-ruby

Add a new input to optionally update RubyGems

OK, then we should probably check gem --version in this action if the rubygems input is set to a given version as we wouldn't want to fail the workload in such a case. For example in Puma's CI where the psych 4 issue happens they'd want something like:

jobs:
  test:
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest]
        ruby: [2.3, 2.4, 2.5, 2.6, 2.7, '3.0', 3.1]
    runs-on: ${{ matrix.os }}
    steps:
    - uses: actions/checkout@v2
    - uses: ruby/setup-ruby@v1
      with:
        ruby-version: ${{ matrix.ruby }}
        rubygems: MINIMUM_RUBYGEMS_VERSION_WHICH_SUPPORTS_PSYCH4
        bundler-cache: true

and for Ruby >= 2.6 it should just no try to update RubyGems as that would error (or downgrade).

deivid-rodriguez

comment created time in a day

pull request commentruby/setup-ruby

Add a new input to optionally update RubyGems

@deivid-rodriguez What do you think of this:

Or maybe never downgrade and always skip updating if the installed RubyGems is more recent than the given version (sounds nice to me).

I think that seems generally useful, unless there might be a valid reason to downgrade RubyGems lower than the version with Ruby? (I guess not)

deivid-rodriguez

comment created time in a day

pull request commentruby/setup-ruby

Add a new input to optionally update RubyGems

Yeah, we could e.g. look at the lockfile to see if there is Pysch 4 in there, but that feels hacky. I think we don't try to address this directly, it's probably not frequent enough to warrant it, and users should probably understand Psych 4 + Ruby 2.4-2.5 is a problematic combination anyway (not just for CI but also for anyone running those locally).

bundler-cache: true (I guess this is common because it's the default?).

It's not default but it's fairly common.

deivid-rodriguez

comment created time in a day

issue commentoracle/truffleruby

Docker Arm64 Unsupported Floating Point Type: f128

Sulong/GraalVM LLVM does not support fp128 yet, which is what long double resolves to on linux-aarch64. Internal Sulong issue about fp128: GR-36514

WozniakMac

comment created time in a day

pull request commentruby/setup-ruby

Add a new input to optionally update RubyGems

What's your opinion regarding the psych 4 + old Ruby/RubyGems issue? (https://github.com/ruby/setup-ruby/pull/264)

I think updating to a given RubyGems version wouldn't work if people have a matrix of both old and new Rubies (it would actually downgrade RubyGems on the newer Rubies). Maybe a special version psych4 or so would make sense? (feels hacky to me) Or maybe never downgrade and always skip updating if the installed RubyGems is more recent than the given version (sounds nice to me). (Updating to latest RubyGems would probably work for all but is adding more moving parts in CI)

deivid-rodriguez

comment created time in a day

pull request commentruby/setup-ruby

Add a new input to optionally update RubyGems

For TruffleRuby it will just ignore the update, which is probably fine for now, so I think best to treat it like any other Ruby in this action.

deivid-rodriguez

comment created time in a day

pull request commentruby/setup-ruby

Add a new input to optionally update RubyGems

Thank you for the PR!

Could you add a single CI job around https://github.com/ruby/setup-ruby/blob/180e1d1f1c5eadbfbab3dab6fb79ab0c07e3cecc/.github/workflows/test.yml#L115-L168 to test updating to latest, so we make sure it works and keeps working? Maybe also for a specific version.

Since the default remains default then the I think big matrix should still use default.

And could you add a new RubyGems short section section in the README about this new input?

deivid-rodriguez

comment created time in a day

issue commentoracle/truffleruby

Docker Arm64 Unsupported Floating Point Type: f128

I'll take a look at the history and see if I can figure it out.

Maybe it's the famous dtoa() DoS because it's not linear and creates arbitrarily big integers when parsing long floats (IIRC)? I think an usual fix is to just limit the length of the float to parse and if it's just between 2 floats then whatever cut at a reasonable length.

WozniakMac

comment created time in 2 days

pull request commentruby/ruby

[Feature #18249] Implement ABI checking

Using the ABI version is exposed through RbConfig, we're looking into changing bundler to rebuild gems when the ABI version changes. That should further help in reducing ABI incompatibilities.

I think that should just work if the new ABI version is used, because Bundler would then use a different path (the ABI is part of the path Bundler uses), but that may only work if the Bundler path is set and not if unset.

BTW, is there any reason to not simply update RbConfig::CONFIG['ruby_vesion'] to be this value. That's the ABI version used by Bundler and many other usages.

peterzhu2118

comment created time in 2 days

Pull request review commentruby/ruby

[Feature #18249] Implement ABI checking

+#!/usr/bin/env ruby++class ABI+  def initialize(srcdir)+    @srcdir = srcdir+    @output_file = "#{@srcdir}/include/ruby/internal/abi.h"+  end++  attr_reader :output_file++  def version+    # Generate MD5 for every header file+    header_files = Dir["#{@srcdir}/include/**/*.h"].reject { |f| f == output_file }+    md5s = header_files.map do |file|+      md5_hexdigest(File.read(file))+    end++    # Generate MD5 of MD5s+    md5 = md5_hexdigest(md5s.join)++    # Take only bottom 8 bytes of 16 byte MD5 string+    md5.to_i(16) % (2**64)

Could you combine the halves with XOR or just + so the top half is not lost?

peterzhu2118

comment created time in 2 days

PullRequestReviewEvent

pull request commentruby/ruby

[Feature #18249] Implement ABI checking

I'm not sure only headers can change ABI, for example a new non-static function (not declared in headers) might also change ABI if e.g. mkmf checks have_func(name). But it probably catches most cases and certainly a million times better than exposing the wrong ABI.

peterzhu2118

comment created time in 2 days

Pull request review commentruby/ruby

[Feature #18249] Implement ABI checking

+#!/usr/bin/env ruby++class ABI+  def initialize(srcdir)+    @srcdir = srcdir+    @output_file = "#{@srcdir}/include/ruby/internal/abi.h"+  end++  attr_reader :output_file++  def version+    # Generate MD5 for every header file+    header_files = Dir["#{@srcdir}/include/**/*.h"].reject { |f| f == output_file }+    md5s = header_files.map do |file|+      md5_hexdigest(File.read(file))+    end++    # Generate MD5 of MD5s+    md5 = md5_hexdigest(md5s.join)++    # Take only bottom 8 bytes of 16 byte MD5 string+    md5.to_i(16) % (2**64)+  end++  private++  def md5_hexdigest(str)+    begin+      require "digest"+    rescue LoadError+      return "0"+    end++    Digest::MD5.hexdigest(str)+  end+end++# Run only if file was directly called+if __FILE__ == $0+  require "optparse"+  require_relative "lib/colorize"++  OptionParser.new do |opts|+    opts.on("--srcdir=PATH", "use PATH as source directory") do |srcdir|+      @srcdir = srcdir+    end+  end.parse!++  abi = ABI.new(@srcdir)+  color = Colorize.new(color)+  updated = color.fail("updated")++  abi_h = <<-C+  #ifndef RUBY_ABI_H+  #define RUBY_ABI_H++  // DO NOT MODIFY THIS FILE DIRECTLY+  // This file was automatically generated by tool/abi.rb++  unsigned long long+  #ifndef RUBY_DLN_CHECK_ABI+  __attribute__((weak))+  #endif

Does this mean it's weak only if we are in a release-or-windows? Shouldn't it just always be weak, except on Windows where it's not supported?

peterzhu2118

comment created time in 2 days

PullRequestReviewEvent

issue commentoracle/truffleruby

Memory leak consuming more than 100gb before getting killed by earlyoomd

@brauliobo Could we reproduce that workload, or could you create a reproducer? It's very hard to investigate without something to run.

If you cannot share it or you want to investigate yourself, you can use bin/visualvm (part of truffleruby+graalvm, see the README) and for example get a heap dump when it starts being big (e.g. at 5 GB) and also screenshot the heap view. You will need to run in --jvm for that to work.

brauliobo

comment created time in 2 days

more