Re: Mac OS X, PostgreSQL, PL/Tcl - Mailing list pgsql-hackers
From | Scott Goodwin |
---|---|
Subject | Re: Mac OS X, PostgreSQL, PL/Tcl |
Date | |
Msg-id | 68D19EFC-64FD-11D8-863F-000A95A0910A@scottg.net Whole thread Raw |
In response to | Re: Mac OS X, PostgreSQL, PL/Tcl (Tom Lane <tgl@sss.pgh.pa.us>) |
Responses |
Re: Mac OS X, PostgreSQL, PL/Tcl
Re: Mac OS X, PostgreSQL, PL/Tcl |
List | pgsql-hackers |
Found the problem. If I have a very long environment variable exported and I start PG, PG crashes when I try to load PG/Tcl. In my case I use color ls and I have a very long LS_COLORS environment variable set. I have duplicated the problem by renaming my .bashrc and logging back in. With this clean environment, I started PG and loaded PG/Tcl without any problems. I then created the following environment variable on the command line: LONG_VAR=aaaaaaaaaaaaaaaaaa:bbbbbbbbbbbbbbbbbbb:cccccccccccccccccc: ddddddddddddddddddd:eeeeeeeeeeeeeeeeeee:fffffffffffffff: ggggggggggggggggg:hhhhhhhhhhhhhhhhhhhh:iiiiiiiiiiiiiiiiiii: jjjjjjjjjjjjjjjjjjjjj:kkkkkkkkkkkkkkkkkkkkkk:llllllllllllllllllll: mmmmmmmmmmmmmmmmmmmmmmm:nnnnnnnnnnnnnnnnnnnnnnnnn: ooooooooooooooooooooooo:pppppppppppppppppppppp:qqqqqqqqqqqqqqqqqqqqqqq: rrrrrrrrrrrrrrrrrrrrrrr:ssssssssssssssssssssssssss: ttttttttttttttttttttttttttt:uuuuuuuuuuuuuuuuuuuuuuuuu: vvvvvvvvvvvvvvvvvvvvvv:wwwwwwwwwwwwwwwwwwwwwwwwwwwwww: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:yyyyyyyyyyyyyyyyyyyyyyyyyyyyy: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz and exported it. (Obviously the line above is going to be broken into multiple lines by the mailer...). Then I stopped and restarted PG, loaded PG/Tcl and PG crashed. You *must* stop and restart PG for the problem to exhibit itself, otherwise it won't pick up the change in the environment. I suspect I'm running into a buffer overflow situation. Ok, it fails consistently when LONG_VAR is 523 characters or greater; works consistently when LONG_VAR is 522 characters or smaller. Might not fail at the same number for others. /s. To prove that this was the problem, I cleaned out my environment by moving my .bashrc file to another name, logged out, logged in, start On Feb 21, 2004, at 1:51 AM, Tom Lane wrote: > Scott Goodwin <scott@scottg.net> writes: >> Hoping someone can help me figure out why I can't get PL/Tcl to load >> without crashing the backend on Mac OS 10.3.2. > > FWIW, pltcl seems to work for me. Using up-to-date Darwin 10.3.2 > and PG CVS tip, I did > configure --with-tcl --without-tk > then make, make install, etc. pltcl installs and passes its regression > test. > >> psql:/Users/scott/pgtest/add_languages.sql:12: server closed the >> connection unexpectedly >> This probably means the server terminated abnormally >> before or while processing the request. > > Can you provide a stack trace for this? > > regards, tom lane >
pgsql-hackers by date: