Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby: mirrord panics when ran with a ruby webserver #858

Closed
infiniteregrets opened this issue Dec 22, 2022 · 1 comment
Closed

Ruby: mirrord panics when ran with a ruby webserver #858

infiniteregrets opened this issue Dec 22, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@infiniteregrets
Copy link
Contributor

Bug Description

mirrord panics when run with ruby ( a simple web server)

Steps to Reproduce

mirrord exec -t pod/py-serv-deployment -c -- ruby test.rb

require 'socket'

server = TCPServer.new 8080

while session = server.accept
  request = session.gets

  puts request

  response = "HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\n\r\nHello, world!"
  session.print response

  session.close
end

Backtrace

⠹ mirrord cli starting
  ✓ ready to launch process
    ✓ layer extracted
    ✓ agent pod created
    ✓ pod is ready
2022-12-22T15:58:04.767050Z ERROR ThreadId(02) mirrord_kube::api: agent disconnected
2022-12-22T15:58:04.767168Z ERROR ThreadId(02) mirrord_layer: agent connection lost
mirrord has encountered an error and is now exiting.
thread 'tokio-runtime-worker' panicked at 'explicit panic', mirrord/layer/src/lib.rs:455:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2022-12-22T15:58:04.767585Z ERROR ThreadId(04) mirrord_layer::error: Error occured in Layer >> RecvError(RecvError(()))
Terminated

Relevant Logs

2022-12-22T16:05:38.459960Z TRACE ThreadId(03) handle_daemon_message{daemon_message=File(Open(Err(RemoteIO(RemoteIOError { raw_os_error: Some(2), kind: NotFound }))))}:pop_send{value=Err(RemoteIO(RemoteIOError { raw_os_error: Some(2), kind: NotFound }))}: mirrord_layer::file: enter
2022-12-22T16:05:38.459998Z TRACE ThreadId(03) handle_daemon_message{daemon_message=File(Open(Err(RemoteIO(RemoteIOError { raw_os_error: Some(2), kind: NotFound }))))}:pop_send{value=Err(RemoteIO(RemoteIOError { raw_os_error: Some(2), kind: NotFound }))}: mirrord_layer::file: exit
2022-12-22T16:05:38.460026Z TRACE ThreadId(03) handle_daemon_message{daemon_message=File(Open(Err(RemoteIO(RemoteIOError { raw_os_error: Some(2), kind: NotFound }))))}: mirrord_layer: exit
2022-12-22T16:05:38.460078Z TRACE ThreadId(02) fopen{rawish_path=Some("/var/lib/dpkg/triggers/File") rawish_mode=Some("r")}:open{rawish_path=Some("/var/lib/dpkg/triggers/File") open_options=OpenOptionsInternal { read: true, write: false, append: false, truncate: false, create: false, create_new: false }}: mirrord_layer::file::ops: exit
2022-12-22T16:05:38.460114Z TRACE ThreadId(02) fopen{rawish_path=Some("/var/lib/dpkg/triggers/File") rawish_mode=Some("r")}: mirrord_layer::file::ops: exit
2022-12-22T16:05:38.460133Z  INFO ThreadId(02) mirrord_layer::error: libc error (doesn't indicate a problem) >> ResponseError(
    RemoteIO(
        RemoteIOError {
            raw_os_error: Some(
                2,
            ),
            kind: NotFound,
        },
    ),
)
2022-12-22T16:05:38.460176Z TRACE ThreadId(02) fopen{rawish_path=Some("/var/lib/dpkg/triggers/Unincorp") rawish_mode=Some("r")}: mirrord_layer::file::ops: enter
2022-12-22T16:05:38.460222Z TRACE ThreadId(02) fopen{rawish_path=Some("/var/lib/dpkg/triggers/Unincorp") rawish_mode=Some("r")}:open{rawish_path=Some("/var/lib/dpkg/triggers/Unincorp") open_options=OpenOptionsInternal { read: true, write: false, append: false, truncate: false, create: false, create_new: false }}: mirrord_layer::file::ops: enter
2022-12-22T16:05:38.460973Z TRACE ThreadId(03) handle_hook_message{hook_message=File(Open(Open { path: "/var/lib/dpkg/triggers/Unincorp", file_channel_tx: Sender { inner: Some(Inner { state: State { is_complete: false, is_closed: false, is_rx_task_set: true, is_tx_task_set: false } }) }, open_options: OpenOptionsInternal { read: true, write: false, append: false, truncate: false, create: false, create_new: false } }))}: mirrord_layer: enter
2022-12-22T16:05:38.461019Z TRACE ThreadId(03) handle_hook_message{hook_message=File(Open(Open { path: "/var/lib/dpkg/triggers/Unincorp", file_channel_tx: Sender { inner: Some(Inner { state: State { is_complete: false, is_closed: false, is_rx_task_set: true, is_tx_task_set: false } }) }, open_options: OpenOptionsInternal { read: true, write: false, append: false, truncate: false, create: false, create_new: false } }))}:handle_hook_message{Open(Open { path: "/var/lib/dpkg/triggers/Unincorp", file_channel_tx: Sender { inner: Some(Inner { state: State { is_complete: false, is_closed: false, is_rx_task_set: true, is_tx_task_set: false } }) }, open_options: OpenOptionsInternal { read: true, write: false, append: false, truncate: false, create: false, create_new: false } })}: mirrord_layer::file: enter
2022-12-22T16:05:38.461068Z TRACE ThreadId(03) handle_hook_message{hook_message=File(Open(Open { path: "/var/lib/dpkg/triggers/Unincorp", file_channel_tx: Sender { inner: Some(Inner { state: State { is_complete: false, is_closed: false, is_rx_task_set: true, is_tx_task_set: false } }) }, open_options: OpenOptionsInternal { read: true, write: false, append: false, truncate: false, create: false, create_new: false } }))}:handle_hook_message{Open(Open { path: "/var/lib/dpkg/triggers/Unincorp", file_channel_tx: Sender { inner: Some(Inner { state: State { is_complete: false, is_closed: false, is_rx_task_set: true, is_tx_task_set: false } }) }, open_options: OpenOptionsInternal { read: true, write: false, append: false, truncate: false, create: false, create_new: false } })}:handle_hook_open{open=Open { path: "/var/lib/dpkg/triggers/Unincorp", file_channel_tx: Sender { inner: Some(Inner { state: State { is_complete: false, is_closed: false, is_rx_task_set: true, is_tx_task_set: false } }) }, open_options: OpenOptionsInternal { read: true, write: false, append: false, truncate: false, create: false, create_new: false } }}: mirrord_layer::file: enter
2022-12-22T16:05:38.461095Z DEBUG ThreadId(03) handle_hook_message{hook_message=File(Open(Open { path: "/var/lib/dpkg/triggers/Unincorp", file_channel_tx: Sender { inner: Some(Inner { state: State { is_complete: false, is_closed: false, is_rx_task_set: true, is_tx_task_set: false } }) }, open_options: OpenOptionsInternal { read: true, write: false, append: false, truncate: false, create: false, create_new: false } }))}:handle_hook_message{Open(Open { path: "/var/lib/dpkg/triggers/Unincorp", file_channel_tx: Sender { inner: Some(Inner { state: State { is_complete: false, is_closed: false, is_rx_task_set: true, is_tx_task_set: false } }) }, open_options: OpenOptionsInternal { read: true, write: false, append: false, truncate: false, create: false, create_new: false } })}:handle_hook_open{open=Open { path: "/var/lib/dpkg/triggers/Unincorp", file_channel_tx: Sender { inner: Some(Inner { state: State { is_complete: false, is_closed: false, is_rx_task_set: true, is_tx_task_set: false } }) }, open_options: OpenOptionsInternal { read: true, write: false, append: false, truncate: false, create: false, create_new: false } }}: mirrord_layer::file: HookMessage::OpenFileHook path "/var/lib/dpkg/triggers/Unincorp" | options OpenOptionsInternal {
    read: true,
    write: false,
    append: false,
    truncate: false,
    create: false,
    create_new: false,
}
2022-12-22T16:05:38.461139Z TRACE ThreadId(03) handle_hook_message{hook_message=File(Open(Open { path: "/var/lib/dpkg/triggers/Unincorp", file_channel_tx: Sender { inner: Some(Inner { state: State { is_complete: false, is_closed: false, is_rx_task_set: true, is_tx_task_set: false } }) }, open_options: OpenOptionsInternal { read: true, write: false, append: false, truncate: false, create: false, create_new: false } }))}:handle_hook_message{Open(Open { path: "/var/lib/dpkg/triggers/Unincorp", file_channel_tx: Sender { inner: Some(Inner { state: State { is_complete: false, is_closed: false, is_rx_task_set: true, is_tx_task_set: false } }) }, open_options: OpenOptionsInternal { read: true, write: false, append: false, truncate: false, create: false, create_new: false } })}:handle_hook_open{open=Open { path: "/var/lib/dpkg/triggers/Unincorp", file_channel_tx: Sender { inner: Some(Inner { state: State { is_complete: false, is_closed: false, is_rx_task_set: true, is_tx_task_set: false } }) }, open_options: OpenOptionsInternal { read: true, write: false, append: false, truncate: false, create: false, create_new: false } }}: mirrord_layer::file: exit
2022-12-22T16:05:38.461176Z TRACE ThreadId(03) handle_hook_message{hook_message=File(Open(Open { path: "/var/lib/dpkg/triggers/Unincorp", file_channel_tx: Sender { inner: Some(Inner { state: State { is_complete: false, is_closed: false, is_rx_task_set: true, is_tx_task_set: false } }) }, open_options: OpenOptionsInternal { read: true, write: false, append: false, truncate: false, create: false, create_new: false } }))}:handle_hook_message{Open(Open { path: "/var/lib/dpkg/triggers/Unincorp", file_channel_tx: Sender { inner: Some(Inner { state: State { is_complete: false, is_closed: false, is_rx_task_set: true, is_tx_task_set: false } }) }, open_options: OpenOptionsInternal { read: true, write: false, append: false, truncate: false, create: false, create_new: false } })}: mirrord_layer::file: exit
2022-12-22T16:05:38.461202Z TRACE ThreadId(03) handle_hook_message{hook_message=File(Open(Open { path: "/var/lib/dpkg/triggers/Unincorp", file_channel_tx: Sender { inner: Some(Inner { state: State { is_complete: false, is_closed: false, is_rx_task_set: true, is_tx_task_set: false } }) }, open_options: OpenOptionsInternal { read: true, write: false, append: false, truncate: false, create: false, create_new: false } }))}: mirrord_layer: exit
2022-12-22T16:05:38.465804Z TRACE ThreadId(04) handle_daemon_message{daemon_message=File(Open(Ok(OpenFileResponse { fd: 0 })))}: mirrord_layer: enter
2022-12-22T16:05:38.465848Z DEBUG ThreadId(04) handle_daemon_message{daemon_message=File(Open(Ok(OpenFileResponse { fd: 0 })))}: mirrord_layer::file: DaemonMessage::OpenFileResponse Ok(
    OpenFileResponse {
        fd: 0,
    },
)!
2022-12-22T16:05:38.465893Z TRACE ThreadId(04) handle_daemon_message{daemon_message=File(Open(Ok(OpenFileResponse { fd: 0 })))}:pop_send{value=Ok(OpenFileResponse { fd: 0 })}: mirrord_layer::file: enter
2022-12-22T16:05:38.465942Z TRACE ThreadId(04) handle_daemon_message{daemon_message=File(Open(Ok(OpenFileResponse { fd: 0 })))}:pop_send{value=Ok(OpenFileResponse { fd: 0 })}: mirrord_layer::file: exit
2022-12-22T16:05:38.465977Z TRACE ThreadId(04) handle_daemon_message{daemon_message=File(Open(Ok(OpenFileResponse { fd: 0 })))}: mirrord_layer: exit
2022-12-22T16:05:38.466065Z TRACE ThreadId(02) fopen{rawish_path=Some("/var/lib/dpkg/triggers/Unincorp") rawish_mode=Some("r")}:open{rawish_path=Some("/var/lib/dpkg/triggers/Unincorp") open_options=OpenOptionsInternal { read: true, write: false, append: false, truncate: false, create: false, create_new: false }}:create_local_fake_file{fake_local_file_name="0" remote_fd=0}: mirrord_layer::file::ops: enter
2022-12-22T16:05:38.466134Z TRACE ThreadId(02) fopen{rawish_path=Some("/var/lib/dpkg/triggers/Unincorp") rawish_mode=Some("r")}:open{rawish_path=Some("/var/lib/dpkg/triggers/Unincorp") open_options=OpenOptionsInternal { read: true, write: false, append: false, truncate: false, create: false, create_new: false }}:create_local_fake_file{fake_local_file_name="0" remote_fd=0}: mirrord_layer::file::ops: exit
2022-12-22T16:05:38.466190Z TRACE ThreadId(02) fopen{rawish_path=Some("/var/lib/dpkg/triggers/Unincorp") rawish_mode=Some("r")}:open{rawish_path=Some("/var/lib/dpkg/triggers/Unincorp") open_options=OpenOptionsInternal { read: true, write: false, append: false, truncate: false, create: false, create_new: false }}: mirrord_layer::file::ops: exit
2022-12-22T16:05:38.466227Z TRACE ThreadId(02) fopen{rawish_path=Some("/var/lib/dpkg/triggers/Unincorp") rawish_mode=Some("r")}: mirrord_layer::file::ops: exit
2022-12-22T16:05:38.466283Z TRACE ThreadId(02) fcntl{orig_fd=11 cmd=1 fcntl_fd=1}: mirrord_layer::socket::ops: enter
2022-12-22T16:05:38.466316Z TRACE ThreadId(02) fcntl{orig_fd=11 cmd=1 fcntl_fd=1}: mirrord_layer::socket::ops: exit
2022-12-22T16:05:38.466345Z TRACE ThreadId(02) mirrord_layer::socket::hooks: fcntl_detour -> result 1
2022-12-22T16:05:38.466385Z TRACE ThreadId(02) fcntl{orig_fd=11 cmd=2 fcntl_fd=0}: mirrord_layer::socket::ops: enter
2022-12-22T16:05:38.466411Z TRACE ThreadId(02) fcntl{orig_fd=11 cmd=2 fcntl_fd=0}: mirrord_layer::socket::ops: exit
2022-12-22T16:05:38.466467Z TRACE ThreadId(02) mirrord_layer::socket::hooks: fcntl_detour -> result 0
2022-12-22T16:05:38.466748Z TRACE ThreadId(02) read{local_fd=13 read_amount=32768}: mirrord_layer::file::ops: enter
2022-12-22T16:05:38.466808Z TRACE ThreadId(02) read{local_fd=13 read_amount=32768}: mirrord_layer::file::ops: exit
2022-12-22T16:05:38.468365Z TRACE ThreadId(02) read{local_fd=13 read_amount=32768}: mirrord_layer::file::ops: enter
2022-12-22T16:05:38.468398Z TRACE ThreadId(02) read{local_fd=13 read_amount=32768}: mirrord_layer::file::ops: exit
2022-12-22T16:05:38.468540Z TRACE ThreadId(02) read{local_fd=11 read_amount=32768}: mirrord_layer::file::ops: enter
2022-12-22T16:05:38.468569Z TRACE ThreadId(02) read{local_fd=11 read_amount=32768}: mirrord_layer::file::ops: exit
2022-12-22T16:05:38.486901Z  INFO ThreadId(02) mirrord_layer: Initializing mirrord-layer!
2022-12-22T16:05:38.544586Z  INFO ThreadId(02) mirrord_layer::connection: Reusing existing agent "mirrord-agent-o4oglkjw5s-dv9rm", port 40079    
2022-12-22T16:05:38.544639Z TRACE ThreadId(02) mirrord_kube::api::kubernetes: port-forward to pod mirrord-agent-o4oglkjw5s-dv9rm:40079
2022-12-22T16:05:38.624174Z TRACE ThreadId(02) new{fs_config=FsConfig { mode: Read, include: None, exclude: None, read_write: None, read_only: None, local: None }}: mirrord_layer::file::filter: enter
2022-12-22T16:05:38.628077Z TRACE ThreadId(02) new{fs_config=FsConfig { mode: Read, include: None, exclude: None, read_write: None, read_only: None, local: None }}: mirrord_layer::file::filter: exit
2022-12-22T16:05:38.628133Z TRACE ThreadId(02) enable_hooks{enabled_file_ops=true enabled_remote_dns=true}: mirrord_layer: enter
2022-12-22T16:05:38.628702Z TRACE ThreadId(02) enable_hooks{enabled_file_ops=true enabled_remote_dns=true}: mirrord_layer: hooked "close"
2022-12-22T16:05:38.628764Z TRACE ThreadId(02) enable_hooks{enabled_file_ops=true enabled_remote_dns=true}: mirrord_layer::socket::hooks: hooked "socket"
2022-12-22T16:05:38.628816Z TRACE ThreadId(02) enable_hooks{enabled_file_ops=true enabled_remote_dns=true}: mirrord_layer::socket::hooks: hooked "bind"
2022-12-22T16:05:38.628862Z TRACE ThreadId(02) enable_hooks{enabled_file_ops=true enabled_remote_dns=true}: mirrord_layer::socket::hooks: hooked "listen"
2022-12-22T16:05:38.628902Z TRACE ThreadId(02) enable_hooks{enabled_file_ops=true enabled_remote_dns=true}: mirrord_layer::socket::hooks: hooked "connect"
2022-12-22T16:05:38.628950Z TRACE ThreadId(02) enable_hooks{enabled_file_ops=true enabled_remote_dns=true}: mirrord_layer::socket::hooks: hooked "fcntl"
2022-12-22T16:05:38.628996Z TRACE ThreadId(02) enable_hooks{enabled_file_ops=true enabled_remote_dns=true}: mirrord_layer::socket::hooks: hooked "dup"
2022-12-22T16:05:38.629068Z TRACE ThreadId(02) enable_hooks{enabled_file_ops=true enabled_remote_dns=true}: mirrord_layer::socket::hooks: hooked "dup2"
2022-12-22T16:05:38.629116Z TRACE ThreadId(02) enable_hooks{enabled_file_ops=true enabled_remote_dns=true}: mirrord_layer::socket::hooks: hooked "getpeername"
2022-12-22T16:05:38.629162Z TRACE ThreadId(02) enable_hooks{enabled_file_ops=true enabled_remote_dns=true}: mirrord_layer::socket::hooks: hooked "getsockname"
2022-12-22T16:05:38.629203Z TRACE ThreadId(02) enable_hooks{enabled_file_ops=true enabled_remote_dns=true}: mirrord_layer::socket::hooks: hooked "accept4"
2022-12-22T16:05:38.629252Z TRACE ThreadId(02) enable_hooks{enabled_file_ops=true enabled_remote_dns=true}: mirrord_layer::socket::hooks: hooked "dup3"
2022-12-22T16:05:38.629296Z TRACE ThreadId(02) enable_hooks{enabled_file_ops=true enabled_remote_dns=true}: mirrord_layer::socket::hooks: hooked "accept"
2022-12-22T16:05:38.629331Z TRACE ThreadId(02) enable_hooks{enabled_file_ops=true enabled_remote_dns=true}: mirrord_layer::socket::hooks: hooked "getaddrinfo"
2022-12-22T16:05:38.629377Z TRACE ThreadId(02) enable_hooks{enabled_file_ops=true enabled_remote_dns=true}: mirrord_layer::socket::hooks: hooked "freeaddrinfo"
2022-12-22T16:05:38.629424Z TRACE ThreadId(02) enable_hooks{enabled_file_ops=true enabled_remote_dns=true}: mirrord_layer::file::hooks: hooked "open"
2022-12-22T16:05:38.629467Z TRACE ThreadId(02) enable_hooks{enabled_file_ops=true enabled_remote_dns=true}: mirrord_layer::file::hooks: hooked "openat"
2022-12-22T16:05:38.629510Z TRACE ThreadId(02) enable_hooks{enabled_file_ops=true enabled_remote_dns=true}: mirrord_layer::file::hooks: hooked "fopen"
2022-12-22T16:05:38.629545Z TRACE ThreadId(02) enable_hooks{enabled_file_ops=true enabled_remote_dns=true}: mirrord_layer::file::hooks: hooked "fdopen"
2022-12-22T16:05:38.629583Z TRACE ThreadId(02) enable_hooks{enabled_file_ops=true enabled_remote_dns=true}: mirrord_layer::file::hooks: hooked "read"
2022-12-22T16:05:38.629625Z TRACE ThreadId(02) enable_hooks{enabled_file_ops=true enabled_remote_dns=true}: mirrord_layer::file::hooks: hooked "fread"
2022-12-22T16:05:38.629657Z TRACE ThreadId(02) enable_hooks{enabled_file_ops=true enabled_remote_dns=true}: mirrord_layer::file::hooks: hooked "fgets"
2022-12-22T16:05:38.629696Z TRACE ThreadId(02) enable_hooks{enabled_file_ops=true enabled_remote_dns=true}: mirrord_layer::file::hooks: hooked "pread"
2022-12-22T16:05:38.629733Z TRACE ThreadId(02) enable_hooks{enabled_file_ops=true enabled_remote_dns=true}: mirrord_layer::file::hooks: hooked "ferror"
2022-12-22T16:05:38.629773Z TRACE ThreadId(02) enable_hooks{enabled_file_ops=true enabled_remote_dns=true}: mirrord_layer::file::hooks: hooked "fclose"
2022-12-22T16:05:38.629811Z TRACE ThreadId(02) enable_hooks{enabled_file_ops=true enabled_remote_dns=true}: mirrord_layer::file::hooks: hooked "fileno"
2022-12-22T16:05:38.629859Z TRACE ThreadId(02) enable_hooks{enabled_file_ops=true enabled_remote_dns=true}: mirrord_layer::file::hooks: hooked "lseek"
2022-12-22T16:05:38.629905Z TRACE ThreadId(02) enable_hooks{enabled_file_ops=true enabled_remote_dns=true}: mirrord_layer::file::hooks: hooked "write"
2022-12-22T16:05:38.629948Z TRACE ThreadId(02) enable_hooks{enabled_file_ops=true enabled_remote_dns=true}: mirrord_layer::file::hooks: hooked "pwrite"
2022-12-22T16:05:38.629990Z TRACE ThreadId(02) enable_hooks{enabled_file_ops=true enabled_remote_dns=true}: mirrord_layer::file::hooks: hooked "access"
2022-12-22T16:05:38.630033Z TRACE ThreadId(02) enable_hooks{enabled_file_ops=true enabled_remote_dns=true}: mirrord_layer::file::hooks: hooked "faccessat"
2022-12-22T16:05:38.630443Z TRACE ThreadId(02) enable_hooks{enabled_file_ops=true enabled_remote_dns=true}: mirrord_layer: exit
2022-12-22T16:05:38.630537Z TRACE ThreadId(02) start_layer_thread{config=LayerConfig { accept_invalid_certificates: true, skip_processes: None, target: TargetConfig { path: Some(Pod(PodTarget { pod: "py-serv-deployment-5c57fbdc98-pdbn4", container: None })), namespace: None }, connect_tcp: None, connect_agent_name: Some("mirrord-agent-o4oglkjw5s-dv9rm"), connect_agent_port: Some(40079), agent: AgentConfig { log_level: "info", namespace: None, image: None, image_pull_policy: "IfNotPresent", ttl: 0, ephemeral: false, communication_timeout: None, startup_timeout: 60, network_interface: None, pause: false }, feature: FeatureConfig { env: EnvConfig { include: None, exclude: None, overrides: None }, fs: FsConfig { mode: Read, include: None, exclude: None, read_write: None, read_only: None, local: None }, network: NetworkConfig { incoming: Mirror, outgoing: OutgoingConfig { tcp: true, udp: true }, dns: true }, capture_error_trace: true }, operator: OperatorConfig { enabled: true, namespace: "mirrord", port: 8080 } }}: mirrord_layer: enter
2022-12-22T16:05:38.630597Z TRACE ThreadId(02) start_layer_thread{config=LayerConfig { accept_invalid_certificates: true, skip_processes: None, target: TargetConfig { path: Some(Pod(PodTarget { pod: "py-serv-deployment-5c57fbdc98-pdbn4", container: None })), namespace: None }, connect_tcp: None, connect_agent_name: Some("mirrord-agent-o4oglkjw5s-dv9rm"), connect_agent_port: Some(40079), agent: AgentConfig { log_level: "info", namespace: None, image: None, image_pull_policy: "IfNotPresent", ttl: 0, ephemeral: false, communication_timeout: None, startup_timeout: 60, network_interface: None, pause: false }, feature: FeatureConfig { env: EnvConfig { include: None, exclude: None, overrides: None }, fs: FsConfig { mode: Read, include: None, exclude: None, read_write: None, read_only: None, local: None }, network: NetworkConfig { incoming: Mirror, outgoing: OutgoingConfig { tcp: true, udp: true }, dns: true }, capture_error_trace: true }, operator: OperatorConfig { enabled: true, namespace: "mirrord", port: 8080 } }}: mirrord_layer: exit
2022-12-22T16:05:38.630685Z TRACE ThreadId(02) fopen{rawish_path=Some("/usr/share/locale/locale.alias") rawish_mode=Some("rce")}: mirrord_layer::file::ops: enter
2022-12-22T16:05:38.630713Z  WARN ThreadId(02) fopen{rawish_path=Some("/usr/share/locale/locale.alias") rawish_mode=Some("rce")}: mirrord_layer::file: Invalid mode for fopen 'c'
2022-12-22T16:05:38.630729Z  WARN ThreadId(02) fopen{rawish_path=Some("/usr/share/locale/locale.alias") rawish_mode=Some("rce")}: mirrord_layer::file: Invalid mode for fopen 'e'
2022-12-22T16:05:38.630771Z TRACE ThreadId(02) fopen{rawish_path=Some("/usr/share/locale/locale.alias") rawish_mode=Some("rce")}:open{rawish_path=Some("/usr/share/locale/locale.alias") open_options=OpenOptionsInternal { read: true, write: false, append: false, truncate: false, create: false, create_new: false }}: mirrord_layer::file::ops: enter
2022-12-22T16:05:38.633194Z TRACE ThreadId(02) fopen{rawish_path=Some("/usr/share/locale/locale.alias") rawish_mode=Some("rce")}:open{rawish_path=Some("/usr/share/locale/locale.alias") open_options=OpenOptionsInternal { read: true, write: false, append: false, truncate: false, create: false, create_new: false }}: mirrord_layer::file::ops: exit
2022-12-22T16:05:38.633229Z TRACE ThreadId(02) fopen{rawish_path=Some("/usr/share/locale/locale.alias") rawish_mode=Some("rce")}: mirrord_layer::file::ops: exit
2022-12-22T16:05:38.684888Z TRACE ThreadId(02) getaddrinfo{rawish_node=None rawish_service=Some("8080") raw_hints=Some(addrinfo { ai_flags: 1025, ai_family: 0, ai_socktype: 1, ai_protocol: 0, ai_addrlen: 0, ai_addr: 0x0, ai_canonname: 0x0, ai_next: 0x0 })}: mirrord_layer::socket::ops: exit
2022-12-22T16:05:38.684940Z ERROR ThreadId(02) mirrord_layer::error: Error occured in Layer >> RecvError(RecvError(()))
2022-12-22T16:05:38.684985Z TRACE ThreadId(02) read{local_fd=11 read_amount=8}: mirrord_layer::file::ops: enter
2022-12-22T16:05:38.685008Z TRACE ThreadId(02) read{local_fd=11 read_amount=8}: mirrord_layer::file::ops: exit

Your operating system and version

Linux mehul-machine 5.15.0-1023-azure #29~20.04.1-Ubuntu SMP Wed Oct 26 19:18:25 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Local process

/usr/bin/ruby: symbolic link to ruby2.7

Local process version

ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]

Additional Info

No response

@infiniteregrets infiniteregrets added the bug Something isn't working label Dec 22, 2022
@infiniteregrets infiniteregrets changed the title Ruby: mirrord fails with RecvError when used with ruby webserver Ruby: mirrord panics when ran with a ruby webserver Dec 22, 2022
@infiniteregrets
Copy link
Contributor Author

This seems to be similar to #848 since explicitly specifying (server = TCPServer.new("127.0.0.1", 8080) or server = TCPServer.new("::1", 8080)) the address works but when not specified (server = TCPServer.new 8080) it panics

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant