[PATCH] RFC: do not detach when we think tracee is going to die

Dmitry V. Levin ldv at altlinux.org
Sun Sep 4 23:40:26 UTC 2011


On Fri, Sep 02, 2011 at 11:33:05AM +1000, Steve Bennett wrote:
> On 01/09/2011, at 3:14 AM, Dmitry V. Levin wrote:
> > On Wed, Aug 31, 2011 at 03:50:16PM +0200, Denys Vlasenko wrote:
> >> Speaking of non-linux-2.6 systems.
> >> 
> >> I am suspicious about non-Linux systems. I'd expect that
> >> changes to the source are mostly tested on Linux,
> >> and therefore we should see a fair number of errors
> >> on non-Linux builds, especially simple ones a-la
> >> "it stopped compiling because you forgot to rename
> >> a function or a variable in '#ifdef FREEBSD' block".
> >> 
> >> But we _don't_ see this.
> >> 
> >> Which makes me wonder whether any non-Linux code we carry
> >> in the tree is actually used by anyone. Do people really build
> >> and use our strace on FreeBSD, SunOS, SVR4 etc?
> > 
> > I remember no emails in this list about any non-Linux platform, so
> > I suppose the support for non-Linux platforms in strace was accidentally
> > broken ling time ago, and this sad event was missed because strace seems
> > to have no non-Linux users nowadays.
> > 
> > I have no such platform nearby to check whether e.g. strace-4.6 builds
> > at all there, though.
> > 
> > Does anybody have an idea how this hypothesis could be checked out?
> 
> FreeBSD 8.2 with strace-4.8 from latest git.

The latest strace version released before I actually started release
engineering is 4.5.18, it is three years old already.  I've managed to
run a build test on FreeBSD 6.3 (which was released more than six month
before strace 4.5.18).  The build failed, and the log shows that some of
those errors are the same as in your build log.

That is, strace doesn't build on FreeBSD for more than three years, and
nobody has complained about it yet.  Does it mean that the FreeBSD
support in strace is dead?


-- 
ldv
-------------- next part --------------
make  all-am
gcc -DHAVE_CONFIG_H -I. -Ifreebsd/i386 -I./freebsd/i386 -Ifreebsd -I./freebsd    -Wall -g -O2 -MT syscall.o -MD -MP -MF .deps/syscall.Tpo -c -o syscall.o syscall.c
syscall.c: In function `internal_syscall':
syscall.c:719: error: `sys_waitpid' undeclared (first use in this function)
syscall.c:719: error: (Each undeclared identifier is reported only once
syscall.c:719: error: for each function it appears in.)
*** Error code 1 (continuing)
gcc -DHAVE_CONFIG_H -I. -Ifreebsd/i386 -I./freebsd/i386 -Ifreebsd -I./freebsd    -Wall -g -O2 -MT file.o -MD -MP -MF .deps/file.Tpo -c -o file.o file.c
file.c: In function `printstatfs':
file.c:1671: error: structure has no member named `__val'
file.c:1671: error: structure has no member named `__val'
file.c: At top level:
file.c:2860: error: `POSIX_FADV_NORMAL' undeclared here (not in a function)
file.c:2860: error: initializer element is not constant
file.c:2860: error: (near initialization for `advise[0].val')
file.c:2860: error: initializer element is not constant
file.c:2860: error: (near initialization for `advise[0]')
file.c:2861: error: `POSIX_FADV_RANDOM' undeclared here (not in a function)
file.c:2861: error: initializer element is not constant
file.c:2861: error: (near initialization for `advise[1].val')
file.c:2861: error: initializer element is not constant
file.c:2861: error: (near initialization for `advise[1]')
file.c:2862: error: `POSIX_FADV_SEQUENTIAL' undeclared here (not in a function)
file.c:2862: error: initializer element is not constant
file.c:2862: error: (near initialization for `advise[2].val')
file.c:2862: error: initializer element is not constant
file.c:2862: error: (near initialization for `advise[2]')
file.c:2863: error: `POSIX_FADV_WILLNEED' undeclared here (not in a function)
file.c:2863: error: initializer element is not constant
file.c:2863: error: (near initialization for `advise[3].val')
file.c:2863: error: initializer element is not constant
file.c:2863: error: (near initialization for `advise[3]')
file.c:2864: error: `POSIX_FADV_DONTNEED' undeclared here (not in a function)
file.c:2864: error: initializer element is not constant
file.c:2864: error: (near initialization for `advise[4].val')
file.c:2864: error: initializer element is not constant
file.c:2864: error: (near initialization for `advise[4]')
file.c:2865: error: `POSIX_FADV_NOREUSE' undeclared here (not in a function)
file.c:2865: error: initializer element is not constant
file.c:2865: error: (near initialization for `advise[5].val')
file.c:2865: error: initializer element is not constant
file.c:2865: error: (near initialization for `advise[5]')
file.c:2866: error: initializer element is not constant
file.c:2866: error: (near initialization for `advise[6]')
*** Error code 1 (continuing)
gcc -DHAVE_CONFIG_H -I. -Ifreebsd/i386 -I./freebsd/i386 -Ifreebsd -I./freebsd    -Wall -g -O2 -MT net.o -MD -MP -MF .deps/net.Tpo -c -o net.o net.c
net.c:831: error: `TCP_NODELAY' undeclared here (not in a function)
net.c:831: error: initializer element is not constant
net.c:831: error: (near initialization for `socktcpoptions[0].val')
net.c:831: error: initializer element is not constant
net.c:831: error: (near initialization for `socktcpoptions[0]')
net.c:832: error: `TCP_MAXSEG' undeclared here (not in a function)
net.c:832: error: initializer element is not constant
net.c:832: error: (near initialization for `socktcpoptions[1].val')
net.c:832: error: initializer element is not constant
net.c:832: error: (near initialization for `socktcpoptions[1]')
net.c:866: error: initializer element is not constant
net.c:866: error: (near initialization for `socktcpoptions[2]')
net.c: In function `printcmsghdr':
net.c:1138: error: `SCM_CREDENTIALS' undeclared (first use in this function)
net.c:1138: error: (Each undeclared identifier is reported only once
net.c:1138: error: for each function it appears in.)
net.c:1138: error: invalid application of `sizeof' to incomplete type `ucred' 
net.c:1142: error: dereferencing pointer to incomplete type
net.c:1142: error: dereferencing pointer to incomplete type
net.c:1142: error: dereferencing pointer to incomplete type
*** Error code 1 (continuing)
gcc -DHAVE_CONFIG_H -I. -Ifreebsd/i386 -I./freebsd/i386 -Ifreebsd -I./freebsd    -Wall -g -O2 -MT sock.o -MD -MP -MF .deps/sock.Tpo -c -o sock.o sock.c
sock.c:58: error: `IFF_NOTRAILERS' undeclared here (not in a function)
sock.c:58: error: initializer element is not constant
sock.c:58: error: (near initialization for `iffflags[5].val')
sock.c:58: error: initializer element is not constant
sock.c:58: error: (near initialization for `iffflags[5]')
sock.c:59: error: initializer element is not constant
sock.c:59: error: (near initialization for `iffflags[6]')
sock.c:60: error: initializer element is not constant
sock.c:60: error: (near initialization for `iffflags[7]')
sock.c:61: error: initializer element is not constant
sock.c:61: error: (near initialization for `iffflags[8]')
sock.c:62: error: initializer element is not constant
sock.c:62: error: (near initialization for `iffflags[9]')
sock.c:63: error: `IFF_MASTER' undeclared here (not in a function)
sock.c:63: error: initializer element is not constant
sock.c:63: error: (near initialization for `iffflags[10].val')
sock.c:63: error: initializer element is not constant
sock.c:63: error: (near initialization for `iffflags[10]')
sock.c:64: error: `IFF_SLAVE' undeclared here (not in a function)
sock.c:64: error: initializer element is not constant
sock.c:64: error: (near initialization for `iffflags[11].val')
sock.c:64: error: initializer element is not constant
sock.c:64: error: (near initialization for `iffflags[11]')
sock.c:65: error: initializer element is not constant
sock.c:65: error: (near initialization for `iffflags[12]')
sock.c:66: error: `IFF_PORTSEL' undeclared here (not in a function)
sock.c:66: error: initializer element is not constant
sock.c:66: error: (near initialization for `iffflags[13].val')
sock.c:66: error: initializer element is not constant
sock.c:66: error: (near initialization for `iffflags[13]')
sock.c:67: error: `IFF_AUTOMEDIA' undeclared here (not in a function)
sock.c:67: error: initializer element is not constant
sock.c:67: error: (near initialization for `iffflags[14].val')
sock.c:67: error: initializer element is not constant
sock.c:67: error: (near initialization for `iffflags[14]')
sock.c:68: error: initializer element is not constant
sock.c:68: error: (near initialization for `iffflags[15]')
sock.c: In function `print_addr':
sock.c:81: error: dereferencing pointer to incomplete type
sock.c: In function `sock_ioctl':
sock.c:89: warning: unused variable `ifr'
sock.c:91: warning: unused variable `str'
sock.c:92: warning: unused variable `bytes'
sock.c: At top level:
sock.c:77: warning: 'print_addr' defined but not used
*** Error code 1 (continuing)
gcc -DHAVE_CONFIG_H -I. -Ifreebsd/i386 -I./freebsd/i386 -Ifreebsd -I./freebsd    -Wall -g -O2 -MT time.o -MD -MP -MF .deps/time.Tpo -c -o time.o time.c
time.c: In function `printtv_bitness':
time.c:87: error: `UTIME_NOW' undeclared (first use in this function)
time.c:87: error: (Each undeclared identifier is reported only once
time.c:87: error: for each function it appears in.)
time.c:90: error: `UTIME_OMIT' undeclared (first use in this function)
*** Error code 1 (continuing)
`all-am' not remade because of errors.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20110905/7bdd7fd8/attachment.bin>


More information about the Strace-devel mailing list