GNU bug report logs - #18892
few test failure with 'grep-2.20.72-d512'

Previous Next

Package: grep;

Reported by: Assaf Gordon <assafgordon <at> gmail.com>

Date: Wed, 29 Oct 2014 20:53:02 UTC

Severity: normal

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Bruce Dubbs <bruce.dubbs <at> gmail.com>
To: Jim Meyering <jim <at> meyering.net>
Cc: 18892 <at> debbugs.gnu.org
Subject: bug#18892: few test failure with 'grep-2.20.72-d512'
Date: Sun, 02 Nov 2014 12:59:34 -0600
Jim Meyering wrote:
> Your total free memory is obviously larger than 2GiB, but remember
> that what's listed there is the total, while the offending usage
> required a *contiguous* 2GiB region.

My understanding of the kernel is that it allocates in 4K blocks and 
maps them to user space to appear to be contiguous.

If I write a program that does:
  size_t size = 0xA0000000;  // 2,684,354,560
  char*  mem  = (char*) malloc( size );
  size_t i;

  for ( i = 0; i < size; i++, mem++ ) *mem='A';

There are no problems, but it does take about 9 seconds on my system.
The start address is 7ffa5405d010.
The end   address is 7ffaf405d010.

What am I missing?

  -- Bruce


> On Sat, Nov 1, 2014 at 7:56 PM, Bruce Dubbs <bruce.dubbs <at> gmail.com> wrote:
>> Jim Meyering wrote:
>>>
>>> On Wed, Oct 29, 2014 at 2:56 PM, Bruce Dubbs <bruce.dubbs <at> gmail.com>
>>> wrote:
>>> ...
>>>>>>
>>>>>>      http://meyering.net/grep/grep-2.20.72-d512.tar.xz
>>>
>>> ...
>>>>
>>>> Linux From Scratch 7.6
>>>>
>>>> configure and make were clean.
>>>>
>>>> $ env RUN_EXPENSIVE_TESTS=yes make -k check
>>>>
>>>> big-match: skipped test: not enough main memory to run the test
>>>> sjis-mb: skipped test: SJIS locale not found
>>>>
>>>> I do have 8G of memory.
>>>
>>>
>>> That test fails when grep fails to allocate enough space to hold a 2GiB
>>> line.
>>> No big deal, and not hard to imaging happening with a few applications
>>> in 8GiB of RAM.
>>
>>
>> Curious though.  It should have been OK.  I did not have any gui running at
>> the time.  Even if RAM was full, swap should have handled it.
>>
>> $ free
>>              total       used       free     shared    buffers     cached
>> Mem:      8105972    2380012    5725960        880     610460     326820
>> -/+ buffers/cache:   1442732    6663240
>> Swap:    10485756       3216   10482540
>>
>>    -- Bruce
>>
>>
>






This bug report was last modified 9 years and 251 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.