View Issue Details

IDProjectCategoryView StatusLast Update
0000362Pgpool-IIBugpublic2017-11-08 07:36
Reporterzachwalton Assigned Tot-ishii  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionopen 
Product Version3.6.6 
Fixed in Version3.6.7 
Summary0000362: pg_terminate_backend() causes failover when run as non-super user
DescriptionWith postgres user:

2017-11-06 21:38:40: pid 63723: LOG: found the pg_terminate_backend request for backend pid:56220 on backend node:2

As a non-privileged user killing its own connections:

2017-11-06 21:23:24: pid 62226: LOG: degenerate backend request for node_id: 2 from pid [62226] is canceled because failover is disallowed on the node
2017-11-06 21:23:29: pid 62226: LOG: pool_ssl: "SSL_read": "no SSL error reported"
2017-11-06 21:23:29: pid 62226: ERROR: unable to read data from DB node 2
2017-11-06 21:23:29: pid 62226: DETAIL: socket read failed with an error "Success"
2017-11-06 21:23:29: pid 62226: LOG: pool_ssl: "SSL_read": "no SSL error reported"
2017-11-06 21:23:29: pid 62226: LOG: pool_ssl: "SSL_read": "no SSL error reported"
2017-11-06 21:23:29: pid 62226: WARNING: ssl write: error: 5
2017-11-06 21:23:29: pid 62226: WARNING: write on backend 2 failed with error :"Success"
2017-11-06 21:23:29: pid 62226: DETAIL: while trying to write data from offset: 0 wlen: 5
2017-11-06 21:23:29: pid 62226: LOG: failback event detected
TagsNo tags attached.

Activities

zachwalton

2017-11-07 07:14

reporter   ~0001806

Worth mentioning: even if the code that intercepts `pg_terminate_backend()` is fixed to intercept requests from non-privileged users, a non-privileged user can still cause a failover (potentially denying service to other users) by running `select pg_terminate_backend(pid) from pg_stat_activity where usename=current_user;`

t-ishii

2017-11-07 10:20

developer   ~0001807

It is possible that it's just fixed in 3.6.7. If you try 3.6.7 and still see the problem, please let us know.

zachwalton

2017-11-08 03:59

reporter   ~0001809

I'm unable to reproduce this on 3.6.6 or 3.6.7 on macOS, but it's reliably reproducible on 3.6.6 on Linux.

I'll need a couple of days to build / test 3.6.7 on Linux and will report back.

zachwalton

2017-11-08 04:33

reporter   ~0001810

Tested 3.6.7 on our integration cluster and I can't reproduce this anymore. We can close this and I'll reopen if it happens again in prod.

Thanks!

t-ishii

2017-11-08 07:36

developer   ~0001811

Ok, issue closed.

Issue History

Date Modified Username Field Change
2017-11-07 06:52 zachwalton New Issue
2017-11-07 07:14 zachwalton Note Added: 0001806
2017-11-07 10:20 t-ishii Note Added: 0001807
2017-11-08 03:59 zachwalton Note Added: 0001809
2017-11-08 04:33 zachwalton Note Added: 0001810
2017-11-08 07:36 t-ishii Note Added: 0001811
2017-11-08 07:36 t-ishii Assigned To => t-ishii
2017-11-08 07:36 t-ishii Status new => closed
2017-11-08 07:36 t-ishii Fixed in Version => 3.6.7