Skip to content

IO#write deadlock with fiber profiler #395

@ioquatix

Description

@ioquatix
{"start_time":0.000,"duration":0.013025,"calls":[],"switches":2,"samples":1,"stalls":1}
 3.55s     warn: Async::Task [oid=0x19b8] [ec=0x19c0] [pid=2662] [2025-07-11 09:43:13 +0000]
               | Task may have ended with unhandled exception.
               |   NoMethodError: undefined method 'first' for nil (NoMethodError)
               |   → test/async/task.rb:291 in 'block (5 levels) in <top (required)>'
               |     lib/async/task.rb:201 in 'block in Async::Task#run'
               |     lib/traces/provider/async/task.rb:36 in 'block (2 levels) in schedule'
               |     vendor/bundle/ruby/3.4.0/gems/traces-0.15.2/lib/traces/backend/test.rb:73 in 'Traces::Backend::Test::Interface#trace'
               |     lib/traces/provider/async/task.rb:34 in 'block in schedule'
               |     lib/async/task.rb:439 in 'block in Async::Task#schedule'
bundler: failed to load command: sus (/home/runner/work/async/async/vendor/bundle/ruby/3.4.0/bin/sus)
/home/runner/work/async/async/lib/async/scheduler.rb:369:in 'IO::Event::Selector::URing#io_write': Async::Stop (Async::Stop)
	from /home/runner/work/async/async/lib/async/scheduler.rb:369:in 'Async::Scheduler#io_write'
	from /home/runner/work/async/async/vendor/bundle/ruby/3.4.0/bin/sus:in 'IO#write'
/home/runner/work/async/async/lib/async/scheduler.rb:450:in 'IO#write': deadlock; lock already owned by another fiber belonging to the same thread (ThreadError)
	from /home/runner/work/async/async/lib/async/scheduler.rb:450:in 'IO::Event::Selector::URing#select'
	from /home/runner/work/async/async/lib/async/scheduler.rb:450:in 'Async::Scheduler#run_once!'
	from /home/runner/work/async/async/lib/async/scheduler.rb:489:in 'Async::Scheduler#run_once'
	from /home/runner/work/async/async/lib/async/scheduler.rb:565:in 'block in Async::Scheduler#run'
	from /home/runner/work/async/async/lib/async/scheduler.rb:525:in 'block in Async::Scheduler#run_loop'
	from /home/runner/work/async/async/lib/async/scheduler.rb:522:in 'Thread.handle_interrupt'
	from /home/runner/work/async/async/lib/async/scheduler.rb:522:in 'Async::Scheduler#run_loop'
	from /home/runner/work/async/async/lib/async/scheduler.rb:564:in 'Async::Scheduler#run'
	from test/async/task.rb:278:in 'block (4 levels) in <top (required)>'

https://github.com/socketry/async/actions/runs/16216965704/job/45788492694

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions