failsafeXServer does not parse Xorg.failsafe.log correctly

Bug #1816945 reported by Kevin Dalley
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
xdiagnose (Ubuntu)
Fix Released
High
Timo Aaltonen

Bug Description

The timestamp for Xorg.failsafe.log has changed, and is no longer parsed correctly by failsafeXServer

Here is a sample error message from syslog

2019-02-15T12:30:36.028591-08:00 awabi failsafeXServer[7805]: expr: non-integer argument
2019-02-15T12:30:36.028735-08:00 awabi failsafeXServer[7805]: /usr/share/xdiagnose/failsafeXServer: line 87: [: -lt: unary operator expected

Currently, Xorg.failsafe.log looks like:

[ 477.714] (II) Server terminated successfully (0). Closing log file.

but failsafeXServer assumes that the date is seconds since 1970-01-01 00:00:00 UTC

I have attached a patch which provides a solution to the problem. I look at the timestamp of the file, using %s, which provides seconds since 1970-01-01 00:00:00 UTC

ProblemType: Bug
DistroRelease: Ubuntu 18.10
Package: xdiagnose 3.8.8 [modified: usr/share/xdiagnose/failsafeXServer]
ProcVersionSignature: Ubuntu 4.18.0-15.16-generic 4.18.20
Uname: Linux 4.18.0-15-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.20.10-0ubuntu13.2
Architecture: amd64
CurrentDesktop: XFCE
Date: Wed Feb 20 18:17:05 2019
EcryptfsInUse: Yes
InstallationDate: Installed on 2015-05-18 (1374 days ago)
InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422)
PackageArchitecture: all
SourcePackage: xdiagnose
UpgradeStatus: Upgraded to cosmic on 2018-11-01 (111 days ago)

Revision history for this message
Kevin Dalley (nereocystis) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Patch to failsafeXServer" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
tags: added: rls-dd-incoming
Revision history for this message
Sebastien Bacher (seb128) wrote :

Timo, could you have a look to the patch?

Changed in xdiagnose (Ubuntu):
assignee: nobody → Timo Aaltonen (tjaalton)
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Sounds like that has never worked, since the comparison was buggy.. $last_run would have something like '[12345.123]' which is bad syntax for the comparison. And even if it would be a correct time, it's always lower than time since epoch.

so yes, the patch at least fixes those

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

This bug was fixed in the package xdiagnose - 3.8.9

---------------
xdiagnose (3.8.9) disco; urgency=medium

  * failsafeXServer: Fix checking when the server was last run, thanks
    Kevin Dalley! (LP: #1816945)

 -- Timo Aaltonen <email address hidden> Tue, 05 Mar 2019 15:23:57 +0200

Changed in xdiagnose (Ubuntu):
status: Confirmed → Fix Released
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.