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

Bug #730633 reported by Dan Muresan on 2011-03-07
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lash (Debian)
Fix Released
lash (Ubuntu)
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:

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

Regression risk:
Slim to none.

Changed in lash (Ubuntu):
importance: Undecided → Medium
Dan Muresan (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).

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
Alessio Treglia (quadrispro) wrote :

Fixed in Oneiric.

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

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:

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


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


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
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  Edit
Everyone can see this information.

Other bug subscribers