Probleme de connectivite avec epoll
Bonjour,
voila le code:
https://github.com/alphaonex86/Catch...epoll.cpp#L552
https://github.com/alphaonex86/Catch...Postgresql.cpp
Le serveur simple marche, pourtant il n'y as pas de difference de code:
https://github.com/alphaonex86/Catch...-psql/main.cpp
Mon implementation bug avec valgrind, mais elle est fonctionnel en mode normal ou avec gdb:
Code:
1 2 3 4 5 6
| Connexion CONNECTION_MADE
datapack_loaded not loaded: but database have not the event EPOLLIN
Connexion CONNECTION_AWAITING_RESPONSE
datapack_loaded not loaded: but database have not the event EPOLLIN
Connexion CONNECTION_AWAITING_RESPONSE
datapack_loaded not loaded: start preload data |
Sous valgrind:
Code:
1 2 3 4
| Connexion CONNECTION_MADE
datapack_loaded not loaded: but database have not the event EPOLLIN
Connexion CONNECTION_AWAITING_RESPONSE
datapack_loaded not loaded: but database have not the event EPOLLIN |
Dans les 2 cas:
Code:
1 2 3
| netstat -nap | grep postgres:
unix 2 [ ACC ] STREAM LISTENING 832 - /run/postgresql/.s.PGSQL.5432
unix 3 [ ] STREAM CONNECTED 17572580 - /run/postgresql/.s.PGSQL.5432 |
Autre problème beaucoup moins problématique pour l'instant:
Code:
1 2
| PQconnectStart("dbname=catchchallenger user=root"); -> marche
PQconnectStart("host=localhost dbname=catchchallenger user=root"); -> ne marche pas |
J'ai:
Code:
1 2 3
| Connexion CONNECTION_STARTED, Connecting...
Connexion status: PGRES_POLLING_OK
EPOLLPRI |
Puis apres beaucoup de temps:
Code:
1 2 3 4 5
| Connexion CONNECTION_MADE, Connected to server...
Connexion status: PGRES_POLLING_ACTIVEepoll_ctl, socket ready to write
epoll_ctl, socket ready to read
query repeat send failed
epoll_ctl, socket closed |
-h localhost avec psql marche.
Merci d'avance de l'aide que vous pourrez m'apporter.
Cordialement,