Subject: race in shell pipes to tail -f?
To: None <current-users@netbsd.org>
From: George Michaelson <ggm@apnic.net>
List: current-users
Date: 01/11/2007 09:36:07
$ !437
csup -L 1 /etc/supfile >& /var/tmp/csup.log & tail -f /var/tmp/csup.log
[1] 3732
Segmentation fault (core dumped)
$ tail -f /var/tmp/csup.log
Cannot connect to 2001:700:400:8::3: Address family not supported by protocol family
Cannot connect to 2001:700:400:600::3: Address family not supported by protocol family
Connected to 129.242.16.119
Updating collection netbsd-src/cvs
Edit src/dist/iscsi/include/scsi_cmd_codes.h
Edit src/dist/iscsi/src/disk.c
Edit src/doc/CHANGES
so the first piped command, the tail dies. it dies in the same place
each time. (see below)
subsequent tail is fine.
the file can already exist, it still dies...
any one else seeing this?
-George
$ gdb `which tail` tail.core
GNU gdb 6.5
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386--netbsdelf"...(no debugging symbols found)
Reading symbols from /usr/lib/libc.so.12...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libc.so.12
Reading symbols from /usr/libexec/ld.elf_so...(no debugging symbols found)...done.
Loaded symbols for /usr/libexec/ld.elf_so
Core was generated by `tail'.
Program terminated with signal 11, Segmentation fault.
#0 0x0804955f in forward ()
(gdb) where
#0 0x0804955f in forward ()
#1 0x0804ad06 in main ()
(gdb)