Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Oct 2004 15:57:09 +0300
From:      Peter Pentchev <roam@ringlet.net>
To:        Willem Jan Withagen <wjw@withagen.nl>
Cc:        freebsd-amd64@freebsd.org
Subject:   Re: two 4GB mallocs => SEGV
Message-ID:  <20041026125709.GF1003@straylight.m.ringlet.net>
In-Reply-To: <417E474A.1000401@withagen.nl>
References:  <20041026115041.GE2841@sivokote.iziade.m$> <417E474A.1000401@withagen.nl>

next in thread | previous in thread | raw e-mail | index | archive | help

--O8XZ+2Hy8Kj8wLPZ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Oct 26, 2004 at 02:47:06PM +0200, Willem Jan Withagen wrote:
> Georgi Guninski wrote:
>=20
> >on a freebsd amd64 box with more than 8GB swap i experience the followin=
g:
[snip]
> >amdkotef64# cat test.c
[snip 2 * 4GB malloc]
> >amdkotef64# gcc test.c
> >amdkotef64# ./a.out=20
> >100000000
> >503000
>=20
> >/: write failed, filesystem is full
> >Segmentation fault
>=20
> These 2 lines stem from the fact that the program is being dumped and the=
re=20
> is not enough space to dump the full size core of that program.
>=20
> what does swapinfo tell you during the the run of the program???
>=20
> I ran malloc tests in 4Gb with 5Gb of swap, which it nicely completely=20
> filled, and then in faulted, because there was no more space.
> This behaviour can be set, I think. Check man 5 malloc.conf, and check=20
> /etc/malloc.conf to see if you've got the X-flag on.

But shouldn't malloc() write out an 'out of memory' message before the
core dump then?  There's no such message in Georgi's output.

It's true that when he asked me on Saturday about this, I completely
forgot about malloc's X flag, but I don't think he's using it, and even
if he were, there ought to be a message there.

> I have malloc.conf-> aj, and the program terminates in 3 seconds because =
it=20
> does not zero the memory.
>=20
> So pick and choose the behaviour you want.

Sure, the question is if this is the result of 'X' or something else :)

G'luck,
Peter

--=20
Peter Pentchev	roam@ringlet.net    roam@cnsys.bg    roam@FreeBSD.org
PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
I am not the subject of this sentence.

--O8XZ+2Hy8Kj8wLPZ
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (FreeBSD)

iD8DBQFBfkml7Ri2jRYZRVMRAug1AJ9Q6zz2PD5JypHvRS2NugKQUmvxsQCgnt9d
ZWtCeX7luib2KvkxekiYP0k=
=3oRC
-----END PGP SIGNATURE-----

--O8XZ+2Hy8Kj8wLPZ--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041026125709.GF1003>