[Kamailio-Users] db_mysql errors doing presence activity

Pascal Maugeri pascal.maugeri at gmail.com
Tue Jun 9 17:45:21 CEST 2009


OK good news, with the lastest of 1.5 branch I could not reproduced the bug
I reported.

I've sent something like 3x1000 SIP PUBLISH requests and couldn't get the
error (with 1.5.1. after 40-50 req, the bug was reproduced easily).

Thanks a lot to both for your help!
-pascal

On Tue, Jun 9, 2009 at 5:32 PM, Pascal Maugeri <pascal.maugeri at gmail.com>wrote:

> at least it starts :-)
> let's see if I get these db errors ...
> -pascal
>
>
> On Tue, Jun 9, 2009 at 5:28 PM, Pascal Maugeri <pascal.maugeri at gmail.com>wrote:
>
>> ok I try it again
>> -pascal
>>
>>
>> On Tue, Jun 9, 2009 at 5:27 PM, Daniel-Constantin Mierla <
>> miconda at gmail.com> wrote:
>>
>>> I mistakenly returned error code even all was ok, in the previous commit.
>>> Should be fixed on svn.
>>>
>>> Thanks,
>>> Daniel
>>>
>>> On 06/09/2009 06:22 PM, Pascal Maugeri wrote:
>>>
>>>> I just tried your fix but now the server does not start any more and
>>>> gives the following error:
>>>>
>>>> Jun  9 19:19:20 sandbox /usr/sbin/kamailio[15982]: INFO:core:init_mod:
>>>> initializing module xcap_client
>>>> Jun  9 19:19:20 sandbox /usr/sbin/kamailio[15982]: INFO:core:init_mod:
>>>> initializing module pua
>>>> Jun  9 19:19:20 sandbox /usr/sbin/kamailio[15982]: INFO:pua:db_restore:
>>>> the query returned no result
>>>> Jun  9 19:19:20 sandbox /usr/sbin/kamailio[15982]:
>>>> INFO:core:probe_max_receive_buffer: using a UDP receive buffer of 255 kb
>>>> Jun  9 19:19:20 sandbox /usr/sbin/kamailio[15989]:
>>>> ERROR:core:init_mod_child: failed to initializing module xcap_client, rank 1
>>>> Jun  9 19:19:20 sandbox /usr/sbin/kamailio[15989]: ERROR:core:main_loop:
>>>> init_child failed for UDP listener
>>>> Jun  9 19:19:20 sandbox /usr/sbin/kamailio[15990]:
>>>> ERROR:core:init_mod_child: failed to initializing module xcap_client, rank 2
>>>> Jun  9 19:19:20 sandbox /usr/sbin/kamailio[15990]: ERROR:core:main_loop:
>>>> init_child failed for UDP listener
>>>> Jun  9 19:19:20 sandbox /usr/sbin/kamailio[15992]:
>>>> ERROR:core:init_mod_child: failed to initializing module xcap_client, rank 3
>>>> Jun  9 19:19:20 sandbox /usr/sbin/kamailio[15993]:
>>>> ERROR:core:init_mod_child: failed to initializing module xcap_client, rank 4
>>>> Jun  9 19:19:20 sandbox /usr/sbin/kamailio[15993]: ERROR:core:main_loop:
>>>> init_child failed for UDP listener
>>>> Jun  9 19:19:20 sandbox /usr/sbin/kamailio[15992]: ERROR:core:main_loop:
>>>> init_child failed for UDP listener
>>>>
>>>> -pascal
>>>>
>>>>
>>>> On Tue, Jun 9, 2009 at 1:57 PM, Daniel-Constantin Mierla <
>>>> miconda at gmail.com <mailto:miconda at gmail.com>> wrote:
>>>>
>>>>    I did a fix for what Inaki reported for xcap_client, you can get
>>>>    latest svn version for 1.5 and try again, maybe that was the issue.
>>>>
>>>>    Thanks,
>>>>    Daniel
>>>>
>>>>
>>>>    On 06/08/2009 04:54 PM, Pascal Maugeri wrote:
>>>>
>>>>        Daniel, do you want me to do other test ?
>>>>        -pascal
>>>>
>>>>        On Fri, Jun 5, 2009 at 4:26 PM, Pascal Maugeri
>>>>        <pascal.maugeri at gmail.com <mailto:pascal.maugeri at gmail.com>
>>>>        <mailto:pascal.maugeri at gmail.com
>>>>        <mailto:pascal.maugeri at gmail.com>>> wrote:
>>>>
>>>>           OK now I can provide you more feedback regarding this issue
>>>> and
>>>>           using your patch:
>>>>
>>>>           Jun  5 18:21:17 sandbox /usr/sbin/kamailio[15152]:
>>>>           ERROR:db_mysql:db_mysql_submit_query: submit_query(): select
>>>>           body,sender from presentity where domain='intra.genaker.net
>>>>        <http://intra.genaker.net>
>>>>           <http://intra.genaker.net>' AND username='sipp1' AND
>>>>
>>>>           event='presence' AND etag='a.1244218834.15152.106.1'
>>>>           Jun  5 18:21:17 sandbox /usr/sbin/kamailio[15150]:
>>>>           ERROR:db_mysql:db_mysql_submit_query: submit_query(): select
>>>>           body,sender from presentity where domain='intra.genaker.net
>>>>        <http://intra.genaker.net>
>>>>           <http://intra.genaker.net>' AND username='sipp1' AND
>>>>
>>>>           event='presence' AND etag='a.1244218834.15151.101.0'
>>>>           Jun  5 18:21:17 sandbox /usr/sbin/kamailio[15152]:
>>>>           ERROR:db_mysql:db_mysql_submit_query: submit_query():
>>>>        delete from
>>>>           presentity where domain='intra.genaker.net
>>>>        <http://intra.genaker.net>
>>>>           <http://intra.genaker.net>' AND username='sipp1' AND
>>>>
>>>>           event='presence' AND etag='a.1244218834.15152.106.1'
>>>>           Jun  5 18:21:17 sandbox /usr/sbin/kamailio[15150]:
>>>>           ERROR:db_mysql:db_mysql_submit_query: submit_query(): update
>>>>           presentity set
>>>>
>>>> etag='a.1244218834.15150.110.1',expires=1244218977,received_time=1244218877,body='<?xml
>>>>           version=\"1.0\" encoding=\"UTF-8\"?> [HIDDEN]' where
>>>>           domain='intra.genaker.net <http://intra.genaker.net>
>>>>        <http://intra.genaker.net>' AND
>>>>
>>>>           username='sipp1' AND event='presence' AND
>>>>           etag='a.1244218834.15151.101.0'
>>>>           Jun  5 18:21:17 sandbox /usr/sbin/kamailio[15153]:
>>>>           ERROR:db_mysql:db_mysql_submit_query: submit_query(): select
>>>>           body,sender from presentity where domain='intra.genaker.net
>>>>        <http://intra.genaker.net>
>>>>           <http://intra.genaker.net>' AND username='sipp1' AND
>>>>
>>>>           event='presence' AND etag='a.1244218834.15152.107.1'
>>>>           Jun  5 18:21:17 sandbox /usr/sbin/kamailio[15153]:
>>>>           ERROR:db_mysql:db_mysql_submit_query: driver error on query:
>>>>           Commands out of sync; you can't run this command now
>>>>           Jun  5 18:21:17 sandbox /usr/sbin/kamailio[15153]:
>>>>           ERROR:core:db_do_query: error while submitting query
>>>>
>>>>           So you can see the previous SQL commands sent.
>>>>
>>>>           Do you need anything else ?
>>>>
>>>>           -pascal
>>>>
>>>>
>>>>
>>>>
>>>>           On Fri, Jun 5, 2009 at 2:53 PM, Pascal Maugeri
>>>>           <pascal.maugeri at gmail.com <mailto:pascal.maugeri at gmail.com>
>>>>        <mailto:pascal.maugeri at gmail.com
>>>>        <mailto:pascal.maugeri at gmail.com>>> wrote:
>>>>
>>>>               Sorry I misunderstood what you want me to do: please just
>>>>               forget my previous email.
>>>>
>>>>               Now I'm going to generate some load to reproduce the
>>>>        failure
>>>>               and I'll send you the feedback you expect.
>>>>
>>>>               -pascal
>>>>
>>>>
>>>>               On Fri, Jun 5, 2009 at 2:15 PM, Pascal Maugeri
>>>>               <pascal.maugeri at gmail.com
>>>>        <mailto:pascal.maugeri at gmail.com>
>>>>        <mailto:pascal.maugeri at gmail.com
>>>>        <mailto:pascal.maugeri at gmail.com>>>
>>>>
>>>>               wrote:
>>>>
>>>>                   Hi
>>>>
>>>>                   I just applied your patch and I get - with no
>>>>        traffic yet
>>>>                   - continusouly this log:
>>>>
>>>>                   Jun  5 16:07:24 sandbox /usr/sbin/kamailio[14713]:
>>>>                   ERROR:db_mysql:db_mysql_submit_query: submit_query():
>>>>                   delete from active_watchers where expires<1244210834
>>>>                   Jun  5 16:07:24 sandbox /usr/sbin/kamailio[14713]:
>>>>                   ERROR:db_mysql:db_mysql_submit_query: submit_query():
>>>>                   select id from watchers where
>>>>        inserted_time<1244124444 AND
>>>>                   status=2
>>>>                   Jun  5 16:07:24 sandbox /usr/sbin/kamailio[14713]:
>>>>                   ERROR:db_mysql:db_mysql_submit_query: submit_query():
>>>>                   select username,domain,etag,event from presentity
>>>> where
>>>>                   expires<1244210844 order by username
>>>>
>>>>                   and it never stops.
>>>>
>>>>                   I noticed that this occurs when presence server
>>>>        cleans or
>>>>                   updates database. So I change these configuration
>>>>        parameters:
>>>>
>>>>                   modparam("presence", "db_update_period", 10)
>>>>                   modparam("presence", "clean_period", 10)
>>>>
>>>>                   It changes the frequency of the log but the log always
>>>>                   appear periodically (for clean/update actions).
>>>>
>>>>                   Regards,
>>>>                   Pascal
>>>>
>>>>
>>>>                   On Fri, Jun 5, 2009 at 10:04 AM, Daniel-Constantin
>>>>        Mierla
>>>>                   <miconda at gmail.com <mailto:miconda at gmail.com>
>>>>        <mailto:miconda at gmail.com <mailto:miconda at gmail.com>>> wrote:
>>>>
>>>>
>>>>
>>>>                       On 06/05/2009 10:55 AM, Daniel-Constantin
>>>>        Mierla wrote:
>>>>
>>>>
>>>>
>>>>                           On 06/04/2009 03:14 PM, Pascal Maugeri wrote:
>>>>
>>>>                               ok, I've applied your patch changed my
>>>>                               kamailio.cfg to have debug=5 and
>>>>        restarted the
>>>>                               test.
>>>>                               I will send you send feedback ASAP
>>>>
>>>>                           ok, thanks. If it is too annoying, you can
>>>>        change
>>>>                           the LM_DBG to LM_ERR or something else (like
>>>> in
>>>>                           attached patch).
>>>>
>>>>                       ... patch attached now.
>>>>
>>>>
>>>>                           Cheers,
>>>>                           Daniel
>>>>
>>>>                                -pascal
>>>>
>>>>                               On Thu, Jun 4, 2009 at 12:09 PM,
>>>>                               Daniel-Constantin Mierla
>>>>        <miconda at gmail.com <mailto:miconda at gmail.com>
>>>>                               <mailto:miconda at gmail.com
>>>>        <mailto:miconda at gmail.com>>
>>>>                               <mailto:miconda at gmail.com
>>>>        <mailto:miconda at gmail.com>
>>>>
>>>>                               <mailto:miconda at gmail.com
>>>>        <mailto:miconda at gmail.com>>>> wrote:
>>>>
>>>>                                  Hello,
>>>>
>>>>
>>>>                                  On 06/04/2009 11:49 AM, Pascal
>>>>        Maugeri wrote:
>>>>
>>>>                                      Hello
>>>>
>>>>                                      I'm getting these errors using
>>>>        Kamailio
>>>>                               1.5.1:
>>>>
>>>>                                      Jun  4 12:25:10 sandbox
>>>>                               /usr/sbin/kamailio[5060]:
>>>>
>>>>  ERROR:db_mysql:db_mysql_submit_query:
>>>>                               driver error on query:
>>>>                                      Commands out of sync; you can't run
>>>>                               this command now
>>>>                                      Jun  4 12:25:10 sandbox
>>>>                               /usr/sbin/kamailio[5060]:
>>>>                                      ERROR:core:db_do_update: error
>>>> while
>>>>                               submitting query
>>>>                                      Jun  4 12:25:10 sandbox
>>>>                               /usr/sbin/kamailio[5060]:
>>>>                                      ERROR:presence:update_db_subs:
>>>>        updating
>>>>                               in database
>>>>                                      Jun  4 12:25:10 sandbox
>>>>                               /usr/sbin/kamailio[5060]:
>>>>
>>>>  ERROR:db_mysql:db_mysql_submit_query:
>>>>                               driver error on query:
>>>>                                      Commands out of sync; you can't run
>>>>                               this command now
>>>>                                      Jun  4 12:25:10 sandbox
>>>>                               /usr/sbin/kamailio[5060]:
>>>>                                      ERROR:core:db_do_query: error while
>>>>                               submitting query
>>>>                                      Jun  4 12:25:10 sandbox
>>>>                               /usr/sbin/kamailio[5060]:
>>>>                                      ERROR:presence:msg_watchers_clean:
>>>>                               querying database for
>>>>                                      expired messages
>>>>                                      Jun  4 12:25:10 sandbox
>>>>                               /usr/sbin/kamailio[5060]:
>>>>
>>>>  ERROR:db_mysql:db_mysql_submit_query:
>>>>                               driver error on query:
>>>>                                      Commands out of sync; you can't run
>>>>                               this command now
>>>>                                      Jun  4 12:25:10 sandbox
>>>>                               /usr/sbin/kamailio[5060]:
>>>>                                      ERROR:core:db_do_query: error while
>>>>                               submitting query
>>>>                                      Jun  4 12:25:10 sandbox
>>>>                               /usr/sbin/kamailio[5060]:
>>>>
>>>>  ERROR:presence:msg_presentity_clean:
>>>>                               querying database for
>>>>                                      expired messages
>>>>
>>>>                                      I haven't seen anything similar
>>>>        in the
>>>>                               issue tracker ? Is it a
>>>>                                      new bug ? How can I track it down ?
>>>>
>>>>                                  there seems to be a case when the
>>>> result
>>>>                               from db is not freed
>>>>                                  before making a new query. To sort
>>>>        it out,
>>>>                               please apply the patch
>>>>                                  attached and send me the last two
>>>>        queries
>>>>                               you get for the same
>>>>                                  process - the one that gives the
>>>>        error and
>>>>                               the one before.
>>>>
>>>>
>>>>                               Should
>>>>                                                          Thanks,
>>>>                                  Daniel
>>>>
>>>>
>>>>                                  --     Daniel-Constantin Mierla
>>>>                                  http://www.asipto.com/
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>>
>>>> _______________________________________________
>>>>                               Kamailio (OpenSER) - Users mailing list
>>>>                               Users at lists.kamailio.org
>>>>        <mailto:Users at lists.kamailio.org>
>>>>                               <mailto:Users at lists.kamailio.org
>>>>        <mailto:Users at lists.kamailio.org>>
>>>>
>>>>
>>>> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
>>>>
>>>> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>>>>
>>>>
>>>>
>>>>                       --                Daniel-Constantin Mierla
>>>>                       http://www.asipto.com/
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>    --    Daniel-Constantin Mierla
>>>>    http://www.asipto.com/
>>>>
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>> _______________________________________________
>>>> Kamailio (OpenSER) - Users mailing list
>>>> Users at lists.kamailio.org
>>>> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
>>>> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>>>>
>>>
>>> --
>>> Daniel-Constantin Mierla
>>> http://www.asipto.com/
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/users/attachments/20090609/34b3c032/attachment-0001.htm>


More information about the Users mailing list