Re: [gnome-db] Libgda4.0.6 warnings and segfault



On 29 January 2010 20:08, Alberto Roman Linacero <aroman alienvault com> wrote:
>
> Now, I have another issue; it seems like suddenly, after some correct reads
> and writes, GDA locks, and I'm not sure when GDA doesn't release a lock, so
> that's my question. I have multiple threads reading and inserting data into
> the DB, some of them sharing the same GdaConnection, and others with its own
> one. And suddenly, they stop working. Each thread is built around a wrapper
> and a mutex, to avoid two threads accessing at the same time to DB:
>
>  g_static_rec_mutex_lock (database->_priv->mutex);
>
> It would be a bit difficult to paste all the code because it's in multiple
> files, so I think that I'll have to guess what's happening just by knowing
> when GDA locks and doesn't release a lock. Could you please give some light
> on this?
>
> I've tried with the simple command...:
>  ret = gda_execute_non_select_command (database->_priv->conn, buffer,
> &error__);
>
> ...and with the complex one, doing it myself:
>   database->_priv->parser = gda_sql_parser_new ();
>   stmt = gda_sql_parser_parse_string (database->_priv->parser, buffer,
> &remain, &error__);
>   ret = gda_connection_statement_execute_non_select (database->_priv->conn,
> stmt, NULL, NULL, &error__);
>
> But the result is the same in both cases: suddenly, it stops processing
> insertions (that didn't happen wih libgda2.3).

What database providers do you use (PostgreSQL, MySQL, SQlite, a mix
of all the above)? Also what connection option do you specify when you
open the connection (specifically do you use the
GDA_CONNECTION_OPTIONS_THREAD_SAFE option)?

Regards,

Vivien


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]