Further investigation shows that this can no-longer reproduced with the latest thermald. However, this was an accidentally fixed by another issued (bug 1480892), and when that bug is fixed this issue re-occurs.
The root cause is that this error is triggered when an existing instance of thermald is detected by the lock file and it is reported using thd_log_fatal(). Instead, we should be reporting this with thd_log_error() and exiting via exit(EXIT_FAILURE) rather than going via the g_lib exit paths.
Further investigation shows that this can no-longer reproduced with the latest thermald. However, this was an accidentally fixed by another issued (bug 1480892), and when that bug is fixed this issue re-occurs.
The root cause is that this error is triggered when an existing instance of thermald is detected by the lock file and it is reported using thd_log_fatal(). Instead, we should be reporting this with thd_log_error() and exiting via exit(EXIT_FAILURE) rather than going via the g_lib exit paths.