logwatch: Makes use of $^X, broken under overlayfs.

Bug #1030520 reported by Mike Mestnik
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
logwatch (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Bug number 1030519 tracks this issue in perl and Bug number 1007089 is the root cause. In Ubuntu perl is located in /usr/bin/perl, so using $^X isn't necessarily needed. Also you should investigate using eval() or other methods to get a sub-perl instance.

One solution may be to copy stdin to another handle and then close stdin and open STDIN $(cat ... |). A pipepare can be used to get an actual system filedescriptor. Then the perl code can be run in an eval, instead of a system.

I would be willing to help with development.

/etc/cron.daily/00logwatch:
sh: 1: /bin/perl: not found
sh: 1: /bin/perl: not found
system 'cat '/var/log/mail.log' '/var/log/mail.log.1' | /bin/perl /usr/share/logwatch/scripts/shared/expandrepeats ''| /bin/perl /usr/share/logwatch/scripts/shared/applystddate ''>/tmp/logwatch.BMbdlb_J/maillog' failed: 32512 at /usr/sbin/logwatch line 871.
run-parts: /etc/cron.daily/00logwatch exited with return code 2

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: logwatch 7.4.0+svn20111221rev79-1ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-23.31-lowlatency-pae 3.2.14
Uname: Linux 3.2.0-23-lowlatency-pae i686
ApportVersion: 2.0.1-0ubuntu8
Architecture: i386
Date: Sun Jul 29 09:12:38 2012
PackageArchitecture: all
SourcePackage: logwatch
UpgradeStatus: Upgraded to precise on 2012-01-03 (208 days ago)

Revision history for this message
Mike Mestnik (cheako) wrote :
Revision history for this message
Robie Basak (racb) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

It seems to me that /proc/self/exe being broken in overlayfs is a bug in overlayfs, not in perl or logwatch. But I am interested to hear what the kernel team decide on this.

Presumably this either needs to be fixed in overlayfs, or in every package that uses /proc/self/exe. It would make sense to make an Ubuntu-wide decision on the appropriate course of action here.

Launchpad's bug tracking allows for a single issue to be tracked across multiple packages. I think this is an appropriate issue to track this way, since it will stop discussion and appropriate decisions on the same issue being scattered across many bugs.

So I'm marking this bug as a dupe of bug 1030519, renaming bug 1030519 appropriately, and will add a logwatch task to bug 1030519 to track it there. Please continue discussion in bug 1030519.

I also think that this issue should probably be marked Invalid in both perl and logwatch, since it is reasonable to expect /proc/self/exe to work. But I would like to hear the kernel team's opinion on this first. I'm not marking this as a dupe of the kernel bug 1007089 pending feedback from the kernel team.

Mike, have you tried contacting the kernel team on this? The ubuntu-devel or kernel-team lists would probably be appropriate here. Also, this mailing list post seems relevant: https://lists.ubuntu.com/archives/ubuntu-devel/2012-February/034850.html

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

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

Changed in logwatch (Ubuntu):
status: New → Confirmed
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.