[JDEV] Re: jabber; what would you like to see?

Yobb yobb at sina.com
Thu Sep 25 06:08:04 CDT 2003


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,

----- Original Message ----- 
From: "Bernino Lind" <lind at hlgroup.dk>
To: <jdev at jabber.org>
Sent: Thursday, September 25, 2003 4:39 PM
Subject: RE: [JDEV] Re: jabber; what would you like to see?


> Dear sirs,
> 
> I would like to see jabber move in a direction where LDAP and RDBM is a
> robust integrated part of the infrastructure.
> 
> Also and in extension I would like to see a non-agent'ified middleware
> component - ie. that a programmer can pick any packet or piece of packet
> and apply whatever program to this packet with no restrictions - aka the
> way FORMs are to http->html and php is to html.
> 
> Right now I have tweaked the current xdb_sql so that it meets my
> requirements (ie. I have some processing in the C code related to my and
> only my project which manipulates the packets I receive, for example "if
> username == bernino { printf 'woooo'; }" - what I call middleware, since
> it is not backend nor frontend).
> 
> I do not like prototyping in C - it reminds me too much of my days in
> astrophysics doing models of the universe in Fortran 77 on a
> supercomputer - damn it takes so much time. I like prototyping in Perl
> or other highlevel language.
> 
> So I have made my own xdb method, namely opening for an external
> component, which then handles packets in the namespaces I have told it
> to, and passing the data the packets might contain to forexample DBI.
> Just like the xdb_perl project.
> 
> In this work I have met one really irritating limitation: passing data
> along is not very easy in a iq-get packet. I dont know if it is me who
> is lame, but I simply cant find any examples of a iq-get packet that
> sends more data than the username and xmlns.
> 
> Lets say I would like to make a query where I fetch entries in my roster
> groups that have been online within the last day. This is where the
> current limiation lies within Jabber - its not possible in any other way
> than creating an external component, a specific xmlns and have this
> specific xmlns coded with static information, in this case the distance
> in time from last login.
> 
> What I picture is that one could have a scripting languague within the
> packets, for example:
> 
> <iq type="get">
> <query xmlns="bla bla">
> <script>
> @users=fetchroster(1,2,3);
> for ($i=0; $i<$@#users) {
>    echo "<message to=@user[$i]> In my new roster bla bla ";
> }
> createrostergroup(@users, "newrostergroup");
> return @users;
> </script>
> </query>
> </iq>
> 
> And a backend language, jabberlang:
> 
> <iq type="get">
> <query xmlns="jabberlang">
> <url>test.jab</url>
> <value1>blabla</value1>
> <value2>123</value2>
> </query>
> </iq>
> 
> When jabber sees the jabberlang packet it know to fire off the test.jab
> file, which is say a python program or whatever and it passes the value1
> and value2 to the program. The test.jab does whatever to this data with
> the full access to jabber at hand, ie. xdb etc. is available, and then
> it returns whatever result to the client.
> 
> In this way one it would be trivial to create a groupware project, voip
> ... whatever utility out of the infrastructure, since in this way what
> we have achieved is completely generalised generic xml socket server -
> in difference to what it is now: a more or less specific project aimed
> at messengers.
> 
> It is not that it is not possible doing tricks with jabber - I myself
> have created a multiuser gameplatform via flash and web and with a
> PostgreSQL backend - its just that when one works out such a project it
> becomes evident that the rationale behind jabber is not a generic set of
> building blocks, as stated in the DJ Adams book, but rather a specific
> messenger project which can be tweaked to behave as you would like it
> to.
> 
> Best regards,
> Bernino Lind
> 
> 
> 
> -----Original Message-----
> From: jdev-admin at jabber.org [mailto:jdev-admin at jabber.org] On Behalf Of
> GuruJ
> Sent: Wednesday, September 24, 2003 12:16 PM
> To: jdev at jabber.org
> Subject: [JDEV] Re: jabber; what would you like to see?
> 
> 
> Personally, I'd love to see Jabber making inroads into the 
> groupware/collaboration scene (maybe along the lines of Groove).
> 
> -- GuruJ.
> 
> milk wrote:
> 
> > out of interest, i was just wondering what everyone thinks about what 
> > the
>  > most important current/upcoming jabber features are, what features do
> > you personally think need to be developed/expanded, and what 
> tasks/applications
>  > would you like to see jabber doing/working with in say, one or two  >
> years time?
> 
> 
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev
> 
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev
> 
> 



More information about the JDev mailing list