[darcs-devel] [darcs #136] darcs record fails under certain stack
limits
via RT
bugs at darcs.net
Mon Dec 13 16:26:40 PST 2004
Mon Dec 13 19:26:39 2004: New ticket: 136.
Transaction: Ticket created by guest
Queue: Darcs
Subject: darcs record fails under certain stack limits
Owner: Nobody
Requestors: eric.s.wallace at intel.com
Status: new
Ticket <URL: http://bugs.darcs.net/.//Ticket/Display.html?id=136 >
Because darcs uses pthreads to read/write to gzip'ed patch files, the
stack size of the new thread can in some cases be too large and cause
darcs to fail. The following shell script demonstrates the problem:
--cut--
#!/bin/sh
dir=/tmp/stacksize.$$
ulimit -s 2097151
mkdir $dir
cd $dir
darcs initialize
touch a
(echo `date`; echo 'someone'; echo 'first patch') | darcs record -a
--look-for-adds --pipe
rm -rf $dir
--cut--
For me, this produces an output something like:
===
Successfully initialized repository!
What is the date? Who is the author? What is the patch name? What is the
log?
darcs failed: Error opening file
_darcs/patches/20041213161541-35bb0-9d946aed4e02979c7f106ef9c7fac05c113fa59f.gz-0
===
The ulimit number isn't as weird as it looks, it's basically 2Gb-1
written in kilobytes. It happens to be what I get in tcsh if I do
"limit stacksize u".
darcs ought to adjust the stacksize of the thread it creates using
pthread_attr_stacksize() or somesuch, prior to pthread_create().
Thanks,
Eric Wallace
--------------------------
Intel/DPG/Arch/Performance
eric.s.wallace at intel.com
More information about the darcs-devel
mailing list