log_error not set in my.cnf, errors not written anywhere

Bug #1014732 reported by Clint Byrum on 2012-06-18
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
mysql-5.5 (Ubuntu)
High
Clint Byrum
Precise
High
Unassigned

Bug Description

[Impact]

Bugs reported on mysql in Precise are very difficult to triage, because apport doesn't submit logs and reporters don't even have them available. Thus this impacts all mysql bugs in Precise, not just this one.

[Test Case]
1. install mysql-server
2. make sure it is running (service mysql start)
3. mysql -uroot -e "SHOW VARIABLES LIKE 'log_error'" -p
    - a broken mysql-server will show a blank answer
    - fixed package will show '/var/log/mysql/error.log'
4. Check that /var/log/mysql/error.log exists and is non-empty.

[Regression Potential]
Very low, as its just a config file change. People may not have been expecting this file to be written though.

------------

The errors for mysqld in 5.1 packages used to be written to /var/log/mysql/error.log, but that change was dropped from my.cnf in the transition to 5.5.

This should be restored so the logs can be written properly.

Changed in mysql-5.5 (Ubuntu Precise):
status: New → Triaged
importance: Undecided → High
Changed in mysql-5.5 (Ubuntu):
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mysql-5.5 - 5.5.25a-0ubuntu1

---------------
mysql-5.5 (5.5.25a-0ubuntu1) quantal; urgency=low

  [ Clint Byrum ]
  * New upstream release.
  * d/additions/my.cnf: Ensure mysql errors are written to log file.
    (LP: #1014732)
  * d/mysql-server-5.5.mysql-server.logrotate: Add
    /var/log/mysql/error.log so it is rotated properly. (LP: #879560)
  * d/control: remove Vcs-* as they are inaccurate in Ubuntu.
  * d/rules: use WITH_SSL=bundled to ensure that we do not accidentally
    build against openssl.
  * d/control, d/rules: cherry pick fix from Debian to use gcc 4.4 only
    for i386 to work around problems with yaSSL assembly (LP: #1012139)

  [ Matthieu Baerts (matttbe) ]
  * Update apport hook for python3 ; patch by Edward Donovan (LP: #1013171)
 -- Clint Byrum <email address hidden> Thu, 19 Jul 2012 16:14:50 -0700

Changed in mysql-5.5 (Ubuntu):
status: Fix Committed → Fix Released
Robie Basak (racb) wrote :

Debdiff attached for precise-proposed. I have test built this, verified the apport hook changes work and that logging works. Upgrading with an unchanged my.cnf just works. Upgrading with a changed my.cnf displays the usual conffile changed prompt as expected.

description: updated
Robie Basak (racb) wrote :

Test build attached.

Robie Basak (racb) wrote :

Rebased on the security update 12.04.2 in precise-proposed. I've test built this also, and reverified that mysql still appears to work, that the new log file is created, rotates correctly, and checked that the apport hook submits it.

Robie Basak (racb) wrote :
Robie Basak (racb) wrote :

Rebased again on security update 12.04.3 this time. I've test built this and again reverified that mysql still appears to work, that the new log file is created, rotates correctly, and checked that the apport hook submits it.

Robie Basak (racb) wrote :
Robie Basak (racb) wrote :
Robie Basak (racb) on 2012-12-11
description: updated
Marc Deslauriers (mdeslaur) wrote :

Although the debdiff looks good, I'm not quite sure changing a conf file is an appropriate thing to do in an SRU. I'll let the SRU team chime in on whether they are comfortable with that or not.

Marc Deslauriers (mdeslaur) wrote :

OK, based on the discussion in ubuntu-devel, I'll prepare and upload an SRU for this for precise. Thanks!

Bryce Harrington (bryce) wrote :

@Marc, status on your upload of this?

Sebastien Bacher (seb128) wrote :

it's indeed in the SRU review queue, unsubscribing sponsors since there is nothing left to upload there

Changed in mysql-5.5 (Ubuntu Precise):
status: Triaged → Fix Committed

Hello Clint, or anyone else affected,

Accepted mysql-5.5 into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/mysql-5.5/5.5.29-0ubuntu0.12.04.2 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!

tags: added: verification-needed
Roman Yepishev (rye) wrote :

mysql-server-5.5:
  Installed: 5.5.29-0ubuntu0.12.04.2

Logs are written to /var/log/mysql/error.log.

Please note that /etc/mysql/conf.d/mysqld_safe_syslog.cnf still exists and it sets syslog target if mysql service is running via mysqld_safe. Since currently mysqld is started directly, there is no need for that file.

tags: added: verification-done
removed: verification-needed

The verification of this Stable Release Update 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 regresssions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mysql-5.5 - 5.5.29-0ubuntu0.12.04.2

---------------
mysql-5.5 (5.5.29-0ubuntu0.12.04.2) precise-proposed; urgency=low

  [ Robie Basak ]
  * Update default my.cnf to log errors to /var/log/mysql/error.log instead
    of not logging errors at all (LP: #1014732).
  * Add attachment of error log /var/log/mysql/error.log to apport hook.
 -- Marc Deslauriers <email address hidden> Wed, 23 Jan 2013 08:43:56 -0500

Changed in mysql-5.5 (Ubuntu Precise):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers