task crashed with SIGSEGV in Context::dispatch()

Bug #980093 reported by James Troup
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
task (Ubuntu)
Fix Released
High
Bryce Harrington
Precise
Fix Released
High
Bryce Harrington

Bug Description

[Impact]
task crashes when doing `task edit` inside task shell.

[Development Fix]
The crash was fixed upstream. This fix has been backported to the 2.0.0 version and uploaded to quantal

[Stable Fix]
Since we're including essentially the same version of task in precise and quantal, the same patch can be included in quantal.

[Test Case]
How to reproduce:

| james@ornery:$ mkdir /tmp/x; cd /tmp/x
| james@ornery:/tmp/x$ echo "data.location=/tmp/x/.task" > .taskrc
| james@ornery:/tmp/x$ task rc:.taskrc shell
| task 2.0.0 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> add foo
| Using alternate .taskrc file .taskrc
| Created task 1.
| task> 1 edit

[ just quit the editor at this point ]

| Editing complete.
| No edits were detected.
| Using alternate .taskrc file .taskrc
| task> next
| A configuration file could not be found in .
|
| Would you like a sample .taskrc created, so taskwarrior can proceed? (yes/no) no
| Using alternate .taskrc file .taskrc
| Cannot proceed without rc file.
| Segmentation fault (core dumped)

Using a fully qualified path as the argument to 'rc' works around this
crash but breaks my use case, i.e. being able to cd into an arbitrary
directory and run a 't' alias which is 'task rc:.taskrc'.

[Regression Potential]
None expected, but the change includes modifications to pointers and thus things to watch for include segfaults and memory leaks. This fix has been present upstream for a while now without incident.

ProblemType: Crash
DistroRelease: Ubuntu 12.04
Package: task 2.0.0.release-0ubuntu2
ProcVersionSignature: Ubuntu 3.2.0-22.35-generic 3.2.14
Uname: Linux 3.2.0-22-generic x86_64
ApportVersion: 2.0.1-0ubuntu2
Architecture: amd64
CrashCounter: 1
Date: Thu Apr 12 18:21:35 2012
EcryptfsInUse: Yes
ExecutablePath: /usr/bin/task
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
ProcCmdline: task rc:.taskrc shell
ProcEnviron:
 SHELL=/bin/bash
 TERM=screen-256color-bce
 PATH=(custom, no user)
 LANG=en_GB.UTF-8
 LANGUAGE=en_GB:en
SegvAnalysis:
 Segfault happened at: 0x4256ff <_ZN7Context8dispatchERSs+575>: mov (%rdi),%rax
 PC (0x004256ff) ok
 source "(%rdi)" (0x00000000) not located in a known VMA region (needed readable region)!
 destination "%rax" ok
SegvReason: reading NULL VMA
Signal: 11
SourcePackage: task
StacktraceTop:
 Context::dispatch(std::string&) ()
 Context::run() ()
 CmdShell::execute(std::string&) ()
 Context::dispatch(std::string&) ()
 Context::run() ()
Title: task crashed with SIGSEGV in Context::dispatch()
UpgradeStatus: Upgraded to precise on 2012-01-09 (93 days ago)
UserGroups: adm admin cdrom dialout libvirtd lpadmin plugdev sambashare

Revision history for this message
James Troup (elmo) wrote :
Revision history for this message
James Troup (elmo) wrote :

I've deleted the core dump as it contained private data.

James Troup (elmo)
visibility: private → public
tags: removed: need-amd64-retrace
Revision history for this message
Bryce Harrington (bryce) wrote :

Reproduced using provided directions (thanks!)

Changed in task (Ubuntu):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Bryce Harrington (bryce) wrote :

This is reproduced against current upstream git.

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

James, I've forward this bug upstream to http://taskwarrior.org/issues/1001; please set yourself as a Watch on that bug if you'd like to follow it.

I've also posted a patch to the upstream bug that seems to solve the segfault for me, however I don't think it's a complete fix, so am awaiting feedback from upstream before including it.

Changed in task (Ubuntu):
assignee: nobody → Bryce Harrington (bryce)
status: Triaged → In Progress
Bryce Harrington (bryce)
Changed in task (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package task - 2.0.0.release-0ubuntu4

---------------
task (2.0.0.release-0ubuntu4) quantal; urgency=low

  * Add 103_total_active_time.patch: Don't continue accumulating total
    active time after an active task is completed.
    (LP: #992854)
  * Add 104_project_complete_verbosity.patch and 105_affected_verbosity.patch:
    Be quieter with feedback if rc.vebose=nothing is specified.
    (LP: #992876)
  * Add 106_chdir_back_after_edit.patch: Fix segfault in
    Context::dispatch() when running task shell. This is because the edit
    command was not restoring the current directory.
    (LP: #980093)
 -- Bryce Harrington <email address hidden> Thu, 19 Jul 2012 14:43:49 -0700

Changed in task (Ubuntu):
status: Fix Committed → Fix Released
Bryce Harrington (bryce)
description: updated
Changed in task (Ubuntu Precise):
status: New → Fix Committed
importance: Undecided → High
assignee: nobody → Bryce Harrington (bryce)
Revision history for this message
Stéphane Graber (stgraber) wrote :

Reverting the precise task to In Porogress, Fix Commited is for packages that are in the -proposed pocket, this package is still in the Unapproved queue.

Changed in task (Ubuntu Precise):
status: Fix Committed → In Progress
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello James, or anyone else affected,

Accepted task into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/task/2.0.0.release-0ubuntu2.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in task (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote : Verification still needed

The fix for this bug has been awaiting testing feedback in the -proposed repository for precise for more than 90 days. Please test this fix and update the bug appropriately with the results. In the event that the fix for this bug is still not verified 15 days from now, the package will be removed from the -proposed repository.

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

salisbury:~$ mkdir /tmp/x; cd /tmp/x
salisbury:/tmp/x$ echo "data.location=/tmp/x/.task" > .taskrc
salisbury:/tmp/x$ task rc:.taskrc shell
task 2.0.0 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> add foo
Using alternate .taskrc file .taskrc
Created task 1.
task> 1 edit
Launching 'emacs -nw "task.6641.1.task"' now...
Editing complete.
No edits were detected.
Using alternate .taskrc file .taskrc
task> next
Using alternate .taskrc file .taskrc

ID Project Pri Due A Age Urgency Description
 1 15s 0 foo

1 task
task>

tags: added: verification-done
removed: verification-needed
Revision history for this message
Scott Kitterman (kitterman) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

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

This bug was fixed in the package task - 2.0.0.release-0ubuntu2.2

---------------
task (2.0.0.release-0ubuntu2.2) precise-proposed; urgency=low

  * Add 103_total_active_time.patch: Don't continue accumulating total
    active time after an active task is completed.
    (LP: #992854)
  * Add 104_project_complete_verbosity.patch and 105_affected_verbosity.patch:
    Be quieter with feedback if rc.vebose=nothing is specified.
    (LP: #992876)
  * Add 106_chdir_back_after_edit.patch: Fix segfault in
    Context::dispatch() when running task shell. This is because the edit
    command was not restoring the current directory.
    (LP: #980093)
 -- Bryce Harrington <email address hidden> Thu, 19 Jul 2012 14:43:49 -0700

Changed in task (Ubuntu Precise):
status: Fix Committed → 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.