-
Notifications
You must be signed in to change notification settings - Fork 790
Description
Please note that security bugs or issues should be reported to security@pgadmin.org.
Describe the bug
This seems to be the same issue as #7809 and #7900 which is marked as fixed. I'm not sure whether there was a regression after that fix or my case is different so I decided to create a new issue.
I'm managing a database that has many partitioned tables (hundreds of partitions) and is used for data analytics with complex queries. From time to time, someone runs a suboptimal query that hits all partitions at once that results in thousands of locks being created. Anytime there are non-trivial number of locks in pg_locks table, the dashboard state tab freezes up and eventually causes the app to crash after a few minutes. The behavior is the same when pgAdmin is run in desktop mode or server mode. I have collected some stats in one of such crashes while running pgAdmin in server mode.
select count(1) from pg_stat_activity;
37
select count(1) from pg_stat_activity where state = 'active';
5
select count(1) from pg_locks;
54414
select count(1), pid from pg_locks group by pid;
2 3862383
13603 3866328
13603 3866379
13603 3866367
13603 3866350
I was monitoring the resource usage for the client Chrome tab and it raised up to 10GB memory with 100% CPU until it eventually crashed. The server process seemed to be doing fine with modest resource usage before, during, and after the freeze and the eventual crash.
To Reproduce
Steps to reproduce the behavior:
- Start running a few queries that acquire significant amount of locks (>1000)
- Click on Dashboard -> State
- Wait for a few seconds as the page loads with sessions.
- The sessions would be displayed followed by a freeze and an eventual crash.
Error message
There are no error messages in pgAdmin4 server logs.
Screenshots
Desktop (please complete the following information):
- OS: Ubuntu 24.04.3 LTS, Linux-6.14.0-33-generic-x86_64-with-glibc2.39
- pgAdmin version: v9.9
- Mode: both Desktop and Server
- Browser (if running in server mode): Chrome (v141)
- Package type: DEB from the official repo
Additional context
I understand that this case is a bit out of the ordinary with having tens of thousands of locks acquired by a handful of sessions. However, it's also the same reason why I want to be able to use the state tab to find out about these as a DBA and take necessary action.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status