[Devel] Re: crash after xlite shutdown ...

Anca-Maria Vamanu anca at voice-system.ro
Fri Apr 13 15:06:33 CEST 2007


Hi Cesc,

I am glad it works.
That with not printing the last two values was something left from the 
beginning when the filling was not done on the condition if the value is 
not NULL. It should indeed be removed now. I will do that right ahead.
It might be easier to find where the messages come from, but since the 
name of the function is always printed in debug messages it is sould not 
be that hard even so.

Best regards,

Anca Vamanu

Cesc wrote:

> Hi Anca,
>
> It seems to work ... at least I cannot reproduce the problem anymore.
> As usual, thanks a lot!
>
> One small thing, not related to this problem ...
> when inserting, you print the values in DBG mode ... except the last
> two (n_query_cols - 2 ) ... why not all? See the diff
>
> An another small thing ... this is purely my taste ... when debugging
> the presence module, I found quite annoying the fact that debug
> messages are split into two lines, which makes it difficult to grep
> to find on which line they are ... I understand that this way they fit
> the 80columns editors, but I still think they should be all in one
> line ...
>
>
> Index: modules/presence/subscribe.c
> ===================================================================
> --- modules/presence/subscribe.c        (revision 1999)
> +++ modules/presence/subscribe.c        (working copy)
> @@ -438,23 +438,25 @@
>
>                        DBG("PRESENCE:update_subscription:Inserting
> into database:"
>                                "\nn_query_cols:%d\n",n_query_cols);
> -                       for(i = 0;i< n_query_cols-2; i++)
> +//                     for(i = 0;i< n_query_cols-2; i++)
> +                       for(i = 0;i< n_query_cols; i++)
>                        {
> -                               if(query_vals[i].type==DB_STR)
> -                               DBG("[%d] = %s %.*s\n",i, query_cols[i],
> -
> query_vals[i].val.str_val.len,query_vals[i].val.str_val.s );
> -                               if(query_vals[i].type==DB_INT)
> +                               if(query_vals[i].type==DB_STR) {
> +                                       DBG("[%d] = %s %.*s\n",i, 
> query_cols[i],
> +
> query_vals[i].val.str_val.len,query_vals[i].val.str_val.s );
> +                               } else if(query_vals[i].type==DB_INT) {
>                                        DBG("[%d] = %s %d\n",i, 
> query_cols[i],
>                                                
> query_vals[i].val.int_val);
> +                               } else {
> +                                       DBG("[%d] = %s (unknown value
> type)\n",i, query_cols[i] );
> +                               }
>                        }
>
>
>
> On 4/13/07, Anca-Maria Vamanu <anca at voice-system.ro> wrote:
>
>> It is probably safer to check if expired messages exist before
>> attempting to delete them, assuming that a query in an empty table does
>> not generate an error. I have added this and commited the change.
>> Please tell me if you encounter further errors.
>>
>> Cesc wrote:
>>
>> > Hi Anca,
>> >
>> > I think I have further info ...
>> > the crash happens for i = j = 0 ...  (2(6495) DBT:dbt_get_refs:
>> > looping ... i=0 (4), j=0(8))
>> > and the reason, i think, is when file has NO data-row ... that is:
>> >
>> > file content:
>> > id(int) ...... NO_RETURN
>> > NO_DATA_ROWS
>> >
>> > If I add just a return after the table fields definition, it seems to
>> > be ok ...
>> >
>> > Cesc
>> >
>> > On 4/13/07, Anca-Maria Vamanu <anca at voice-system.ro> wrote:
>> >
>> >> For this problem with watchers table I can't figure where the problem
>> >> is. It would be very helpful if you would print the values for i 
>> and j
>> >> and send the result.
>> >>
>> >> Cesc wrote:
>> >>
>> >> > I think related .... in another run of openser, i got another crash
>> >> > ... same backtrace on gdb ...
>> >> >
>> >> > [root at mandriva2006 openser.1.2]#  5(5142) PRESENCE:
>> >> > msg_watchers_clean:cleaning pending subscriptions
>> >> > 5(5142) DBT:dbt_load_file: request for table [watchers]
>> >> > 5(5142) DBT:dbt_load_file: db is 
>> [/cafes/openser.1.2/cafesConf/dbtext]
>> >> > 5(5142) DBT:dbt_load_file: loading file
>> >> > [/cafes/openser.1.2/cafesConf/dbtext/watchers]
>> >> > 5(5142) DBT:dbt_load_file: state FLINE!
>> >> > 5(5142) DBT: column[0] is INT!
>> >> > 5(5142) DBT:dbt_load_file: state FLINE!
>> >> > 5(5142) DBT: column[1] is STR!
>> >> > 5(5142) DBT:dbt_load_file: state FLINE!
>> >> > 5(5142) DBT: column[2] is STR!
>> >> > 5(5142) DBT:dbt_load_file: state FLINE!
>> >> > 5(5142) DBT: column[3] is STR!
>> >> > 5(5142) DBT:dbt_load_file: state FLINE!
>> >> > 5(5142) DBT: column[4] is STR!
>> >> > 5(5142) DBT:dbt_load_file: state FLINE!
>> >> > 5(5142) DBT: column[5] is STR!
>> >> > 5(5142) DBT:dbt_load_file: state FLINE!
>> >> > 5(5142) DBT: column[6] is STR!
>> >> > 5(5142) DBT:dbt_load_file: state FLINE!
>> >> > 5(5142) DBT: column[7] is INT!
>> >> > 5(5142) DTB:dbt_db_get_table: watchers
>> >> >
>> >> >
>> >> > On 4/13/07, Cesc <cesc.santa at gmail.com> wrote:
>> >> >
>> >> >> Hi,
>> >> >>
>> >> >> doing some progress ... still with openser1.2 and dbtext ...
>> >> >>
>> >> >> on xlite shutdown ... crash
>> >> >>
>> >> >> #0  0xb7f89e52 in dbt_get_refs (_dtp=0xb5d6c848, _k=0xbffa6ea0, 
>> _n=2)
>> >> >> at dbt_res.c:168
>> >> >> 168
>> >> >> if(strlen(_k[i])==_dtp->colv[j]->name.len
>> >> >> (gdb)
>> >> >> (gdb)
>> >> >> (gdb) bt
>> >> >> #0  0xb7f89e52 in dbt_get_refs (_dtp=0xb5d6c848, _k=0xbffa6ea0, 
>> _n=2)
>> >> >> at dbt_res.c:168
>> >> >> #1  0xb7f8495b in dbt_delete (_h=0x816fd98, _k=0xbffa6ea0,
>> >> >> _o=0xbffa6e94, _v=0xbffa6e64, _n=2) at dbt_base.c:455
>> >> >> #2  0xb7dba7e9 in msg_watchers_clean (ticks=100, param=0x0) at
>> >> >> subscribe.c:539
>> >> >> #3  0x080a73bf in run_timer () at timer.c:226
>> >> >> #4  0x0806ec11 in main_loop () at main.c:896
>> >> >> #5  0x080704cb in main (argc=3, argv=0xbffa7054) at main.c:1399
>> >> >>
>> >> >
>> >> > _______________________________________________
>> >> > Devel mailing list
>> >> > Devel at openser.org
>> >> > http://openser.org/cgi-bin/mailman/listinfo/devel
>> >> >
>> >>
>> >>
>> >
>>
>>
>




More information about the Devel mailing list