Unitech / Unitech/pm2

PM2 - API: Calling PM2 connect 2x before disconnect causes thread to lock.

Open
#5,302 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
43.3k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

What's wrong

Using the API for a web based process launcher.
If I get a second launch request before the first has completed - It appears that the thread locks up.

How could we reproduce this issue?

Simple node express app that Uses PM2 api to launch a process

Supporting information

$ pm2 report

--- PM2 report ----------------------------------------------------------------
Date : Fri Feb 11 2022 17:10:45 GMT-0700 (Mountain Standard Time)

--- Daemon -------------------------------------------------
pm2d version : 5.1.2
node version : 12.22.1
node path : /Users/Eti/.npm-packages/bin/pm2
argv : /Users/Eti/n/bin/node,/Users/Eti/.npm-packages/lib/node_modules/pm2/lib/Daemon.js
argv0 : node
user : Eti
uid : 501
gid : 20
uptime : 21682min

--- CLI ----------------------------------------------------
local pm2 : 5.1.2
node version : 12.22.1
node path : /Users/Eti/.npm-packages/bin/pm2
argv : /Users/Eti/n/bin/node,/Users/Eti/.npm-packages/bin/pm2,report
argv0 : node
user : Eti
uid : 501
gid : 20

--- System info --------------------------------------------
arch : x64
platform : darwin
type : Darwin
cpus : Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
cpus nb : 16
freemem : 2967498752
totalmem : 34359738368

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

No source files or tests are named. Reproduce the issue with a Node/Express app using the PM2 API, issuing a second launch request before the first completes or calling connect twice before disconnect; done when concurrent requests no longer lock the thread.

Written by the indexing model from the issue text.

Assessment

Tech stack
express, javascript, nodejs
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.