Skip to content

"[BUG] Bus Error" on OS X #2

Closed
jayzes opened this Issue Jun 16, 2009 · 4 comments

4 participants

@jayzes
jayzes commented Jun 16, 2009

Running OS X 10.5.6, ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0], I keep getting bus errors when I try to profile my Rails app. Whenever the PerfTools::CpuProfiler.stop call runs, either by executing script/server with "CPUPROFILE=my_app_profile RUBYOPT="-rgem which perftools | tail -1" script/server" or using some custom hooks to start/stop profiling from a controller, I get a short and cryptic error message from mongrel as it crashes:

[BUG] Bus Error
ruby 1.8.6 (2008-03-03) [universal-darwin9.0]

<18 connection closed.
Abort trap

I'm a little stumped as to what else to look for - didn't see anything else in the README or Ilya's blog post, and while the GoRuCo talk mentions patching the Ruby interpreter I didn't see any instructions for that in the README. Any ideas as to what could be going on?

@acatighera

I'm getting the same thing as well on OS X using ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0] .

@jayzes
jayzes commented Jun 17, 2009

One other update on this - I've noticed that it only happens when I try to profile multiple requests. If I set up the start/stop calls in an around filter and only profile a single request, it works fine. If I try multiple requests, I get the bus error.

@jodosha
jodosha commented Jun 21, 2009

Ran into the same issue, my ruby version is:
ruby 1.8.6 (2009-06-08 patchlevel 369) [i686-darwin9.7.0]

With the pl 287 this won't happen. I just tried to run the add_numbers_profile example.

@tmm1
Owner
tmm1 commented Oct 13, 2009

These segfaults should be fixed. Please open a new ticket if you run into more issues.

@tmm1 tmm1 added a commit that referenced this issue Aug 21, 2012
@tmm1 prevent explosions when stopping while paused
Breakpoint 1, CpuProfiler::DisableHandler (this=0x7fa1ce890ce0) at src/profiler.cc:271
271   RAW_CHECK(prof_handler_token_ != NULL, "SIGPROF handler is not registered");
Current language:  auto; currently c++

Program received signal SIGABRT, Aborted.
0x00007fa1d7df9ed5 in raise () from /lib/libc.so.6
(gdb) where
 #0  0x00007fa1d7df9ed5 in raise () from /lib/libc.so.6
 #1  0x00007fa1d7dfb3f3 in abort () from /lib/libc.so.6
 #2  0x00007fa1ce685634 in CpuProfiler::DisableHandler (this=0x7fa1ce890ce0) at src/profiler.cc:271
 #3  0x00007fa1ce6859b0 in CpuProfiler::Stop (this=0x7fa1ce890ce0) at src/profiler.cc:209
 #4  0x00007fa1ce685a2a in ~CpuProfiler (this=0x7fa1ce890ce0) at src/profiler.cc:196
 #5  0x00007fa1d7dfc9cd in exit () from /lib/libc.so.6
 #6  0x0000000000425310 in ruby_stop (ex=<value optimized out>) at eval.c:1689
 #7  0x000000000042dcd1 in ruby_run () at eval.c:1710
 #8  0x0000000000412063 in main (argc=9, argv=0x7fff08f9b6e8, envp=<value optimized out>) at main.c:48
f39c7c9
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.