Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Sep 2011 11:12:38 +0800
From:      Li-Wen Hsu <lwhsu@FreeBSD.org>
To:        Doug Barton <dougb@FreeBSD.org>
Cc:        cvs-ports@FreeBSD.org, cvs-all@FreeBSD.org, ports-committers@FreeBSD.org
Subject:   Re: cvs commit: ports UPDATING ports/lang/python24 Makefile ports/lang/python25 Makefile ports/lang/python26 Makefile ports/lang/python27 Makefile ports/lang/python31 Makefile ports/lang/python32 Makefile
Message-ID:  <20110927031238.GA27471@FreeBSD.cs.nctu.edu.tw>
In-Reply-To: <4E7F84F0.7030107@FreeBSD.org>
References:  <201109251505.p8PF5ILo082611@repoman.freebsd.org> <4E7F84F0.7030107@FreeBSD.org>

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

--5mCyUwZo2JvN/JJP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

It's the default stack size of the system it runs on.  If you don't set
THREAD_STACK_SIZE while building python, it will be defined to 0.  When
running, python will skip calling pthread_attr_setstacksize(), and
pthread_create() will use the system's default value: 2MB on amd64 and
1MB on i386.

But in python27+, if there is no THREAD_STACK_SIZE defined by user when
building, it will be hard-coded to 0x400000 (4MB) on FreeBSD.  It is
because our default stack size for new threads is too small. [1]

Anyway, now all the values are larger or equal than the original size
we defined in ports: 128K or 1MB (with HUGE_STACK_SIZE).  I think
it is right way for nowadays.  There are some users reported about small
stack size causes problems for complex applications like Django. [2]

[1] http://bugs.python.org/issue9670
[2] http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dports/158679

Li-Wen

On Sun, Sep 25, 2011 at 12:45:52 -0700, Doug Barton wrote:
> Since I don't know that much about python it is not clear to me if this
> is using the default stack size of the system it's built on, or the
> system it's running on. Can you clarify?
>=20
>=20
> Doug
>=20
>=20
> On 09/25/2011 08:05, Li-Wen Hsu wrote:
> > lwhsu       2011-09-25 15:05:18 UTC
> >=20
> >   FreeBSD ports repository
> >=20
> >   Modified files:
> >     .                    UPDATING=20
> >     lang/python24        Makefile=20
> >     lang/python25        Makefile=20
> >     lang/python26        Makefile=20
> >     lang/python27        Makefile=20
> >     lang/python31        Makefile=20
> >     lang/python32        Makefile=20
> >   Log:
> >   - Remove the HUGE_STACK_SIZE option, now Python will use default
> >     thread stack size of the system.
> >  =20
> >   Revision  Changes    Path
> >   1.1146    +9 -1      ports/UPDATING
> >   1.174     +1 -7      ports/lang/python24/Makefile
> >   1.165     +1 -6      ports/lang/python25/Makefile
> >   1.176     +1 -6      ports/lang/python26/Makefile
> >   1.179     +1 -7      ports/lang/python27/Makefile
> >   1.174     +1 -6      ports/lang/python31/Makefile
> >   1.179     +1 -6      ports/lang/python32/Makefile
> >=20
> > http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/UPDATING.diff?&r1=3D1.1145&=
r2=3D1.1146&f=3Dh
> > http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/lang/python24/Makefile.diff=
?&r1=3D1.173&r2=3D1.174&f=3Dh
> > http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/lang/python25/Makefile.diff=
?&r1=3D1.164&r2=3D1.165&f=3Dh
> > http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/lang/python26/Makefile.diff=
?&r1=3D1.175&r2=3D1.176&f=3Dh
> > http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/lang/python27/Makefile.diff=
?&r1=3D1.178&r2=3D1.179&f=3Dh
> > http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/lang/python31/Makefile.diff=
?&r1=3D1.173&r2=3D1.174&f=3Dh
> > http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/lang/python32/Makefile.diff=
?&r1=3D1.178&r2=3D1.179&f=3Dh
> >=20
>=20
>=20
>=20
> --=20
>=20
> 	Nothin' ever doesn't change, but nothin' changes much.
> 			-- OK Go
>=20
> 	Breadth of IT experience, and depth of knowledge in the DNS.
> 	Yours for the right price.  :)  http://SupersetSolutions.com/

--=20
Li-Wen Hsu <lwhsu AT FreeBSD.org>
http://lwhsu.org

--5mCyUwZo2JvN/JJP
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (FreeBSD)

iEYEARECAAYFAk6BPyUACgkQQWsOOSiXsii9pQCfUKlgjjAqIo/z2VxC/EsvoVt6
lSAAn2AxN9DomnZwinOao/zDQqsOkyDO
=s0GH
-----END PGP SIGNATURE-----

--5mCyUwZo2JvN/JJP--



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