Thread: bug on debian... what's wrong with me ?

bug on debian... what's wrong with me ?

From
Raphaël Enrici
Date:
Hi,

I can't login to the database with RC2 and Debian. I have a wxWidgets
assert. Did I miss something or should I try the --disable-beer ?
Here is the end of my pgadmin.log:

2004-11-18 22:49:33 INFO   : Draw size of 'M': w=11, h=17, descent 4,
external lead 0.
2004-11-18 22:49:33 INFO   : Draw size of 'g': w=8, h=17, descent 4,
external lead 0.
2004-11-18 22:49:33 INFO   : Draw size of 'Mg': w=19, h=17, descent 4,
external lead 0.
2004-11-18 22:49:33 INFO   : Creating a ctlSQLBox
2004-11-18 22:49:33 INFO   : Creating a pgCollection object
2004-11-18 22:49:33 INFO   : Reloading servers...
2004-11-18 22:49:34 INFO   : Creating a pgServer object
2004-11-18 22:49:34 INFO   : Creating a pgServer object
2004-11-18 22:49:34 INFO   : Creating a pgServer object
2004-11-18 22:49:34 INFO   : Creating a pgServer object
2004-11-18 22:49:34 INFO   : Destroying a splash screen
2004-11-18 22:49:37 STATUS : Interrogation en cours de la configuration
du serveur....
2004-11-18 22:49:37 INFO   : Displaying properties for Server localhost:5432
2004-11-18 22:49:37 INFO   : Displaying properties for server localhost:5432
2004-11-18 22:49:37 STATUS : Interrogation en cours de la configuration
du serveur.... (0,00 secondes)
2004-11-18 22:49:37 INFO   : Attempting to create a connection object...
2004-11-18 22:49:37 INFO   : Creating a connect dialogue
2004-11-18 22:49:41 INFO   : Destroying a connect dialogue
2004-11-18 22:49:41 STATUS : Connexion en cours à la base...
2004-11-18 22:49:41 INFO   : Creating pgConn object
2004-11-18 22:49:41 INFO   : Server name: localhost (resolved to: 127.0.0.1)
2004-11-18 22:49:41 INFO   : Opening connection with connection string:
hostaddr='127.0.0.1' dbname='template1' user='ralph' password='blabla'
port=5432 sslmode=prefer
2004-11-18 22:49:41 STATUS : Connexion en cours à la base... (0,00 secondes)
2004-11-18 22:49:41 DEBUG  : src/common/string.cpp(1060): assert "nLen
!= (size_t)-1" failed.


I precise I used the exact same snapshot as for RC1.

Thanks,
Raphaël

Re: bug on debian... what's wrong with me ?

From
Raphaël Enrici
Date:
Raphaël Enrici wrote:
> Hi,
>
> I can't login to the database with RC2 and Debian. I have a wxWidgets
> assert.

Just after I enter my password.

> Did I miss something or should I try the --disable-beer ?
> Here is the end of my pgadmin.log:
>
> 2004-11-18 22:49:33 INFO   : Draw size of 'M': w=11, h=17, descent 4,
> external lead 0.
> 2004-11-18 22:49:33 INFO   : Draw size of 'g': w=8, h=17, descent 4,
> external lead 0.
> 2004-11-18 22:49:33 INFO   : Draw size of 'Mg': w=19, h=17, descent 4,
> external lead 0.
> 2004-11-18 22:49:33 INFO   : Creating a ctlSQLBox
> 2004-11-18 22:49:33 INFO   : Creating a pgCollection object
> 2004-11-18 22:49:33 INFO   : Reloading servers...
> 2004-11-18 22:49:34 INFO   : Creating a pgServer object
> 2004-11-18 22:49:34 INFO   : Creating a pgServer object
> 2004-11-18 22:49:34 INFO   : Creating a pgServer object
> 2004-11-18 22:49:34 INFO   : Creating a pgServer object
> 2004-11-18 22:49:34 INFO   : Destroying a splash screen
> 2004-11-18 22:49:37 STATUS : Interrogation en cours de la configuration
> du serveur....
> 2004-11-18 22:49:37 INFO   : Displaying properties for Server
> localhost:5432
> 2004-11-18 22:49:37 INFO   : Displaying properties for server
> localhost:5432
> 2004-11-18 22:49:37 STATUS : Interrogation en cours de la configuration
> du serveur.... (0,00 secondes)
> 2004-11-18 22:49:37 INFO   : Attempting to create a connection object...
> 2004-11-18 22:49:37 INFO   : Creating a connect dialogue
> 2004-11-18 22:49:41 INFO   : Destroying a connect dialogue
> 2004-11-18 22:49:41 STATUS : Connexion en cours à la base...
> 2004-11-18 22:49:41 INFO   : Creating pgConn object
> 2004-11-18 22:49:41 INFO   : Server name: localhost (resolved to:
> 127.0.0.1)
> 2004-11-18 22:49:41 INFO   : Opening connection with connection string:
> hostaddr='127.0.0.1' dbname='template1' user='ralph' password='blabla'
> port=5432 sslmode=prefer
> 2004-11-18 22:49:41 STATUS : Connexion en cours à la base... (0,00
> secondes)
> 2004-11-18 22:49:41 DEBUG  : src/common/string.cpp(1060): assert "nLen
> != (size_t)-1" failed.
>
>
> I precise I used the exact same snapshot as for RC1.
>
> Thanks,
> Raphaël
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
>               http://www.postgresql.org/docs/faqs/FAQ.html
>


Re: bug on debian... what's wrong with me ?

From
Devrim GUNDUZ
Date:
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--8323328-612310808-1100819231=:3230
Content-Type: TEXT/PLAIN; charset=iso-8859-9; format=flowed
Content-Transfer-Encoding: 8BIT

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hi,

On Thu, 18 Nov 2004, [ISO-8859-1] Raphaël Enrici wrote:

> I can't login to the database with RC2 and Debian. I have a wxWidgets assert.
> Did I miss something or should I try the --disable-beer ?

<snip>
> 2004-11-18 22:49:41 DEBUG  : src/common/string.cpp(1060): assert "nLen !=
> (size_t)-1" failed.

I get the same error if I use Turkish locale! I'd report it today but
totally forgot it!

I think there is a problem in wxWidgets, we should report this bug to
them.

Regards,

- --
Devrim GUNDUZ
devrim~gunduz.org                devrim.gunduz~linux.org.tr
              http://www.tdmsoft.com
              http://www.gunduz.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFBnSs4tl86P3SPfQ4RAkUjAJ9bARkGUudIeX/aQhWFzQcxnAxUiACfflFl
8aGsWPo0ZweO3jyz2d/L1Ow=
=XJY8
-----END PGP SIGNATURE-----
--8323328-612310808-1100819231=:3230--

Re: bug on debian... what's wrong with me ?

From
blacknoz@club-internet.fr
Date:
----Message d'origine----
>Date: Fri, 19 Nov 2004 01:07:31 +0200 (EET)
>De: Devrim GUNDUZ <devrim@gunduz.org>
>A: Raphaël Enrici <blacknoz@club-internet.fr>
>Copie à: PgAdmin Hackers <pgadmin-hackers@postgresql.org>,
>Sujet: Re: [pgadmin-hackers] bug on debian... what's wrong with me ?
>
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>On Thu, 18 Nov 2004, [ISO-8859-1] Raphaël Enrici wrote:
>
>> I can't login to the database with RC2 and Debian. I have a wxWidgets assert.
>> Did I miss something or should I try the --disable-beer ?
>
><snip>
>> 2004-11-18 22:49:41 DEBUG  : src/common/string.cpp(1060): assert "nLen !=
>> (size_t)-1" failed.
>
>I get the same error if I use Turkish locale! I'd report it today but
>totally forgot it!
>
>I think there is a problem in wxWidgets, we should report this bug to
>them.

mmmh be patient and have a beer :)

I couldn't get a nor fr_FR nor C locale to work...
How do you explain that it worked smoothly with pgA3 RC1 and not with RC2 ?
Maybe it's a problem due to modifications in pgA3, maybe I should rebuild the entire wx based on the current libs on my
host(they all were upgraded), myabe this is due to some changes elsewhere which break "dialogues" between pgA3 code and
wxWid...

Andreas ?

Any idea ?
Regards,
Raphaël


Re: bug on debian... what's wrong with me ?

From
Andreas Pflug
Date:
blacknoz@club-internet.fr wrote:
> ----Message d'origine----
>
>>Date: Fri, 19 Nov 2004 01:07:31 +0200 (EET)
>>De: Devrim GUNDUZ <devrim@gunduz.org>
>>A: Raphaël Enrici <blacknoz@club-internet.fr>
>>Copie à: PgAdmin Hackers <pgadmin-hackers@postgresql.org>,
>>Sujet: Re: [pgadmin-hackers] bug on debian... what's wrong with me ?
>>
>>-----BEGIN PGP SIGNED MESSAGE-----
>>Hash: SHA1
>>
>>On Thu, 18 Nov 2004, [ISO-8859-1] Raphaël Enrici wrote:
>>
>>
>>>I can't login to the database with RC2 and Debian. I have a wxWidgets assert.
>>>Did I miss something or should I try the --disable-beer ?
>>
>><snip>
>>
>>>2004-11-18 22:49:41 DEBUG  : src/common/string.cpp(1060): assert "nLen !=
>>>(size_t)-1" failed.
>>
>>I get the same error if I use Turkish locale! I'd report it today but
>>totally forgot it!
>>
>>I think there is a problem in wxWidgets, we should report this bug to
>>them.
>
>
> mmmh be patient and have a beer :)
>
> I couldn't get a nor fr_FR nor C locale to work...
> How do you explain that it worked smoothly with pgA3 RC1 and not with RC2 ?
> Maybe it's a problem due to modifications in pgA3, maybe I should rebuild the entire wx based on the current libs on
myhost (they all were upgraded), myabe this is due to some changes elsewhere which break "dialogues" between pgA3 code
andwxWid... 

Provide a stack backtrace, so I can see where the assert comes from.
Maybe you have to switch from beer to cocktails.

Regards,
Andreas

Re: bug on debian... what's wrong with me ?

From
Raphaël Enrici
Date:
Hi Andreas,

finally it's not as dramatic as I thought... read further please:

Andreas Pflug wrote:
> blacknoz@club-internet.fr wrote:
>
>> ----Message d'origine----
>>
>>> Date: Fri, 19 Nov 2004 01:07:31 +0200 (EET)
>>> De: Devrim GUNDUZ <devrim@gunduz.org>
>>> A: Raphaël Enrici <blacknoz@club-internet.fr>
>>> Copie à: PgAdmin Hackers <pgadmin-hackers@postgresql.org>,
>>> Sujet: Re: [pgadmin-hackers] bug on debian... what's wrong with me ?
>>>
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> On Thu, 18 Nov 2004, [ISO-8859-1] Raphaël Enrici wrote:
>>>
>>>
>>>> I can't login to the database with RC2 and Debian. I have a
>>>> wxWidgets assert. Did I miss something or should I try the
>>>> --disable-beer ?
>>>
>>>
>>> <snip>
>>>
>>>> 2004-11-18 22:49:41 DEBUG  : src/common/string.cpp(1060): assert
>>>> "nLen != (size_t)-1" failed.
>>>
>>>
>>> I get the same error if I use Turkish locale! I'd report it today but
>>> totally forgot it!
>>> I think there is a problem in wxWidgets, we should report this bug to
>>> them.
>>
>
> Provide a stack backtrace, so I can see where the assert comes from.
> Maybe you have to switch from beer to cocktails.
>

So, take this as an invitation to my cocktail party! ;)
In fact, I have such an assert when PostgreSQL is stopped!!! ;)
/etc/init.d/postgresql stop
launch pgadmin, try to connect and you fall in the assert...

Here is a backtrace:

Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread -1211925824 (LWP 21032)]
0xb7d27780 in raise () from /lib/tls/libpthread.so.0
(gdb) bt
#0  0xb7d27780 in raise () from /lib/tls/libpthread.so.0
#1  0x085d4166 in wxTrap ()
#2  0x0851f80e in wxGUIAppTraitsBase::ShowAssertDialog ()
#3  0x085d44f9 in ShowAssertDialog ()
#4  0x085d3f8b in wxAppConsole::OnAssert ()
#5  0x084952a2 in wxApp::OnAssert ()
#6  0x085d421f in wxOnAssert ()
#7  0x085d4194 in wxAssert ()
#8  0x086317e5 in wxWcstr ()
#9  0x0862ba87 in wxString::wxString ()
#10 0x081b062b in pgConn::GetLastError (this=0x5) at string.h:919
#11 0x08216ea2 in pgServer::GetLastError (this=0x8c9f560) at string.h:228
#12 0x0829475f in frmMain::ReconnectServer (this=0x8c0e7b0,
server=0x8c9f560)
     at string.h:789
#13 0x0827923e in frmMain::OnSelActivated (this=0x8c0e7b0,
event=@0xbffff010)
     at ui/events.cpp:944
#14 0x085d3d1c in wxAppConsole::HandleEvent ()
#15 0x0864021a in wxEvtHandler::ProcessEventIfMatches ()
#16 0x0863f390 in wxEventHashTable::HandleEvent ()
#17 0x08640408 in wxEvtHandler::ProcessEvent ()
#18 0x0857c85f in wxWindowBase::TryParent ()
#19 0x0864046a in wxEvtHandler::ProcessEvent ()
#20 0x0857c85f in wxWindowBase::TryParent ()
---Type <return> to continue, or q <return> to quit---
#21 0x0864046a in wxEvtHandler::ProcessEvent ()
#22 0x085a9259 in wxGenericTreeCtrl::OnMouse ()
#23 0x085d3d1c in wxAppConsole::HandleEvent ()
#24 0x0864021a in wxEvtHandler::ProcessEventIfMatches ()
#25 0x0863f390 in wxEventHashTable::HandleEvent ()
#26 0x08640408 in wxEvtHandler::ProcessEvent ()
#27 0x084bb996 in gtk_window_button_press_callback ()
#28 0x4129c934 in _gtk_marshal_BOOLEAN__BOXED ()
    from /usr/lib/libgtk-x11-2.0.so.0
#29 0x4164cc20 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#30 0x41660c25 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
#31 0x4165f9be in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#32 0x4165fee4 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#33 0x4139b957 in gtk_widget_send_expose () from
/usr/lib/libgtk-x11-2.0.so.0
#34 0x4129aed2 in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
#35 0x41299c26 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#36 0x4151b185 in _gdk_events_queue () from /usr/lib/libgdk-x11-2.0.so.0
#37 0x4147db92 in g_main_depth () from /usr/lib/libglib-2.0.so.0
#38 0x4147ec88 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#39 0x4147efc0 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#40 0x4147f603 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#41 0x412994e3 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#42 0x085b1730 in wxEventLoop::Run ()
#43 0x0851f1b6 in wxAppBase::MainLoop ()
#44 0x0851f2f2 in wxAppBase::OnRun ()
#45 0x0860c06e in wxEntry ()
#46 0x0860c144 in wxEntry ()
#47 0x081ab59b in main (argc=1, argv=0x0) at pgAdmin3.cpp:81

Cheers,
Raphaël

Re: bug on debian... what's wrong with me ?

From
Andreas Pflug
Date:
Raphaël Enrici wrote:
>>>>
>>>>> I can't login to the database with RC2 and Debian. I have a
>>>>> wxWidgets assert. Did I miss something or should I try the
>>>>> --disable-beer ?
>>>>
>>>>
> #8  0x086317e5 in wxWcstr ()
> #9  0x0862ba87 in wxString::wxString ()
> #10 0x081b062b in pgConn::GetLastError (this=0x5) at string.h:919
> #11 0x08216ea2 in pgServer::GetLastError (this=0x8c9f560) at string.h:228

Possibly PQerrorMessage from the libpq version you're using is returning
NULL under some circumstances; catching it doesn't hurt so please try
the new pgConn.cpp.

Regards,
Andreas

Re: bug on debian... what's wrong with me ?

From
Raphaël Enrici
Date:
Andreas Pflug wrote:
> Raphaël Enrici wrote:
>
>>>>>
>>>>>> I can't login to the database with RC2 and Debian. I have a
>>>>>> wxWidgets assert. Did I miss something or should I try the
>>>>>> --disable-beer ?
>>>>>
>>>>>
>>>>>
>> #8  0x086317e5 in wxWcstr ()
>> #9  0x0862ba87 in wxString::wxString ()
>> #10 0x081b062b in pgConn::GetLastError (this=0x5) at string.h:919
>> #11 0x08216ea2 in pgServer::GetLastError (this=0x8c9f560) at string.h:228
>
>
> Possibly PQerrorMessage from the libpq version you're using is returning
> NULL under some circumstances; catching it doesn't hurt so please try
> the new pgConn.cpp.

nope :( it does not solve the problem. But I think you were on the good
way... Here is the error message reported by psql:

$ psql -d template1 -h localhost
psql: could not connect to server: ��ٷ
         Is the server running on host "localhost" and accepting
         TCP/IP connections on port 5432?


$ psql -d template1 -h localhost 2>&1 | cat -vet
psql: could not connect to server: M-^HM-^]M-YM-7$
^IIs the server running on host "localhost" and accepting$
^ITCP/IP connections on port 5432?$


I found the right part of the message really strange and decided to take
  a look to debian bugs... It seems you were right :) Take a look at bug
#277757 [1].
Apparently it's fixed upstream now and I bet there will be an update.
BTW, it may be good if we could prevent this libpq bug from altering
pgA3 runability.

So, here we go, I'm gonna reupload pga3 rc2 debian packages and precise
there are some side effects in certain conditions due to libpq bugs.

Regards,
Raphaël
[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=277757

Re: bug on debian... what's wrong with me ?

From
Andreas Pflug
Date:
Raphaël Enrici wrote:
> Andreas Pflug wrote:
>
>> Raphaël Enrici wrote:
>>
>>>>>>
>>>>>>> I can't login to the database with RC2 and Debian. I have a
>>>>>>> wxWidgets assert. Did I miss something or should I try the
>>>>>>> --disable-beer ?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>> #8  0x086317e5 in wxWcstr ()
>>> #9  0x0862ba87 in wxString::wxString ()
>>> #10 0x081b062b in pgConn::GetLastError (this=0x5) at string.h:919
>>> #11 0x08216ea2 in pgServer::GetLastError (this=0x8c9f560) at
>>> string.h:228
>>
>>
>>
>> Possibly PQerrorMessage from the libpq version you're using is
>> returning NULL under some circumstances; catching it doesn't hurt so
>> please try the new pgConn.cpp.
>
>
> nope :( it does not solve the problem. But I think you were on the good
> way... Here is the error message reported by psql:
>
> $ psql -d template1 -h localhost
> psql: could not connect to server: ��ٷ
>         Is the server running on host "localhost" and accepting
>         TCP/IP connections on port 5432?
>
>
> $ psql -d template1 -h localhost 2>&1 | cat -vet
> psql: could not connect to server: M-^HM-^]M-YM-7$
> ^IIs the server running on host "localhost" and accepting$
> ^ITCP/IP connections on port 5432?$
>
>
> I found the right part of the message really strange and decided to take
>  a look to debian bugs... It seems you were right :) Take a look at bug
> #277757 [1].
> Apparently it's fixed upstream now and I bet there will be an update.
> BTW, it may be good if we could prevent this libpq bug from altering
> pgA3 runability.

IMHO making pga3 dependent on the yet-to-come corrected libpq version
should be enough. I don't have a good idea how to catch this.

Regards,
Andreas


Re: bug on debian... what's wrong with me ?

From
Raphaël Enrici
Date:
Andreas Pflug wrote:
>
>
> IMHO making pga3 dependent on the yet-to-come corrected libpq version
> should be enough. I don't have a good idea how to catch this.

mmh I can't do that in packaging stuff as it would make them
uninstalable unless I badly package PG8 myself (and I won't!)... ;)
However, we may consider pg8 as a highly recommended build dep in the
"howto build pga3" documentation.

Can you add a "bug line" to the "known issue" or "Known issues, but
might stay unfixed"

something like:

<li>[Connection window] you might get a wxAssert when trying to connect
to a non running PostgreSQL server; this is a libpq problem which is
solved in PostgreSQL 8.0beta3.

Regards,
Raphaël

Re: bug on debian... what's wrong with me ?

From
Andreas Pflug
Date:
Raphaël Enrici wrote:
> Andreas Pflug wrote:
>
>
> <li>[Connection window] you might get a wxAssert when trying to connect
> to a non running PostgreSQL server; this is a libpq problem which is
> solved in PostgreSQL 8.0beta3.

Assert should arise only if compiled in debug mode, so I think we can
omit that. OTOH, if the Assert *does* popup, the Debian package version
seems to be compiled for debugging, ist this intentional?

Regards,
Andreas