Cannot open a file in a directory under control of Mecurial

Bug #1175422 reported by Kimikazu
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
emacs24 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

This problem happened just after the upgrade to Ubuntu 13.04.

When trying to open a file in a directory under control of Mercurial, i.e. a directory which has .hg directory, emacs stops in its staring process.
When this symptom occurs, in the minibuffer, it says:
Loading vc-hg...done

And the following is dumped to stderr:
(emacs:5305): GLib-WARNING **: GChildWatchSource: Exit status of a child process was requested but ECHILD was received by waitpid(). Most likely the process is ignoring SIGCHLD, or some other thread is invoking waitpid() with a nonpositive first argument; either behavior can break applications that use g_child_watch_add()/g_spawn_sync() either directly or indirectly.

Even when opening an unregistered file in a Mercurial-controlled directory, the same symptom happens.
It works when started alone (to open *scratch* buffer) and it's also OK to open a file not under control of Mercurial.

Additional information after the first post:
    - It gets fixed after uninstalling mercurial, and reproduces again after re-installing mercurial.
    - It occurs even when there's no ~/.emacs or ~/.emacs.d/init.el
    - It didn't reproduced on another PC. so it depends on the environments.
    - The same symptom reproduces in a git-controlled directory, so it seems to be a problem of vc-mode.
    - WORKAROUND: Cancel vc-mode in .emacs file by "(setq vc-handled-backends ())" then it works.

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: emacs24 24.2+1-2ubuntu2
ProcVersionSignature: Ubuntu 3.8.0-19.29-generic 3.8.8
Uname: Linux 3.8.0-19-generic x86_64
ApportVersion: 2.9.2-0ubuntu8
Architecture: amd64
Date: Thu May 2 10:50:18 2013
InstallationDate: Installed on 2012-11-05 (177 days ago)
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.5)
MarkForUpload: True
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: emacs24
UpgradeStatus: Upgraded to raring on 2013-05-02 (0 days ago)

Revision history for this message
Kimikazu (kimikazu) wrote :
Kimikazu (kimikazu)
description: updated
Kimikazu (kimikazu)
tags: added: emacs mercurial
Kimikazu (kimikazu)
description: updated
Revision history for this message
Rolf Schreiber (t-launchpad-schreiber-rolf-de) wrote :

I guess my problem has the same root cause: since 13.04 I cannot run emacs as root anymore.
to be more precise:

emacs -q hangs immediately with the same message: GLib-WARNING **: GChildWatchSource: ...

emacs -Q works, but then running dired on any dir freezes again with the same message

opening git-controlled files freezes as well

running (setq vc-handled-backends ()) after the start does help for the git-controlled files, but not for the dired
so the root cause most likely isn't vc-mode but somewhere else.

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

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

Changed in emacs24 (Ubuntu):
status: New → Confirmed
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.