bugmake - Bugs: bug #42390, fopen-fail fails on Debian...

 
 

bug #42390: fopen-fail fails on Debian GNU/Linux unstable

Submitter:  Manoj Srivastava <srivasta>
Submitted:  Mon 19 May 2014 06:23:38 PM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Fixed Privacy:  Public
Assigned to:  psmith Open/Closed:  Closed
Component Version:  4.1 Operating System:  POSIX-Based
Fixed Release:  4.2 Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 12 Jul 2015 10:21:07 PM UTC, comment #5: 

There is already a way to choose a longer timeout: the run_make_test() method takes an optional extra argument which is the timeout value.

I increased this to 300; hopefully that will solve this problem (I cannot reproduce the original problem on my current Ubuntu GNOME system, which is Debian-based of course: even with the original timeout I get the expected failure).

I don't understand YunQiang's comment; the point of the test is to verify that we get a non-zero error if we open too many file descriptors.  I don't know why it should take so long to open more file descriptors than are valid for the process.  Maybe a difference in the number of open file descriptors allowed via ulimit -n is at play somehow here?  I've also added a step to the check-regression rule (used by "make check") that sets ulimit -n 512 just in case.  Of course this only works if you invoke the test suite through make, not separately.  I couldn't find a portable way (without requiring extra modules) of setting ulimit from within Perl itself.

Paul D. Smith <psmith>
Group administrator
Thu 04 Sep 2014 01:56:58 PM UTC, comment #4: 

I don't think this works.

it still fails on mips64el, even when I modify another test_timeout to 300 and both to 1300.

It should be just hang, not about timeout.

YunQiang Su <wzssyqa>
Fri 13 Jun 2014 09:21:54 PM UTC, comment #3: 

In the Debian BTS, Víctor M. Jáquez L. found the root cause:


>  The problem is, if I understand it correctly, the timeout value:


> By default the test timeout (tests/test_driver.pl) is 5 seconds, but in this
> particular test, the timeout is reached before hitting the "too many open
> files" error, which is the expected error. This is the case when the computer
> is not under a heavy load. I changed the variable $test_timeout from 5 to 300
> and I could build the package smoothly.


> # Timeout in seconds.  If the test takes longer than this we'll fail it.
> $test_timeout = 300;


Nased on that, I came up with the minimal patch that allows the build to succeed, though I think that hard coding test specific behaviour int he driver is sub optimal. The patch, though, does only reset the timeout for the one single test that needs it. Ideally, there should be a mechanism to specfy a per test timeout.

diff --git i/tests/test_driver.pl w/tests/test_driver.pl
index 2f83270..18d0379 100644
--- i/tests/test_driver.pl
+++ w/tests/test_driver.pl
@@ -419,7 +419,9 @@ sub run_all_tests
 {
     $categories_run = 0;
 
+    my $save_timeout = $test_timeout;
     foreach $testname (sort @TESTS) {
+        local $test_timeout = $save_timeout;
         $suite_passed = 1;       # reset by test on failure
         $num_of_logfiles = 0;
         $num_of_tmpfiles = 0;
@@ -462,6 +464,7 @@ sub run_all_tests
         $tests_run = 0;
         $tests_passed = 0;
 
+       if ($testname =~ m{misc/fopen-fail}msx) { $test_timeout = 300; }
         # Run the test!
         $code = do $perl_testname;

Manoj Srivastava <srivasta>
Mon 26 May 2014 10:57:53 PM UTC, comment #2: 

Pardon me for not being clear. What I mean to say is that while I can see the Makefile being used, all it contains is  an include directive, which reads in another file. What is not clear to me is what that file contains; and what the recipe being run is. I have tried again, and I get:

Test timed out after 5 seconds
Error running /tmp/test/make-dfsg-4.0/debian/build-make-guile/tests/../make (expected 512; got 14): /tmp/test/make-dfsg-4.0/debian/build-make-guile/tests/../make -f work/misc/fopen-fail.mk

cat debian/build-make-guile/tests/work/misc/fopen-fail.mk
include $(lastword $(MAKEFILE_LIST))

The error, I think, is too many file desciptors open. Qhat do I need to add to help  narrow down where the problem might be?

Manoj Srivastava <srivasta>
Mon 19 May 2014 06:32:24 PM UTC, comment #1: 

I'm not sure I understand the question "how can I see what the actual Makefile is"... you've shown the actual makefile in your question.

The contents of the .run file is the shell command used to invoke make for that test.  You should be able to type that command at the console and get the same behavior (so you can run it in the debugger, etc.)  The makefile used is given with the -f flag (here, work/misc/fopen-fail.mk).

Paul D. Smith <psmith>
Group administrator
Mon 19 May 2014 06:23:38 PM UTC, original submission:  

Hi,

    This might not be a make bug, but make checkout from git currentlyu fails to build on Debian GNU/Linux. The version that built correcly last week fails on a recent Debian unstable.

I can run a single test (-detail -keep -debug are nice). However, how can I see what the actual Makefile is? I am not sure that the $(MAKEFILE_LIST) variable expands to, so I can dig further into this,

==> fopen-fail.log <==
/tmp/test/make-dfsg-4.0/build/tests/../make -f work/misc/fopen-fail.mk at test_driver.pl line 803.
work/misc/fopen-fail.mk:2: * Too many open files.  Stop.

==> fopen-fail.mk <==

include $(lastword $(MAKEFILE_LIST))

==> fopen-fail.run <==
/tmp/test/make-dfsg-4.0/build/tests/../make -f work/misc/fopen-fail.mk

Manoj Srivastava <srivasta>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by wzssyqa (Posted a comment)
  • -email is unavailable- added by psmith (Posted a comment)
  • -email is unavailable- added by srivasta (Submitted the item)
  • -email is unavailable- added by srivasta (Please keep the CC to -email is unavailable- so that the debian BTS has a record of the updates here)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-07-13 psmith StatusNone Fixed
        Assigned toNone psmith
        Open/ClosedOpen Closed
        Fixed ReleaseNone 4.2
    2014-05-19 srivasta Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code