Skip to content

Strange Errno::ENOENT of ARGV value #156

Closed

Description

@adam12

I'm not sure how to even start debugging this one. I thought it was related to console being an overused term and perhaps the filename conflicting, but I'm not sure that's the reason (hence you see console2 as I try to identify if it's the cause).

It could be application specific and I haven't been able to reproduce it outside of my app.

app@96b8c3cf79c2:/workspace$ ruby app.rb console2
DEBUGGER: Session start (pid: 57884)
[2021-07-09] [14:03:56.994] › ℹ info    Subscribing Listeners::PaymentIntent
[2021-07-09] [14:03:57.534] › ℹ info    Subscribing Listeners::Email
[1, 8] in lib/cli/console.rb
      1| name "console2"
      2| summary "runs console in application context"
      3| 
      4| run do |opts, args|
      5|   Container[:db].logger = Logger.new($stdout)
=>    6|   binding.bp
      7|   # Pry.start
      8| end
=>#0    block {|opts={}, args=#<Cri::ArgumentList:0x0000aaaafb9294c8 @...|} in define at lib/cli/console.rb:6
  #1    Cri::Command#run_this(opts_and_args=[], parent_opts={}) at /usr/local/bundle/gems/cri-2.15.11/lib/cri/command.rb:362
  # and 4 frames (use `bt' command for all frames)

(rdbg) q
Really quit? [Y/n] [REPL ERROR] #<Errno::ENOENT: No such file or directory @ rb_sysopen - console2>
  /usr/local/bundle/gems/debug-1.0.0.beta6/lib/debug/console.rb:39:in `gets'
  /usr/local/bundle/gems/debug-1.0.0.beta6/lib/debug/console.rb:39:in `gets'
  /usr/local/bundle/gems/debug-1.0.0.beta6/lib/debug/console.rb:39:in `block in ask'
  /usr/local/bundle/gems/debug-1.0.0.beta6/lib/debug/console.rb:103:in `setup_interrupt'
  /usr/local/bundle/gems/debug-1.0.0.beta6/lib/debug/console.rb:37:in `ask'
  /usr/local/bundle/gems/debug-1.0.0.beta6/lib/debug/session.rb:663:in `ask'
  /usr/local/bundle/gems/debug-1.0.0.beta6/lib/debug/session.rb:301:in `process_command'
  /usr/local/bundle/gems/debug-1.0.0.beta6/lib/debug/session.rb:247:in `wait_command'
  /usr/local/bundle/gems/debug-1.0.0.beta6/lib/debug/session.rb:211:in `block (2 levels) in wait_command_loop'
  /usr/local/bundle/gems/debug-1.0.0.beta6/lib/debug/session.rb:210:in `loop'
  /usr/local/bundle/gems/debug-1.0.0.beta6/lib/debug/session.rb:210:in `block in wait_command_loop'
  /usr/local/bundle/gems/debug-1.0.0.beta6/lib/debug/session.rb:892:in `block in stop_all_threads'
  <internal:trace_point>:196:in `enable'
  /usr/local/bundle/gems/debug-1.0.0.beta6/lib/debug/session.rb:891:in `stop_all_threads'
  /usr/local/bundle/gems/debug-1.0.0.beta6/lib/debug/session.rb:209:in `wait_command_loop'
  /usr/local/bundle/gems/debug-1.0.0.beta6/lib/debug/session.rb:141:in `session_server_main'
  /usr/local/bundle/gems/debug-1.0.0.beta6/lib/debug/session.rb:88:in `block in initialize'

(rdbg) q
Really quit? [Y/n] app@96b8c3cf79c2:/workspace$ 

It's not obvious, so here's my text input (I'm never at the Y/n prompt to provide input):

q
q

Attached are script output and timing, if it helps. Use scriptreplay --timing timing.txt script.txt to replay.

timing.txt
script.txt

debug (1.0.0.beta6)
ruby 2.7.3p183 (2021-04-05 revision 6847ee089d) [aarch64-linux]

Activity

  1. adam12 commented on Jul 9, 2021

    @adam12
    ContributorAuthor

    Actually, looking at it again, I wonder if it thinks that my ARGV is arguments to rdbg for remote socket. Here's a simpler command to reproduce.

    app@96b8c3cf79c2:/workspace$ ruby -r bundler/setup -r debug -e binding.bp notfound
    DEBUGGER: Session start (pid: 59996)
    [1, 1] in -e
    =>    1| binding.bp
    =>#0    <main> at -e:1
    
    (rdbg) q
    Really quit? [Y/n] [REPL ERROR] #<Errno::ENOENT: No such file or directory @ rb_sysopen - notfound>
      /usr/local/bundle/bundler/gems/debug-2aacf6ce055f/lib/debug/console.rb:43:in `gets'
      /usr/local/bundle/bundler/gems/debug-2aacf6ce055f/lib/debug/console.rb:43:in `gets'
      /usr/local/bundle/bundler/gems/debug-2aacf6ce055f/lib/debug/console.rb:43:in `block in ask'
      /usr/local/bundle/bundler/gems/debug-2aacf6ce055f/lib/debug/console.rb:107:in `setup_interrupt'
      /usr/local/bundle/bundler/gems/debug-2aacf6ce055f/lib/debug/console.rb:41:in `ask'
      /usr/local/bundle/bundler/gems/debug-2aacf6ce055f/lib/debug/session.rb:736:in `ask'
      /usr/local/bundle/bundler/gems/debug-2aacf6ce055f/lib/debug/session.rb:308:in `process_command'
      /usr/local/bundle/bundler/gems/debug-2aacf6ce055f/lib/debug/session.rb:254:in `wait_command'
      /usr/local/bundle/bundler/gems/debug-2aacf6ce055f/lib/debug/session.rb:218:in `block (2 levels) in wait_command_loop'
      /usr/local/bundle/bundler/gems/debug-2aacf6ce055f/lib/debug/session.rb:217:in `loop'
      /usr/local/bundle/bundler/gems/debug-2aacf6ce055f/lib/debug/session.rb:217:in `block in wait_command_loop'
      /usr/local/bundle/bundler/gems/debug-2aacf6ce055f/lib/debug/session.rb:965:in `block in stop_all_threads'
      <internal:trace_point>:196:in `enable'
      /usr/local/bundle/bundler/gems/debug-2aacf6ce055f/lib/debug/session.rb:964:in `stop_all_threads'
      /usr/local/bundle/bundler/gems/debug-2aacf6ce055f/lib/debug/session.rb:216:in `wait_command_loop'
      /usr/local/bundle/bundler/gems/debug-2aacf6ce055f/lib/debug/session.rb:145:in `session_server_main'
      /usr/local/bundle/bundler/gems/debug-2aacf6ce055f/lib/debug/session.rb:88:in `block in initialize'
    
    (rdbg) q
    

    This is using latest master.

  2. changed the title [-]Strange `Error::ENOENT` of ARGV value[/-] [+]Strange `Errno::ENOENT` of ARGV value[/+] on Jul 9, 2021
  3. ko1 commented on Jul 10, 2021

    @ko1
    Collaborator

    Thank you I can reproduce:

    [master]$ exe/rdbg -- -e binding.bp xyzzy
    DEBUGGER: Session start (pid: 10132)
    [1, 1] in -e
    =>    1| binding.bp
    =>#0    <main> at -e:1
    
    (rdbg) q
    Really quit? [Y/n] [REPL ERROR] #<Errno::ENOENT: No such file or directory @ rb_sysopen - xyzzy>
      /mnt/c/ko1/src/rb/ruby-debug/lib/debug/console.rb:43:in `gets'
      /mnt/c/ko1/src/rb/ruby-debug/lib/debug/console.rb:43:in `gets'
      /mnt/c/ko1/src/rb/ruby-debug/lib/debug/console.rb:43:in `block in ask'
      /mnt/c/ko1/src/rb/ruby-debug/lib/debug/console.rb:107:in `setup_interrupt'
      /mnt/c/ko1/src/rb/ruby-debug/lib/debug/console.rb:41:in `ask'
      /mnt/c/ko1/src/rb/ruby-debug/lib/debug/session.rb:736:in `ask'
      /mnt/c/ko1/src/rb/ruby-debug/lib/debug/session.rb:308:in `process_command'
      /mnt/c/ko1/src/rb/ruby-debug/lib/debug/session.rb:254:in `wait_command'
      /mnt/c/ko1/src/rb/ruby-debug/lib/debug/session.rb:218:in `block (2 levels) in wait_command_loop'
      /mnt/c/ko1/src/rb/ruby-debug/lib/debug/session.rb:217:in `loop'
      /mnt/c/ko1/src/rb/ruby-debug/lib/debug/session.rb:217:in `block in wait_command_loop'
      /mnt/c/ko1/src/rb/ruby-debug/lib/debug/session.rb:965:in `block in stop_all_threads'
      <internal:trace_point>:196:in `enable'
      /mnt/c/ko1/src/rb/ruby-debug/lib/debug/session.rb:964:in `stop_all_threads'
      /mnt/c/ko1/src/rb/ruby-debug/lib/debug/session.rb:216:in `wait_command_loop'
      /mnt/c/ko1/src/rb/ruby-debug/lib/debug/session.rb:145:in `session_server_main'
      /mnt/c/ko1/src/rb/ruby-debug/lib/debug/session.rb:88:in `block in initialize'
    
    (rdbg)
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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