Re: how to deal with "virtual memory exhausted: Cannot allocate memory"?

2016-10-15 Thread Yaroslav Halchenko

On Sat, 15 Oct 2016, Adrian Bunk wrote:
> > > The build log says
> > >   make -j4

> > > This is due to the following in debian/rules:
> > >   dh $@ --parallel --sourcedirectory=src

> > > Running 4 instances of the compiler in parallel can quadruple
> > > the memory usage. 

> > That is true, however the amount of memory per 32-bit process is
> > unchanged and still limited to 2GB, so I doubt it will make any
> > change.

> The error message just tells that mmap() failed with ENOMEM,
> but looking at the hardware specs of the autobuilders I agree
> with you that my suggestion is not likely to help here.

and your suspicion is right on the money -- it didn't help, the same
problem:
https://buildd.debian.org/status/fetch.php?pkg=connectome-workbench=mips=1.2.3-3=1476565096
and there is 'make -j1' there but
cd /«PKGBUILDDIR»/obj-mips-linux-gnu/Desktop && /usr/bin/c++   -DCARET_OS_LINUX 
-DHAVE_FREETYPE -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG 
-DQT_OPENGL_LIB -DQT_XML_LIB -isystem /usr/include/qt4 -isystem 
/usr/include/qt4/QtGui -isystem /usr/include/qt4/QtCore -isystem 
/usr/include/qt4/QtOpenGL -isystem /usr/include/qt4/QtXml -isystem 
/usr/include/qt4/QtNetwork -I/«PKGBUILDDIR»/src/Desktop 
-I/«PKGBUILDDIR»/src/Algorithms -I/«PKGBUILDDIR»/src/Commands 
-I/«PKGBUILDDIR»/src/GuiQt -I/«PKGBUILDDIR»/src/Brain 
-I/«PKGBUILDDIR»/src/FilesBase -I/«PKGBUILDDIR»/src/Files 
-I/«PKGBUILDDIR»/src/Palette -I/«PKGBUILDDIR»/src/Cifti 
-I/«PKGBUILDDIR»/src/Gifti -I/«PKGBUILDDIR»/src/Nifti -I/«PKGBUILDDIR»/src/Qwt 
-I/«PKGBUILDDIR»/src/Scenes -I/«PKGBUILDDIR»/src/Xml 
-I/«PKGBUILDDIR»/src/Common  -fopenmp -g -O2 
-fdebug-prefix-map=/«PKGBUILDDIR»=. -fstack-protector-strong -Wformat 
-Werror=format-security -DNDEBUG -Wdate-time -D_FORTIFY_SOURCE=2 -W -Wall 
-Werror=return-type -Werror=switch -Wunused-parameter -Wno-narrowing 
-Wno-unused-local-typedefs -o CMakeFiles/wb_view.dir/qrc_resources.cxx.o -c 
/«PKGBUILDDIR»/obj-mips-linux-gnu/Desktop/qrc_resources.cxx
virtual memory exhausted: Cannot allocate memory

so the same story.

more ideas before I guess I just file for RM for mips and mipsel?
-- 
Yaroslav O. Halchenko
Center for Open Neuroscience http://centerforopenneuroscience.org
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834   Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik



Re: how to deal with "virtual memory exhausted: Cannot allocate memory"?

2016-10-15 Thread Jeffrey Walton
>> Does anyone know what kind of board is being used? What are its cpu
>> and memory specs? Does /proc/meminfo report a swap file?
>
> https://db.debian.org/machines.cgi?host=mipsel-manda-03
> Memory: 8GB

Oh, thanks. I was not aware the machine had requisite horse power.

Sorry about that.

Jeff



Re: how to deal with "virtual memory exhausted: Cannot allocate memory"?

2016-10-15 Thread Aurelien Jarno
On 2016-10-15 11:00, Yaroslav Halchenko wrote:
> 
> On Sat, 15 Oct 2016, Adrian Bunk wrote:
> > > > The build log says
> > > >   make -j4
> 
> > > > This is due to the following in debian/rules:
> > > >   dh $@ --parallel --sourcedirectory=src
> 
> > > > Running 4 instances of the compiler in parallel can quadruple
> > > > the memory usage. 
> 
> > > That is true, however the amount of memory per 32-bit process is
> > > unchanged and still limited to 2GB, so I doubt it will make any
> > > change.
> 
> > The error message just tells that mmap() failed with ENOMEM,
> > but looking at the hardware specs of the autobuilders I agree
> > with you that my suggestion is not likely to help here.
> 
> we will discover relatively shortly... uploaded -3 which shouldn't use
> --parallel on mipses

Thanks for the upload. Can you please however disable --parallel only on
mips and mipsel? mips64el is a 64-bit architecture and is not affected
by this issue. Thanks.

Aurelien

-- 
Aurelien Jarno  GPG: 4096R/1DDD8C9B
aurel...@aurel32.net http://www.aurel32.net



Re: how to deal with "virtual memory exhausted: Cannot allocate memory"?

2016-10-15 Thread James Cowgill
Hi,

On 15/10/16 13:10, Jeffrey Walton wrote:
 "virtual memory exhausted: Cannot allocate memory"

 What would be your recommendation -- demand removing mips* from
 supported architectures or there is a chance... ? ;)
>>>
>>> The build log says
>>>   make -j4
>>>
>>> This is due to the following in debian/rules:
>>>   dh $@ --parallel --sourcedirectory=src
>>>
>>> Running 4 instances of the compiler in parallel can quadruple
>>> the memory usage.
>>
>> That is true, however the amount of memory per 32-bit process is
>> unchanged and still limited to 2GB, so I doubt it will make any
>> change.
> 
> IoT gadgets and other resource constrained devices usually don't have
> virtual memory. I frequently experience OOM kills when using make's
> job option on dev boards, like ci20, beaglebone, cubietrucks, banana
> pi's, raspberry pi's, etc.
> 
> We experienced so many OOM kills with our test script we had to stop
> using make's job option on certain machines. The machines had less
> than 1280 MB of memory or lacked a swap file. Cf.,
> https://github.com/weidai11/cryptopp/blob/master/cryptest.sh#L893

I think you're confusing virtual memory and physical memory here. The
error is "virtual memory exhausted", not an OOM kill. On MIPS 32-bit
there is always[1] 2GB of user virtual memory per process regardless of
the amount of RAM. If you exceed that, then you could add 100GB of RAM
and it wouldn't help.

[1] Ignoring EVA here... (none of the buildds support it anyway)

> Does anyone know what kind of board is being used? What are its cpu
> and memory specs? Does /proc/meminfo report a swap file?

https://db.debian.org/machines.cgi?host=mipsel-manda-03
Memory: 8GB

James



signature.asc
Description: OpenPGP digital signature


Re: how to deal with "virtual memory exhausted: Cannot allocate memory"?

2016-10-15 Thread Adrian Bunk
On Sat, Oct 15, 2016 at 01:51:07PM +0200, Aurelien Jarno wrote:
> On 2016-10-14 14:12, Adrian Bunk wrote:
> > On Tue, Oct 11, 2016 at 08:28:28PM -0400, Yaroslav Halchenko wrote:
> > > Hi MIPS gurus,
> > > 
> > > We have
> > > Bug#837403: connectome-workbench: FTBFS with bindnow and PIE
> > > due to inability to build that package on mips
> > > https://buildd.debian.org/status/fetch.php?pkg=connectome-workbench=mips=1.2.3-2=1473733739
> > > or mipsel
> > > https://buildd.debian.org/status/fetch.php?pkg=connectome-workbench=mipsel=1.2.3-2=1473733554
> > > 
> > > both of which fail with
> > > 
> > > "virtual memory exhausted: Cannot allocate memory"
> > > 
> > > What would be your recommendation -- demand removing mips* from
> > > supported architectures or there is a chance... ? ;)
> > 
> > The build log says
> >   make -j4
> > 
> > This is due to the following in debian/rules:
> >   dh $@ --parallel --sourcedirectory=src
> > 
> > Running 4 instances of the compiler in parallel can quadruple
> > the memory usage. 
> 
> That is true, however the amount of memory per 32-bit process is
> unchanged and still limited to 2GB, so I doubt it will make any
> change.

The error message just tells that mmap() failed with ENOMEM,
but looking at the hardware specs of the autobuilders I agree
with you that my suggestion is not likely to help here.

> Aurelien

cu
Adrian

-- 

   "Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   "Only a promise," Lao Er said.
   Pearl S. Buck - Dragon Seed



Re: how to deal with "virtual memory exhausted: Cannot allocate memory"?

2016-10-15 Thread Jeffrey Walton
>> > "virtual memory exhausted: Cannot allocate memory"
>> >
>> > What would be your recommendation -- demand removing mips* from
>> > supported architectures or there is a chance... ? ;)
>>
>> The build log says
>>   make -j4
>>
>> This is due to the following in debian/rules:
>>   dh $@ --parallel --sourcedirectory=src
>>
>> Running 4 instances of the compiler in parallel can quadruple
>> the memory usage.
>
> That is true, however the amount of memory per 32-bit process is
> unchanged and still limited to 2GB, so I doubt it will make any
> change.

IoT gadgets and other resource constrained devices usually don't have
virtual memory. I frequently experience OOM kills when using make's
job option on dev boards, like ci20, beaglebone, cubietrucks, banana
pi's, raspberry pi's, etc.

We experienced so many OOM kills with our test script we had to stop
using make's job option on certain machines. The machines had less
than 1280 MB of memory or lacked a swap file. Cf.,
https://github.com/weidai11/cryptopp/blob/master/cryptest.sh#L893

Does anyone know what kind of board is being used? What are its cpu
and memory specs? Does /proc/meminfo report a swap file?

Jeff



Re: how to deal with "virtual memory exhausted: Cannot allocate memory"?

2016-10-15 Thread Aurelien Jarno
On 2016-10-14 14:12, Adrian Bunk wrote:
> On Tue, Oct 11, 2016 at 08:28:28PM -0400, Yaroslav Halchenko wrote:
> > Hi MIPS gurus,
> > 
> > We have
> > Bug#837403: connectome-workbench: FTBFS with bindnow and PIE
> > due to inability to build that package on mips
> > https://buildd.debian.org/status/fetch.php?pkg=connectome-workbench=mips=1.2.3-2=1473733739
> > or mipsel
> > https://buildd.debian.org/status/fetch.php?pkg=connectome-workbench=mipsel=1.2.3-2=1473733554
> > 
> > both of which fail with
> > 
> > "virtual memory exhausted: Cannot allocate memory"
> > 
> > What would be your recommendation -- demand removing mips* from
> > supported architectures or there is a chance... ? ;)
> 
> The build log says
>   make -j4
> 
> This is due to the following in debian/rules:
>   dh $@ --parallel --sourcedirectory=src
> 
> Running 4 instances of the compiler in parallel can quadruple
> the memory usage. 

That is true, however the amount of memory per 32-bit process is
unchanged and still limited to 2GB, so I doubt it will make any
change.

Aurelien

-- 
Aurelien Jarno  GPG: 4096R/1DDD8C9B
aurel...@aurel32.net http://www.aurel32.net



Re: how to deal with "virtual memory exhausted: Cannot allocate memory"?

2016-10-14 Thread Yaroslav Halchenko

On Fri, 14 Oct 2016, Adrian Bunk wrote:

> On Tue, Oct 11, 2016 at 08:28:28PM -0400, Yaroslav Halchenko wrote:
> > Hi MIPS gurus,

> > We have
> > Bug#837403: connectome-workbench: FTBFS with bindnow and PIE
> > due to inability to build that package on mips
> > https://buildd.debian.org/status/fetch.php?pkg=connectome-workbench=mips=1.2.3-2=1473733739
> > or mipsel
> > https://buildd.debian.org/status/fetch.php?pkg=connectome-workbench=mipsel=1.2.3-2=1473733554

> > both of which fail with

> > "virtual memory exhausted: Cannot allocate memory"

> > What would be your recommendation -- demand removing mips* from
> > supported architectures or there is a chance... ? ;)

> The build log says
>   make -j4

> This is due to the following in debian/rules:
>   dh $@ --parallel --sourcedirectory=src

> Running 4 instances of the compiler in parallel can quadruple
> the memory usage. 

good catch Adrian!

Let me disable --parallel setting on mips* architectures and see how it
goes.

-- 
Yaroslav O. Halchenko, Ph.D.
http://neuro.debian.net http://www.pymvpa.org http://www.fail2ban.org
Research Scientist,Psychological and Brain Sciences Dept.
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834   Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik



Re: how to deal with "virtual memory exhausted: Cannot allocate memory"?

2016-10-14 Thread Adrian Bunk
On Tue, Oct 11, 2016 at 08:28:28PM -0400, Yaroslav Halchenko wrote:
> Hi MIPS gurus,
> 
> We have
> Bug#837403: connectome-workbench: FTBFS with bindnow and PIE
> due to inability to build that package on mips
> https://buildd.debian.org/status/fetch.php?pkg=connectome-workbench=mips=1.2.3-2=1473733739
> or mipsel
> https://buildd.debian.org/status/fetch.php?pkg=connectome-workbench=mipsel=1.2.3-2=1473733554
> 
> both of which fail with
> 
> "virtual memory exhausted: Cannot allocate memory"
> 
> What would be your recommendation -- demand removing mips* from
> supported architectures or there is a chance... ? ;)

The build log says
  make -j4

This is due to the following in debian/rules:
  dh $@ --parallel --sourcedirectory=src

Running 4 instances of the compiler in parallel can quadruple
the memory usage. 

Does the build succeed when you make that non-parallel on mips?

> Please CC us in reply

cu
Adrian

-- 

   "Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   "Only a promise," Lao Er said.
   Pearl S. Buck - Dragon Seed



RE: how to deal with "virtual memory exhausted: Cannot allocate memory"?

2016-10-14 Thread Dejan Latinovic

Hi,

I have tried to solve this issue  using  ggc-min-expand flag, it helped in 
similar issues in the past, but in this case it did not worked.

> ggc-min-expand
> GCC uses a garbage collector to manage its own memory allocation. This 
> parameter specifies the minimum percentage by which the garbage collector's 
> heap should be allowed to expand between collections. Tuning this may improve 
> compilation speed; it has no effect on code generation.

The file qrc_resources.cxx is quite large (66M), is it possible to split it?


Regards,
Dejan


From: Yaroslav Halchenko [y...@dartmouth.edu]
Sent: Wednesday, October 12, 2016 2:28 AM
To: debian-mips@lists.debian.org
Cc: Timothy Coalson
Subject: how to deal with "virtual memory exhausted: Cannot allocate memory"?

Hi MIPS gurus,

We have
Bug#837403: connectome-workbench: FTBFS with bindnow and PIE
due to inability to build that package on mips
https://buildd.debian.org/status/fetch.php?pkg=connectome-workbench=mips=1.2.3-2=1473733739
or mipsel
https://buildd.debian.org/status/fetch.php?pkg=connectome-workbench=mipsel=1.2.3-2=1473733554

both of which fail with

"virtual memory exhausted: Cannot allocate memory"

What would be your recommendation -- demand removing mips* from
supported architectures or there is a chance... ? ;)

Please CC us in reply
--
Yaroslav O. Halchenko
Center for Open Neuroscience http://centerforopenneuroscience.org
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834   Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik