Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Submitted By: Phil D'Amore (ptdamore)
Assigned to: Nobody/Anonymous (nobody)
Summary: segfault caused by usrloc:db_timer_udomain when db goes away
db_timer_udomain only initializes the keys for the delete query if there isn't an existing prepared statement (my_ps == NULL). This works as long as the connection doesn't go away for a long period of time. If the db goes away for 2*timer_interval, the stored statement context is no longer valid, and the underlying db_delete function needs to re-create it from the original query. However, since the keys aren't populated, you get a segfault when there is an attempt to read them.
The patch attached removes the conditional setup of the keys in db_timer_udomain.
This was with the mysql driver, but it seems like good practice for any driver.