------------- Begin Forwarded Message -------------
>From jdp@austin.polstra.com Sat Jul 26 03:42:04 1997
To: "Thomas G. Lockhart" <Thomas.G.Lockhart@jpl.nasa.gov>
Subject: Thread safe malloc for Modula-3
Date: Fri, 25 Jul 1997 20:41:41 -0700
From: John Polstra <jdp@polstra.com>
Content-Length: 26878
Tom,
I'm appending the sources for the thread safe version of malloc that
I told you about. I believe that it will simply compile and work
under Linux, but I've never had an opportunity to test it there.
I urge you to put it into your Modula-3 system -- otherwise, you
I urge you to put it into your Modula-3 system; otherwise, you
are guaranteed to get occasional mysterious core dumps from cvsupd.
As a first step, I'd suggest simply trying to compile it under
...
...
@@ -720,38 +834,6 @@ using even aside from the thread safety of it.
Regards,
John
From - Tue Dec 1 14:04:30 1998
Received: from eis-msg-012.jpl.nasa.gov (eis-msg-012.jpl.nasa.gov [137.78.68.42]) by alumnae.caltech.edu (8.8.3/8.7.3) with ESMTP id WAA24486 for <lockhart@alumni.caltech.edu>; Tue, 29 Jul 1997 22:54:06 -0700 (PDT)
Received: from mythos.jpl.nasa.gov by eis-msg-012.jpl.nasa.gov; Tue, 29 Jul 1997 22:53:32 -0700
Received: by mythos.jpl.nasa.gov (5.65v3.2/1.1.10.5/11Jan97-0348AM)
id AA13731; Wed, 30 Jul 1997 05:54:08 GMT
Received: from hub.org by mythos.jpl.nasa.gov (5.65v3.2/1.1.10.5/11Jan97-0348AM)
id AA13687; Wed, 30 Jul 1997 05:54:07 GMT
Received: from localhost (majordom@localhost) by hub.org (8.8.5/8.7.5) with SMTP id BAA07442; Wed, 30 Jul 1997 01:52:26 -0400 (EDT)
Received: (from majordom@localhost) by hub.org (8.8.5/8.7.5) id BAA07304 for pgsql-hackers-outgoing; Wed, 30 Jul 1997 01:48:03 -0400 (EDT)
Received: from golem.jpl.nasa.gov (root@gnet04.jpl.nasa.gov [128.149.70.168]) by hub.org (8.8.5/8.7.5) with ESMTP id BAA07297 for <hackers@postgresql.org>; Wed, 30 Jul 1997 01:47:55 -0400 (EDT)
Received: from golem (localhost [127.0.0.1])
by golem.jpl.nasa.gov (8.8.5/8.8.5) with SMTP id FAA23412;
From: "Thomas G. Lockhart" <lockhart@alumni.caltech.edu>
Organization: Caltech/JPL
X-Mailer: Mozilla 3.01 (X11; I; Linux 2.0.30 i686)
Mime-Version: 1.0
To: The Hermit Hacker <scrappy@hub.org>
Cc: hackers@postgresql.org, John Polstra <jdp@polstra.com>
Subject: [HACKERS] cvsup
Content-Transfer-Encoding: 7bit
Sender: owner-hackers@hub.org
Precedence: bulk
Content-Type: text/plain; charset=us-ascii
X-Mozilla-Status: 0001
Content-Length: 1069
I've deposited a statically built cvsup client executable (and man pages
and test configuration) in
...
...
@@ -780,41 +862,6 @@ Thanks to John for getting me going.
- Tom
From - Tue Dec 1 14:07:28 1998
Received: from eis-msg-012.jpl.nasa.gov (eis-msg-012.jpl.nasa.gov [137.78.68.42]) by alumnae.caltech.edu (8.8.3/8.7.3) with ESMTP id XAA25148 for <lockhart@alumni.caltech.edu>; Tue, 29 Jul 1997 23:17:22 -0700 (PDT)
Received: from mythos.jpl.nasa.gov by eis-msg-012.jpl.nasa.gov; Tue, 29 Jul 1997 23:16:48 -0700
Received: by mythos.jpl.nasa.gov (5.65v3.2/1.1.10.5/11Jan97-0348AM)
id AA09663; Wed, 30 Jul 1997 06:17:25 GMT
Received: from hub.org by mythos.jpl.nasa.gov (5.65v3.2/1.1.10.5/11Jan97-0348AM)
id AA13538; Wed, 30 Jul 1997 06:17:24 GMT
Received: from localhost (majordom@localhost) by hub.org (8.8.5/8.7.5) with SMTP id CAA08702; Wed, 30 Jul 1997 02:14:29 -0400 (EDT)
Received: (from majordom@localhost) by hub.org (8.8.5/8.7.5) id CAA08094 for pgsql-hackers-outgoing; Wed, 30 Jul 1997 02:03:41 -0400 (EDT)
Received: from golem.jpl.nasa.gov (root@gnet04.jpl.nasa.gov [128.149.70.168]) by hub.org (8.8.5/8.7.5) with ESMTP id CAA08086 for <hackers@postgreSQL.org>; Wed, 30 Jul 1997 02:03:10 -0400 (EDT)
Received: from golem (localhost [127.0.0.1])
by golem.jpl.nasa.gov (8.8.5/8.8.5) with SMTP id GAA23505;
> It became clear that I had a problem with my m3 installation; some
> X11 libraries were not being found correctly.
By the way, you can build the client without the GUI by doing this
in the "client" subdirectory:
m3build -DNOGUI
If you build it that way, then it doesn't need the X11 libraries and
it's quite a bit smaller. The GUI is fun to watch, but it's not
very useful. I originally implemented it because it made debugging
the multi-threaded client program much easier.
> Anyway, with the reinstall and the two-line patch above (and that
> one include-file _POSIX_SOURCE workaround from the previous try),
> things built cleanly.
Good!
> Now I just need a server somewhere to test.
If you want to try it out, there are public servers for the FreeBSD
source repository at cvsup.freebsd.org and cvsup2.freebsd.org.
Here's a suggested supfile:
*default host=cvsup.freebsd.org compress
*default release=cvs
*default base=/home/jdp/cvsup-test # FIX THIS
*default delete use-rel-suffix
# *default tag=.
src-bin
This will fetch you the source repository for the programs that get
installed into "/bin". I chose it because it's one of the smaller
pieces of the system. Make an empty directory someplace for
testing, and change the "FIX THIS" line to specify that directory
after the "base=".
If you are on a T1 or better, you should probably delete the
"compress" keyword in the first line.
As shown, it will get the repository (RCS) files. If you uncomment
the line containing "tag=." then it will instead check out the
latest version of each file. There's a bunch more information about
what you can do at <http://www.freebsd.org/handbook/cvsup.html>.
There is one other thing I want to send you, but not tonight. I
discovered the hard way that you need a malloc package that is
thread-safe with respect to the Modula-3 threads package. The
Modula-3 runtime takes care to do the proper mutual exclusion around
all calls it makes to malloc. But if you call certain functions in
the native C library which in turn call malloc, then the mutual
exclusion gets bypassed. This can lead to rare but baffling core
dumps.
For FreeBSD, I solved this by adding a thread-safe malloc package
into the Modula-3 runtime. The package is quite portable, and I'm
sure it will work well for Linux with very few changes (probably
none at all). I want to send it to you along with instructions
for making it a part of the "libm3core" library. It's very simple,
but I've run out of steam for tonight. :-) Once you have this
malloc in place, the CVSup system should be rock solid. We have
servers that have been up for weeks and have served many thousands
of clients without any observed problems.
> We hope to have the Postgres tree using CVSup within a month or
> so, and hope to retire sup in September...
Great! I'll do my best to help make sure you don't regret it.
John
From - Tue Dec 1 14:09:25 1998
Received: from eis-msg-012.jpl.nasa.gov (eis-msg-012.jpl.nasa.gov [137.78.68.42]) by alumnae.caltech.edu (8.8.3/8.7.3) with ESMTP id SAA17924 for <lockhart@alumni.caltech.edu>; Sat, 9 Aug 1997 18:34:20 -0700 (PDT)
Received: from mythos.jpl.nasa.gov by eis-msg-012.jpl.nasa.gov; Sat, 9 Aug 1997 18:33:19 -0700
Received: by mythos.jpl.nasa.gov (5.65v3.2/1.1.10.5/11Jan97-0348AM)
id AA29836; Sun, 10 Aug 1997 01:34:22 GMT
Received: from hub.org by mythos.jpl.nasa.gov (5.65v3.2/1.1.10.5/11Jan97-0348AM)
id AA28782; Sun, 10 Aug 1997 01:34:21 GMT
Received: from hub.org (hub.org [207.107.138.200]) by hub.org (8.8.5/8.7.5) with ESMTP id VAA13030; Sat, 9 Aug 1997 21:27:21 -0400 (EDT)
Received: by hub.org (TLB v0.10a (1.23 tibbs 1997/01/09 00:29:32)); Sat, 09 Aug 1997 21:23:11 -0400 (EDT)
Received: (from majordom@localhost) by hub.org (8.8.5/8.7.5) id VAA12661 for pgsql-hackers-outgoing; Sat, 9 Aug 1997 21:23:04 -0400 (EDT)
Received: from thelab.hub.org (root@ppp-164.halifax-01.ican.net [206.231.248.164]) by hub.org (8.8.5/8.7.5) with ESMTP id VAA12657 for <pgsql-hackers@postgresql.org>; Sat, 9 Aug 1997 21:22:54 -0400 (EDT)
Received: from thelab.hub.org (scrappy@localhost [127.0.0.1]) by thelab.hub.org (8.8.6/8.8.2) with SMTP id WAA05735 for <pgsql-hackers@postgresql.org>; Sat, 9 Aug 1997 22:22:27 -0300 (ADT)