RocketChat / RocketChat/Rocket.Chat
Core Dump of Rocket Chat Service Error: EBADF: bad file descriptor, read
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
One of our Rocket Chat services just core dumped. We were able to successfully restart the service. I'm not sure what triggered it. I seen an error about a bad file descriptor. Systemd output is pasted below.
Steps to reproduce:
I don't know how to reproduce it.
Expected behavior:
I would expect Rocket Chat not to core dump
Actual behavior:
● rocketchat4.service - Rocket.Chat server instance 4
Loaded: loaded (/usr/lib/systemd/system/rocketchat4.service; disabled; vendor preset: disabled)
Active: failed (Result: core-dump) since Fri 2023-06-09 11:10:01 CDT; 2min 17s ago
Process: 1109886 ExecStart=/usr/local/bin/node /opt/chat.courseleaf.com/Rocket.Chat/main.js (code=dumped, signal=ABRT)
Main PID: 1109886 (code=dumped, signal=ABRT)
Jun 09 11:10:01 chat.leepfrog.com rocketchat4[1109886]: => awaited here:
Jun 09 11:10:01 chat.leepfrog.com rocketchat4[1109886]: at Function.Promise.await (/opt/chat.courseleaf.com/Rocket.Chat/programs/server/npm/node_modules/>
Jun 09 11:10:01 chat.leepfrog.com rocketchat4[1109886]: at server/lib/dataExport/processDataDownloads.ts:226:25
Jun 09 11:10:01 chat.leepfrog.com rocketchat4[1109886]: at /opt/chat.courseleaf.com/Rocket.Chat/programs/server/npm/node_modules/meteor/promise/node_modu>
Jun 09 11:10:01 chat.leepfrog.com rocketchat4[1109886]: errno: -9,
Jun 09 11:10:01 chat.leepfrog.com rocketchat4[1109886]: code: 'EBADF',
Jun 09 11:10:01 chat.leepfrog.com rocketchat4[1109886]: syscall: 'read'
Jun 09 11:10:01 chat.leepfrog.com rocketchat4[1109886]: }
Jun 09 11:10:01 chat.leepfrog.com systemd[1]: rocketchat4.service: Main process exited, code=dumped, status=6/ABRT
Jun 09 11:10:01 chat.leepfrog.com systemd[1]: rocketchat4.service: Failed with result 'core-dump'.
Server Setup Information:
- Version of Rocket.Chat Server: 6.2.3
- Operating System: Red Hat Linux 8.7
- Deployment Method: build instances provided by Rocket Chat
- Number of Running Instances: 4
- DB Replicaset Oplog: Enabled
- NodeJS Version: 14.21.3
- MongoDB Version: 5.0.17
Client Setup Information
This was a server side error
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with server/lib/dataExport/processDataDownloads.ts at line 226 and review the EBADF read stack trace alongside the reported NodeJS 14.21.3 runtime and deployment setup. Identify a reproducible trigger for the core dump and verify that the service no longer aborts on the corresponding read failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100