Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failiure in misc on master #15341

Closed
mikewl opened this issue Mar 3, 2016 · 30 comments
Closed

Failiure in misc on master #15341

mikewl opened this issue Mar 3, 2016 · 30 comments
Labels
error handling Handling of exceptions by Julia or the user system:windows Affects only Windows

Comments

@mikewl
Copy link
Contributor

mikewl commented Mar 3, 2016

rom worker 3:       * misc                 Error During Test
        From worker 3:    Test threw an exception of type SystemError
        From worker 3:    Expression: clipboard() == str
        From worker 3:    SystemError: OpenClipboard: No error
        From worker 3:     [inlined code] from .\promotion.jl:185
        From worker 3:     in clipboard() at .\interactiveutil.jl:149
        From worker 3:     [inlined code] from K:\julia\usr\share\julia\test\misc.jl:385
        From worker 3:     in anonymous at .\no file:4294967295
        From worker 3:     [inlined code] from .\essentials.jl:79
        From worker 3:     in include_string(::UTF8String, ::ASCIIString) at .\loading.jl:371
        From worker 3:     in include_from_node1(::ASCIIString) at .\loading.jl:420
        From worker 3:     [inlined code] from .\util.jl:179
        From worker 3:     in runtests(::ASCIIString) at K:\julia\usr\share\julia\test\testdefs.jl:7
        From worker 3:     in (::Base.Serializer.__deserialized_types__.##9173)(::ASCIIString) at K:\julia\usr\share\julia\test\runtests.jl:36
        From worker 3:     in run_work_thunk(::Base.##256#258{Base.CallMsg{:call_fetch}}, ::Bool) at .\multi.jl:714
        From worker 3:     [inlined code] from .\multi.jl:1010
        From worker 3:     in (::Base.##255#257{Base.CallMsg{:call_fetch},TCPSocket})() at .\task.jl:59
        From worker 4:       * subarray              in 1266.05 seconds, maxrss 1260.23 MB
Exception running test misc :
On worker 3:
LoadError: There was an error during testing
 in record at .\test.jl:317
 in do_test at .\test.jl:215
 [inlined code] from .\test.jl:137
 in anonymous at .\no file:4294967295
 [inlined code] from .\essentials.jl:79
 in include_string at .\loading.jl:371
 in include_from_node1 at .\loading.jl:420
 [inlined code] from .\util.jl:179
 in runtests at K:\julia\usr\share\julia\test\testdefs.jl:7
 in #16 at K:\julia\usr\share\julia\test\runtests.jl:36
 in run_work_thunk at .\multi.jl:714
 [inlined code] from .\multi.jl:1010
 in #255 at .\task.jl:59
while loading K:\julia\usr\share\julia\test\misc.jl, in expression starting on line 382
ERROR: LoadError: Some tests exited with errors.
 in (::##11#19)() at K:\julia\usr\share\julia\test\runtests.jl:64
 in cd(::##11#19, ::ASCIIString) at .\file.jl:58
 in include(::ASCIIString) at .\boot.jl:264
 in include_from_node1(::UTF8String) at .\loading.jl:417
 in process_options(::Base.JLOptions) at .\client.jl:262
 in _start() at .\client.jl:318
while loading K:\julia\usr\share\julia\test\runtests.jl, in expression starting on line 13
ERROR: A test has failed. Please submit a bug report (https://github.com/JuliaLang/julia/issues)
including error messages above and the output of versioninfo():
Julia Version 0.5.0-dev+2985
Commit d8ec4a7* (2016-03-03 01:09 UTC)
Platform Info:
  System: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.7.1

 in error(::ASCIIString) at .\error.jl:21
 in runtests(::Array{ASCIIString,1}, ::Int64) at .\interactiveutil.jl:420
 in runtests() at .\interactiveutil.jl:409
 in eval(::Module, ::Any) at .\boot.jl:267

Make.user contains JULIA_THREADS=1.

Tests pass fine with threading disabled.

@yuyichao
Copy link
Contributor

yuyichao commented Mar 3, 2016

Is this reproducible? Can this be reproduced with single process test or single test?

@mikewl
Copy link
Contributor Author

mikewl commented Mar 3, 2016

Reproducible on Base.runtests().
Reproducible on Base.runtests("misc")

lia> Base.runtests("misc")
     * misc                 Error During Test
  Test threw an exception of type SystemError
  Expression: clipboard() == str
  SystemError: OpenClipboard: No error
   [inlined code] from .\promotion.jl:185
   in clipboard() at .\interactiveutil.jl:149
   [inlined code] from K:\julia\usr\share\julia\test\misc.jl:385
   in anonymous at .\no file:4294967295
   in include(::UTF8String) at .\boot.jl:264
   in include_from_node1(::UTF8String) at .\loading.jl:417
   [inlined code] from .\util.jl:179
   in runtests(::UTF8String) at K:\julia\usr\share\julia\test\testdefs.jl:7
   in run_work_thunk(::Base.##247#248{##16#24,Tuple{UTF8String}}, ::Bool) at .\multi.jl:714
   in remotecall_fetch(::Any, ::LocalProcess, ::UTF8String, ::Vararg{UTF8String}) at .\multi.jl:787
   in remotecall_fetch(::Any, ::Int64, ::UTF8String, ::Vararg{UTF8String}) at .\multi.jl:803
   [inlined code] from K:\julia\usr\share\julia\test\runtests.jl:36
   in (::##15#23{Array{Any,1}})() at .\task.jl:431
ERROR: LoadError: LoadError: There was an error during testing
 in record(::Base.Test.FallbackTestSet, ::Base.Test.Error) at .\test.jl:317
 in do_test(::Base.Test.Threw, ::Expr) at .\test.jl:215
 [inlined code] from .\test.jl:137
 in anonymous at .\no file:4294967295
 in include(::UTF8String) at .\boot.jl:264
 in include_from_node1(::UTF8String) at .\loading.jl:417
 [inlined code] from .\util.jl:179
 in runtests(::UTF8String) at K:\julia\usr\share\julia\test\testdefs.jl:7
 in run_work_thunk(::Base.##247#248{##16#24,Tuple{UTF8String}}, ::Bool) at .\multi.jl:714
 in remotecall_fetch(::Any, ::LocalProcess, ::UTF8String, ::Vararg{UTF8String}) at .\multi.jl:787
 in remotecall_fetch(::Any, ::Int64, ::UTF8String, ::Vararg{UTF8String}) at .\multi.jl:803
 [inlined code] from K:\julia\usr\share\julia\test\runtests.jl:36
 in (::##15#23{Array{Any,1}})() at .\task.jl:431
while loading K:\julia\usr\share\julia\test\misc.jl, in expression starting on line 382
 in remotecall_fetch(::Any, ::LocalProcess, ::UTF8String, ::Vararg{UTF8String}) at .\multi.jl:788
 in remotecall_fetch(::Any, ::Int64, ::UTF8String, ::Vararg{UTF8String}) at .\multi.jl:803
 [inlined code] from K:\julia\usr\share\julia\test\runtests.jl:36
 in (::##15#23{Array{Any,1}})() at .\task.jl:431
 in sync_end() at .\task.jl:397
 [inlined code] from .\task.jl:406
 in (::##11#19)() at K:\julia\usr\share\julia\test\runtests.jl:31
 in cd(::##11#19, ::ASCIIString) at .\file.jl:58
 in include(::ASCIIString) at .\boot.jl:264
 in include_from_node1(::UTF8String) at .\loading.jl:417
 in process_options(::Base.JLOptions) at .\client.jl:262
 in _start() at .\client.jl:318
while loading K:\julia\usr\share\julia\test\runtests.jl, in expression starting on line 13
ERROR: A test has failed. Please submit a bug report (https://github.com/JuliaLang/julia/issues)
including error messages above and the output of versioninfo():
Julia Version 0.5.0-dev+2985
Commit d8ec4a7* (2016-03-03 01:09 UTC)
Platform Info:
  System: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.7.1

 in error(::ASCIIString) at .\error.jl:21
 in runtests(::ASCIIString, ::Int64) at .\interactiveutil.jl:420
 in runtests(::ASCIIString) at .\interactiveutil.jl:409
 in eval(::Module, ::Any) at .\boot.jl:267

julia>

@yuyichao
Copy link
Contributor

yuyichao commented Mar 3, 2016

Hmm, for one thing it seems that the error reporting for OpenClipboard is wrong (unless errno is the same with GetLastError() on windows?).

Can you try to run

@show ccall((:OpenClipboard, "user32"), stdcall, Cint, (Ptr{Void},), C_NULL)
e = Libc.GetLastError()
@show e
@show FormatMessage(e)

?

@mikewl
Copy link
Contributor Author

mikewl commented Mar 3, 2016

julia> @show ccall((:OpenClipboard, "user32"), stdcall, Cint, (Ptr{Void},), C_NULL)
ccall((:OpenClipboard,"user32"),Cint,(Ptr{Void},),C_NULL,$(Expr(:stdcall))) = 1
1

julia> e = Libc.GetLastError()
0x000001e7

julia> @show e
e = 0x000001e7
0x000001e7

julia> @show FormatMessage(e)
ERROR: UndefVarError: FormatMessage not defined
 in eval(::Module, ::Any) at .\boot.jl:267

@yuyichao
Copy link
Contributor

yuyichao commented Mar 3, 2016

Ooops replace the FormatMessage with Libc.FormatMessage ....

@yuyichao
Copy link
Contributor

yuyichao commented Mar 3, 2016

ERROR_INVALID_ADDRESS
487 (0x1E7)
Attempt to access invalid address.

Really?....

@mikewl
Copy link
Contributor Author

mikewl commented Mar 3, 2016

julia> @show ccall((:OpenClipboard, "user32"), stdcall, Cint, (Ptr{Void},), C_NULL)
ccall((:OpenClipboard,"user32"),Cint,(Ptr{Void},),C_NULL,$(Expr(:stdcall))) = 1
1

julia> e = Libc.GetLastError()
0x0000007f

julia> @show e
e = 0x0000007f
0x0000007f

julia> @show Libc.FormatMessage(e)
Libc.FormatMessage(e) = "The specified procedure could not be found. "
"The specified procedure could not be found. 

Excuse the previous messup!

@yuyichao
Copy link
Contributor

yuyichao commented Mar 3, 2016

Well, you still need to call the function.

Maybe

f() = ccall((:OpenClipboard, "user32"), stdcall, Cint, (Ptr{Void},), C_NULL)
@code_llvm f()
@code_native f()

?

I don't really see why this issue is threading specific though.....

@mikewl
Copy link
Contributor Author

mikewl commented Mar 3, 2016

julia> f() = ccall((:OpenClipboard, "user32"), stdcall, Cint, (Ptr{Void},), C_NULL)
f (generic function with 1 method)

julia> @code_llvm f()

; Function Attrs: uwtable
define i32 @julia_f_1536() #0 {
top:
  %0 = call x86_stdcallcc i32 inttoptr (i64 140734516732800 to i32 (i8*)*)(i8* null)
  ret i32 %0
}

julia> @code_native f()
        .text
Filename: none
Source line: 0
        pushq   %rbp
        movq    %rsp, %rbp
Source line: 1
        subq    $32, %rsp
        movabsq $OpenClipboard, %rax
        xorl    %ecx, %ecx
        callq   *%rax
        addq    $32, %rsp
        popq    %rbp
        retq

Absolutely no idea either. That is the only change I have in my Make.user removing that takes the error away after a make clean && make

@yuyichao
Copy link
Contributor

yuyichao commented Mar 3, 2016

Is there a difference if you run output the llvm and native code for the non-threading version?

@mikewl mikewl changed the title Failiure in misc on master with threading enabled Failiure in misc on master Mar 3, 2016
@mikewl
Copy link
Contributor Author

mikewl commented Mar 3, 2016

Hmmm, not limited to threading. Disabled threading and tested just misc and am getting a similar error now.

julia> Base.runtests("misc")
     * misc                 ERROR: LoadError: LoadError: SystemError: OpenClipboard: No error
 [inlined code] from .\promotion.jl:185
 in clipboard(::ASCIIString) at .\interactiveutil.jl:132
 [inlined code] from K:\julia\usr\share\julia\test\misc.jl:384
 in anonymous at .\no file:4294967295
 in include(::UTF8String) at .\boot.jl:264
 in include_from_node1(::UTF8String) at .\loading.jl:417
 [inlined code] from .\util.jl:179
 in runtests(::UTF8String) at K:\julia\usr\share\julia\test\testdefs.jl:7
 in run_work_thunk(::Base.##247#248{##16#24,Tuple{UTF8String}}, ::Bool) at .\multi.jl:714
 in remotecall_fetch(::Any, ::LocalProcess, ::UTF8String, ::Vararg{UTF8String}) at .\multi.jl:787
 in remotecall_fetch(::Any, ::Int64, ::UTF8String, ::Vararg{UTF8String}) at .\multi.jl:803
 [inlined code] from K:\julia\usr\share\julia\test\runtests.jl:36
 in (::##15#23{Array{Any,1}})() at .\task.jl:431
while loading K:\julia\usr\share\julia\test\misc.jl, in expression starting on line 382
 in remotecall_fetch(::Any, ::LocalProcess, ::UTF8String, ::Vararg{UTF8String}) at .\multi.jl:788
 in remotecall_fetch(::Any, ::Int64, ::UTF8String, ::Vararg{UTF8String}) at .\multi.jl:803
 [inlined code] from K:\julia\usr\share\julia\test\runtests.jl:36
 in (::##15#23{Array{Any,1}})() at .\task.jl:431
 in sync_end() at .\task.jl:397
 [inlined code] from .\task.jl:406
 in (::##11#19)() at K:\julia\usr\share\julia\test\runtests.jl:31
 in cd(::##11#19, ::ASCIIString) at .\file.jl:58
 in include(::ASCIIString) at .\boot.jl:264
 in include_from_node1(::UTF8String) at .\loading.jl:417
 in process_options(::Base.JLOptions) at .\client.jl:262
 in _start() at .\client.jl:318
while loading K:\julia\usr\share\julia\test\runtests.jl, in expression starting on line 13
ERROR: A test has failed. Please submit a bug report (https://github.com/JuliaLang/julia/issues)
including error messages above and the output of versioninfo():
Julia Version 0.5.0-dev+2985
Commit d8ec4a7* (2016-03-03 01:09 UTC)
Platform Info:
  System: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.7.1

 in error(::ASCIIString) at .\error.jl:21
 in runtests(::ASCIIString, ::Int64) at .\interactiveutil.jl:420
 in runtests(::ASCIIString) at .\interactiveutil.jl:409
 in eval(::Module, ::Any) at .\boot.jl:267
julia> f() = ccall((:OpenClipboard, "user32"), stdcall, Cint, (Ptr{Void},), C_NULL)
f (generic function with 1 method)

julia> @code_llvm f()

; Function Attrs: uwtable
define i32 @julia_f_1404() #0 {
top:
  %0 = call x86_stdcallcc i32 inttoptr (i64 140734516732800 to i32 (i8*)*)(i8* null)
  ret i32 %0
}

julia> @code_native f()
        .text
Filename: none
Source line: 0
        pushq   %rbp
        movq    %rsp, %rbp
Source line: 1
        subq    $32, %rsp
        movabsq $OpenClipboard, %rax
        xorl    %ecx, %ecx
        callq   *%rax
        addq    $32, %rsp
        popq    %rbp
        retq

julia>

Going to run all tests again. See if the misc tests only pass under no threading and run all.

@mikewl
Copy link
Contributor Author

mikewl commented Mar 3, 2016

This time it failed with threading disabled and all tests ran. So it is intermittently passing.
Going to try compile under Cygwin instead and see if that makes a difference.
If it matters, using gcc 5.3.0 on msys2 right now.

@yuyichao yuyichao added the system:windows Affects only Windows label Mar 3, 2016
@mikewl
Copy link
Contributor Author

mikewl commented Mar 5, 2016

Could #15033 have possibly affected this?

OT: cygwin keeps on failing with:
cp: preserving permissions for '/cygdrive/d/julia/usr/bin': Invalid argument
This occurs as soon as building libuv. It was working before.

@tkelman
Copy link
Contributor

tkelman commented Mar 6, 2016

Maybe, can you bisect? What windows version are you on? I haven't seen this but I've been using windows 10 lately.

@mikewl
Copy link
Contributor Author

mikewl commented Mar 6, 2016

I am on windows 10. Not sure what is causing it. Will start a bisect in the morning.

@tkelman
Copy link
Contributor

tkelman commented Mar 6, 2016

The cygwin issue might be if you're running in a clone that wasn't downloaded by cygwin's git. Some of the new ACL permissions stuff in cygwin works differently for cygwin's git vs mingw git.

@mikewl
Copy link
Contributor Author

mikewl commented Mar 6, 2016

It was that it wasn't Cygwin's git thanks!

I did the bisect and I am going to do it again just to be sure but bisect gives:

54c3ffe571292e1ae5a04fb229f4e0edf2d9e0b6 is the first bad commit
commit 54c3ffe571292e1ae5a04fb229f4e0edf2d9e0b6
Author: Jeff Bezanson <[email protected]>
Date:   Mon Feb 29 18:19:17 2016 -0500

    put only values, instead of both names and values, in static parameter environments

    this is significantly simpler

:040000 040000 f83cdb5ed749c160d408b6c93f9770b9915c9d60 e86897a1a8b8f1fc8f8d5caabe7e6391e11d1ad9 M      base
:040000 040000 b5f1b455c51001127143b1e546d164726f288462 8c2e5b36d50459ae0143d8ad2fc8ab8dee0deaec M      src

I will redo bisect just in case.

@tkelman
Copy link
Contributor

tkelman commented Mar 6, 2016

If it's an intermittent failure, you may need to run the misc test 5
or 10 times before calling a commit good (with some probability)

@mikewl
Copy link
Contributor Author

mikewl commented Mar 6, 2016

I did it properly and got an amusing result:

6970fdaa09c0313221a9f9d22796ca16871502fa is the first bad commit
commit 6970fdaa09c0313221a9f9d22796ca16871502fa
Author: Stefan Karpinski <[email protected]>
Date:   Thu Feb 18 17:11:20 2016 -0500

    clipboard: add some basic tests (OS X & Windows)

:040000 040000 e93b3675683b399ce4f9f992e99e9c45befc7f30 c601d5730a24d717053fa2ef288ae9311b58498b M      test

Will continue tomorrow with including the misc tests manually.

@tkelman
Copy link
Contributor

tkelman commented Mar 6, 2016

d'oh, should've seen that coming! whoops

@StefanKarpinski
Copy link
Sponsor Member

Maybe those clipboard tests are just too problematic and should be disabled entirely?

@tkelman
Copy link
Contributor

tkelman commented Mar 7, 2016

Maybe. Worth figuring out why they're so problematic though.

@StefanKarpinski
Copy link
Sponsor Member

My guess is that it's an interactive feature that's likely to be unsupported on pure server systems.

@tkelman
Copy link
Contributor

tkelman commented Mar 7, 2016

Does apple even have a "pure server" variant of os x any more? Their man page for pbcopy didn't indicate any obvious restrictions. And this issue is on Windows, still not clear why me and appveyor see different behavior than @Mike43110

@vtjnash
Copy link
Sponsor Member

vtjnash commented Mar 7, 2016

don't be fooled by the pretty gui, underneath it is still unix. it's not hard to make it fail, all you need is an account without a running quartz server:

$ echo foobar | sudo -u macports pbcopy
2016-03-07 00:09:00.883 pbcopy[19638:16810165] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data

@tkelman
Copy link
Contributor

tkelman commented Mar 7, 2016

Ah. Sure would've been useful for the man page to mention that.

@StefanKarpinski
Copy link
Sponsor Member

So I guess we should check for a running quartz server before running these tests?

@vtjnash vtjnash added the error handling Handling of exceptions by Julia or the user label Mar 8, 2016
@vtjnash vtjnash added the bug Indicates an unexpected problem or unintended behavior label Mar 8, 2016
@vtjnash
Copy link
Sponsor Member

vtjnash commented Mar 8, 2016

marking as a windows error handling bug since it is printing the wrong error code.

@tkelman
Copy link
Contributor

tkelman commented Mar 8, 2016

Possibly related to #15117 where the wrong error was being reported?

@vtjnash vtjnash removed the bug Indicates an unexpected problem or unintended behavior label Jul 20, 2016
@musm
Copy link
Contributor

musm commented Aug 24, 2020

stale

@musm musm closed this as completed Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error handling Handling of exceptions by Julia or the user system:windows Affects only Windows
Projects
None yet
Development

No branches or pull requests

6 participants