Loading pylint.elc causes emacs24 to hang for a VERY LONG TIME at startup

Bug #1530667 reported by Brian the Lion on 2016-01-03
This bug affects 9 people
Affects Status Importance Assigned to Milestone
pylint (Ubuntu)

Bug Description

On stock Wily. Workaround is to "emacs --no-site-file"

Note the "ERROR" line below:

$ sudo apt-get install emacs24 pylint
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  emacs24-bin-common emacs24-common emacs24-common-non-dfsg liblockfile-bin liblockfile1 libm17n-0
  libotf0 m17n-db python-astroid python-egenix-mxdatetime python-egenix-mxtools python-logilab-common
Suggested packages:
  emacs24-el m17n-docs python-egenix-mxdatetime-dbg python-egenix-mxdatetime-doc
  python-egenix-mxtools-dbg python-egenix-mxtools-doc pyro python-unittest2
The following NEW packages will be installed:
  emacs24 emacs24-bin-common emacs24-common emacs24-common-non-dfsg liblockfile-bin liblockfile1
  libm17n-0 libotf0 m17n-db pylint python-astroid python-egenix-mxdatetime python-egenix-mxtools
0 upgraded, 14 newly installed, 0 to remove and 0 not upgraded.
Need to get 594 kB/22.9 MB of archives.
After this operation, 106 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://us.archive.ubuntu.com/ubuntu/ wily/main python-logilab-common all 1.0.2-1 [384 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ wily/main python-astroid all 1.3.8-1 [67.8 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ wily/main python-egenix-mxtools amd64 3.2.8-1 [75.2 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ wily/main python-egenix-mxdatetime amd64 3.2.8-1 [67.3 kB]
Fetched 594 kB in 1s (380 kB/s)
Selecting previously unselected package liblockfile-bin.
(Reading database ... 174286 files and directories currently installed.)
Preparing to unpack .../liblockfile-bin_1.09-6ubuntu1_amd64.deb ...
Unpacking liblockfile-bin (1.09-6ubuntu1) ...
Selecting previously unselected package liblockfile1:amd64.
Preparing to unpack .../liblockfile1_1.09-6ubuntu1_amd64.deb ...
Unpacking liblockfile1:amd64 (1.09-6ubuntu1) ...
Selecting previously unselected package libotf0:amd64.
Preparing to unpack .../libotf0_0.9.13-1ubuntu1_amd64.deb ...
Unpacking libotf0:amd64 (0.9.13-1ubuntu1) ...
Selecting previously unselected package emacs24-common-non-dfsg.
Preparing to unpack .../emacs24-common-non-dfsg_24.4+1-2_all.deb ...
Unpacking emacs24-common-non-dfsg (24.4+1-2) ...
Selecting previously unselected package emacs24-common.
Preparing to unpack .../emacs24-common_24.5+1-1ubuntu2_all.deb ...
Unpacking emacs24-common (24.5+1-1ubuntu2) ...
Selecting previously unselected package emacs24-bin-common.
Preparing to unpack .../emacs24-bin-common_24.5+1-1ubuntu2_amd64.deb ...
Unpacking emacs24-bin-common (24.5+1-1ubuntu2) ...
Selecting previously unselected package m17n-db.
Preparing to unpack .../m17n-db_1.6.5-1_all.deb ...
Unpacking m17n-db (1.6.5-1) ...
Selecting previously unselected package libm17n-0.
Preparing to unpack .../libm17n-0_1.6.4-3_amd64.deb ...
Unpacking libm17n-0 (1.6.4-3) ...
Selecting previously unselected package emacs24.
Preparing to unpack .../emacs24_24.5+1-1ubuntu2_amd64.deb ...
Unpacking emacs24 (24.5+1-1ubuntu2) ...
Selecting previously unselected package python-logilab-common.
Preparing to unpack .../python-logilab-common_1.0.2-1_all.deb ...
Unpacking python-logilab-common (1.0.2-1) ...
Selecting previously unselected package python-astroid.
Preparing to unpack .../python-astroid_1.3.8-1_all.deb ...
Unpacking python-astroid (1.3.8-1) ...
Selecting previously unselected package pylint.
Preparing to unpack .../pylint_1.3.1-3ubuntu1_all.deb ...
Unpacking pylint (1.3.1-3ubuntu1) ...
Selecting previously unselected package python-egenix-mxtools.
Preparing to unpack .../python-egenix-mxtools_3.2.8-1_amd64.deb ...
Unpacking python-egenix-mxtools (3.2.8-1) ...
Selecting previously unselected package python-egenix-mxdatetime.
Preparing to unpack .../python-egenix-mxdatetime_3.2.8-1_amd64.deb ...
Unpacking python-egenix-mxdatetime (3.2.8-1) ...
Processing triggers for man-db (2.7.4-1) ...
Processing triggers for install-info (6.0.0.dfsg.1-3) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu1) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu3) ...
Processing triggers for mime-support (3.58ubuntu1) ...
Setting up liblockfile-bin (1.09-6ubuntu1) ...
Setting up liblockfile1:amd64 (1.09-6ubuntu1) ...
Setting up libotf0:amd64 (0.9.13-1ubuntu1) ...
Setting up emacs24-common-non-dfsg (24.4+1-2) ...
Setting up emacs24-common (24.5+1-1ubuntu2) ...
Setting up emacs24-bin-common (24.5+1-1ubuntu2) ...
update-alternatives: using /usr/bin/ctags.emacs24 to provide /usr/bin/ctags (ctags) in auto mode
update-alternatives: using /usr/bin/ebrowse.emacs24 to provide /usr/bin/ebrowse (ebrowse) in auto mode
update-alternatives: using /usr/bin/emacsclient.emacs24 to provide /usr/bin/emacsclient (emacsclient) in auto mode
update-alternatives: using /usr/bin/etags.emacs24 to provide /usr/bin/etags (etags) in auto mode
update-alternatives: using /usr/bin/grep-changelog.emacs24 to provide /usr/bin/grep-changelog (grep-changelog) in auto mode
Setting up m17n-db (1.6.5-1) ...
Setting up libm17n-0 (1.6.4-3) ...
Setting up emacs24 (24.5+1-1ubuntu2) ...
update-alternatives: using /usr/bin/emacs24-x to provide /usr/bin/emacs (emacs) in auto mode
Install emacsen-common for emacs24
emacsen-common: Handling install of emacsen flavor emacs24
Wrote /etc/emacs24/site-start.d/00debian-vars.elc
Wrote /usr/share/emacs24/site-lisp/debian-startup.elc
Install pylint for emacs24
install/pylint: Handling install for emacsen flavor emacs24
Loading 00debian-vars...
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...
Info: Skip debian-el loading if run under dpkg control.
Wrote /usr/share/emacs24/site-lisp/pylint/pylint.elc
Install dictionaries-common for emacs24
install/dictionaries-common: Byte-compiling for emacsen flavour emacs24
Wrote /usr/share/emacs24/site-lisp/dictionaries-common/debian-ispell.elc
Setting up python-logilab-common (1.0.2-1) ...
Setting up python-astroid (1.3.8-1) ...
Setting up pylint (1.3.1-3ubuntu1) ...
ERROR: pylint is broken - called emacs-package-install as a new-style add-on, but has no compat file.
Install pylint for emacs
Install pylint for emacs24
install/pylint: Handling install for emacsen flavor emacs24
Loading 00debian-vars...
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...
Info: Skip debian-el loading if run under dpkg control.
Loading /etc/emacs/site-start.d/50pylint.el (source)...
Loading pylint (compiled; note, source file is newer)...
Wrote /usr/share/emacs24/site-lisp/pylint/pylint.elc
Setting up python-egenix-mxtools (3.2.8-1) ...
Setting up python-egenix-mxdatetime (3.2.8-1) ...
Processing triggers for libc-bin (2.21-0ubuntu4) ...

ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: pylint 1.3.1-3ubuntu1
ProcVersionSignature: Ubuntu 4.2.0-22.27-generic 4.2.6
Uname: Linux 4.2.0-22-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.19.1-0ubuntu5
Architecture: amd64
CurrentDesktop: GNOME
Date: Sun Jan 3 11:06:33 2016
PackageArchitecture: all
 PATH=(custom, no user)
SourcePackage: pylint
UpgradeStatus: No upgrade log present (probably fresh install)

Brian the Lion (rossabri) wrote :
Launchpad Janitor (janitor) wrote :

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

Changed in pylint (Ubuntu):
status: New → Confirmed

I can confirm this bug affects me too on Wily.

sudo apt-get remove --purge pylint

is enough to get emacs to start up instantly.


sudo apt-get install pylint

Hangs for a very long time, and starting emacs after that hangs for a very long time - it shows `Loading pylint...` in the minibuffer while hanging.

$ dpkg -l | egrep 'pylint|emacs'
ii emacs 46.1 all GNU Emacs editor (metapackage)
ii emacs24 24.5+1-1ubuntu2 amd64 GNU Emacs editor (with GTK+ GUI support)
ii emacs24-bin-common 24.5+1-1ubuntu2 amd64 GNU Emacs editor's shared, architecture dependent files
ii emacs24-common 24.5+1-1ubuntu2 all GNU Emacs editor's shared, architecture independent infrastructure
ii emacs24-common-non-dfsg 24.4+1-2 all GNU Emacs common non-DFSG items, including the core documentation
ii emacsen-common 2.0.8 all Common facilities for all emacsen
ii maxima-emacs 5.36.1-1 all Computer algebra system -- emacs interface
ii pylint 1.3.1-3ubuntu1 all Python code static checker and UML diagram generator

What I don't understand is that this combo has worked ever since I installed wily, and I haven't updated emacs or pylint for over a month.

Changed in pylint (Ubuntu):
importance: Undecided → High
Sergio Callegari (callegar) wrote :

Bug is also in xenial

Andreas Loeffler (lefty01) wrote :

seeing this as well in xenial (16.04.3)

when removing pylint I also see this msg when opening python file in emacs:
File mode specification error: (file-error "Cannot open load file" "no such file or directory" "pylint")
... this however does not cause further lag/hang or something

YAMAMOTO Hirotaka (ymmt2005) wrote :

I had the same issue in xenial and could resolve it.

The problem occurs when pylint package was installed before emacs.
The postinst script of pylint installs the pylint.el properly only if emacs has been installed.

To workaround the problem, reconfigure pylint as:

sudo dpkg-reconfigure pylint

Gabriele (im-drunk) wrote :

The workaround proposed in comment #6 does not solve the issue for me on Kubuntu xenial but removing:


lets emacs start any python file instantly without hanging but (of course) with no pylint. This issue for me started out of nowhere, I haven't updated anything for a long time and all of a sudden trying to create a new python file takes forever.

Neil Jerram (neil-jerram) wrote :

I would guess that this is because pylint.el includes:

(require 'tramp)

and that this is more a problem with Tramp startup, than with pylint. I've had slow Tramp startup problems in other contexts unrelated to python.

Possibly relevant references:

https://magit.vc/manual/magit/Emacs-245-hangs-when-loading-Magit.html#Emacs-245-hangs-when-loading-Magit, which includes:

> You can work around the problem by setting tramp-ssh-controlmaster-options. Changing your DNS server (e.g. to Google’s may also be sufficient to work around the issue.


To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers