thermald crashed with signal 5 in main()

Bug #1432220 reported by Andreas
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
thermald (Ubuntu)
Fix Released
Medium
Colin Ian King
Trusty
Fix Released
Medium
Colin Ian King
Vivid
Fix Released
Medium
Colin Ian King
Wily
Fix Released
Medium
Colin Ian King

Bug Description

just upgraded from 14.10

(btw. reboot faled becaus init wasn't found...)

ProblemType: Crash
DistroRelease: Ubuntu 15.04
Package: thermald 1.3-9
ProcVersionSignature: Ubuntu 3.19.0-9.9-generic 3.19.1
Uname: Linux 3.16.0-31-generic x86_64
ApportVersion: 2.16.2-0ubuntu3
Architecture: amd64
Date: Sat Mar 14 19:38:29 2015
ExecutablePath: /usr/sbin/thermald
InstallationDate: Installed on 2014-07-08 (248 days ago)
InstallationMedia: Ubuntu-GNOME 14.04 LTS "Trusty Tahr" - Release amd64 (20140416.2)
ProcCmdline: /usr/sbin/thermald --no-daemon --dbus-enable
ProcEnviron:
 LANG=de_DE.UTF-8
 LANGUAGE=de_DE
 PATH=(custom, no user)
Signal: 5
SourcePackage: thermald
StacktraceTop: main ()
Title: thermald crashed with signal 5 in main()
UpgradeStatus: Upgraded to vivid on 2015-03-14 (0 days ago)
UserGroups:

Revision history for this message
Andreas (andreas-rabus) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 thd_dbus_server_proc (no_daemon=1) at src/main.cpp:321
 main (argc=1, argv=0x7fff83c14cc8) at src/main.cpp:460

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : StacktraceSource.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in thermald (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in thermald (Ubuntu):
status: New → Confirmed
Changed in thermald (Ubuntu):
assignee: nobody → Colin Ian King (colin-king)
Revision history for this message
Colin Ian King (colin-king) wrote :

This is trapping in g_logv in the final call of g_private_set:

g_private_set (&g_log_depth, GUINT_TO_POINTER (depth));

however, curiously, we've already done calls to g_private_get and g_private_set just a few lines earlier in the same block of code. I wonder if the earlier calls in the same block of code works because it's locked by &g_messages_lock

Revision history for this message
Colin Ian King (colin-king) wrote :
Revision history for this message
Colin Ian King (colin-king) wrote :

Is this still an issue with the latest version of thermald (1.4.3-2~15.04.1)?

Revision history for this message
Colin Ian King (colin-king) wrote :

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.

Changed in thermald (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Colin Ian King (colin-king) wrote :

[SRU Justification] (Vivid, Trusty)

Thermald exiting because it is already running will abort via a thd_log_fatal message that triggers a SIGTRAP on a segmentation fault. This fix resolves this and thermald will exit cleanly with exit(EXIT_FAILURE) and a message without the SIGTRAP + segmentation fault.

[Test Case]
Check thermald is already running as a deamon. Next, start another instance of thermald from the command line:

sudo thermald --no-daemon --loglevel=info

Without the fix this can crash with a SIGTRAP on a segmentation fault. With the fix, thermald will report another instance of thermald is running and then cleaning exit with EXIT_FAILURE (1) exit status.

[Regression Potential]
Can't think of any, this is a one line fix that does not trip a segfault because the fix uses the correct way to log an error.

Changed in thermald (Ubuntu Trusty):
status: New → In Progress
Changed in thermald (Ubuntu Vivid):
status: New → In Progress
Changed in thermald (Ubuntu Trusty):
importance: Undecided → Medium
Changed in thermald (Ubuntu Vivid):
importance: Undecided → Medium
Changed in thermald (Ubuntu Trusty):
assignee: nobody → Colin Ian King (colin-king)
Changed in thermald (Ubuntu Vivid):
assignee: nobody → Colin Ian King (colin-king)
Chris J Arges (arges)
information type: Private → Public
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Andreas, or anyone else affected,

Accepted thermald into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/thermald/1.4.3-3~14.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in thermald (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Chris J Arges (arges) wrote :

Hello Andreas, or anyone else affected,

Accepted thermald into vivid-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/thermald/1.4.3-3~15.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in thermald (Ubuntu Vivid):
status: In Progress → Fix Committed
Revision history for this message
Colin Ian King (colin-king) wrote :

Verified on trusty -proposed

Revision history for this message
Colin Ian King (colin-king) wrote :

Verified on vivid -proposed

tags: added: trusty verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package thermald - 1.4.3-4

---------------
thermald (1.4.3-4) unstable; urgency=medium

  * Fix null pointer deferences with _ART active trip points (LP: #1480821)
  * Re-enable lockfile (LP:# 1480892)
  * Report multiple instances of thermald with thd_log_fatal (LP: #1432220)

 -- Colin King <email address hidden> Mon, 3 Aug 2015 18:47:00 +0100

Changed in thermald (Ubuntu Wily):
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package thermald - 1.4.3-3~14.04.1

---------------
thermald (1.4.3-3~14.04.1) trusty; urgency=medium

  * Fix null pointer deferences with _ART active trip points (LP: #1480821)
  * Re-enable lockfile (LP: #1480892)
  * Report multiple instances of thermald with thd_log_fatal (LP: #1432220)
  * Suppress systemd failed service messages (e.g. on VMs) (LP: #1480182)

 -- Colin King <email address hidden> Tue, 4 Aug 2015 11:50:00 +0100

Changed in thermald (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Adam Conrad (adconrad) wrote : Update Released

The verification of the Stable Release Update for thermald has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package thermald - 1.4.3-3~15.04.1

---------------
thermald (1.4.3-3~15.04.1) vivid; urgency=medium

  * Fix null pointer deferences with _ART active trip points (LP: #1480821)
  * Re-enable lockfile (LP: #1480892)
  * Report multiple instances of thermald with thd_log_fatal (LP: #1432220)
  * Suppress systemd failed service messages (e.g. on VMs) (LP: #1480182)

 -- Colin King <email address hidden> Tue, 4 Aug 2015 11:48:00 +0100

Changed in thermald (Ubuntu Vivid):
status: Fix Committed → Fix Released
Revision history for this message
Andy Whitcroft (apw) wrote : Please test proposed package

Hello Andreas, or anyone else affected,

Accepted thermald into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/thermald/1.7.0-5ubuntu4 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in thermald (Ubuntu Bionic):
status: New → Fix Committed
tags: added: verification-needed verification-needed-bionic
removed: verification-done
Revision history for this message
Colin Ian King (colin-king) wrote :

The bionic SRU test message occurred because I accidentally uploaded the package with the entire old history. This bug has already been fixed and the verification for bionic can be ignored.

no longer affects: thermald (Ubuntu Bionic)
tags: removed: verification-needed verification-needed-bionic
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.