Thread: Re: pgadmin3 stops working when trying to access/show

Re: pgadmin3 stops working when trying to access/show

From
"Dave Page"
Date:

> -----Original Message-----
> From: Andreas Pflug [mailto:pgadmin@pse-consulting.de]
> Sent: 23 July 2003 14:00
> To: blacknoz@club-internet.fr
> Cc: christian.bahls@stud.uni-rostock.de;
> pgadmin-hackers@postgresql.org
> Subject: Re: [pgadmin-hackers] pgadmin3 stops working when
> trying to access/show
>
> >
> >Andreas, do you have any idea concerning this problem ? Does
> anybody on
> >the list can reproduce such problems with other linux distros ?
> >
> >Christian, I'll try to send you more precise informations concerning
> >debian build so that you can try to build it by yourself...
> But I won't
> >have time until tonight.
> >
>
> I'm quite sure that we have a libpq problem here. Christian
> reports that
> the query tool will not even return from a simple
>
> SELECT rw.ev_class FROM pg_rewrite rw WHERE ev_class = 711967
>
>
> which is really horrible. Only way I see is that Christian tries to
> figure it out on his system.

Yes, I'm seeing this on Snake, which has PostgreSQL 7.3.3, and out
latest wx build.

If I do 'select * from pg_description', the query runs forever. Clicking
the stop button hangs pgAdmin. The edit grid just hangs at 'Refreshing
data, please wait'

Andreas, I'm unlikely to get time to look at this before I go, but I
have had some success running X and displaying the output remotely on my
laptop using Cygwin if you want to give that a go. The postgresql
installation is basically clean - you can open a trusted connection from
snake as user postgres.

BTW, it works fine on XP.

Regards, Dave.

Re: pgadmin3 stops working when trying to access/show

From
Andreas Pflug
Date:
Dave Page wrote:

>
>
>>-----Original Message-----
>>From: Andreas Pflug [mailto:pgadmin@pse-consulting.de]
>>Sent: 23 July 2003 14:00
>>To: blacknoz@club-internet.fr
>>Cc: christian.bahls@stud.uni-rostock.de;
>>pgadmin-hackers@postgresql.org
>>Subject: Re: [pgadmin-hackers] pgadmin3 stops working when
>>trying to access/show
>>
>>
>>
>>>Andreas, do you have any idea concerning this problem ? Does
>>>
>>>
>>anybody on
>>
>>
>>>the list can reproduce such problems with other linux distros ?
>>>
>>>Christian, I'll try to send you more precise informations concerning
>>>debian build so that you can try to build it by yourself...
>>>
>>>
>>But I won't
>>
>>
>>>have time until tonight.
>>>
>>>
>>>
>>I'm quite sure that we have a libpq problem here. Christian
>>reports that
>>the query tool will not even return from a simple
>>
>>SELECT rw.ev_class FROM pg_rewrite rw WHERE ev_class = 711967
>>
>>
>>which is really horrible. Only way I see is that Christian tries to
>>figure it out on his system.
>>
>>
>
>Yes, I'm seeing this on Snake, which has PostgreSQL 7.3.3, and out
>latest wx build.
>
>If I do 'select * from pg_description', the query runs forever. Clicking
>the stop button hangs pgAdmin. The edit grid just hangs at 'Refreshing
>data, please wait'
>
>Andreas, I'm unlikely to get time to look at this before I go, but I
>have had some success running X and displaying the output remotely on my
>laptop using Cygwin if you want to give that a go. The postgresql
>installation is basically clean - you can open a trusted connection from
>snake as user postgres.
>
>BTW, it works fine on XP.
>
I wonder why this fundamental problem comes up at this late stage.
Certainly it works on XP, as it does on W2K, and my SuSE 8.2 (2.4.20)
has no problem either. One common thing is that the non-working systems
use libpq from 7.3.3, maybe that's the problem. I'll be checking now
with 7.4, before I try to ssh/X to snake. I tried snake's libpq.a on my
system, but got unresolved externals.
Haven't run ssh/X so far, can you give me a short how-to? My f/w already
maps port22 statically. If I didn't need ssh, I'd EXPORT DISPLAY=... and
run.


Regards,
Andreas


Re: problem with libpq7.3.3/encrypted

From
Andreas Pflug
Date:
So I believe we have a problem with libpq 7.3.3 with encryption. Can
somebody please verify this, and forward this to pgsql-bugs? I have an
ancient 7.3.2 libpq without encryption, and 7.4 CVS, and it's already
difficult to handle that.

Regards,
Andreas


Christian Ruediger Bahls wrote:

>[2003-07-23 17:57] Andreas Pflug <pgadmin@pse-consulting.de> wrote:
>
>
>>I wonder why this fundamental problem comes up at this late stage.
>>Certainly it works on XP, as it does on W2K, and my SuSE 8.2 (2.4.20)
>>has no problem either. One common thing is that the non-working systems
>>use libpq from 7.3.3, maybe that's the problem. I'll be checking now
>>with 7.4, before I try to ssh/X to snake. I tried snake's libpq.a on my
>>system, but got unresolved externals.
>>
>>
>it could be because of the encryption layer
>that postgresql uses ..
>i think this is because i use the encrypted layer
>an uncomplete stacktrace i have from one
>of these runs:
>#0  0x407659c4 in read () from /lib/libc.so.6
>#1  0x4066db50 in __JCR_LIST__ () from /lib/libpthread.so.0
>#2  0x40668f53 in read () from /lib/libpthread.so.0
>#3  0x400c31cc in BIO_new_socket () from /usr/lib/libcrypto.so.0.9.7
>#4  0x0000000a in ?? ()
>#5  0x08aec778 in ?? ()
>#6  0x00000005 in ?? ()
>#7  0x400c31b6 in BIO_new_socket () from /usr/lib/libcrypto.so.0.9.7
>#8  0x4013bc60 in KRB5_AUTHENT_it () from /usr/lib/libcrypto.so.0.9.7
>#9  0x08ac3e48 in ?? ()
>
>but still i guess i cant trust these traces
>as i got stuff like that as well:
>#0  0x40667a71 in __errno_location () from /lib/libpthread.so.0
>#1  0x40032430 in ssl3_read () from /usr/lib/libssl.so.0.9.7
>#2  0x4004c130 in ssl3_undef_enc_method () from /usr/lib/libssl.so.0.9.7
>#3  0xffffffff in ?? ()
>#4  0x08ad6b80 in ?? ()
>#5  0xbfffee58 in ?? ()
>#6  0x4004c130 in ssl3_undef_enc_method () from /usr/lib/libssl.so.0.9.7
>#7  0x08b77e38 in ?? ()
>#8  0xbfffee18 in ?? ()
>#9  0x4003b7ea in SSL_read () from /usr/lib/libssl.so.0.9.7
>#10 0x08ac0ed8 in ?? ()
>#11 0x08b814f6 in ?? ()
>#12 0x00006942 in ?? ()
>#13 0x4003b795 in SSL_read () from /usr/lib/libssl.so.0.9.7
>#14 0x40153860 in pg_enc2name_tbl () from /usr/lib/libpq.so.3
>#15 0xffffffff in ?? ()
>#16 0x08ad6b80 in ?? ()
>#17 0x40717438 in realloc () from /lib/libc.so.6
>
And Dave wrote:

>Interestingly, I've just tried this on Linux, and when viewing
>pg_description, the empty edit grid appears with 'Refreshing data,
>please wait...' in the task bar and then hangs.
>
>The pg console shows:
>
>LOG: SSL SYSCALL error: EOF detected
>LOG: pq_recvbuf: Unexpected EOF on client connection
>
>
>
Regards,
Andreas





Re: problem with libpq7.3.3/encrypted

From
Andreas Pflug
Date:
Christian Ruediger Bahls wrote:

>andreas,
>
>i tested your libpq.a .. it works[1]
> this seems to be some kind of esoteric bug as
> the CommandLineInterFace linked against the same library
> works like a charm .. even with encryption
>
>i made a dump: you can find an excerpt of the tcpdump at
>http://dmv.math.uni-rostock.de/downloads/this_works.tcpdump
>(Debian GNU/Linux tcpdump ..)
>
>yours
>  christian bahls
>  maths student
>  looking for a challenging internship
>  (Postgresql or CL)
>
>[1] it is considerably faster too ..
>
>
>
Christian,
I believe that my libpq.a is compiled without encryption. If you can try
with your newer libpq version, and switch postgresql.conf ssl option on
and off to make sure what the reason is (and it already seems quite
clear to me). Then we post the result including that gdb trace to
pgsql-bugs.
I didn't see any message in the archives about that so far.

Regards,
Andreas



Re: problem with libpq7.3.3/encrypted

From
Christian Ruediger Bahls
Date:
i rebuild my postgresql(with debuging symbols)
i got wxwindows2.5 from your server
i build pgadmin3 statically from source

i started gdb -> there it is -> my trace ..
have fun .. see following url:
http://dmv.math.uni-rostock.de/downloads/gdb_trace.txt

looks like a bufferoverflow to me

strange enough i can connect, view definitions,
do selects on most tables .. could that be an ssl problem?

yours
  christian
  maths student
  looking for a challenging internship

Re: problem with libpq7.3.3/encrypted

From
Christian Ruediger Bahls
Date:
andreas,

i tested your libpq.a .. it works[1]
 this seems to be some kind of esoteric bug as
 the CommandLineInterFace linked against the same library
 works like a charm .. even with encryption

i made a dump: you can find an excerpt of the tcpdump at
http://dmv.math.uni-rostock.de/downloads/this_works.tcpdump
(Debian GNU/Linux tcpdump ..)

yours
  christian bahls
  maths student
  looking for a challenging internship
  (Postgresql or CL)

[1] it is considerably faster too ..

[2003-07-23 20:36] Andreas Pflug <pgadmin@pse-consulting.de> wrote:
> So I believe we have a problem with libpq 7.3.3 with encryption. Can
> somebody please verify this, and forward this to pgsql-bugs? I have an
> ancient 7.3.2 libpq without encryption, and 7.4 CVS, and it's already
> difficult to handle that.

Re: problem with libpq7.3.3/encrypted

From
Christian Ruediger Bahls
Date:
forgot to cc to list ..

[2003-07-23 23:42] Andreas Pflug <pgadmin@pse-consulting.de> wrote:
> >i tested your libpq.a .. it works
> >this seems to be some kind of esoteric bug as
> >the CommandLineInterface linked against the same library
> >works like a charm .. even with encryption
> I believe that my libpq.a is compiled without encryption. If you can
> try
yes your libpq is without encryption
.. as you can see .. the dump is in cleartext
(except the md5 password hashes of course)

> with your newer libpq version, and switch postgresql.conf ssl option
> on
> and off to make sure what the reason is (and it already seems quite
yes setting "ssl=false" makes it work
reverting to "ssl=true" breaks it again

strange enough that the server ignores
the "host" entry and uses "hostssl"
although the host entry is more specific
host    all     rotz    xxx.yy.0.0      255.255.0.0     md5
hostssl all     all     xxx.yy.0.0      255.255.0.0     password

i tested it .. it even uses ssl when only host is specified
 .. if the client supports ssl .. is this the expected behaviour?

> clear to me). Then we post the result including that gdb trace to
> pgsql-bugs.
ok thank you very much if you could handle this
.. my significant other is realy sick
.. i will leave tomorrow afternoon
.. i won't come back 'til sunday

yours
  christian bahls
  maths student