rbspy: Crash: thread '' has overflowed its stack

I saw this while running the latest rbspy v0.3.13.

Command:

sudo rbspy record -p $(pgrep -n -f 'puma ') --subprocesses --duration 10

Crash:

thread '<unknown>' has overflowed its stack
fatal runtime error: stack overflow
Aborted (core dumped)

gdb on the core dump gave me:

(gdb) bt
#0  0x000000000070fe1f in __restore_sigs ()
#1  0x000000000070fe60 in raise ()
#2  0x00007f821ffdc4b0 in ?? ()
#3  0x00007f82203edac8 in ?? ()
#4  0x00000000006e0242 in std::io::Write::write_fmt::h9ff815313448b677 () at library/std/src/io/mod.rs:1518
#5  0x00007f8449189af0 in ?? ()
#6  0x00007f82203edac8 in ?? ()
#7  0x000000000070ddb2 in abort ()
#8  0x0000000000a3df28 in ?? ()
#9  0x0000000000000002 in ?? ()
#10 0x0000000000000000 in ?? ()

It’s happening consistently. Could be related to something new.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (6 by maintainers)

Most upvoted comments

The fix for this will be included in 0.3.14 when it’s published. Thanks again for the detailed feedback, @igorwwwwwwwwwwwwwwwwwwww and @jarthod.

Okay, I found a way to reliably repro this crash. I should have time over the next few days to dig into it.

@acj Fix confirmed, thank you so much!

The application in question is gitlab-org/gitlab.

Here’s a profile and flamegraph that I captured with stackprof. To give an idea of the size of symbol names.

stacks.sorted.out.gz flamegraph.svg.gz

Sample of longest strings:

➜  ~ gunzip - < stacks.sorted.out.gz | awk '{ print gsub(";", "\n") } 1' | sort | uniq | awk '{ print length, $0 }' | sort -nr | head -n 20

120 #<Class:0x00007f2f76f81950>#_app_views_projects_commit__verified_signature_badge_html_haml___3701128517441069523_8077900
116 #<Class:0x00007f2f76f81950>#_app_views_projects_commit__signature_badge_user_html_haml___2100551994653635981_8077940
114 ActionDispatch::Routing::RouteSet::NamedRouteCollection::UrlHelper::OptimizedUrlHelper#optimize_routes_generation?
111 GraphQL::Schema::Member::AcceptsDefinition::AcceptsDefinitionDefinitionMethods#own_accepts_definition_methods 1
111 #<Class:0x00007f2f76f81950>#_app_views_projects_commit__signature_badge_html_haml___1444496172046339228_8077920
107 GraphQL::Schema::Member::AcceptsDefinition::AcceptsDefinitionDefinitionMethods#accepts_definition_methods 1
105 GraphQL::Schema::Member::AcceptsDefinition::AcceptsDefinitionDefinitionMethods#accepts_definition_methods
105 #<Class:0x00007f2f76f81950>#_app_views_projects_commit__signature_html_haml___3300368348616861883_8077880
100 ActionController::RequestForgeryProtection::ProtectionMethods::Exception#handle_unverified_request 1
98 Gitlab::UsageDataCounters::VSCodeExtensionActivityUniqueCounter.track_api_request_when_trackable 1
97 ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter#convert_time_to_time_zone 1
96 Gitlab::UsageDataCounters::VSCodeExtensionActivityUniqueCounter.track_api_request_when_trackable
96 ActiveRecord::ConnectionAdapters::QueryCache::ConnectionPoolConfiguration#disable_query_cache! 1
95 ActiveRecord::ConnectionAdapters::QueryCache::ConnectionPoolConfiguration#query_cache_enabled 1
95 ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter#convert_time_to_time_zone
95 #<GrapePathHelpers::DecoratedRoute:0x00007f2fdac0ec78>.api_v4_projects_repository_branches_path
94 ActiveRecord::ConnectionAdapters::QueryCache::ConnectionPoolConfiguration#disable_query_cache!
93 ActiveRecord::ConnectionAdapters::QueryCache::ConnectionPoolConfiguration#query_cache_enabled
93 ActiveRecord::ConnectionAdapters::QueryCache::ConnectionPoolConfiguration#enable_query_cache!
93 ActiveRecord::ConnectionAdapters::PostgreSQL::DatabaseStatements#exec_rollback_db_transaction

@acj it’s puma 5.1.1.