parse-community / parse-community/parse-server

Cancelling MongoDB query operation causes Parse Server crash

Open
#8,641 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:bug
Dominant language
JavaScript
Stars
21.4k
Forks
4.8k
Avg merge
7h 45m
Merged PRs (30d)
11

Description

New Issue Checklist
Issue Description

Cancelling a query operation in MongoDB causes Parse Server to crash.
This is not a security vulnerability as access to the DB server is required.

Steps to reproduce
  1. Send a request from Parse Server with a long-running query.
  2. On the MongoDB server side, terminate the ongoing query operation. This may need to be repeated several times as a retry is usually issued and the terminated operation will be restarted.
  3. Parse Server crashes and rends a with 5xx response to the client.
Actual Outcome

Parse Server crashes.

Expected Outcome

Parse Server should not crash but send an appropriate error code to the client.

Environment

Server

  • Parse Server version: 5.5.1, likely that this also affects 6.x
  • MongoDB version: 4.2.24

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the cancelled long-running query with Parse Server 5.5.1 and MongoDB 4.2.24, repeating the termination as described to observe the retry and crash path. Trace the resulting MongoDB error through the Parse Server request handling, then verify that cancellation returns an appropriate 5xx response without crashing the server.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, mongodb, node.js
Domain
backend, database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.