agora inbox for pgsql-interfaces@postgresql.org  
help / color / mirror / Atom feed
From: alpha_one_x86 <alpha_one_x86@first-world.info>
To: pgsql-interfaces@postgresql.org
Subject: Valgrind => break?
Date: Tue, 24 Jun 2014 11:44:35 +0200
Message-ID: <3988520.4H6EVNlcny@amber> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-interfaces>

Hello,

The code:
https://github.com/alphaonex86/CatchChallenger/blob/master/server/main-epoll.cpp#L552
https://github.com/alphaonex86/CatchChallenger/blob/master/server/epoll/db/EpollPostgresql.cpp
But the simple server work, no difference of code:
https://github.com/alphaonex86/CatchChallenger/blob/master/tools/epoll-server/epoll-psql/main.cpp

In my implementation, valgrind break the postgresql connexion. With gdb or normal:
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 

Under valgrind:
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

In both case:
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



Other problem, but very less problematic, in simple and complex case:
PQconnectStart("dbname=catchchallenger user=root"); -> work
PQconnectStart("host=localhost dbname=catchchallenger user=root"); -> don't work
I have:
Connexion CONNECTION_STARTED, Connecting...
Connexion status: PGRES_POLLING_OK
EPOLLPRI
And after lot of time:
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 with psql work perfectly.

Thanks in advance for you help.
Cheers,

-- 
alpha_one_x86 <alpha_one_x86@first-world.info>
Main developer of Ultracopier, Esourcing and server management
IT, OS, technologies, security and business department

Attachments:

  [application/pgp-signature] signature.asc (835B, ../3988520.4H6EVNlcny@amber/2-signature.asc)
  download

Message-ID: <3988520.4H6EVNlcny@amber>
Permalink:  ../3988520.4H6EVNlcny@amber/
Also on:    postgresql.org/message-id/3988520.4H6EVNlcny@amber

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: alpha_one_x86@first-world.info
  Subject: Re: Valgrind => break?
  In-Reply-To: <3988520.4H6EVNlcny@amber>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox