python-gamin does not detect any filesystem events

Bug #926862 reported by Alistair Buxton
62
This bug affects 9 people
Affects Status Importance Assigned to Milestone
gamin
Fix Released
Medium
gamin (Ubuntu)
Medium
Unassigned
Precise
Medium
Unassigned
Quantal
Medium
Unassigned

Bug Description

[rational]
gamin is unable to detect changes on filesystem which make it impossible to work with bcfg2-server. and other service as well.

[test case]
To reproduce, use the attached test case:

1. python gamin-test.py
2. touch /tmp/foo

Expected result:
Got callback: /tmp/foo, 5

Actual result:
Nothing

[regression potential]
None, this fix the deadlock on gamin

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: python-gamin 0.1.10-4
ProcVersionSignature: Ubuntu 3.2.0-12.21-generic 3.2.2
Uname: Linux 3.2.0-12-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 1.91-0ubuntu1
Architecture: amd64
Date: Sat Feb 4 20:07:26 2012
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Beta amd64 (20110921.2)
SourcePackage: gamin
UpgradeStatus: Upgraded to precise on 2012-02-02 (1 days ago)

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :
Revision history for this message
Sol Jerome (solj) wrote :

Ugly workaround

    $ pkill gam_server && python gamin-test.py
    Got callback: /tmp, 8
    Got callback: .ICE-unix, 8
    Got callback: aptitude-root.4939:nRkJsO, 8
    Got callback: .X11-unix, 8
    Got callback: /tmp, 9
    Got callback: foo, 5
    Got callback: foo, 1

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

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gamin (Ubuntu):
status: New → Confirmed
Changed in gamin:
status: Unknown → Confirmed
Revision history for this message
alp (atoker) wrote :

Upstream Gnome bug #667230 has an appropriate analysis and patch.

Changed in gamin:
status: Confirmed → Unknown
Revision history for this message
alp (atoker) wrote :

As far as I can tell, this is a security issue since fail2ban and presumably other monitoring daemons will silently ignore intrusion attempts on Precise server (see bug #954453).

Apart from breaking intrusion detection, it turns out this issue with gamin was also the cause of delayed IMAP mail notifications with postfix/dovecot and loss of nightly backups on our server following an upgrade to Precise.

The problem is due to a deadlock after the first disconnect from gam_server under common conditions.

https://bugzilla.gnome.org/show_bug.cgi?id=667230 has the correct fix for this issue which should be applied in Ubuntu and uploaded to precise-security as soon as possible.

Gentoo is using this fix (http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-admin/gam-server/files/gam-server-0.1.10-ih_sub_cancel-deadlock.patch?revision=1.1) while Fedora is using a similar but less accurate version (https://bugzilla.redhat.com/show_bug.cgi?id=786170).

Would be great to set this up so it monitors the other trackers as the problem was fixed in other distributions months ago yet the latest Ubuntu release didn't get the fix. I don't know my way around Launchpad well enough to do that myself.

security vulnerability: no → yes
Changed in gamin:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
alp (atoker) wrote :

Also mentioned at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=542361.

Not sure why the discussion at Debian is stalled but it's probably significant to Ubuntu server where gamin is used by default for IDS. As a Gnome developer I can confirm that http://bugzilla-attachments.gnome.org/attachment.cgi?id=204537 is the obviously correct fix out of the two available patches in case that was the sticking point.

Guessing upstream is MIA.

Revision history for this message
Rick Richardson (rick-richardson) wrote :

Also, "gnome-manual-duplex" doesn't work unless you do the "pkill gam_server"!

Changed in gamin (Ubuntu Precise):
status: New → In Progress
Changed in gamin (Ubuntu Quantal):
status: Confirmed → In Progress
Changed in gamin (Ubuntu Precise):
importance: Undecided → Medium
Changed in gamin (Ubuntu Quantal):
importance: Undecided → Medium
Revision history for this message
Marc Gariépy (mgariepy) wrote :
tags: added: patch
Marc Gariépy (mgariepy)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gamin - 0.1.10-4ubuntu1

---------------
gamin (0.1.10-4ubuntu1) quantal; urgency=low

  * Add 18_gam_server_deadlocks.patch: fix gam server deadlock (LP: #926862)
 -- Marc Gariepy <email address hidden> Thu, 05 Jul 2012 15:39:41 -0400

Changed in gamin (Ubuntu Quantal):
status: In Progress → Fix Released
security vulnerability: yes → no
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Alistair, or anyone else affected,

Accepted gamin into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/gamin/0.1.10-4ubuntu0.1 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 gamin (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Marc Gariépy (mgariepy) wrote :

just tested the new package, everything work as expected.

Thanks for the upload.

tags: added: verification-done
removed: verification-needed
Revision history for this message
DEXTER (mydexterid) wrote :

The new package works for me too.

Revision history for this message
Florin (flopppy) wrote :

This new package works for me too, it fixes the issue. When this will be pushed from proposed to main?

Revision history for this message
Florin (flopppy) wrote :

and btw, this was already released for quantal, when it will be released for precise?

Revision history for this message
Stéphane Graber (stgraber) wrote :

It needs to stay at least 2 more days in -proposed as the minimum testing period is 7 days from the time it was accepted.

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

This bug was fixed in the package gamin - 0.1.10-4ubuntu0.1

---------------
gamin (0.1.10-4ubuntu0.1) precise-proposed; urgency=low

  * Add 18_gam_server_deadlocks.patch: fix gam server deadlock (LP: #926862)
 -- Marc Gariepy <email address hidden> Thu, 05 Jul 2012 15:39:41 -0400

Changed in gamin (Ubuntu Precise):
status: Fix Committed → Fix Released
Revision history for this message
Wladimir Mutel (mwg) wrote :

Hell, finally
it screwed my courier-imap for 3 months !
Thanks a lot for fixing this !

Changed in gamin:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.