Be more robust against errors whilst aborting (crash due to recursion)
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
Right now we don't handle conditions like out of file descriptors safely, but instead PANIC because we fail recursively while aborting the transaction:
```
2017-08-07 00:40:03.766 UTC [17342][4/67561] : [2-1] [app=[unknown]] LOG: connection authorized: user=citus database=citus SSL enabled (protocol=TLSv1.2, cipher=ECDHE-RSA-AES256-GCM-SHA384, compression=off)
2017-08-07 00:40:03.850 UTC [17342][4/67562] : [3-1] [app=psql] ERROR: epoll_create1 failed: Too many open files
2017-08-07 00:40:03.850 UTC [17342][4/67562] : [4-1] [app=psql] STATEMENT: INSERT INTO anonymized SELECT * FROM anonymized
2017-08-07 00:40:03.851 UTC [17342][4/0] : [5-1] [app=psql] ERROR: epoll_create1 failed: Too many open files
2017-08-07 00:40:03.851 UTC [17342][4/0] : [6-1] [app=psql] WARNING: AbortTransaction while in ABORT state
2017-08-07 00:40:03.851 UTC [17342][4/0] : [7-1] [app=psql] ERROR: epoll_create1 failed: Too many open files
2017-08-07 00:40:03.851 UTC [17342][4/0] : [8-1] [app=psql] WARNING: AbortTransaction while in ABORT state
2017-08-07 00:40:03.851 UTC [17342][4/0] : [9-1] [app=psql] ERROR: epoll_create1 failed: Too many open files
2017-08-07 00:40:03.851 UTC [17342][4/0] : [10-1] [app=psql] WARNING: AbortTransaction while in ABORT state
2017-08-07 00:40:03.851 UTC [17342][4/0] : [11-1] [app=psql] ERROR: epoll_create1 failed: Too many open files
2017-08-07 00:40:03.851 UTC [17342][4/0] : [12-1] [app=psql] PANIC: ERRORDATA_STACK_SIZE exceeded
```
Contributor guide
Assessment
This issue has not been assessed yet.