Bug 89406 - Go testing leaves many temporary directories in /tmp around
Summary: Go testing leaves many temporary directories in /tmp around
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: go (show other bugs)
Version: 9.0
: P3 normal
Target Milestone: ---
Assignee: Ian Lance Taylor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-19 18:13 UTC by Jakub Jelinek
Modified: 2019-03-08 02:32 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2019-02-20 00:00:00


Attachments
cmd_go-testlog from x86_64 (5.22 KB, text/plain)
2019-02-27 23:04 UTC, Jakub Jelinek
Details
cmd_go-testlog from i686-linux build (46.76 KB, text/plain)
2019-02-27 23:11 UTC, Jakub Jelinek
Details
cmd_go-testlog from x86_64-linux on idle box (51.73 KB, text/plain)
2019-02-27 23:27 UTC, Jakub Jelinek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Jelinek 2019-02-19 18:13:37 UTC
After every bootstrap I see many directories like
/tmp/{200483472,cmd-go-test-213036399,go-build359954754,gotest050976977}
(with random numbers, in most cases multiple of them for each style) in /tmp.  Could libgo testing clean that up after itself?
Comment 1 Richard Biener 2019-02-20 09:03:14 UTC
Confirmed.
Comment 2 ian@gcc.gnu.org 2019-02-22 00:48:02 UTC
Author: ian
Date: Fri Feb 22 00:47:30 2019
New Revision: 269087

URL: https://gcc.gnu.org/viewcvs?rev=269087&root=gcc&view=rev
Log:
	PR go/89406
    net: remove unixgram test sockets
    
    Backport https://golang.org/cl/163277 from the master library.
    
    Updates https://gcc.gnu.org/PR89406
    
    Reviewed-on: https://go-review.googlesource.com/c/163200

Modified:
    trunk/gcc/go/gofrontend/MERGE
    trunk/libgo/go/net/listen_test.go
    trunk/libgo/go/net/mockserver_test.go
    trunk/libgo/go/net/splice_test.go
Comment 3 Ian Lance Taylor 2019-02-22 05:44:11 UTC
I don't see any more of these when testing on x86_64-pc-linux-gnu, but then I never saw anything like /tmp/200483472.  If you still see them with current trunk, give me details like the platform, what is in the directory, and whether there are any failing tests.  Thanks.
Comment 4 Jakub Jelinek 2019-02-27 22:31:31 UTC
In today's x86_64-linux and i686-linux bootstrap, I see following in /tmp (remove all non-systemd directories in /tmp before the bootstrap):
340681328
517045444
844331773
cmd-go-test-051806874
cmd-go-test-051806874/go-build626269585
cmd-go-test-051806874/go-build486488501
cmd-go-test-051806874/go-build486488501/b001
cmd-go-test-051806874/go-build985544238
cmd-go-test-051806874/go-build275250066
cmd-go-test-051806874/go-build206701887
cmd-go-test-051806874/go-build148081200
cmd-go-test-051806874/gotest035473270
cmd-go-test-051806874/gotest035473270/src
cmd-go-test-051806874/gotest035473270/src/p
cmd-go-test-051806874/gotest035473270/src/p/p_test.go
cmd-go-test-051806874/go-build618547490
cmd-go-test-051806874/go-build618547490/b008
cmd-go-test-051806874/go-build618547490/b008/vet.out
cmd-go-test-051806874/go-build618547490/b008/vet.cfg
cmd-go-test-051806874/go-build618547490/b008/_pkg_.a
cmd-go-test-051806874/go-build618547490/b008/_buildid.o
cmd-go-test-051806874/go-build618547490/b008/_buildid.s
cmd-go-test-051806874/go-build618547490/b008/_go_.o
cmd-go-test-051806874/go-build618547490/b008/_importcfgroot_
cmd-go-test-051806874/go-build618547490/b008/_importcfgroot_/libb.a
cmd-go-test-051806874/go-build618547490/b008/_importcfgroot_/liba.a
cmd-go-test-051806874/go-build618547490/b009
cmd-go-test-051806874/go-build618547490/b009/vet.out
cmd-go-test-051806874/go-build618547490/b009/vet.cfg
cmd-go-test-051806874/go-build618547490/b009/_pkg_.a
cmd-go-test-051806874/go-build618547490/b009/_buildid.o
cmd-go-test-051806874/go-build618547490/b009/_buildid.s
cmd-go-test-051806874/go-build618547490/b009/_go_.o
cmd-go-test-051806874/go-build618547490/b009/_importcfgroot_
cmd-go-test-051806874/go-build618547490/b009/_importcfgroot_/libb.a
cmd-go-test-051806874/go-build618547490/b007
cmd-go-test-051806874/go-build618547490/b007/vet.out
cmd-go-test-051806874/go-build618547490/b007/vet.cfg
cmd-go-test-051806874/go-build618547490/b007/_pkg_.a
cmd-go-test-051806874/go-build618547490/b007/_buildid.o
cmd-go-test-051806874/go-build618547490/b007/_buildid.s
cmd-go-test-051806874/go-build618547490/b007/_go_.o
cmd-go-test-051806874/go-build814904079
cmd-go-test-051806874/gotest973510067
cmd-go-test-051806874/gotest973510067/src
cmd-go-test-051806874/gotest973510067/src/p
cmd-go-test-051806874/gotest973510067/src/p/p.go
cmd-go-test-051806874/gotest511784738
cmd-go-test-051806874/gotest511784738/src
cmd-go-test-051806874/gotest511784738/src/p1
cmd-go-test-051806874/gotest511784738/src/p1/p1_test.go
cmd-go-test-051806874/gotest511784738/src/p1/p1.go
cmd-go-test-051806874/gotest648556558
cmd-go-test-051806874/gotest648556558/src
cmd-go-test-051806874/gotest648556558/src/b
cmd-go-test-051806874/gotest648556558/src/b/b_test.go
cmd-go-test-051806874/gotest648556558/src/b/export_test.go
cmd-go-test-051806874/gotest648556558/src/b/b.go
cmd-go-test-051806874/gotest648556558/src/a
cmd-go-test-051806874/gotest648556558/src/a/a.go
cmd-go-test-051806874/gotest294122667
cmd-go-test-051806874/gotest294122667/pkg-config.out
cmd-go-test-051806874/gotest294122667/pkg-config.sh
cmd-go-test-051806874/gotest294122667/src
cmd-go-test-051806874/gotest294122667/src/x
cmd-go-test-051806874/gotest294122667/src/x/b.go
cmd-go-test-051806874/gotest294122667/src/x/a.go
cmd-go-test-051806874/gotest072509820
cmd-go-test-051806874/gotest072509820/x.exe
cmd-go-test-051806874/gotest072509820/src
cmd-go-test-051806874/gotest072509820/src/x
cmd-go-test-051806874/gotest072509820/src/x/a.go
cmd-go-test-051806874/gotest882825809
cmd-go-test-051806874/gotest882825809/pkg
cmd-go-test-051806874/gotest882825809/pkg/gccgo_linux_386
cmd-go-test-051806874/gotest882825809/pkg/gccgo_linux_386/liba.a
cmd-go-test-051806874/gotest882825809/src
cmd-go-test-051806874/gotest882825809/src/a
cmd-go-test-051806874/gotest882825809/src/a/a.go
cmd-go-test-051806874/gotest996175495
cmd-go-test-051806874/gotest996175495/src
cmd-go-test-051806874/gotest996175495/src/example
cmd-go-test-051806874/gotest996175495/src/example/b
cmd-go-test-051806874/gotest996175495/src/example/a
cmd-go-test-051806874/gotest996175495/src/example/a/a.go
cmd-go-test-051806874/gotest996175495/src/example/a/Pkg
cmd-go-test-051806874/gotest996175495/src/example/a/Pkg/pkg.go
cmd-go-test-051806874/gotest996175495/src/example/a/pkg
cmd-go-test-051806874/gotest996175495/src/example/a/pkg/pkg.go
cmd-go-test-051806874/gotest063357645
cmd-go-test-051806874/gotest063357645/src
cmd-go-test-051806874/gotest063357645/src/cgoref
cmd-go-test-051806874/gotest063357645/src/cgoref/cgoref.go
cmd-go-test-051806874/tmpdir706014513
cmd-go-test-051806874/tmpdir706014513/testbin
cmd-go-test-051806874/tmpdir706014513/testbin/go
cmd-go-test-099107789
cmd-go-test-099107789/gotest690010532
cmd-go-test-099107789/gotest690010532/symdir1
cmd-go-test-099107789/gotest690010532/gopath
cmd-go-test-099107789/gotest690010532/gopath/bin
cmd-go-test-099107789/gotest690010532/gopath/bin/dir1
cmd-go-test-099107789/gotest690010532/gopath/src
cmd-go-test-099107789/gotest690010532/gopath/src/dir1
cmd-go-test-099107789/gotest690010532/gopath/src/dir1/p.go
cmd-go-test-099107789/gotest690010532/gopath/src/dir1/internal
cmd-go-test-099107789/gotest690010532/gopath/src/dir1/internal/v
cmd-go-test-099107789/gotest690010532/gopath/src/dir1/internal/v/v.go
cmd-go-test-099107789/tmpdir216051912
cmd-go-test-099107789/tmpdir216051912/testbin
cmd-go-test-099107789/tmpdir216051912/testbin/go
go-build361223223
go-build361223223/testprogcgo_-tags=threadprof.exe
go-build361223223/testprognet.exe
go-build361223223/testprog.exe
go-build361223223/testprogcxx.exe
go-build361223223/testprogcgo.exe

This was --enable-languages=default,ada,obj-c++,lto,go,brig,d x86_64-linux bootstrap and --enable-languages=default,obj-c++,lto,go,brig,d i686-linux one.
As, the first 3 directories where there is no obvious go string could be from something else.
Comment 5 Ian Lance Taylor 2019-02-27 22:42:12 UTC
Did any of the tests fail?
Comment 6 Jakub Jelinek 2019-02-27 22:47:06 UTC
Yes, some go tests fail pretty much all the time for me, but with quite high volatility, so I usually ignore them if there aren't too many.  This time
FAIL: ./index0-out.go execution,  -O0 -g -fno-var-tracking-assignments
FAIL: go.test/test/nilptr2.go execution,  -O2 -g
FAIL: go test cmd/go
FAIL: go test runtime
on x86_64-linux and
FAIL: ./index0-out.go execution,  -O0 -g -fno-var-tracking-assignments
FAIL: go test cmd/go
FAIL: TestScript
FAIL: go test runtime
FAIL: TestAbort
on i686-linux.
Comment 7 Ian Lance Taylor 2019-02-27 22:58:19 UTC
Can you attach the file gotools/cmd_go-testlog from your build directory?
Comment 8 Jakub Jelinek 2019-02-27 23:04:40 UTC
Created attachment 45844 [details]
cmd_go-testlog from x86_64
Comment 9 Jakub Jelinek 2019-02-27 23:11:24 UTC
Created attachment 45845 [details]
cmd_go-testlog from i686-linux build

Note, this is on 16c32t skylake-avx512 running:
../configure --enable-languages=default,ada,obj-c++,lto,go,brig,d --enable-checking=yes,rtl,extra && make -j32 bootstrap > LOG 2>&1 && GXX_TESTSUITE_STDS=98,11,14,17,2a make -j32 -k check > LOGC 2>&1; ../contrib/test_summary > LOGT 2>&1
for x86_64-linux and
PATH=~/hbin:$PATH i386 ../configure --enable-languages=default,obj-c++,lto,go,brig,d --enable-checking=yes,rtl,extra && PATH=~/hbin:$PATH i386 make -j32 bootstrap > LOG 2>&1 && PATH=~/hbin:$PATH GXX_TESTSUITE_STDS=98,11,14,17,2a i386 make -j32 -k check > LOGC 2>&1; ../contrib/test_summary > LOGT 2>&1
with
for i in ~/hbin/*; do echo ===$i===; cat $i; done
===/home/jakub/hbin/as===
#!/bin/sh
exec /usr/bin/as --32 "$@"
===/home/jakub/hbin/g++===
#!/bin/sh
exec /usr/bin/g++ -m32 "$@"
===/home/jakub/hbin/gcc===
#!/bin/sh
exec /usr/bin/gcc -m32 "$@"
===/home/jakub/hbin/ld===
#!/bin/sh
case "$*" in
  --version) cat <<\EOF
GNU ld version 2.20.52.0.1-10.fc17 20100131
Copyright 2012 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
EOF
  exit 0;;
esac
exec /usr/bin/ld -m elf_i386 -L /usr/lib/ "$@"

Both bootstraps/regtests are running in parallel.
Comment 10 Ian Lance Taylor 2019-02-27 23:18:23 UTC
Thanks.  In both cases the tests were killed because they ran too long (the timeout was 11 minutes).  Since the tests were killed, they didn't clean up after themselves.

Can you cd to the gotools directory and run "time make check-go-tool" and see how long it takes?  Also whether it passes (the full output will go to cmd_go-testlog)?  Thanks.
Comment 11 Jakub Jelinek 2019-02-27 23:27:30 UTC
Created attachment 45846 [details]
cmd_go-testlog from x86_64-linux on idle box

real	3m9.956s
user	9m3.231s
sys	0m39.443s

Though, unlike the normal case, there aren't 63 other tests running concurrently with that, so it doesn't surprise me if the 3 minute wall time grows 4 or how many times (especially when the user time is 9 minutes and so it means it is more than one concurrent process or thread to handle that.
Comment 12 ian@gcc.gnu.org 2019-03-02 00:51:02 UTC
Author: ian
Date: Sat Mar  2 00:50:30 2019
New Revision: 269338

URL: https://gcc.gnu.org/viewcvs?rev=269338&root=gcc&view=rev
Log:
	PR go/89406
    go/internal/gccgoimporter: remove temporary directories in test
    
    Backport of https://golang.org/cl/164862.
    
    Updates https://gcc.gnu.org/PR89406
    
    Reviewed-on: https://go-review.googlesource.com/c/164863

Modified:
    trunk/gcc/go/gofrontend/MERGE
    trunk/libgo/go/go/internal/gccgoimporter/importer_test.go
Comment 13 Ian Lance Taylor 2019-03-02 01:02:19 UTC
I increased the timeouts and fixed another case.  Let me know what it looks like now.  Thanks.
Comment 14 Ian Lance Taylor 2019-03-08 02:32:36 UTC
I haven't heard about any more problems, so closing.