I was able to get this working. I couldn't find any way to get a thread safe or single threaded Oracle client library. So what I did was rebuild the pth library with pthread support (added --enable-pthread to the configure script parameter in the pth-1.4.0 directory). I then made a symlink to the libpthread.so library it generated in $ORACLE_HOME/lib. Then I ran the genclntsh script in $ORACLE_HOME/bin to rebuild the client libraries so it would pick up the other threading library.
Pth doesn't actually use the libc pthreads when you add the --enable-pthread flag, but provides a wrapper api for pthread --> pth, so there's no conflict created with using different threading libraries. I don't know why it printed two connected messages in my output below, xdb_sql is printing two of everything. I haven't investigated it yet though. -- Jason > I don't have Oracle, so I probably cannot help much. But, it seems like the > errors are threading related? It looks like your Oracle backend is creating > two connections? I don't remember the other backends (mysql, etc.) doing > this? Are you compiling with thread-safe Oracle libraries? As I said, I'm > not familiar with Oracle, but Sybase has single-threaded and multi-threaded > libraries. Do you perhaps need to set any special Oracle compile flags > related to threading? > > -- Ryan -----Original Message----- From: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> [mailto: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>] On Behalf Of Yobb Sent: Wednesday, September 24, 2003 5:46 AM To: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> Subject: [JDEV] Re: jabberd 1.4.2 segfaulting on xdb_sql, linux, oracle Is there anybody give some useful suggests about the problem Jason said? I am being troubled too. ----- Original Message ----- From: "Smith, Jason" < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> Newsgroups: gmane.network.jabber.devel Sent: Friday, September 19, 2003 12:26 AM Subject: jabberd 1.4.2 segfaulting on xdb_sql, linux, oracle > Hello, > > The jabberd process gives me a segmentation fault when run with xdb_sql and > Oracle. I'm able to run jabberd fine under an identical setup with xdb_sql > and mysql. I'm running jabberd 1.4.2, the latest CVS version of xdb_sql, > and oracle client version 9.2.0.3.0 on Debian linux with libc version 2.3.2. > > If I run the daemon without the debug switch the daemon will segault > immediately after I try to connect to the server. Here's a backtrace: > > (gdb) r > Starting program: /home/jsmith/jabber/jabber-1.4.2/jabberd/jabberd > [New Thread 16384 (LWP 5372)] > xdboracle_backend_new: initialized > xdboracle_backend_new: initialized > xdboracle_connect: Logged to Oracle, db=jabber, user=jabberuser, pass=pass > xdboracle_connect: Logged to Oracle, db=jabber, user=jabberuser, pass=pass > oracle_query: select SYSDATE from DUAL type 1 > oracle_query: select SYSDATE from DUAL type 1 > xdboracle_is_connected: connected > xdboracle_is_connected: connected > xdboracle_free_result: done > xdboracle_free_result: done > 20030918T08:11:19: [notice] (-internal): initializing server > > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread 16384 (LWP 5372)] > 0x40bd9426 in __pthread_internal_tsd_get () from /lib/libpthread.so.0 > (gdb) bt > #0 0x40bd9426 in __pthread_internal_tsd_get () from /lib/libpthread.so.0 > #1 0x400a0de8 in malloc () from /lib/libc.so.6 > #2 0x400a51cc in strdup () from /lib/libc.so.6 > #3 0x0805a5e7 in jlimit_check (r=0x81ce660, key=0x4014e52c "localhost", > points=1) > at rate.c:82 > #4 0x08050c4b in _mio_accept (m=0x81ce5c0) at mio.c:400 > #5 0x080519da in _mio_main (arg=0x0) at mio.c:704 > #6 0x0807d4af in pth_spawn_trampoline () > #7 0x40077014 in makecontext () from /lib/libc.so.6 > > > And when I try to run with debugging information, it will segfault when the > daemon starts up, when it tries to write the debugging output to the > console: > > (gdb) r -D > [ snip ... ] > 20030918T08:06:26: [notice] (-internal): initializing server > Thu Sep 18 10:06:26 2003 jabberd.c:255 main load check of 1.00 with 3 total > threads > > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread 16384 (LWP 5065)] > 0x4005832e in __ctype_b_loc () from /lib/libc.so.6 > (gdb) bt > #0 0x4005832e in __ctype_b_loc () from /lib/libc.so.6 > #1 0x0805b708 in format_converter (odp=0x8113ca8, fmt=0x808326d "s:%d", > ap=0x8113cf4 " \027\b\bl\002") at snprintf.c:579 > #2 0x0805c097 in strx_printv (ccp=0x8113cdc, buf=0x808d580 "jabberd.c:256", > len=62, > format=0x808326c "%s:%d", ap=0x8113cf4 " \027\b\bl\002") at > snprintf.c:904 > #3 0x0805c0e9 in ap_snprintf (buf=0x808d580 "jabberd.c:256", len=63, > format=0x808326c "%s:%d") at snprintf.c:918 > #4 0x0805cd03 in zonestr (file=0x8081720 "mio.c", line=620) at str.c:343 > #5 0x08051545 in _mio_main (arg=0x0) at mio.c:620 > #6 0x0807d4af in pth_spawn_trampoline () > #7 0x40077014 in makecontext () from /lib/libc.so.6 > > > In both cases, it segfaults when trying to make a libc call. Also, in the > first case I noticed the server is making a libpthread call. Should the > jabber daemon be using both libpthread and pth? > > Does anyone have any suggestions as to what the problem could be or could be > able to offer any tips on debugging? > > Thanks, > Jason _______________________________________________ jdev mailing list [EMAIL PROTECTED] http://mailman.jabber.org/listinfo/jdev
