[JDEV] Packets not sent from server

Schuyler Heath sheath at jabber.org
Tue May 29 11:52:12 CDT 2001


Hello,

Yes, your analysis is correct.  The xdb_get() blocks the thread
which the packet was delivered from, in this case the main MIO
thread used by pthsock.  Since base_accept also uses MIO, the packet
delivered to it is never written until the request expires and the
thread is unblocked.  I'll get a fix into CVS in a few hours.

Because auth is done by another component, JSM never "learns" anything
about the user prior to the session start after auth.  It doesn't even
know the user name actually exists.

The jabber:iq:auth xdb_get() is done to make sure the user exists, since
all valid users should have jabber:iq:auth set.  JSM doesn't actually check the
result, just that there was indeed data returned.  It will do this xdb_get()
when ever it receives a packet to a user without a session or a previously
cached result(before storing offline messages, for example).

When auth is handled by JSM, it still does the jabber:iq:auth request, just in another
thread.  The result is cached, so the xdb_get() which is blocking MIO when the session
starts is rarely called.

Schuyler

On Tue, May 29, 2001 at 04:43:36PM +0200, Gerard BUNEL wrote:
> After a few analyze of what happens:
> 
> It seems that the thread handling the XDB requests is locked, as it can be seen in the logs, there are 3 attempts to deliver to
> the instance, and so 3calls to mio_write. But this calls are not followed by the _mio_write_dump
> These one occurs after a probable timeout.
> 
> Does anyone ever encountered this problem ?
> Is there a solution ?
> 
> 
> Mon May 28 15:54:16 2001  deliver.c:649 delivering to instance
> 'xdb_test'
> Mon May 28 15:54:16 2001  mio.c:908 mio_write called on x: 8377CD0
> buffer: (null)
> Mon May 28 15:54:16 2001  xdb.c:201 xdb_get() waiting for
> gbunel at cezon.ago.fr jabber:iq:auth
> Mon May 28 15:54:27 2001  deliver.c:460 DELIVER 2:cezon.ago.fr <xdb
> type='get' to='gbunel at cezon.ago.fr' from='sessions' ns='jabber:iq:auth'
> id='1'/>
> Mon May 28 15:54:27 2001  deliver.c:649 delivering to instance
> 'xdb_test'
> Mon May 28 15:54:27 2001  mio.c:908 mio_write called on x: 83731F0
> buffer: (null)
> Mon May 28 15:54:38 2001  deliver.c:460 DELIVER 2:cezon.ago.fr <xdb
> type='get' to='gbunel at cezon.ago.fr' from='sessions' ns='jabber:iq:auth'
> id='1'/>
> Mon May 28 15:54:38 2001  deliver.c:649 delivering to instance
> 'xdb_test'
> Mon May 28 15:54:38 2001  mio.c:908 mio_write called on x: 8373A48
> buffer: (null)
> Mon May 28 15:54:49 2001  xdb.c:206 xdb_get() done waiting for
> gbunel at cezon.ago.fr jabber:iq:auth
> 
> --
> gerard.bunel at ago.fr - Atlantide - http://www.ago.fr/atlantide/
> Technopole Brest Iroise BP 80802 - Site du Vernis - 29608 Brest cedex - France
> Tel. : +33 2 98 05 43 21 - Fax. : +33 2 98 05 20 34
> e-mail: atlantide-brest at ago.fr
> Centre Affaires Oberthur - 74D, rue de Paris -  35700 Rennes - France
> Tel. : +33 2 99 84 15 84 - Fax : +33 2 99 84 15 85
> e-mail: atlantide-rennes at ago.fr
> 
> 
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <https://www.jabber.org/jdev/attachments/20010529/29b13c0d/attachment-0002.pgp>


More information about the JDev mailing list