<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/NEWS, branch v8.8</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v8.8</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v8.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2010-12-22T16:43:50Z</updated>
<entry>
<title>version 8.8</title>
<updated>2010-12-22T16:43:50Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2010-12-22T16:43:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=518b92a5e3c8b57b09a3f408cedcb22fee702dde'/>
<id>urn:sha1:518b92a5e3c8b57b09a3f408cedcb22fee702dde</id>
<content type='text'>
* NEWS: Record release date.
</content>
</entry>
<entry>
<title>sort: use at most 8 threads by default</title>
<updated>2010-12-19T00:33:45Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2010-12-18T05:27:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=0e181024c00b746a930aab6a0cfd9162d7b67ae4'/>
<id>urn:sha1:0e181024c00b746a930aab6a0cfd9162d7b67ae4</id>
<content type='text'>
* src/sort.c (main): If --parallel isn't specified,
restrict the number of threads to 8 by default.
If the --parallel option is specified, then
allow any number of threads to be set, independent
of the number of processors on the system.
* doc/coreutils.texi (sort invocation): Document the changes
to determining the number of threads to use.
Mention the memory overhead when using multiple threads.
* tests/misc/sort-spinlock-abuse: Allow single core
systems that support pthreads.
* tests/misc/sort-stale-thread-mem: Likewise.
* tests/misc/sort-unique-segv: Likewise.
* NEWS: Mention the change in behaviour.
</content>
</entry>
<entry>
<title>sort: do not generate thousands of subprocesses for 16-way merge</title>
<updated>2010-12-17T06:32:06Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2010-12-17T06:31:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=8e81a99c2690a5a8e3a3449e9c4f440738e0cac9'/>
<id>urn:sha1:8e81a99c2690a5a8e3a3449e9c4f440738e0cac9</id>
<content type='text'>
Without this change, tests/misc/sort-compress-hang would consume
more than 10,000 process slots on my RHEL 5.5 x86-64 server,
making it likely for other applications to fail due to lack of
process slots.  With this change, the same benchmark causes 'sort'
to consume at most 19 process slots.  The change also improved
wall-clock time by 2% and user+system time by 14% on that benchmark.
* NEWS: Document this.
* src/sort.c (MAX_PROCS_BEFORE_REAP): Remove.
(reap_exited): Renamed from reap_some; this is a more accurate name,
since "some" incorrectly implies that it reaps at least one process.
All uses changed.
(reap_some): New function: it *does* reap at least one process.
(pipe_fork): Do not allow more than NMERGE + 2 subprocesses.
(mergefps, sort): Omit check for exited processes: no longer needed,
and anyway the code consumed too much CPU per line when 2 &lt; nprocs.
</content>
</entry>
<entry>
<title>sort: fix hang with sort --compress</title>
<updated>2010-12-16T21:55:31Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2010-12-16T21:55:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=1b31ce6982a9151d9dfe2ea3595ad7595cb9ca86'/>
<id>urn:sha1:1b31ce6982a9151d9dfe2ea3595ad7595cb9ca86</id>
<content type='text'>
* NEWS: Document this.
* src/sort.c (UNCOMPRESSED, UNREAPED, REAPED): New constants.
(struct tempnode): New member 'state', to hold these constants.
The pid member is now undefined if state == UNCOMPRESSED.
(struct sortfile): Replace member 'pid' with member 'temp'.
(uintptr): Remove.
(proctab_hasher, proctab_comparator, register_proc, delete_proc):
Proctab entries are now struct tempnode *, not pid_t, to handle
the case where multiple tempnode objects correspond to the same
pid.  This avoids a race condition that can cause a hang.
(register_proc): Arg is now struct tempnode *, not pid_t.  All
callers changed.
(delete_proc): Set tempnode state to REAPED.
(create_temp_file): No need to set pid member here; it's now
done when the pid is known.
(maybe_create_temp, create_temp): Remove PPID arg.  Return struct
tempnode *, not char *.  All callers changed.
(maybe_create_temp): Set node state to UNCOMPRESSED or UNREAPED.
No need to set node-&gt;pid to 0.
(open_temp): Replace NAME and PID args with a single TEMP arg.
All callers changed.  Wait only for unreaped children.
(zaptemp): Wait for decompressor to finish before removing its
temporary-file input.  This avoids .nfsXXXX hassles with NFS
and fixes a race (leading to a hang) regardless of NFS.
(open_input_files): Adjust to new way of dealing with temp files
and their subprocesses.
* tests/Makefile.am (TESTS): Add misc/sort-compress-hang.
* tests/misc/sort-compress-hang: New file.
</content>
</entry>
<entry>
<title>sort: don't dump core when merging from input twice</title>
<updated>2010-12-16T08:04:32Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2010-12-16T08:03:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=f3c584d1e08646704cb46f4e5b6afc4afef3f70a'/>
<id>urn:sha1:f3c584d1e08646704cb46f4e5b6afc4afef3f70a</id>
<content type='text'>
* NEWS: Document this.
* src/sort.c (avoid_trashing_input): The previous fix to this
function didn't fix all the problems with this code.  Replace it
with something simpler: just copy the input file.  This doesn't
change the number of files, so return void instead of the updated
file count.  Caller changed.
* tests/misc/sort-merge-fdlimit: Test for the bug.
</content>
</entry>
<entry>
<title>sort: document --compress reaper fixes</title>
<updated>2010-12-14T18:22:04Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2010-12-14T18:21:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=8f40ed634c9e6696a6bf05a4924dd6f8b7c834f6'/>
<id>urn:sha1:8f40ed634c9e6696a6bf05a4924dd6f8b7c834f6</id>
<content type='text'>
* NEWS: Document the --compress reaper fixes installed yesterday.
</content>
</entry>
<entry>
<title>sort: avoid segfault when using two or more threads</title>
<updated>2010-12-11T10:52:24Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2010-12-11T10:38:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=ad61335bf832937dd95739c70405db9b61ffda37'/>
<id>urn:sha1:ad61335bf832937dd95739c70405db9b61ffda37</id>
<content type='text'>
This change does not fix the actual bug.  That was done by commit
c9db0ac6, "sort: preallocate merge tree nodes to heap".  The fix
was to store each "node" structure on the heap, not on the stack.
Otherwise, a node from one thread's stack could be used in another
thread after the first thread had expired (via pthread_join).
This bug was very hard to trigger when using spinlocks, but
easier once we began using mutexes.
* NEWS (Bug fixes): Mention it.
For details, see http://debbugs.gnu.org/7597.
</content>
</entry>
<entry>
<title>sort: use mutexes, not spinlocks (avoid busy loop on blocked output)</title>
<updated>2010-12-11T08:29:13Z</updated>
<author>
<name>Chen Guo</name>
<email>chenguo4@ucla.edu</email>
</author>
<published>2010-12-06T08:15:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=621876ff446885d32922f34681790581c994f9a5'/>
<id>urn:sha1:621876ff446885d32922f34681790581c994f9a5</id>
<content type='text'>
Running a command like this on a multi-core system
  sort &lt; big-file | less
would peg all processors at near 100% utilization.
* src/sort.c: (struct merge_node) Change member lock to mutex.
All uses changed.
* tests/Makefile.am (XFAIL_TESTS): Remove definition, now that
this test passes once again.  I.e., the sort-spinlock-abuse test
no longer fails.
* NEWS (Bug reports): Mention this.
Reported by DJ Lucas in http://debbugs.gnu.org/7489.
</content>
</entry>
<entry>
<title>cp: fix bug with fine-grained src to nearby coarse-grained dest</title>
<updated>2010-12-03T17:56:32Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2010-12-03T17:55:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=b5a25a996da0ed80025e6ed94ca7fe4347704864'/>
<id>urn:sha1:b5a25a996da0ed80025e6ed94ca7fe4347704864</id>
<content type='text'>
The actual fix is in gnulib's lib/utimecmp.c.
* NEWS: Document fix.
</content>
</entry>
<entry>
<title>sort -u: fix a thread-race pointer corruption bug</title>
<updated>2010-12-01T06:13:06Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2010-11-30T21:30:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=3afda5f0076beca786ecbe90875828eb6988a964'/>
<id>urn:sha1:3afda5f0076beca786ecbe90875828eb6988a964</id>
<content type='text'>
* src/sort.c (write_unique): Save the entire "struct line", not
just a pointer to one.  Otherwise, with a multi-thread run,
sometimes, with some inputs, fillbuf would would win a race
and clobber a "saved-&gt;text" pointer in one thread just before
it was dereferenced in a comparison in another thread.
* NEWS (Bug fixes): Mention it.
</content>
</entry>
</feed>
