klogd segfaults on startup in OpenVZ container, makes boot+upgrade hang at "Starting kernel log daemon..."

Bug #218320 reported by VE7JKD
44
This bug affects 5 people
Affects Status Importance Assigned to Milestone
sysklogd (Debian)
Fix Released
Unknown
sysklogd (Ubuntu)
Fix Released
Medium
Unassigned
Nominated for Jaunty by Jordon Bedwell
Nominated for Karmic by Jordon Bedwell

Bug Description

Binary package hint: sysklogd

In a OpenVZ container: it hangs at restart of the kernel log daemon.

root@localhost:/# apt-get install --reinstall klogd
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 126 not upgraded.
Need to get 0B/45.9kB of archives.
After unpacking 0B of additional disk space will be used.
Do you want to continue [Y/n]?
(Reading database ... 8982 files and directories currently installed.)
Preparing to replace klogd 1.5-1ubuntu1 (using .../klogd_1.5-1ubuntu1_i386.deb) ...
Unpacking replacement klogd ...
Setting up klogd (1.5-1ubuntu1) ...
 * Stopping kernel log daemon...
   ...done.
 * Starting kernel log daemon...

package klogd 1.5-1ubuntu1 details:

ProblemType: Package
Architecture: i386
Date: Wed Apr 16 10:42:57 2008
DistroRelease: Ubuntu 8.04
ErrorMessage:
 ErrorMessage: subprocess post-installation script returned error exit status 1
Package: klogd 1.5-1ubuntu1
PackageArchitecture: i386
SourcePackage: sysklogd
Title: package klogd 1.5-1ubuntu1 failed to install/upgrade:
Uname: Linux 2.6.24-16-generic i686

The only known way to circumvent this is to uninstall the package, which leaves the container without system logging features active.

Tags: patch
Revision history for this message
VE7JKD (hemstrandt) wrote :
Revision history for this message
Daniel Hahler (blueyed) wrote :

Thank you for your bug report.
Unfortunately, the required information, how it fails, is missing.
This may be available in /var/log/apt/term.log (you need to open this file with "sudo", e.g. "sudo less /var/log/apt/term.log" in a shell/terminal) or you could reproduce it using "sudo apt-get install --reinstall klogd" maybe and then paste the output here.

I'm experiencing also upgrade problems, in a OpenVZ container: it hangs at restart of the kernel log daemon.

root@localhost:/# apt-get install --reinstall klogd
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 126 not upgraded.
Need to get 0B/45.9kB of archives.
After unpacking 0B of additional disk space will be used.
Do you want to continue [Y/n]?
(Reading database ... 8982 files and directories currently installed.)
Preparing to replace klogd 1.5-1ubuntu1 (using .../klogd_1.5-1ubuntu1_i386.deb) ...
Unpacking replacement klogd ...
Setting up klogd (1.5-1ubuntu1) ...
 * Stopping kernel log daemon...
   ...done.
 * Starting kernel log daemon...
_

Changed in sysklogd:
status: New → Incomplete
Revision history for this message
trevonio (carlos-lopezr) wrote :

My log:

sudo less /var/log/apt/term.log

Log started: 2008-04-05 09:38:10
(Leyendo la base de datos ...
107606 ficheros y directorios instalados actualmente.)
Preparando para reemplazar opera 9.25-20071214.6gutsy1 (usando .../opera_9.27-20080331.6gutsy1_i386.deb) ...
Desempaquetando el reemplazo de opera ...
Configurando cupsys (1.3.2-1ubuntu7.6) ...
Unable to find apparmor_parser, installation problem?: Failed.
invoke-rc.d: initscript apparmor, action "force-reload" failed.
usage: update-rc.d [-n] [-f] <basename> remove
       update-rc.d [-n] <basename> defaults [NN | sNN kNN]
       update-rc.d [-n] <basename> start|stop NN runlvl [runlvl] [...] .
                -n: not really
                -f: force
dpkg: error al procesar cupsys (--configure):
 el subproceso post-installation script devolvió el código de salida de error 1
Configurando opera (9.27-20080331.6gutsy1) ...
Instalando una nueva versión del fichero de configuración /etc/opera6rc ...

Se encontraron errores al procesar:
 cupsys
Log ended: 2008-04-05 09:38:24

Revision history for this message
Daniel Hahler (blueyed) wrote :

trevonio, thank you for the additional information, but this log extract refers to failure of cupsys.
Please search for klogd in the logs and paste what you find.

Revision history for this message
Jayson Rowe (jayson.rowe) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!

Changed in sysklogd:
status: Incomplete → Invalid
Revision history for this message
Motin (motin) wrote : Re: Hangs at "Starting kernel log daemon..." in OpenVZ container

Confirmed. Ctrl + C is necessary to come forward in the install process:

Setting up klogd (1.5-1ubuntu1) ...
 * Stopping kernel log daemon... [ OK ]
 * Starting kernel log daemon... dpkg: error processing klogd (--configure):
 subprocess post-installation script killed by signal (Interrupt)
Errors were encountered while processing:
 klogd
E: Sub-process /usr/bin/dpkg returned an error code (1)

uname -a
Linux fantadawarrior 2.6.18-fza-028stab051.1-amd64 #1 SMP Fri Dec 7 15:14:08 UTC 2007 i686 GNU/Linux

The syslog deamon works, so if there is any way to disable klogd and only keep syslogd active maybe that would be a solution?

description: updated
tags: removed: apport-package
summary: - package klogd 1.5-1ubuntu1 failed to install/upgrade:
+ Hangs at "Starting kernel log daemon..." in OpenVZ container
Changed in sysklogd (Ubuntu):
status: Invalid → Confirmed
Daniel Hahler (blueyed)
Changed in sysklogd (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
Revision history for this message
Jakob Unterwurzacher (jakobunt) wrote :

The workaround is to disable klogd using update-rc.d. This keeps syslogd active.
# update-rc.d -f klogd remove

Revision history for this message
Jakob Unterwurzacher (jakobunt) wrote :

in ksym_mod.c we have

 ksyms = fopen(KSYMS, "r");

 if ( ksyms == NULL )
 {
  if ( errno == ENOENT )
   Syslog(LOG_INFO, "No module symbols loaded - "
          "kernel modules not enabled.\n");
  else
   Syslog(LOG_ERR, "Error loading kernel symbols " \
          "- %s\n", strerror(errno));
  fclose(ksyms);
  return(0);
 }

We fclose a NULL file descriptor?

On OpenVZ, /proc/kallsyms (=KSYMS) does not exist. So it segfaults here.

summary: - Hangs at "Starting kernel log daemon..." in OpenVZ container
+ klogd segfaults on startup in OpenVZ container, makes boot+upgrade hang
+ at "Starting kernel log daemon..."
Changed in sysklogd (Debian):
status: Unknown → New
Revision history for this message
shinythings (danielbumke) wrote :
tags: added: patch
Revision history for this message
Daniel Hahler (blueyed) wrote :

This appears to be fixed.
Looking at the source for 1.5-6ubuntu1 (which is in Natty), the faulty call to fclose ihas been removed.

Changed in sysklogd (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Daniel Hahler (blueyed) wrote :

The fix was added in 1.5-6, according to the Debian changelog.

Changed in sysklogd (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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