agora inbox for pljava-dev@postgresql.org  
help / color / mirror / Atom feed
[Pljava-dev] PL/Java example queries don't respond
3+ messages / 0 participants
[nested] [flat]

* [Pljava-dev] PL/Java example queries don't respond
@ 2005-06-02 17:43 
  2005-06-08 06:44 ` [Pljava-dev] Re: PL/Java example queries don't respond 
  0 siblings, 1 reply; 3+ messages in thread

From:  @ 2005-06-02 17:43 UTC (permalink / raw)

Hi,
    Thanks for the previous help with LD_LIBRARY_PATH and LD_PRELOAD.  I 
will post shortly on some tricks for making these changes when launching 
postgres from RedHat-style init scrips.

    I'm working with PL/JAVA on a postgres 7.4 instance on Suse 9.2 
Pro.  I've successfully installed pl-java, and when go to run the 
examples.jar file with:
SELECT 
sqlj.install_jar('file:///usr/lib/postgresql/pljava/examples.jar', 
'samples',  true);

the query runs indefinitely, and basically cannot be canceled, except 
via a SIGQUIT to postmaster.

LD_LIBRARY_PATH is set to use java, and LD_PRELOAD points zlib at the 
version used by the JVM.  From the log (see below), the JVM is 
initializing, but nothing further is happening.

Any insight?

Thanks,

Eric




limsdev:~ # tail -f -n250 /var/log/postgresql
2005-06-02 13:26:17 DEBUG:      
LD_LIBRARY_PATH=/usr/lib/jvm/java/jre/lib/i386:/usr/lib/jvm/java/jre/lib/i386/client
2005-06-02 13:26:17 DEBUG:      XNLSPATH=/usr/X11R6/lib/X11/nls
2005-06-02 13:26:17 DEBUG:      HOSTTYPE=i386
2005-06-02 13:26:17 DEBUG:      PAGER=less
2005-06-02 13:26:17 DEBUG:      MINICOM=-c on
2005-06-02 13:26:17 DEBUG:      
PATH=/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin
2005-06-02 13:26:17 DEBUG:      CPU=i686
2005-06-02 13:26:17 DEBUG:      JAVA_BINDIR=/usr/lib/jvm/java/bin
2005-06-02 13:26:17 DEBUG:      PWD=/var/lib/pgsql
2005-06-02 13:26:17 DEBUG:      INPUTRC=/etc/inputrc
2005-06-02 13:26:17 DEBUG:      JAVA_HOME=/usr/lib/jvm/java
2005-06-02 13:26:17 DEBUG:      LANG=en_US.UTF-8
2005-06-02 13:26:17 DEBUG:      PYTHONSTARTUP=/etc/pythonstart
2005-06-02 13:26:17 DEBUG:      SDK_HOME=/usr/lib/jvm/java
2005-06-02 13:26:17 DEBUG:      
TEXINPUTS=:/var/lib/pgsql/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX
2005-06-02 13:26:17 DEBUG:      HOME=/var/lib/pgsql
2005-06-02 13:26:17 DEBUG:      SHLVL=2
2005-06-02 13:26:17 DEBUG:      JDK_HOME=/usr/lib/jvm/java
2005-06-02 13:26:17 DEBUG:      OSTYPE=linux
2005-06-02 13:26:17 DEBUG:      LESS_ADVANCED_PREPROCESSOR=no
2005-06-02 13:26:17 DEBUG:      LS_OPTIONS=-N --color=tty -T 0
2005-06-02 13:26:17 DEBUG:      WINDOWMANAGER=/usr/X11R6/bin/kde
2005-06-02 13:26:17 DEBUG:      LOGNAME=postgres
2005-06-02 13:26:17 DEBUG:      MACHTYPE=i686-suse-linux
2005-06-02 13:26:17 DEBUG:      LESS=-M -I
2005-06-02 13:26:17 DEBUG:      ACLOCAL_FLAGS=-I /opt/gnome/share/aclocal
2005-06-02 13:26:17 DEBUG:      
CLASSPATH=/usr/lib/postgresql/pljava/pljava.jar
2005-06-02 13:26:17 DEBUG:      LESSOPEN=lessopen.sh %s
2005-06-02 13:26:17 DEBUG:      PKG_CONFIG_PATH=/opt/gnome/lib/pkgconfig
2005-06-02 13:26:17 DEBUG:      PGDATA=/var/lib/pgsql/data
2005-06-02 13:26:17 DEBUG:      
INFOPATH=/usr/local/info:/usr/share/info:/usr/info:/opt/gnome/share/info
2005-06-02 13:26:17 DEBUG:      LESSCLOSE=lessclose.sh %s %s
2005-06-02 13:26:17 DEBUG:      COLORTERM=1
2005-06-02 13:26:17 DEBUG:      JAVA_ROOT=/usr/lib/jvm/java
2005-06-02 13:26:17 DEBUG:      _=/usr/bin/postmaster
2005-06-02 13:26:17 DEBUG:  -----------------------------------------
2005-06-02 13:26:17 DEBUG:  found "/usr/bin/postgres" using argv[0]
2005-06-02 13:26:17 DEBUG:  invoking IpcMemoryCreate(size=10436608)
2005-06-02 13:26:17 DEBUG:  max_safe_fds = 984, usable_fds = 1018, 
already_open = 6
2005-06-02 13:26:17 DEBUG:  found "/usr/bin/postmaster" using argv[0]
2005-06-02 13:26:17 LOG:  database system was interrupted at 2005-06-02 
13:22:18 EDT
2005-06-02 13:26:17 LOG:  checkpoint record is at 0/FC605C
2005-06-02 13:26:17 LOG:  redo record is at 0/FC605C; undo record is at 
0/0; shutdown TRUE
2005-06-02 13:26:17 LOG:  next transaction ID: 1571; next OID: 35694
2005-06-02 13:26:17 LOG:  database system was not properly shut down; 
automatic recovery in progress
2005-06-02 13:26:17 FATAL:  the database system is starting up
2005-06-02 13:26:17 DEBUG:  proc_exit(0)
2005-06-02 13:26:17 DEBUG:  shmem_exit(0)
2005-06-02 13:26:17 DEBUG:  exit(0)
2005-06-02 13:26:17 DEBUG:  forked new backend, pid=18284 socket=9
2005-06-02 13:26:17 DEBUG:  reaping dead processes
2005-06-02 13:26:17 DEBUG:  child process (PID 18284) exited with exit 
code 0
2005-06-02 13:26:17 LOG:  record with zero length at 0/FC609C
2005-06-02 13:26:17 LOG:  redo is not required
2005-06-02 13:26:18 FATAL:  the database system is starting up
2005-06-02 13:26:18 DEBUG:  proc_exit(0)
2005-06-02 13:26:18 DEBUG:  shmem_exit(0)
2005-06-02 13:26:18 DEBUG:  exit(0)
2005-06-02 13:26:18 DEBUG:  forked new backend, pid=18288 socket=9
2005-06-02 13:26:18 DEBUG:  reaping dead processes
2005-06-02 13:26:18 DEBUG:  child process (PID 18288) exited with exit 
code 0
2005-06-02 13:26:19 FATAL:  the database system is starting up
2005-06-02 13:26:19 DEBUG:  proc_exit(0)
2005-06-02 13:26:19 DEBUG:  shmem_exit(0)
2005-06-02 13:26:19 DEBUG:  exit(0)
2005-06-02 13:26:19 DEBUG:  forked new backend, pid=18292 socket=9
2005-06-02 13:26:19 DEBUG:  reaping dead processes
2005-06-02 13:26:19 DEBUG:  child process (PID 18292) exited with exit 
code 0
2005-06-02 13:26:19 LOG:  database system is ready
2005-06-02 13:26:19 DEBUG:  proc_exit(0)
2005-06-02 13:26:19 DEBUG:  shmem_exit(0)
2005-06-02 13:26:19 DEBUG:  exit(0)
2005-06-02 13:26:19 DEBUG:  reaping dead processes
2005-06-02 13:26:20 DEBUG:  forked new backend, pid=18296 socket=9
2005-06-02 13:26:20 DEBUG:  /usr/bin/postmaster child[18296]: starting 
with (
2005-06-02 13:26:20 DEBUG:      postgres
2005-06-02 13:26:20 DEBUG:      -v196608
2005-06-02 13:26:20 DEBUG:      -p
2005-06-02 13:26:20 DEBUG:      template1
2005-06-02 13:26:20 DEBUG:  )
2005-06-02 13:26:20 DEBUG:  InitPostgres
2005-06-02 13:26:20 DEBUG:  StartTransactionCommand
2005-06-02 13:26:20 DEBUG:  PortalRun
2005-06-02 13:26:20 DEBUG:  CommitTransactionCommand
2005-06-02 13:26:20 DEBUG:  proc_exit(0)
2005-06-02 13:26:20 DEBUG:  shmem_exit(0)
2005-06-02 13:26:20 DEBUG:  exit(0)
2005-06-02 13:26:20 DEBUG:  reaping dead processes
2005-06-02 13:26:20 DEBUG:  child process (PID 18296) exited with exit 
code 0
2005-06-02 13:27:00 DEBUG:  forked new backend, pid=18297 socket=9
2005-06-02 13:27:00 DEBUG:  received password packet
2005-06-02 13:27:00 DEBUG:  /usr/bin/postmaster child[18297]: starting 
with (
2005-06-02 13:27:00 DEBUG:      postgres
2005-06-02 13:27:00 DEBUG:      -v196608
2005-06-02 13:27:00 DEBUG:      -p
2005-06-02 13:27:00 DEBUG:      template1
2005-06-02 13:27:00 DEBUG:  )
2005-06-02 13:27:00 DEBUG:  InitPostgres
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  PortalRun
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  ProcessUtility
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  PortalRun
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  PortalRun
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  PortalRun
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  PortalRun
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  PortalRun
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  PortalRun
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  PortalRun
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:00 DEBUG:  forked new backend, pid=18298 socket=9
2005-06-02 13:27:00 DEBUG:  received password packet
2005-06-02 13:27:00 DEBUG:  /usr/bin/postmaster child[18298]: starting 
with (
2005-06-02 13:27:00 DEBUG:      postgres
2005-06-02 13:27:00 DEBUG:      -v196608
2005-06-02 13:27:00 DEBUG:      -p
2005-06-02 13:27:00 DEBUG:      limsdev
2005-06-02 13:27:00 DEBUG:  )
2005-06-02 13:27:00 DEBUG:  InitPostgres
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  PortalRun
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  ProcessUtility
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  PortalRun
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  PortalRun
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  PortalRun
2005-06-02 13:27:00 DEBUG:  ProcessUtility
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  PortalRun
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  PortalRun
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  PortalRun
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  PortalRun
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  PortalRun
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  PortalRun
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  PortalRun
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  PortalRun
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  PortalRun
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  PortalRun
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  PortalRun
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  PortalRun
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  PortalRun
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  PortalRun
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  PortalRun
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  PortalRun
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  PortalRun
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  PortalRun
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  PortalRun
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:00 DEBUG:  StartTransactionCommand
2005-06-02 13:27:00 DEBUG:  PortalRun
2005-06-02 13:27:00 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:02 DEBUG:  forked new backend, pid=18299 socket=9
2005-06-02 13:27:02 DEBUG:  received password packet
2005-06-02 13:27:02 DEBUG:  /usr/bin/postmaster child[18299]: starting 
with (
2005-06-02 13:27:02 DEBUG:      postgres
2005-06-02 13:27:02 DEBUG:      -v196608
2005-06-02 13:27:02 DEBUG:      -p
2005-06-02 13:27:02 DEBUG:      limsdev
2005-06-02 13:27:02 DEBUG:  )
2005-06-02 13:27:02 DEBUG:  InitPostgres
2005-06-02 13:27:02 DEBUG:  StartTransactionCommand
2005-06-02 13:27:02 DEBUG:  PortalRun
2005-06-02 13:27:02 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:02 DEBUG:  StartTransactionCommand
2005-06-02 13:27:02 DEBUG:  ProcessUtility
2005-06-02 13:27:02 DEBUG:  CommitTransactionCommand
2005-06-02 13:27:23 DEBUG:  StartTransactionCommand
2005-06-02 13:27:23 DEBUG:  PortalRun
2005-06-02 13:27:23 DEBUG:  find_in_dynamic_libpath: trying 
"/usr/lib/postgresql/libpljava"
2005-06-02 13:27:23 DEBUG:  find_in_dynamic_libpath: trying 
"/usr/lib/postgresql/libpljava.so"
2005-06-02 13:27:23 DEBUG:  Using integer_datetimes
2005-06-02 13:27:23 DEBUG:  Added JVM option string 
"-Djava.class.path=/usr/lib/postgresql/pljava/pljava.jar"
2005-06-02 13:27:23 DEBUG:  Added JVM option string 
"-Dsqlj.defaultconnection=jdbc:default:connection"
2005-06-02 13:27:23 DEBUG:  Added JVM option string "vfprintf"
2005-06-02 13:27:23 DEBUG:  Creating JavaVM








^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* [Pljava-dev] Re: PL/Java example queries don't respond
  2005-06-02 17:43 [Pljava-dev] PL/Java example queries don't respond 
@ 2005-06-08 06:44 ` 
  2005-06-10 16:55   ` [Pljava-dev] Re: PL/Java example queries don't respond 
  0 siblings, 1 reply; 3+ messages in thread

From:  @ 2005-06-08 06:44 UTC (permalink / raw)

Eric E wrote:
> Hi,
>    Thanks for the previous help with LD_LIBRARY_PATH and LD_PRELOAD.  I 
> will post shortly on some tricks for making these changes when launching 
> postgres from RedHat-style init scrips.
> 
>    I'm working with PL/JAVA on a postgres 7.4 instance on Suse 9.2 Pro.  
> I've successfully installed pl-java, and when go to run the examples.jar 
> file with:
> SELECT 
> sqlj.install_jar('file:///usr/lib/postgresql/pljava/examples.jar', 
> 'samples',  true);
> 
> the query runs indefinitely, and basically cannot be canceled, except 
> via a SIGQUIT to postmaster.
> 
> LD_LIBRARY_PATH is set to use java, and LD_PRELOAD points zlib at the 
> version used by the JVM.  From the log (see below), the JVM is 
> initializing, but nothing further is happening.
> 
> Any insight?
> 
Can you please try the following:
1. Reconfigure and recompile your PostgreSQL installation:

./configure --enable-cassert --enable-debug
make

2. Recompile your PL/Java using make CFLAGS=-g (make clean first).

Start your app again. Once it hangs, attach gdb to the postgres process 
that corresponds to your session, i.e.:

gdb <pid of process> <full path to postgres executable>

Once in gdb, print a stack backtrace and see where it's hung.

Regards,
Thomas Hallgren





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* [Pljava-dev] Re: PL/Java example queries don't respond
  2005-06-02 17:43 [Pljava-dev] PL/Java example queries don't respond 
  2005-06-08 06:44 ` [Pljava-dev] Re: PL/Java example queries don't respond 
@ 2005-06-10 16:55   ` 
  0 siblings, 0 replies; 3+ messages in thread

From:  @ 2005-06-10 16:55 UTC (permalink / raw)

Hi Thomas,
    Thanks for the advice - I'll hang on to this.  Since I installed 
Postgres from binaries, and didn't build it, I'm gonna hold off on 
recompiling with debugging symbols in the interest of getting my project 
done.  Turns out I got PL/Java working on Postgres 8.0 under windows, so 
I think I'll migrate my Linux installation to 8.0 as well.  Thanks again 
for all the advice.

Cheers,

Eric


Thomas Hallgren wrote:

> Eric E wrote:
>
>> Hi,
>>    Thanks for the previous help with LD_LIBRARY_PATH and LD_PRELOAD.  
>> I will post shortly on some tricks for making these changes when 
>> launching postgres from RedHat-style init scrips.
>>
>>    I'm working with PL/JAVA on a postgres 7.4 instance on Suse 9.2 
>> Pro.  I've successfully installed pl-java, and when go to run the 
>> examples.jar file with:
>> SELECT 
>> sqlj.install_jar('file:///usr/lib/postgresql/pljava/examples.jar', 
>> 'samples',  true);
>>
>> the query runs indefinitely, and basically cannot be canceled, except 
>> via a SIGQUIT to postmaster.
>>
>> LD_LIBRARY_PATH is set to use java, and LD_PRELOAD points zlib at the 
>> version used by the JVM.  From the log (see below), the JVM is 
>> initializing, but nothing further is happening.
>>
>> Any insight?
>>
> Can you please try the following:
> 1. Reconfigure and recompile your PostgreSQL installation:
>
> ./configure --enable-cassert --enable-debug
> make
>
> 2. Recompile your PL/Java using make CFLAGS=-g (make clean first).
>
> Start your app again. Once it hangs, attach gdb to the postgres 
> process that corresponds to your session, i.e.:
>
> gdb <pid of process> <full path to postgres executable>
>
> Once in gdb, print a stack backtrace and see where it's hung.
>
> Regards,
> Thomas Hallgren
>
>
>







^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2005-06-10 16:55 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-06-02 17:43 [Pljava-dev] PL/Java example queries don't respond 
2005-06-08 06:44 ` 
2005-06-10 16:55   ` 

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