**Apache Airflow version**: 2.0.1


**Kubernetes version (if you are using kubernetes)** (use `kubectl version`): 1.16

**Environment**:

- **Cloud provider or hardware configuration**:
- **OS** (e.g. from /etc/os-release):
- **Kernel** (e.g. `uname -a`):
- **Install tools**:
- **Others**:

**What happened**:

Airflow fails to schedule any tasks after some time. The "Task Instance Details" tab of some of the failed tasks show the following: 

```
('Not scheduling since there are %s open slots in pool %s and require %s pool slots', -3, 'transformation', 3)
```

Admin > Pools tab shows 0 Running Slots but 9 Queued Slots. Gets stuck in this state until airflow is restarted.

**What you expected to happen**:

Number of "open slots in pool" should never be negative! 

**How to reproduce it**:
- Create/configure a pool with a small size (eg. 6)
- DAG with multiple tasks occupying multiple pool_slots (eg. pool_slots=3)


**Anything else we need to know**:

tests/models/test_pool.py
#
#
#
import unittest
from airflow import settings
from airflow.models import DAG
from airflow.models.pool import Pool
from airflow.models.taskinstance import TaskInstance as TI
from airflow.operators.dummy import DummyOperator
from airflow.utils import timezone
from airflow.utils.state import State
from tests.test_utils.db import clear_db_pools, clear_db_runs, set_default_pool_slots
DEFAULT_DATE = timezone.datetime(2016, 1, 1)
class TestPool(unittest.TestCase):
    def setUp(self):
        clear_db_runs()
        clear_db_pools()
    def tearDown(self):
        clear_db_runs()
        clear_db_pools()
    def test_open_slots(self):