task crashed with SIGSEGV in fseek()

Bug #733942 reported by Ron Lusk
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
task (Ubuntu)
Fix Released
High
Bryce Harrington
Natty
Invalid
High
Bryce Harrington

Bug Description

[Impact]
Crash that occurs when using task to track completed tasks associated with a project. Since that is a normal activity for users, this issue is important.

[Development Branch]
This crash was found and fixed in task 1.9.4 (see upstream bug #555). We are going to be shipping this version in oneiric. I've confirmed this bug does not reproduce on oneiric.

[Stable Branch]
Patch cherrypicked and added to task, uploaded to natty-proposed as 1.9.3-1ubuntu1.

[Test Case]
$ task log pro:india-dinner Prepare Indian food

Output should be as follows:

Logged task.
The project 'india-dinner' has changed. Project 'india-dinner' is 0% complete (0 of 0 tasks remaining).

Bugged version segfaults

[Regression Potential]
None really. The patch simply delays when the task database is unlocked for a couple statements, which is a very modest change. The patch has been included in 1.9.4 for some time without further issue (reviewed the 1.9.4 changelog for other project-related bugs and there have been no other fixes related to this).

[Original Report]

Running task as "task shell". Entered command
  log +india +test project:india-dinner due:today Prepare Indian food
and it SEGV'd

ProblemType: Crash
DistroRelease: Ubuntu 11.04
Package: task 1.9.3-1
ProcVersionSignature: Ubuntu 2.6.38-6.34-generic 2.6.38-rc7
Uname: Linux 2.6.38-6-generic i686
Architecture: i386
Date: Sat Mar 12 13:03:53 2011
ExecutablePath: /usr/bin/task
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Alpha i386 (20110302)
ProcCmdline: task shell
ProcEnviron:
 SHELL=/bin/bash
 LANG=en_US.UTF-8
 LANGUAGE=en_US:en
SegvAnalysis:
 Segfault happened at: 0x21e8bd <fseek+29>: mov (%esi),%eax
 PC (0x0021e8bd) ok
 source "(%esi)" (0x00000000) not located in a known VMA region (needed readable region)!
 destination "%eax" ok
SegvReason: reading NULL VMA
Signal: 11
SourcePackage: task
StacktraceTop:
 fseek () from /lib/libc.so.6
 ?? ()
 ?? ()
 ?? ()
 ?? ()
Title: task crashed with SIGSEGV in fseek()
UpgradeStatus: Upgraded to natty on 2011-03-10 (1 days ago)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
Ron Lusk (luskwater) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 fseek () from /lib/libc.so.6
 TDB::loadCompleted (this=0x816f968, tasks=..., filter=...) at TDB.cpp:394
 TDB::load (this=0x816f968, tasks=..., filter=...) at TDB.cpp:271
 onProjectChange (task=..., scope=true) at report.cpp:2884
 handleLog (outs=...) at command.cpp:203

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in task (Ubuntu):
importance: Undecided → Medium
tags: removed: need-i386-retrace
Revision history for this message
Bryce Harrington (bryce) wrote :

Hmm, worked for me (with 1.9.4):

humber:~/src/Files/Admin$ task shell
task 1.9.4 shell

Enter any task command (such as 'list'), or hit 'Enter'.
There is no need to include the 'task' command itself.
Enter 'quit' (or 'bye', 'exit') to end the session.

task> log +india +test project:india-dinner due:today Prepare Indian food
Logged task.
The project 'india-dinner' has changed. Project 'india-dinner' is 0% complete (0 of 0 tasks remaining).

task>

visibility: private → public
Revision history for this message
Bryce Harrington (bryce) wrote :

Reproduced on 1.9.3 (near-stock ubuntu 11.04):

lynmouth:~$ task shell
A configuration file could not be found in /home/bryce

Would you like a sample /home/bryce/.taskrc created, so taskwarrior can proceed? (y/n) y
task 1.9.3 shell

Enter any task command (such as 'list'), or hit 'Enter'.
There is no need to include the 'task' command itself.
Enter 'quit' to end the session.

task> log +india +test project:india-dinner due:today Prepare Indian food
Segmentation fault

Revision history for this message
Bryce Harrington (bryce) wrote :

This is sufficient to crash it:

task> log project:india-dinner Prepare Indian food
Segmentation fault

Revision history for this message
Bryce Harrington (bryce) wrote :

This is bug http://taskwarrior.org/issues/555

[Tried linking it in launchpad but launchpad doesn't seem to recognize the Redmine bug tracker (LP: #324387)

Bryce Harrington (bryce)
Changed in task (Ubuntu):
assignee: nobody → Bryce Harrington (bryce)
status: New → In Progress
Revision history for this message
Bryce Harrington (bryce) wrote :

After applying upstream patch to our packaging, issue does not reproduce:

lynmouth:~$ task shell
task 1.9.3 shell

Enter any task command (such as 'list'), or hit 'Enter'.
There is no need to include the 'task' command itself.
Enter 'quit' to end the session.

task> log +india +test project:india-dinner due:today Prepare Indian food
Logged task.
The project 'india-dinner' has changed. Project 'india-dinner' is 0% complete (0 of 0 tasks remaining).

task>

Changed in task (Ubuntu):
importance: Medium → High
description: updated
Revision history for this message
Bryce Harrington (bryce) wrote :

Patch cherrypicked and uploaded to natty-proposed.

Changed in task (Ubuntu Natty):
assignee: nobody → Bryce Harrington (bryce)
importance: Undecided → High
milestone: none → natty-updates
status: New → Fix Committed
Bryce Harrington (bryce)
description: updated
Bryce Harrington (bryce)
description: updated
Revision history for this message
Chris Halse Rogers (raof) wrote : Please test proposed package

Hello Ron, or anyone else affected,

Accepted task into natty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in task (Ubuntu):
status: In Progress → Fix Released
tags: added: verification-needed
Revision history for this message
dino99 (9d9) wrote :
Changed in task (Ubuntu Natty):
status: Fix Committed → Invalid
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.