Re: a.out left in root directory when configuring --with-toolchain-type=clang

2018-04-03 Thread Magnus Ihse Bursie

On 2018-04-03 19:55, Martin Buchholz wrote:

It's some kind of weird race.

Weird. I can't help you out here, since I cannot reproduce.

I can tell you what I did to find the strange a.out file for solaris -- 
I opened one terminal with a "while true; do ls -l a.out; done", and one 
running configure, and then I pressed ctrl-c on configure as soon as the 
a.out appeared. I checked the output, and that gave me an end limit on 
where the file appeared from. Then I started breaking the script in 
various places just ahead of that (by inserting "exit 1" in suitable 
places), and bisected to find the problematic line.


If you have a race and it's not fully reproducible, maybe it's not so 
easy for you.


If this is a recent regression, maybe the problems lies in the same 
place, that is, in the new TOOLCHAIN_EXTRACT_LD_VERSION function?


/Magnus



 $ rm -f a.out; bash configure --with-toolchain-type=clang 
--with-toolchain-path=/usr/lib/llvm-3.9/bin >&/dev/null; ls -l a.out; 
file a.out
bash configure --with-toolchain-type=clang >&/dev/null  5.04s user 
3.81s system 94% cpu 9.323 total

-rw-r--r-- 1 martin martin 568 Apr  3 10:32 a.out
a.out: data

but then I run it again

 $ rm -f a.out; bash configure --with-toolchain-type=clang 
--with-toolchain-path=/usr/lib/llvm-3.9/bin >&/dev/null; ls -l a.out; 
file a.out
bash configure --with-toolchain-type=clang >&/dev/null  5.30s user 
2.72s system 92% cpu 8.625 total

ls: cannot access 'a.out': No such file or directory
a.out: cannot open `a.out' (No such file or directory)

(on my personal Ubuntu machine)

 $ readelf -ld a.out
readelf: Error: Not an ELF file - it has the wrong magic bytes at the 
start


What is this crazy phantom file?

 $ hd a.out
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
||

*
0040  06 00 00 00 05 00 00 00 40 00 00 00 00 00 00 00  
|@...|
0050  40 00 40 00 00 00 00 00 40 00 40 00 00 00 00 00  
|@.@.@.@.|
0060  f8 01 00 00 00 00 00 00 f8 01 00 00 00 00 00 00  
||
0070  08 00 00 00 00 00 00 00 03 00 00 00 04 00 00 00  
||
0080  38 02 00 00 00 00 00 00 38 02 40 00 00 00 00 00  
|8...8.@.|
0090  38 02 40 00 00 00 00 00 1c 00 00 00 00 00 00 00  
|8.@.|
00a0  1c 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00  
||
00b0  01 00 00 00 05 00 00 00 00 00 00 00 00 00 00 00  
||
00c0  00 00 40 00 00 00 00 00 00 00 40 00 00 00 00 00  
|..@...@.|
00d0  44 06 00 00 00 00 00 00 44 06 00 00 00 00 00 00  
|D...D...|
00e0  00 00 20 00 00 00 00 00 01 00 00 00 06 00 00 00  |.. 
.|
00f0  10 0e 00 00 00 00 00 00 10 0e 60 00 00 00 00 00  
|..`.|
0100  10 0e 60 00 00 00 00 00 20 02 00 00 00 00 00 00  |..`. 
...|
0110  28 02 00 00 00 00 00 00 00 00 20 00 00 00 00 00  |(. 
.|
0120  02 00 00 00 06 00 00 00 28 0e 00 00 00 00 00 00  
|(...|
0130  28 0e 60 00 00 00 00 00 28 0e 60 00 00 00 00 00  
|(.`.(.`.|
0140  d0 01 00 00 00 00 00 00 d0 01 00 00 00 00 00 00  
||
0150  08 00 00 00 00 00 00 00 04 00 00 00 04 00 00 00  
||
0160  54 02 00 00 00 00 00 00 54 02 40 00 00 00 00 00  
|T...T.@.|
0170  54 02 40 00 00 00 00 00 20 00 00 00 00 00 00 00  |T.@. 
...|
0180  20 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00  | 
...|
0190  50 e5 74 64 04 00 00 00 44 05 00 00 00 00 00 00  
|P.tdD...|
01a0  44 05 40 00 00 00 00 00 44 05 40 00 00 00 00 00  
|D.@.D.@.|
01b0  2c 00 00 00 00 00 00 00 2c 00 00 00 00 00 00 00  
|,...,...|
01c0  04 00 00 00 00 00 00 00 51 e5 74 64 06 00 00 00  
|Q.td|
01d0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
||

*
01f0  00 00 00 00 00 00 00 00 10 00 00 00 00 00 00 00  
||
0200  52 e5 74 64 04 00 00 00 10 0e 00 00 00 00 00 00  
|R.td|
0210  10 0e 60 00 00 00 00 00 10 0e 60 00 00 00 00 00  
|..`...`.|
0220  f0 01 00 00 00 00 00 00 f0 01 00 00 00 00 00 00  
||

0230  01 00 00 00 00 00 00 00                          ||
0238

On Tue, Apr 3, 2018 at 6:44 AM, Magnus Ihse Bursie 
> 
wrote:


Actually, the clang issue is different. The fix for JDK-8200267 is
solstudio only.

Martin: I cannot reproduce the behaviour with "bash configure
--with-toolchain-type=clang
--with-toolchain-path=/usr/lib/llvm-3.9/bin". No a.out file for
me. Is this repeatable? Are you sure you didn't accidentally hit
ctrl-c at some point?

/Magnus


On 2018-03-27 22:11, Erik Joelsson wrote:

https://bugs.openjdk.java.net/browse/JDK-8200267



On 2018-03-27 12:35, Martin Buchholz wrote:

I notice 

Re: a.out left in root directory when configuring --with-toolchain-type=clang

2018-04-03 Thread Martin Buchholz
It's some kind of weird race.

 $ rm -f a.out; bash configure --with-toolchain-type=clang
--with-toolchain-path=/usr/lib/llvm-3.9/bin >&/dev/null; ls -l a.out; file
a.out
bash configure --with-toolchain-type=clang  >&/dev/null  5.04s user 3.81s
system 94% cpu 9.323 total
-rw-r--r-- 1 martin martin 568 Apr  3 10:32 a.out
a.out: data

but then I run it again

 $ rm -f a.out; bash configure --with-toolchain-type=clang
--with-toolchain-path=/usr/lib/llvm-3.9/bin >&/dev/null; ls -l a.out; file
a.out
bash configure --with-toolchain-type=clang  >&/dev/null  5.30s user 2.72s
system 92% cpu 8.625 total
ls: cannot access 'a.out': No such file or directory
a.out: cannot open `a.out' (No such file or directory)

(on my personal Ubuntu machine)

 $ readelf -ld a.out
readelf: Error: Not an ELF file - it has the wrong magic bytes at the start

What is this crazy phantom file?

 $ hd a.out
  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
||
*
0040  06 00 00 00 05 00 00 00  40 00 00 00 00 00 00 00
|@...|
0050  40 00 40 00 00 00 00 00  40 00 40 00 00 00 00 00
|@.@.@.@.|
0060  f8 01 00 00 00 00 00 00  f8 01 00 00 00 00 00 00
||
0070  08 00 00 00 00 00 00 00  03 00 00 00 04 00 00 00
||
0080  38 02 00 00 00 00 00 00  38 02 40 00 00 00 00 00  |8...8.@
.|
0090  38 02 40 00 00 00 00 00  1c 00 00 00 00 00 00 00  |8.@
.|
00a0  1c 00 00 00 00 00 00 00  01 00 00 00 00 00 00 00
||
00b0  01 00 00 00 05 00 00 00  00 00 00 00 00 00 00 00
||
00c0  00 00 40 00 00 00 00 00  00 00 40 00 00 00 00 00
|..@...@.|
00d0  44 06 00 00 00 00 00 00  44 06 00 00 00 00 00 00
|D...D...|
00e0  00 00 20 00 00 00 00 00  01 00 00 00 06 00 00 00  |..
.|
00f0  10 0e 00 00 00 00 00 00  10 0e 60 00 00 00 00 00
|..`.|
0100  10 0e 60 00 00 00 00 00  20 02 00 00 00 00 00 00  |..`.
...|
0110  28 02 00 00 00 00 00 00  00 00 20 00 00 00 00 00  |(.
.|
0120  02 00 00 00 06 00 00 00  28 0e 00 00 00 00 00 00
|(...|
0130  28 0e 60 00 00 00 00 00  28 0e 60 00 00 00 00 00
|(.`.(.`.|
0140  d0 01 00 00 00 00 00 00  d0 01 00 00 00 00 00 00
||
0150  08 00 00 00 00 00 00 00  04 00 00 00 04 00 00 00
||
0160  54 02 00 00 00 00 00 00  54 02 40 00 00 00 00 00  |T...T.@
.|
0170  54 02 40 00 00 00 00 00  20 00 00 00 00 00 00 00  |T.@.
...|
0180  20 00 00 00 00 00 00 00  04 00 00 00 00 00 00 00  |
...|
0190  50 e5 74 64 04 00 00 00  44 05 00 00 00 00 00 00
|P.tdD...|
01a0  44 05 40 00 00 00 00 00  44 05 40 00 00 00 00 00  |D.@.D.@
.|
01b0  2c 00 00 00 00 00 00 00  2c 00 00 00 00 00 00 00
|,...,...|
01c0  04 00 00 00 00 00 00 00  51 e5 74 64 06 00 00 00
|Q.td|
01d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
||
*
01f0  00 00 00 00 00 00 00 00  10 00 00 00 00 00 00 00
||
0200  52 e5 74 64 04 00 00 00  10 0e 00 00 00 00 00 00
|R.td|
0210  10 0e 60 00 00 00 00 00  10 0e 60 00 00 00 00 00
|..`...`.|
0220  f0 01 00 00 00 00 00 00  f0 01 00 00 00 00 00 00
||
0230  01 00 00 00 00 00 00 00   ||
0238

On Tue, Apr 3, 2018 at 6:44 AM, Magnus Ihse Bursie <
magnus.ihse.bur...@oracle.com> wrote:

> Actually, the clang issue is different. The fix for JDK-8200267 is
> solstudio only.
>
> Martin: I cannot reproduce the behaviour with "bash configure
> --with-toolchain-type=clang --with-toolchain-path=/usr/lib/llvm-3.9/bin".
> No a.out file for me. Is this repeatable? Are you sure you didn't
> accidentally hit ctrl-c at some point?
>
> /Magnus
>
>
> On 2018-03-27 22:11, Erik Joelsson wrote:
>
>> https://bugs.openjdk.java.net/browse/JDK-8200267
>>
>>
>> On 2018-03-27 12:35, Martin Buchholz wrote:
>>
>>> I notice that running bash ./configure ... leaves an a.out file in the
>>> root
>>> directory of the jdk, but only after adding configure flags
>>>
>>> --with-toolchain-type=clang --with-toolchain-path=/usr/lib/llvm-3.9/bin
>>>
>>> (i.e. not when building with default gcc)
>>>
>>> Probably there's a test compilation whose output does not go into the
>>> build/ directory, and whose output is not cleaned up.
>>>
>>
>>
>


Re: a.out left in root directory when configuring --with-toolchain-type=clang

2018-04-03 Thread Magnus Ihse Bursie
Actually, the clang issue is different. The fix for JDK-8200267 is 
solstudio only.


Martin: I cannot reproduce the behaviour with "bash configure 
--with-toolchain-type=clang 
--with-toolchain-path=/usr/lib/llvm-3.9/bin". No a.out file for me. Is 
this repeatable? Are you sure you didn't accidentally hit ctrl-c at some 
point?


/Magnus

On 2018-03-27 22:11, Erik Joelsson wrote:

https://bugs.openjdk.java.net/browse/JDK-8200267


On 2018-03-27 12:35, Martin Buchholz wrote:
I notice that running bash ./configure ... leaves an a.out file in 
the root

directory of the jdk, but only after adding configure flags

--with-toolchain-type=clang --with-toolchain-path=/usr/lib/llvm-3.9/bin

(i.e. not when building with default gcc)

Probably there's a test compilation whose output does not go into the
build/ directory, and whose output is not cleaned up.






Re: a.out left in root directory when configuring --with-toolchain-type=clang

2018-03-27 Thread Erik Joelsson

https://bugs.openjdk.java.net/browse/JDK-8200267


On 2018-03-27 12:35, Martin Buchholz wrote:

I notice that running bash ./configure ... leaves an a.out file in the root
directory of the jdk, but only after adding configure flags

--with-toolchain-type=clang --with-toolchain-path=/usr/lib/llvm-3.9/bin

(i.e. not when building with default gcc)

Probably there's a test compilation whose output does not go into the
build/ directory, and whose output is not cleaned up.




a.out left in root directory when configuring --with-toolchain-type=clang

2018-03-27 Thread Martin Buchholz
I notice that running bash ./configure ... leaves an a.out file in the root
directory of the jdk, but only after adding configure flags

--with-toolchain-type=clang --with-toolchain-path=/usr/lib/llvm-3.9/bin

(i.e. not when building with default gcc)

Probably there's a test compilation whose output does not go into the
build/ directory, and whose output is not cleaned up.