lashd 6 doesn't load projects from JFS (patch included)

Bug #730633 reported by danmb
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lash (Debian)
Fix Released
Undecided
Unassigned
lash (Ubuntu)
Fix Released
Medium
Unassigned
Natty
Won't Fix
Undecided
Daniel T Chen

Bug Description

Binary package hint: lashd

SRU Impact statement:
lashd-0.6.0~rc2-1ubuntu2 (Maverick and Natty) doesn't restore projects from JFS filesystems upon startup.

This is because the code uses an unreliable, non-portable check for dirent.d_type == DT_DIR, which fails on many filesystems, causing lashd to think that the project directories are not, in fact, directories.

Patch / resolution:
The attached 05_stat.patch uses stat / S_ISDIR to properly check dentries (and fixes a similar problem with the lashd "appdb"). It has been tested in my PPA.
Oneiric is not affected, as the lash source package is not available.

Patch for natty-proposed: https://bugs.launchpad.net/ubuntu/natty/+source/lash/+bug/730633/+attachment/2221562/+files/lash_0.6.0~rc2-5ubuntu0.1.debdiff

TEST CASE:
Install lashd on 11.04 and attempt to load a project hosted on JFS. It will fail.

Regression risk:
Slim to none.

Revision history for this message
danmb (danmbox) wrote :
Changed in lash (Ubuntu):
importance: Undecided → Medium
Revision history for this message
danmb (danmbox) wrote :

Note, not only JFS is affected. From the readdir() manpage:

Currently, only some file systems (among them: Btrfs, ext2, ext3, and ext4) have full support returning the file type in d_type. All applications must properly handle a return of DT_UNKNOWN.

So, XFS, Reiser, Fuse, and whatever comes in the future might all be affected (sorry, can't check).

Revision history for this message
Alessio Treglia (quadrispro) wrote :

Fixed with Debian's 0.6.0~rc2-6 release.

Changed in lash (Debian):
status: New → Fix Released
Changed in lash (Ubuntu):
status: New → Triaged
Revision history for this message
Alessio Treglia (quadrispro) wrote :

Fixed in Oneiric.

Changed in lash (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Daniel T Chen (crimsun) wrote :
description: updated
description: updated
Changed in lash (Ubuntu Natty):
assignee: nobody → Daniel T Chen (crimsun)
tags: added: patch-accepted-debian
removed: patch
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Hello Daniel Chen and Dan Muresan, thanks so much for the bug fix!

Unfortunately, I have to reject this from the SRU queue.

The patch needs a minimal DEP3 header, with Description, Origin, Author, and any relevant bug references.

I would also disagree with the regression potential of the patch. Stat *is* a very reliable pattern, and this looks like it uses best practices. However, it does change to a different method for this check, and thats more than "slim to no" chance of a regression. Please discuss, in summary, the logic behind the regression potential.

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Oh and I forgot to add, the version is a bit of a confusing thing for this package. It seems that lash was removed from Debian:

http://packages.qa.debian.org/l/lash/news/20110618T093426Z.html

Due to an abandoned upstream. Still, I think the appropriate version for your SRU upload would be:

0.6.0~rc2-5ubuntu0.1

In case there is a new release picked up later, which is numbered

0.6.0~rc2-5ubuntu1

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

3rd time is the charm.. what I meant to end that comment with was that the version chosen was correct.

tags: added: testcase
Revision history for this message
Rolf Leggewie (r0lf) wrote :

natty has seen the end of its life and is no longer receiving any updates. Marking the natty task for this ticket as "Won't Fix".

Changed in lash (Ubuntu Natty):
status: New → Won't Fix
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.