Please merge rsyslog 5.8.1-1 (main) from debian unstable

Bug #794230 reported by Scott Moser
42
This bug affects 5 people
Affects Status Importance Assigned to Milestone
rsyslog (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: rsyslog

Ubuntu is currently (oneiric) at 4.6.4-2ubuntu4. Debian is at
5.8.1-1ubuntu1. .

Related branches

Revision history for this message
Scott Moser (smoser) wrote :
Changed in rsyslog (Ubuntu):
assignee: nobody → Scott Moser (smoser)
importance: Undecided → Low
status: New → In Progress
Scott Moser (smoser)
Changed in rsyslog (Ubuntu):
assignee: Scott Moser (smoser) → nobody
status: In Progress → Confirmed
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Hey Scott, since there's a merge proposal, unsubscribing sponsors so its only in the sponsorship queue once.

Note that there are some important comments on the previous merge bug, bug #775703 . It warrants investigating the /dev/xconsole issue before upload. Since this one supersedes that one, I will mark it as a duplicate of this.

Revision history for this message
Scott Moser (smoser) wrote :

OK, when running my build, I do get the same messages regarding xconsole that pitti saw in https://bugs.launchpad.net/ubuntu/+source/rsyslog/+bug/775703/comments/8 . It *appears* that the newer syslog is just being overly annoying about the xconsole issue, but what is really happening is its segfaulting and upstart is restarting it.

ie:
$ sudo start rsyslog
$ tail /var/log/syslog
Jun 8 20:07:12 ip-10-68-51-59 kernel: imklog 5.8.1, log source = /proc/kmsg started.
Jun 8 20:07:12 ip-10-68-51-59 rsyslogd: [origin software="rsyslogd" swVersion="5.8.1" x-pid="15174" x-info="http://www.rsyslog.com"] start
Jun 8 20:07:12 ip-10-68-51-59 rsyslogd: rsyslogd's groupid changed to 103
Jun 8 20:07:12 ip-10-68-51-59 rsyslogd: rsyslogd's userid changed to 101
Jun 8 20:07:12 ip-10-68-51-59 rsyslogd-2039: Could no open output pipe '/dev/xconsole' [try http://www.rsyslog.com/e/2039 ]
$ echo "hi" | logger
$ tail /var/log/syslog

Jun 8 20:08:35 ip-10-68-51-59 kernel: imklog 5.8.1, log source = /proc/kmsg started.
Jun 8 20:08:35 ip-10-68-51-59 rsyslogd: [origin software="rsyslogd" swVersion="5.8.1" x-pid="15826" x-info="http://www.rsyslog.com"] start
Jun 8 20:08:35 ip-10-68-51-59 rsyslogd: rsyslogd's groupid changed to 103
Jun 8 20:08:35 ip-10-68-51-59 rsyslogd: rsyslogd's userid changed to 101
Jun 8 20:08:35 ip-10-68-51-59 rsyslogd-2039: Could no open output pipe '/dev/xconsole' [try http://www.rsyslog.com/e/2039 ]

Note, the pid changed.

Debugging this, I installed the debian build of 5.81-1 from the debian archive, and then substituted our rsyslog config in. Everything is fine. I rebuilt the debian build from source in an oneiric sbuild, and the segfault behavior is back.

So, this appears to me to be an issue shown or caused by different build environments of debian versus ubuntu.

Revision history for this message
Scott Moser (smoser) wrote :

I installed the debug syms and ran 'rsyslog -c5 -d -n' in gdb, and then triggered the sigv, heres what I see:

$ gdb /usr/sbin/rsyslog
(gdb) set args -c5 -d -n
(gdb) run
Starting program: /usr/sbin/rsyslogd -c5 -d -n
...
# now trigger a syslog message with 'logger'
5308.356929362:7ffff5734700: Message from UNIX socket: #5
5308.356952517:7ffff5734700: XXX: pre CM loop, length of control message 32
5308.356967407:7ffff5734700: XXX: in CM loop, 1, 2
5308.356981665:7ffff5734700: XXX: got credentials pid 29357
5308.356995776:7ffff5734700: XXX: post CM loop
5308.357011547:7ffff5734700: imuxsock: no ratelimiter for pid 29357, creating one

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff5734700 (LWP 28862)]
0x0000000000000000 in ?? ()
(gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x00007ffff67801ad in MsgSetInputName (pThis=0x68f1f0, inputName=0x672970)
    at msg.c:1932
#2 0x00007ffff6779539 in SubmitMsg (pLstn=<value optimized out>)
    at imuxsock.c:558
#3 readSocket (pLstn=<value optimized out>) at imuxsock.c:671
#4 0x00007ffff6779be7 in runInput (pThrd=<value optimized out>)
    at imuxsock.c:740
#5 0x00000000004395d6 in thrdStarter (arg=<value optimized out>)
    at ../threads.c:191
#6 0x00007ffff79acd8c in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#7 0x00007ffff72da16d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#8 0x0000000000000000 in ?? ()
(gdb)

Revision history for this message
Scott Moser (smoser) wrote :

Same backtrace as above, but with glibc debugging symbols:
(gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x00007ffff67801ad in MsgSetInputName (pThis=0x68f020, inputName=0x672970)
    at msg.c:1932
#2 0x00007ffff6779539 in SubmitMsg (pLstn=<value optimized out>)
    at imuxsock.c:558
#3 readSocket (pLstn=<value optimized out>) at imuxsock.c:671
#4 0x00007ffff6779be7 in runInput (pThrd=<value optimized out>)
    at imuxsock.c:740
#5 0x00000000004395d6 in thrdStarter (arg=<value optimized out>)
    at ../threads.c:191
#6 0x00007ffff79acd8c in start_thread (arg=0x7ffff5734700)
    at pthread_create.c:304
#7 0x00007ffff72da16d in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#8 0x0000000000000000 in ?? ()

Revision history for this message
Scott Moser (smoser) wrote :

well, at this point I have 3 builds:
 a.) debian archive build (5.8.1-1)
 b.) debian build (5.8.1-1) in oneiric sbuild
 c.) build on the runtime system using bzr bd of debian source (5.8.1-1)
 d.) build not through debuild (CFLAGS="-g -O2" ./configure --prefix=...)
 e.) build of same source from rsyslog git

a and d do not fail.
b and c do.

I'm not sure what changes there are between c and d.

Revision history for this message
Scott Moser (smoser) wrote :

OK, so I've narrowed down the problem to LDFLAGS="-Wl,-Bsymbolic-functions" . If I build rsyslog without that, then the daemon does not segfault on the first message. The debian build has an empty LDFLAGS [1], which explains why their binaries work and the ones I built with debuild did not.

[1] https://buildd.debian.org/status/fetch.php?pkg=rsyslog&arch=amd64&ver=5.8.1-1&stamp=1306775502

I wonder if it is an appropriate work around or not, to build with empty LDFLAGS.

Revision history for this message
Scott Moser (smoser) wrote :

LDFLAGS is now unset during the build, so we don't segfault.
With regard to /dev/xconsole (bug 459730), that bug can be handled separately.

In the pervious merge bug (bug 775703 -- see comment 4 specifically), it was believed that the /dev/xconsole messages were a more severe complaint from rsyslog, but actually they were segfault of rsyslog and subsequent restart by upstart. That issue has been fixed.

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (5.5 KiB)

This bug was fixed in the package rsyslog - 5.8.1-1ubuntu1

---------------
rsyslog (5.8.1-1ubuntu1) oneiric; urgency=low

  * Resynchronise with Debian (LP: #794230). Remaining changes:
    - Run as rsyslog:rsyslog, set $FileOwner to syslog
    - Replace init script with debian/rsyslog.upstart.
    - debian/rsyslog.logrotate: Use reload command to restart rsyslog
    - debian/rsyslog.conf: enable $RepeatedMsgReduction
      to avoid bloating the syslog file (LP #453444)
    - Add debian/rsyslog.dmesg.upstart to save initial dmesg into a file.
      Install it in debian/rules.
    - debian/50-default.conf: set of default rules for syslog (forwarded to
      Debian #603160). remove file in postrm on purge. manage with ucf.
    - debian/rules: build with LDFLAGS=""
  * Dropped:
    - debian/control: Bump build-dependency on debhelper
      debian now depends on dh >= 8

rsyslog (5.8.1-1) unstable; urgency=low

  * New upstream release.
  * Bump Standards-Version to 3.9.2. No further changes.
  * Enable and install impstats module. (Closes: #620114)
  * Update logcheck rule. (Closes: #616659)
  * debian/rsyslog.init: Set correct compat level (5).
  * The way rsyslog processes SIGHUP has changed. It no longer does a reload
    of its configuration, but simply closes all open files. To apply a changed
    configuration, rsyslogd needs to be restarted now.
    - Drop "reload" action from debian/rsyslog.init, map "force-reload" to
      "restart". (Closes: #580897)
    - Add "rotate" action to debian/rsyslog.init which sends SIGHUP to
      rsyslogd. Use that in debian/rsyslog.logrotate. (Closes: #626365)
    - Update debian/rsyslog-mysql.postinst and rsyslog-pgsql.postinst to use
      restart instead of reload.
    - Add a NEWS file explaining the changed SIGHUP handling.

rsyslog (5.8.0-1) unstable; urgency=low

  * New upstream stable release.

rsyslog (5.7.10-1) unstable; urgency=low

  * New upstream release.
    - Properly handle ANSI SQL strings in ompgsql. (Closes: #600479)

rsyslog (5.7.9-1) unstable; urgency=low

  * New upstream release.
  * debian/patches/02-pmaixforwardedfrom_type_nokeep.patch
    - Remove, merged upstream.
  * debian/patches/03-epoll_create1-fallback.patch
    - Remove, merged upstream.

rsyslog (5.7.8-2) unstable; urgency=low

  * debian/patches/03-epoll_create1-fallback.patch
    - If epoll_create1() is not available during runtime, fall back to
      epoll_create(). This fixes remote syslog when runnig rsyslog on a
      lenny kernel. (Closes: #617996)

rsyslog (5.7.8-1) unstable; urgency=low

  * New upstream release.
  * debian/rsyslog.links
    - Create symlink for rsyslog.service in multi-user.target.wants so rsyslog
      is enabled by default when using systemd.
  * debian/patches/02-pmaixforwardedfrom_type_nokeep.patch
    - Fix build failure in aixforwardedfrom parser module by setting the
      module type to NOKEEP.
  * debian/rsyslog.preinst
    - Remove old rsyslog.socket symlink from sockets.target.wants on upgrades
      as rsyslog uses syslog.socket now which is provided by systemd.
  * debian/rsyslog.install
    - Stop installing rsyslog.socket.

rsyslog (5.7.6-1) unstable; urgency=low

  * New ups...

Read more...

Changed in rsyslog (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
reliable-robin-22 (nicolasdiogo) wrote :

THANKS !!

i can see that my laptop is working.. correctly

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.