[JDEV] Has anyone ever actually TESTED this ?????
Dennis Noordsij
dennis.noordsij at wiral.com
Tue Jan 9 21:29:47 CST 2001
Also, when trying to register a new account the same thing happens: after
receiving the second xdb reply from my DB component jabber segfaults.
I guess something goes screwy in the xdb handling which causes any subsequent
(the second one) xdb_get()s to crash the server.
Either way, not what anyone needs :-)
Regards,
Dennis
PS I know, I can dive into the code and find out what is wrong myself, but
even though I have fun writing pretty much anything communicating to jabber
through a socket, using nothing but libjabber, libxode and libpthread I do
not know a thing about gnupth, and don't like them either :-). Besides,
someone who was actually involved in designing the jabber architecture can
most likely pretty much straight away determine what is wrong anyway.
Wether it is easy to fix is another question, but just knowing where the
logic fails would be a great help.
Would some kind of a wrapper be an idea? Like a loadable module like
xdb_file.so but one that simply re-routes the packets to an external
component?
If so, do all xdb replies have to be returned in the right order? (ie while
one xdb request is taking some time a later one that is already finished can
not be returned until the first (slow) one is?
> Hi,
>
> With regard to an external XDB (base_accept) component..
>
> has anyone ever done it before ????????
>
>
>
>
> I am following *exactly* the same XML query-results as the normal
> xdb_file.so but for some reason, because I am connected via base_accept,
> jabber just crashes *every single time*.
>
> When using xdb_file.so:
>
> user tries to log in, jabber sends:
> <xdb type='get' from='user at host/jabber:iq:auth' to='xdb' id='1'/>
> xdb replies:
> <xdb type='result' from='xdb' to='user at host/jabber:iq:auth' id='1'>
> <password>dapassword</password></xdb>
>
> Then, for some reason, jabber repeats the thing with id=2
> <xdb type='get' from='user at host/jabber:iq:auth' to='xdb' id='2'/>
> Again, xdb replies with:
> <xdb type='result' from='xdb' to='user at host/jabber:iq:auth' id='2'>
> <password>dapassword</password></xdb>
>
> And then everything merrily continues.
>
>
>
> If I replace the standard xdb with an <accept>ing external program, same
> thing happens.
>
> Jabber sends xdb get id 1, components replies with the *exact* same xml as
> xdb_file.so
>
> Jabber sends xdb get id 2, component replies with the *exact* same xml as
> xdb_file.so
>
> ---- Jabber segfaults.
>
>
>
> So, is it actually even POSSIBLE to have xdb components NOT compiled into
> jabber as loadable modules ?
>
>
> In base_load.c the xdb_get and xdb_set functions block until a reply is
> received, however that reply comes via base_accept. Does that matter in
> this case? (it still reports "xdb_get() done waiting", but does it screw up
> some mutex/memory/semaphore stuff so badly it just dies after that?)
>
> Please don't tell me after all this that xdb components can not be based on
> base_accept !
>
>
>
>
> Sorry if I sound peeved off, I had everything lined up to have a DB XDB
> component tonight but now I'm stuck with this. I appreciate any pointers
> :-)
>
> Regards,
> Dennis
>
>
> For your enjoyment 2 dumps, spot the differences. One of them segfaults.
> WHY?
>
> ---
> Wed Jan 10 05:14:04 2001 authreg.c:52 auth request
> Wed Jan 10 05:14:04 2001 users.c:147
> js_user(mitja at jabber.mydomain.com/gabber,818B2E8)
> Wed Jan 10 05:14:04 2001 users.c:159 js_user not current
> Wed Jan 10 05:14:04 2001 deliver.c:472 DELIVER 2:jabber.mydomain.com <xdb
> type='get' to='mitja at jabber.mydomain.com/jabber:iq:auth'
> from='jabber.mydomain.com'
> id='1'/>
> Wed Jan 10 05:14:04 2001 deliver.c:344 delivering to instance 'xdb'
> Wed Jan 10 05:14:04 2001 base_load.c:323 xdb_get() waiting for
> mitja at jabber.mydomain.com/gabber jabber:iq:auth
> Wed Jan 10 05:14:04 2001 mtq 81ECBB0 starting
> Wed Jan 10 05:14:04 2001 mtq 81ECBB0 leaving to pth
> Wed Jan 10 05:14:04 2001 mtq 81FCE50 starting
> Wed Jan 10 05:14:04 2001 mtq 81FCE50 leaving to pth
> Wed Jan 10 05:14:04 2001 mtq 820D0F0 starting
> Wed Jan 10 05:14:04 2001 mtq 820D0F0 leaving to pth
> Wed Jan 10 05:14:04 2001 mtq 821D390 starting
> Wed Jan 10 05:14:04 2001 mtq 821D390 leaving to pth
> Wed Jan 10 05:14:04 2001 base_accept.c:341 io incoming message event for
> 15 Wed Jan 10 05:14:04 2001 base_accept.c:328 io read event for 15
> Wed Jan 10 05:14:04 2001 base_accept.c:213 base_accept: <xdb id='1'
> from='mitja at jabber.mydomain.com/jabber:iq:auth' to='jabber.mydomain.com'
> type='result'><password>dapassword</password></xdb>
> Wed Jan 10 05:14:04 2001 deliver.c:472 DELIVER 1:jabber.mydomain.com <xdb
> id='1' from='mitja at jabber.mydomain.com/jabber:iq:auth'
> to='jabber.mydomain.com'
> type='result'><password>dapassword</password></xdb>
> Wed Jan 10 05:14:04 2001 deliver.c:344 delivering to instance 'sessions'
> Wed Jan 10 05:14:04 2001 base_load.c:167 xdb_results checking xdb packet
> <xdb id='1' from='mitja at jabber.mydomain.com/jabber:iq:auth'
> to='jabber.mydomain.com'
> type='result'><password>dapassword</password></xdb> Wed Jan 10 05:14:04
> 2001 base_load.c:327 xdb_get() done waiting for
> mitja at jabber.mydomain.com/gabber jabber:iq:auth
> Wed Jan 10 05:14:04 2001 users.c:179 js_user debug 822D808 822D808
> Wed Jan 10 05:14:04 2001 modules.c:127 mapi_call 5
> Wed Jan 10 05:14:04 2001 modules.c:150 MAPI 810B748
> Wed Jan 10 05:14:04 2001 mod_auth_plain checking
> Wed Jan 10 05:14:04 2001 modules.c:150 MAPI 810B7A8
> Wed Jan 10 05:14:04 2001 mod_auth_digest checking
> Wed Jan 10 05:14:04 2001 deliver.c:472 DELIVER 2:jabber.mydomain.com <xdb
> type='get' to='mitja at jabber.mydomain.com/jabber:iq:auth'
> from='jabber.mydomain.com'
> id='2'/>
> Wed Jan 10 05:14:04 2001 deliver.c:344 delivering to instance 'xdb'
> Wed Jan 10 05:14:04 2001 base_load.c:323 xdb_get() waiting for
> mitja at jabber.mydomain.com jabber:iq:auth
> Wed Jan 10 05:14:04 2001 base_accept.c:341 io incoming message event for
> 15 Wed Jan 10 05:14:04 2001 base_accept.c:328 io read event for 15
> Wed Jan 10 05:14:04 2001 base_accept.c:213 base_accept: <xdb id='2'
> from='mitja at jabber.mydomain.com/jabber:iq:auth' to='jabber.mydomain.com'
> type='result'><password>dapassword</password></xdb>
> Wed Jan 10 05:14:04 2001 deliver.c:472 DELIVER 1:jabber.mydomain.com <xdb
> id='2' from='mitja at jabber.mydomain.com/jabber:iq:auth'
> to='jabber.mydomain.com'
> type='result'><password>dapassword</password></xdb>
> Wed Jan 10 05:14:04 2001 deliver.c:344 delivering to instance 'sessions'
> Wed Jan 10 05:14:04 2001 base_load.c:167 xdb_results checking xdb packet
> <xdb id='2' from='mitja at jabber.mydomain.com/jabber:iq:auth'
> to='jabber.mydomain.com'
> type='result'><password>dapassword</password></xdb> Wed Jan 10 05:14:04
> 2001 base_load.c:327 xdb_get() done waiting for mitja at jabber.mydomain.com
> jabber:iq:auth
> Wed Jan 10 05:14:04 2001 mod_auth_digest Got SID: 3A5BD37C
> Wed Jan 10 05:14:04 2001 mod_auth_digest comparing
> 8e27b43170e95ea62396869bd7085f76d214a70e
> 8e27b43170e95ea62396869bd7085f76d214a70e
> Wed Jan 10 05:14:04 2001 deliver.c:472 DELIVER 4:c2s <route
> from='mitja at jabber.mydomain.com/gabber' to='19 at c2s/8165F98' type='auth'><iq
> id='A0' type='result'/></route>
> Wed Jan 10 05:14:04 2001 deliver.c:344 delivering to instance 'c2s'
> Wed Jan 10 05:14:04 2001 client.c:124 Found the sock for this user
> Wed Jan 10 05:14:04 2001 client.c:141 auth for user successful
> Wed Jan 10 05:14:04 2001 deliver.c:472 DELIVER 4:jabber.mydomain.com
> <route type='session' to='mitja at jabber.mydomain.com/gabber'
> from='19 at c2s/8165F98'/> Wed Jan 10 05:14:04 2001 deliver.c:344 delivering
> to instance 'sessions' Wed Jan 10 05:14:04 2001 deliver.c:84
> (80D69C8)incoming packet <route type='session'
> to='mitja at jabber.mydomain.com/gabber' from='19 at c2s/8165F98'/>
>
> SEGFAULTS EITHER HERE OR AFTER THE LAST XDB_GET() DONE WAITING...
> ---
>
>
> ---
> Wed Jan 10 05:16:39 2001 authreg.c:52 auth request
> Wed Jan 10 05:16:39 2001 users.c:147
> js_user(mitja at jabber.mydomain.com/gabber,8159C30)
> Wed Jan 10 05:16:39 2001 users.c:159 js_user not current
> Wed Jan 10 05:16:39 2001 deliver.c:472 DELIVER 2:jabber.mydomain.com <xdb
> type='get' to='mitja at jabber.mydomain.com/jabber:iq:auth'
> from='jabber.mydomain.com'
> id='1'/>
> Wed Jan 10 05:16:39 2001 deliver.c:344 delivering to instance 'xdb'
> Wed Jan 10 05:16:39 2001 xdb_file.c:161 handling xdb request <xdb
> type='get' to='mitja at jabber.mydomain.com/jabber:iq:auth'
> from='jabber.mydomain.com' id='1'/>
> Wed Jan 10 05:16:39 2001 xdb_file.c:98 loading
> ./spool/jabber.mydomain.com/mitja.xml
> Wed Jan 10 05:16:39 2001 xdb_file.c:118 caching
> ./spool/jabber.mydomain.com/mitja.xml
> Wed Jan 10 05:16:39 2001 deliver.c:472 DELIVER 1:jabber.mydomain.com <xdb
> type='result' to='jabber.mydomain.com'
> from='mitja at jabber.mydomain.com/jabber:iq:auth'
> id='1'><password>dapassword</password></xdb>
> Wed Jan 10 05:16:39 2001 deliver.c:344 delivering to instance 'sessions'
> Wed Jan 10 05:16:39 2001 base_load.c:167 xdb_results checking xdb packet
> <xdb type='result' to='jabber.mydomain.com'
> from='mitja at jabber.mydomain.com/jabber:iq:auth'
> id='1'><password>dapassword</password></xdb>
> Wed Jan 10 05:16:39 2001 users.c:179 js_user debug 81FC0B8 81FC0B8
> Wed Jan 10 05:16:39 2001 modules.c:127 mapi_call 5
> Wed Jan 10 05:16:39 2001 modules.c:150 MAPI 810BAD0
> Wed Jan 10 05:16:39 2001 mod_auth_plain checking
> Wed Jan 10 05:16:39 2001 modules.c:150 MAPI 810BB30
> Wed Jan 10 05:16:39 2001 mod_auth_digest checking
> Wed Jan 10 05:16:39 2001 deliver.c:472 DELIVER 2:jabber.mydomain.com <xdb
> type='get' to='mitja at jabber.mydomain.com/jabber:iq:auth'
> from='jabber.mydomain.com'
> id='2'/>
> Wed Jan 10 05:16:39 2001 deliver.c:344 delivering to instance 'xdb'
> Wed Jan 10 05:16:39 2001 xdb_file.c:161 handling xdb request <xdb
> type='get' to='mitja at jabber.mydomain.com/jabber:iq:auth'
> from='jabber.mydomain.com' id='2'/>
> Wed Jan 10 05:16:39 2001 xdb_file.c:98 loading
> ./spool/jabber.mydomain.com/mitja.xml
> Wed Jan 10 05:16:39 2001 deliver.c:472 DELIVER 1:jabber.mydomain.com <xdb
> type='result' to='jabber.mydomain.com'
> from='mitja at jabber.mydomain.com/jabber:iq:auth'
> id='2'><password>dapassword</password></xdb>
> Wed Jan 10 05:16:39 2001 deliver.c:344 delivering to instance 'sessions'
> Wed Jan 10 05:16:39 2001 base_load.c:167 xdb_results checking xdb packet
> <xdb type='result' to='jabber.mydomain.com'
> from='mitja at jabber.mydomain.com/jabber:iq:auth'
> id='2'><password>dapassword</password></xdb>
> Wed Jan 10 05:16:39 2001 mod_auth_digest Got SID: 3A5BD417
> Wed Jan 10 05:16:39 2001 mod_auth_digest comparing
> 732da8fcf49723d897e7767c6627f3a70558ca60
> 732da8fcf49723d897e7767c6627f3a70558ca60
> Wed Jan 10 05:16:39 2001 deliver.c:472 DELIVER 4:c2s <route
> from='mitja at jabber.mydomain.com/gabber' to='17 at c2s/8158228' type='auth'><iq
> id='A0' type='result'/></route>
> Wed Jan 10 05:16:39 2001 deliver.c:344 delivering to instance 'c2s'
> Wed Jan 10 05:16:39 2001 client.c:124 Found the sock for this user
> Wed Jan 10 05:16:39 2001 client.c:141 auth for user successful
> Wed Jan 10 05:16:39 2001 deliver.c:472 DELIVER 4:jabber.mydomain.com
> <route type='session' to='mitja at jabber.mydomain.com/gabber'
> from='17 at c2s/8158228'/> Wed Jan 10 05:16:39 2001 deliver.c:344 delivering
> to instance 'sessions' Wed Jan 10 05:16:39 2001 deliver.c:84
> (80D6D50)incoming packet <route type='session'
> to='mitja at jabber.mydomain.com/gabber' from='17 at c2s/8158228'/>
>
> CONTINUES HAPPILY
> ---
>
>
>
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev
More information about the JDev
mailing list