Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 01 02:40

    acj on v0.14.0

    (compare)

  • Dec 01 02:40

    acj on main

    CI: Add ruby 2.7.7, 3.0.5, and … CI: Revert to Ubuntu 20.04 for … Regenerate ruby C bindings and 2 more (compare)

  • Nov 14 00:15

    acj on main

    CI: Use leaner FreeBSD image wi… (compare)

  • Nov 11 21:56
    acj commented #369
  • Nov 11 21:53

    acj on main

    CI: Build gnu container image o… CI: Make build less noisy CI: Migrate to maintained rust … and 1 more (compare)

  • Nov 11 20:15

    acj on v0.13.1

    (compare)

  • Nov 11 20:15

    acj on main

    Upgrade spytools crate to pick … (compare)

  • Nov 11 20:12

    acj on v0.13.1

    (compare)

  • Nov 11 19:09

    acj on v0.13.1

    (compare)

  • Nov 11 19:09

    acj on main

    Upgrade dependencies Prepare v0.13.1 release (compare)

  • Nov 10 23:56

    acj on main

    pprof: Add test for stack frame… pprof: Tolerate timestamps arri… Merge pull request #371 from ac… (compare)

  • Nov 10 23:56
    acj closed #367
  • Nov 10 23:56
    acj closed #371
  • Nov 10 23:56
    acj commented #371
  • Nov 10 23:41
    saunderst commented #371
  • Nov 08 12:52
    acj opened #371
  • Nov 04 11:44

    acj on main

    CI: Upgrade to Ubuntu 22.04 CI: Upgrade actions to v3 CI: Extend timeout for FreeBSD … and 5 more (compare)

  • Nov 03 11:16
    acj closed #369
  • Nov 03 11:16
    acj commented #369
  • Nov 02 12:05
    acj closed #368
Julia Evans
@jvns
is it possible for you to email me the raw output if the information in it isn't sensitive?
Beni Cherniavsky-Paskin
@cben
sure :+1:
Julia Evans
@jvns
gzip it and send it to julia@jvns.ca?
Beni Cherniavsky-Paskin
@cben
thanks for the tips. I don't actually care for this profile, I'm just excited about opportunity to profile profiling tools ;-)
Julia Evans
@jvns
=)
there are definitely some performance improvements that can be made on rbspy, I haven't worked on performance basically at all yet
Julia Evans
@jvns
@cben thinking of by default giving the --minwidth 10command line flag to flamegraph.pl, which would have cut this particular flamegraph down by from 37MB to 700k
might be a better user experience for folks who want to just quickly look at a flamegraph?
my guess is that this particular thing is actually kind of a bad fit for a flamegraph though.
Beni Cherniavsky-Paskin
@cben
nice. --minwidth 1 is already 4MB and loads in acceptable time. --minwidth 10 loads near instanteneously.
you're right about bad fit, this is rake test, with many tests, exercising code on small data, and we've already optimized most hot spots here, so not much stands out.
Beni Cherniavsky-Paskin
@cben
for benefit of others, here's what it looks like after --minwidth 10 :
flame.png
Julia Evans
@jvns
another thing is that there are some functions (like use_cassette) that appear in almost every (or every?) stack trace, and the flamegraph format makes it hard to see that because it doesn't always appear at the same point in the stack trace
John Meagher
@jmeagher
Hi, I've been stuck getting permission errors for a while and have hit the limits of my very limited Rust knowledge in figuring out why my tests haven't been working. I put an example that I think should work in a PR and would love some help trying to figure out why it doesn't work. rbspy/rbspy#119
John Meagher
@jmeagher
That might be an issue with Docker on Mac. The test worked fine in travis-ci.
Philip Potter
@philandstuff
Hello! I'm trying to use rbspy to record a gem cli tool, but I'm having trouble passing parameters to the cli tool under test
I'm trying the following command:
rbspy record bundle exec aws-assume-role run --profile default aws s3 ls
but I get the error:
error: Found argument '--profile' which wasn't expected, or isn't valid in this context
it looks like rbspy is trying to interpret --profile as a parameter for rbspy, not one for the command under test
normally I would expect to be able to add a -- to the parameter list to tell rbspy to ignore it, but that doesn't work for me either:
oh wait, it seems to have suddenly started working
would you accept a documentation patch to document the -- behaviour?
I expected to see it mentioned here but there's nothing there
Julia Evans
@jvns
@philandstuff I added documentation of --to that page, thanks for pointing that out! If you have more ideas for docs I'll happily accept PRs to https://github.com/rbspy/rbspy-docs/blob/master/content/using-rbspy.md
Philip Potter
@philandstuff
Thanks @jvns! <3
Daniel Schierbeck
@dasch
I'm having trouble getting rbspy to work inside a Docker container.
# rbspy --version
rbspy 0.2.8

# ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0    208     4 ?        Ss   09:02   0:00 /usr/local/bin/
root         7  0.0  0.0   4336   800 pts/0    Ss+  09:02   0:00 /bin/sh -c rail
root         8  1.7  1.8 329276 114660 pts/0   Sl+  09:02   0:05 rails master --
root        16  0.0  1.7 329276 107760 pts/0   Sl+  09:02   0:00 rails worker[0]
root        19  0.0  1.7 329276 107444 pts/0   Sl+  09:02   0:00 rails worker[1]
root       120  0.3  0.0   4336   804 pts/1    Ss   09:07   0:00 /bin/sh
root       126  0.0  0.0  17500  2076 pts/1    R+   09:07   0:00 ps aux

# rbspy record --pid 16
Press Ctrl+C to stop
Wrote raw data to /root/.cache/rbspy/records/rbspy-2018-04-25-UlxxzhMGlG.raw.gz
Writing formatted output to /root/.cache/rbspy/records/rbspy-2018-04-25-FSNYLqaCyq.flamegraph.svg
ERROR: No stack counts found
Error. Causes:
- Couldn't determine Ruby version
- Couldn't create process handle for PID
- Permission denied when reading from process. Try again with sudo and check sys_ptrace capability?
Daniel Schierbeck
@dasch
Ah, I need to pass --cap-add=SYS_PTRACE to docker run
It would be nice to document that somewhere...
Julia Evans
@jvns
@dasch thanks for reporting, made a PR to improve the error message rbspy/rbspy#144
Zachary Drummond
@zdrummond
Hello @jvns. I just started to use the tool last night, and actually want to use it exactly for one of the primary use-cases "One common use case for rbspy is profiling slow unit test runs " :)
However, I am getting confusing results on my first try
I ran it on a test in rspec (macos 10.13.4), and I get one big lump of a flame graph
Mozilla_Firefox.png
I am personally completely new to perf on *nix, but in Windows this feels like I don't have symbols (the <c function> unknown line), but I am not sure why I have no Ruby details
Aaron Cheng
@gitguudd
Hey everybody! I'm trying out rbspy for the first time and I'm wondering -- is there a good way to report the data that rbspy records to a service (like datadog or something)?
My actual use case would be to monitor (in near real-time) the memory usage of one of my async job workers in production
Arun Kumar
@AskDrCatcher
Hi @jvns ,nice work with rbspy! I saw there was a nice comparison of rbspy with stackprof in the website. I was wondering whats your thoughts on dtrace specific tools to profile the apps and how rbspy differ from them ?
lmat
@dartme18_gitlab
I'm having trouble with rbspy. Well...really I'm having trouble with asset_path (rails), and I'm considering using rbspy to try to diagnose.
DaveUngerer
@DaveUngerer_twitter
Hey guys, don't want to waste anyone's time by logging an issue if I'm doing something wrong, but I'm getting "memory allocation of 46867591601568 bytes failedAborted" when trying to attach to a process. That's a lot of memory! This is on version 0.3.10. Any debugging tips?
lmat
@dartme18_gitlab
Hmm, so you have less than 47 terabytes of RAM...that might be a problem. Are you running on an embedded system?
DaveUngerer
@DaveUngerer_twitter
Just an old netbook I had lying around. I'll try it on my desktop and report back.
DaveUngerer
@DaveUngerer_twitter
Good call, works now, although memory is a bit tight, but for now I'm happy to close Slack and Chrome when using it.
Paul Woolcock
@pwoolcoc
hello! I have an application in which a supervising process kicks off subprocesses. I know that rbspy will include subprocesses, but is there a way to tell it to ignore the superprocess, or maybe filter out the superprocess's data?
Peter P
@PeteOnThings_twitter
Hi all. The docs say that apk add rbspy for Alpine Linux is a thing - but on my Alpine, it doesn't find it. Is there a repo that needs to be added?
Jochen Seeber
@jochenseeber

Hi, is there a way to run rbspy from outside a running container, using e.g. nsenter? All my attempts only have yielded the following:

nsenter -t $PID -p /usr/local/bin/rbspy snapshot --pid 1
Something went wrong while rbspy was sampling the process. Here's what we know:

  • get ruby VM state
  • Couldn't get ruby version: get Ruby version

Caused by:
0: get_ruby_version_address
1: Ruby map not found for PID: 1

or

nsenter -t 2749366 -a /usr/local/bin/rbspy snapshot --pid 1
(unknown) [c function] - (unknown):0

jacoblyw
@jacoblyw

Hello, I’m trying to use rbspy with Docker. Do I understand correctly that I can run a docker container with rbspy (like rbspy/rbspy:0.12.1-gnu) and then ask it to profile a process in another container?

Does anyone have a basic docker-compose.yml for this type of use?

I see the —cap-add=SYS_PTRACE (which I understand needs to be set on the “patient” for the “doctor” [rbspy] to check its vitals), what else needs to be done?

1 reply