Skip to content

[🐛 Bug]: /opt/bin/video.sh: line 135: wait: pid 48494 is not a child of this shell #2775

Closed
@MJB222398

Description

@MJB222398

What happened?

I have a docker selenium grid with a Hub, and four each of Chrome, Edge, Firefox nodes, and then a separate video container for all of these 12 nodes. A new video is recorded for each driver session and the name of the video file is just the session ID. Today I had the video take 4 seconds to stop recording after the web driver session was stopped. When I looked in the logs for the video container I could see there might be an issue:

/opt/bin/video.sh: line 135: wait: pid 48494 is not a child of this shell

So investigating this it looks like in your stop_ffmpeg function you are grabbing any and all ffmpeg processes, but these could belong to another shell - in this case they belong to mine (because I am using ffmpeg to check video file integrity. So I think this function needs to be changed to make sure you are finding your process - not mine.

Command used to start Selenium Grid with Docker (or Kubernetes)

N/A

Relevant log output

2025-04-10 10:15:17,291 [video.recorder] - Video recording in progress
2025-04-10 10:15:18,304 [video.recorder] - Video recording in progress
2025-04-10 10:15:19,317 [video.recorder] - Video recording in progress
/opt/bin/video.sh: line 135: wait: pid 48494 is not a child of this shell
/opt/bin/video.sh: line 135: wait: pid 48518 is not a child of this shell
/opt/bin/video.sh: line 135: wait: pid 48567 is not a child of this shell
2025-04-10 10:15:23,916 [video.recorder] - Video recording stopped

Logs from Node:

10:10:53.568 INFO [LocalNode.newSession] - Session created by the Node. Id: 3dfb3e4e47cda437a138d0a46b2b7264, Caps: Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 135.0.7049.52, chrome: {chromedriverVersion: 135.0.7049.42 (0f351bbd2617..., userDataDir: /home/seluser/selenium/profile}, fedcm:accounts: true, goog:chromeOptions: {debuggerAddress: localhost:45351}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: linux, proxy: Proxy(), se:cdp: ws://localhost:4444/session..., se:cdpVersion: 135.0.7049.52, se:containerName: chrome-node-2, se:gridWebSocketUrl: ws://localhost:2128/session..., setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webSocketUrl: ws://localhost:4444/session..., webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true}
10:10:53.580 INFO [ProxyNodeWebsockets.createWsEndPoint] - Establishing connection to ws://localhost:2128/session/3dfb3e4e47cda437a138d0a46b2b7264
10:15:20.245 INFO [LocalNode.stopTimedOutSession] - Session id 3dfb3e4e47cda437a138d0a46b2b7264 is stopping on demand...
10:15:20.246 INFO [SessionSlot.stop] - Stopping session 3dfb3e4e47cda437a138d0a46b2b7264

Operating System

Ubuntu 20.04

Docker Selenium version (image tag)

4.31.0-20250404 and ffmpeg-7.1-20250404

Selenium Grid chart version (chart version)

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions