Compilation with check not possible (infinite loop)

Bug #487903 reported by Stanislaw Pitucha
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
check (Debian)
Fix Released
Unknown
check (Ubuntu)
Fix Released
Undecided
Unassigned
Lucid
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: check

There are two cases where a build with check goes into an infinite loop. I haven't tried it on any other system, but the latest ubuntu karmic.
Running `aclocal --verbose` on the attached example (check_money) causes the script to freeze on:

aclocal: running autom4te --language Autoconf-without-aclocal-m4 '/usr/share/aclocal/check.m4' '/usr/share/aclocal/libtool.m4' .....

Removing the AM_PATH_CHECK() allows the configure to be generated. When I use the test/Makefile generated this way (and set up @CHECK_CFLAGS@ and ..._LIBS@ myself), `make check` never finishes (both on the example and my project):

make[1]: Leaving directory `/home/viraptor/Projects/xxx'
Making check in tests
make[1]: Entering directory `/home/viraptor/Projects/xxx/tests'
make check_xxx
make[2]: Entering directory `/home/viraptor/Projects/xxx/tests'
gcc ........ || echo './'`check_xxx.c
mv -f .deps/check_xxx-check_xxx.Tpo .deps/check_xxx-check_xxx.Po
make check_xxx
make[3]: Entering directory `/home/viraptor/Projects/xxx/tests'
make check_xxx
make[4]: Entering directory `/home/viraptor/Projects/xxx/tests'
make check_xxx
.... (this is called all the time recursively)

If I install the latest version of `check` from sources, everything works just fine.

ProblemType: Bug
Architecture: i386
Date: Wed Nov 25 00:01:55 2009
DistroRelease: Ubuntu 9.10
Package: check (not installed)
ProcEnviron:
 LANGUAGE=pl_PL.UTF-8
 PATH=(custom, no user)
 LANG=pl_PL.UTF-8
 SHELL=/bin/zsh
ProcVersionSignature: Ubuntu 2.6.31-15.50-generic
SourcePackage: check
Uname: Linux 2.6.31-15-generic i686

Revision history for this message
Stanislaw Pitucha (viraptor-gmail) wrote :
Revision history for this message
Stanislaw Pitucha (viraptor-gmail) wrote :

This one seems to be ubuntu-package specific after all. I made a package from the current deb's .diff file and the latest `check` sources (that worked when installed manually). That package had the same problem - hanging on AM_PATH_CHECK and looping on `make check`

Revision history for this message
Stanislaw Pitucha (viraptor-gmail) wrote :

I've found the problem in the end. This part of ubuntu's patch renders the package broken:

--- check-0.9.6.orig/check.m4
+++ check-0.9.6/check.m4
@@ -4,8 +4,8 @@

 AC_DEFUN([AM_PATH_CHECK],
 [
- AC_MSG_WARN([A@&t@M_PATH_CHECK() is deprecated])
- AC_MSG_WARN([[use P@&t@KG_CHECK_MODULES([CHECK], [check >= 0.9.4]) instead]])
+ AC_MSG_WARN([AM_PATH_CHECK() is deprecated])
+ AC_MSG_WARN([[use PKG_CHECK_MODULES([CHECK], [check >= 0.9.4]) instead]])
   AC_ARG_WITH([check],
   [ --with-check=PATH prefix where check is installed [default=auto]])

@&t@ part was put there to prevent expanding the AM_PATH_CHECK() macro. It makes the package broken for any new check-using project (or old, after running `aclocal`).
Please remove that part ASAP, as this makes the package practically useless.

Revision history for this message
viking (viking415) wrote :

I can confirm this bug. Running aclocal causes m4 to run endlessly, taking up 100% mem very quickly.

Revision history for this message
ccaaatt (ccaaatt) wrote :

confirm this bug at 10.10(lucid), take long long long time , 80 % CPU usage

Revision history for this message
ccaaatt (ccaaatt) wrote :

sorry, 10.04

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

This bug was fixed in the package check - 0.9.8-1ubuntu1

---------------
check (0.9.8-1ubuntu1) maverick; urgency=low

  * Fix infinite loop in automake macro. (LP: #487903)
 -- Soren Hansen <email address hidden> Mon, 31 May 2010 12:27:48 +0200

Changed in check (Ubuntu):
status: New → Fix Released
Revision history for this message
Soren Hansen (soren) wrote :

Simple SRU.

TEST CASE:
mkdir mytmpdir
cd mytmpdir
cat <<EOF > configure.ac
AC_INIT()
AM_PATH_CHECK
EOF
aclocal

Without this patch, it will go into an infinite loop and keep eating more and more memory at a very fast rate. With the patch, it'll terminate succesfully.

Revision history for this message
Soren Hansen (soren) wrote :
Revision history for this message
Soren Hansen (soren) wrote :

Uploaded to lucid-proposed (awaiting acceptance).

Revision history for this message
John Dong (jdong) wrote :

ACK from -sru!

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted check into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in check (Ubuntu Lucid):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Bo Pearce (bo-pearce) wrote :

I updated from the check in lucid-proposed. Reran autoreconf and it worked! It did not hang while running aclocal. Then ran configure and it told me AM_PATH_CHECK() had been deprecated and to use PKG_CHECK_MODULES([CHECK], [check >= 0.9.4]) instead. So I did that and it worked fine.

I wonder if I had used PKG_CHECK_MODULES([CHECK], [check >= 0.9.4]) previously to updating from the lucid-proposed if it would have worked...

Thanks a lot!

Revision history for this message
Soren Hansen (soren) wrote : Re: [Bug 487903] Re: Compilation with check not possible (infinite loop)

On Tue, Jun 01, 2010 at 06:59:28PM -0000, Bo Pearce wrote:
> I updated from the check in lucid-proposed. Reran autoreconf and it
> worked! It did not hang while running aclocal. Then ran configure and it
> told me AM_PATH_CHECK() had been deprecated and to use
> PKG_CHECK_MODULES([CHECK], [check >= 0.9.4]) instead. So I did that and
> it worked fine.

Thanks for checking!

> I wonder if I had used PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
> previously to updating from the lucid-proposed if it would have
> worked...

It would :)

--
Soren Hansen
Ubuntu Developer
http://www.ubuntu.com/

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Changed in check (Debian):
status: Unknown → Won't Fix
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package check - 0.9.8-1ubuntu0.1

---------------
check (0.9.8-1ubuntu0.1) lucid-proposed; urgency=low

  * Fix infinite loop in automake macro (Fix backported from
    0.9.8-1ubuntu1 in Maverick). (LP: #487903)
 -- Soren Hansen <email address hidden> Mon, 31 May 2010 14:12:42 +0200

Changed in check (Ubuntu Lucid):
status: Fix Committed → Fix Released
Changed in check (Debian):
status: Won't Fix → Fix Released
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.