JuliaLang / julia

The Julia Programming Language
https://julialang.org/
MIT License
45.71k stars 5.49k forks source link

Wine tracking issue #43568

Open Keno opened 2 years ago

Keno commented 2 years ago

There has been some recent interest in making sure that julia works properly on wine. Unfortunately, there is currently a large number of issues that will take some time to even root cause, so I'm opening this issue to track all the issues I know about and then once I (or someone else) gets around to root causing them, we'll get a separate issue opened for each underlying cause:

This is all on wine master plus my patch in #43566.

2340:fixme:process:NtQueryInformationProcess (process=0xffffffffffffffff) Unimplemented information class: ProcessConsoleHostProcess 2328:fixme:sync:GetNamedPipeHandleStateW 00000000000000B8 0000000000C3FB98 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0: semi-stub Expression: occursin("f28442", output[5]) BoundsError: attempt to access 4-element Vector{SubString{String}} at index [5] Stacktrace: [1] getindex(A::Vector{SubString{String}}, i1::Int64) @ Base .\array.jl:921 Error During Test at Z:\home\keno\julia-mywin\test\errorshow.jl:668 Test threw exception Expression: occursin("the last 2 lines are repeated 5000 more times", output[7]) BoundsError: attempt to access 4-element Vector{SubString{String}} at index [7] Stacktrace: [1] getindex(A::Vector{SubString{String}}, i1::Int64) @ Base .\array.jl:921 Error During Test at Z:\home\keno\julia-mywin\test\errorshow.jl:669 Test threw exception Expression: (lstrip(output[8]))[1:7] == "[10003]" BoundsError: attempt to access 4-element Vector{SubString{String}} at index [8] Stacktrace: [1] getindex(A::Vector{SubString{String}}, i1::Int64) @ Base .\array.jl:921 Test Failed at Z:\home\keno\julia-mywin\test\errorshow.jl:766 Expression: contains(bt_str, "f(x::Float64; y::Float64)") Evaluated: contains("\nStacktrace:\n [1] error()\n @ Base .\error.jl:42", "f(x::Float64; y::Float64)") Test Failed2330:err:winediag:ntlm_check_version ntlm_auth was not found or is outdated. Make sure that ntlm_auth >= 3.0.25 is in your path. Usually, you can find it in the winbind package of your distribution. 2330:err:ntlm:ntlm_LsaApInitializePackage no NTLM support, expect problems at Z:\home\keno\julia-mywin\test\errorshow.jl:767 Expression: contains(bt_str, "@ $(m).B.C") Evaluated: contains("\nStacktrace:\n [1] error()\n @ Base .\error.jl:42", "@ Main.Test40Main_errorshow.B.C") Test Failed at Z:\home\keno\julia-mywin\test\errorshow.jl:768 Expression: contains(bt_str, "@ $(m).B.D") Evaluated: contains("\nStacktrace:\n [1] error()\n @ Base .\error.jl:42", "@ Main.Test40Main_errorshow.B.D")

- [ ] misc test fails

misc (11) | failed at 2021-12-27T12:14:33.795 Error During Test at 1d44:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION Z:\home\keno\julia-mywin\test\testdefs.jl:21 Got exception outside of a @test LoadError: Deprecation test failed, cmd : 'Z:\home\keno\julia-mywin\usr\bin\julia.exe' -Cnative '-JZ:\home\keno\julia-mywin\usr\lib\julia\sys.dll' -g1 --startup-file=no --check-bounds =yes --startup-file=no --depwarn=yes deprecation_exec.jl Stacktrace: [1] top-level scope @ Z:\home\keno\julia-mywin\test\misc.jl:888 [2] include @ .\Base.jl:414 [inlined] [3] macro expansion @ Z:\home\keno\julia-mywin\test\testdefs.jl:24 [inlined] [4] macro expansion @ Z:\home\keno\julia-mywin\usr\share\julia\stdlib\v1.8\Test\src\Test.jl:1375 [inlined] [5] macro expansion @ Z:\home\keno\julia-mywin\test\testdefs.jl:23 [inlined] [6] macro expansion @ .\timing.jl:439 [inlined] [7] runtests(name::String, path::String, isolate::Bool; seed::UInt128) @ Main Z:\home\keno\julia-mywin\test\testdefs.jl:21 in expression starting at Z:\home\keno\julia-mywin\test\misc.jl:884

- [ ] ArgTools test fails

ArgTools (31) | failed at 2021-12-27T12:15:27.364 Error During Test at Z:\home\keno\julia-mywin\usr\share\julia\stdlib\v1.8\ArgTools\test\runtests.jl:46 Test threw exception Expression: dst == send_data(src, dst) IOError: could not spawn tee 'C:\users\keno\Temp\jl_l8tw93EppG': no such file or directory (ENOENT) Stacktrace: [1] open(::Main.Test6Main_ArgTools.var"#2#4"{IOStream}, ::Cmd; kwargs::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:write,), Tuple{Bool}}}) @ Base .\process.jl:391 Error During Test at Z:\home\keno\julia-mywin\usr\share\julia\stdlib\v1.8\ArgTools\test\runtests.jl:48 Test threw exception Expression: data == read(dst_file) SystemError: opening file "C:\users\keno\Temp\jl_l8tw93EppG": No such file or directory1e28:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION

Stacktrace: [1] open @ .\io.jl:382 [inlined] [2] read @ .\io.jl:460 [inlined]1e1c:fixme:advapi:SetEntriesInAclW unhandled access mode 4

- [ ] LibCurl test fails

LibCURL (19) | failed at 2021-12-27T12:15:38.243 Error During Test at Z:\home\keno\julia-mywin\usr\share\julia\stdlib\v1.8\LibCURL\test\runtests.jl:43 Got exception outside of a @test IOError: could not spawn curl -s -S -g -L -f -o 'C:\users\keno\Temp\jl_LBtm7O\README.md' https://github.com/JuliaWeb/LibCURL.jl/blob/master/README.md: no such file or directory (ENOE NT) Stacktrace: [1] run(::Cmd) @ Base .\process.jl:442

- [ ] Logging test fails

Logging (44) | failed at 2021-12-27T12:15:45.102 Test Failed at Z:\home\keno\julia-mywin\usr\share\julia\stdlib\v1.8\Logging\test\runtests.jl:201 Expression: startswith(genmsg("msg", exception = (DivideError(), bt)), "┌ PREFIX msg\n│ exception =\n│ DivideError: integer division error\n│ Stacktrace:\n│ [1] func1()") Evaluated: startswith("┌ PREFIX msg\n│ exception =\n│ DivideError: integer division error\n│ Stacktrace:\n│ [1] func1()\n│ @ Main.Test9Main_Logging Z:\home\keno\j ulia-mywin\usr\share\julia\stdlib\v1.8\Logging\test\runtests.jl:7\n└ SUFFIX\n", "┌ PREFIX msg\n│ exception =\n│ DivideError: integer division error\n│ Stacktrace:\n│ [1] func1()")

- [ ] FileWatching test fails with many errors
- [x] SparseArrays/sparsevector test segfaults (#43570)
- [ ] Tar test is missing utilities
- [ ] REPL test fails

REPL (51) | failed at 2021-12-27T12:16:58.013 Test Failed at Z:\home\keno\julia-mywin\usr\share\julia\stdlib\v1.8\REPL\test\repl.jl:213 Expression: startswith(s, "\e[0mERROR: unterminated single quote\nStacktrace:\n [1] ") || startswith(s, "\e[0m\e[1m\e[91mERROR: \e[39m\e[22m\e[91munterminated single quote\e[39m\nStac ktrace:\n [1] ") Test Failed at Z:\home\keno\julia-mywin\usr\share\julia\stdlib\v1.8\REPL\test\repl.jl:1384 Expression: readline(stdout_read) == "" Evaluated: "Stacktrace:" == "" Test Failed at Z:\home\keno\julia-mywin\usr\share\julia\stdlib\v1.8\REPL\test\repl.jl:1389 Expression: readline(stdout_read) == "\e[0m" Evaluated: "\e[0m1-element ExceptionStack:" == "\e[0m"

- [ ] Downloads test is missing utilities
- [ ] cmdlineargs test fails

cmdlineargs (39) | failed at 2021-12-27T12:21:13.315 Test Failed at Z:\home\keno\julia-mywin\test\cmdlineargs.jl:121 Expression: Base.VERSION_STRING == chomp(v) Evaluated: "1.8.0-DEV" == "" Test Failed at Z:\home\keno\julia-mywin\test\cmdlineargs.jl:127 Expression: startswith(read($exename -h, String), header) Evaluated: startswith("", "julia [switches] -- [programfile] [args...]") Test Failed at Z:\home\keno\julia-mywin\test\cmdlineargs.jl:128 Expression: startswith(read($exename --help, String), header) Evaluated: startswith("", "julia [switches] -- [programfile] [args...]") Test Failed at Z:\home\keno\julia-mywin\test\cmdlineargs.jl:575 Expression: readchomperrors($exename --startup-file=no --compile=yes -ioo) == (false, "", "ERROR: unknown option -o") Evaluated: (false, "", "") == (false, "", "ERROR: unknown option -o") Test Failed at Z:\home\keno\julia-mywin\test\cmdlineargs.jl:577 Expression: readchomperrors($exename --startup-file=no -p) == (false, "", "ERROR: option -p/--procs is missing an argument") Evaluated: (false, "", "") == (false, "", "ERROR: option -p/--procs is missing an argument") Test Failed at Z:\home\keno\julia-mywin\test\cmdlineargs.jl:579 Expression: readchomperrors($exename --startup-file=no --inline) == (false, "", "ERROR: option --inline is missing an argument") Evaluated: (false, "", "") == (false, "", "ERROR: option --inline is missing an argument") Test Failed at Z:\home\keno\julia-mywin\test\cmdlineargs.jl:581 Expression: readchomperrors($exename --startup-file=no -e "@show ARGS" -now -- julia RUN.jl) == (false, "", "ERROR: unknown option -n") Evaluated: (false, "", "") == (false, "", "ERROR: unknown option -n") Test Failed at Z:\home\keno\julia-mywin\test\cmdlineargs.jl:673 Expression: readchomperrors($(joinpath(Sys.BINDIR, Base.julia_exename())) -Cnative --lisp) == (false, "", "ERROR: --lisp must be specified as the first argument") Evaluated: (false, "", "") == (false, "", "ERROR: --lisp must be specified as the first argument")


- [x] LinearAlgebra/triangular segfaults (#43583)
- [x] Sockets segfaults (#43570)
Keno commented 2 years ago

So to summarize, I think there's three broad classes of issues:

My plan is to pretty much go in that order, since I've seen other segfaults reported also, so hopefully by going through the segfaults we can start collecting any segfault reports and seeing if we got them all.

Keno commented 2 years ago

Looks like the segfaults are all fixed by #43570.

Keno commented 2 years ago

Scratch that - LinearAlgebra/triangular still segfaults

ven-k commented 2 years ago

With Julia Version 1.7.3-pre.6-win64 Commit 482eb3ceaf (2022-02-15 13:48 UTC) and Wine_jll

# On a 1.7.3-pre.6-linux64 (482eb3ceaf commit)
julia> using Wine_jll: win64
julia> ENV["JULIA_DEPOT_PATH"]="wine_depot"
julia> run($(win64()) JULIA_EXE_PATH) # JULIA_EXE_PATH is the v1.7.3-pre.6-win64

I get

julia> using CPUSummary
[ Info: Precompiling CPUSummary [2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9]
****************************************************************************
* hwloc 2.7.0 received invalid information from the operating system.
*
* Failed with: intersection without inclusion
* while inserting L1d (cpuset 0x006c6c64,0x2e32336e,,,,,,,,,0x006c6c64,0x2e33345f,,,0x006c6c64,0x03000000,,,,,0x006c6c64,0x2e38335f,,,0x006c6c64,0x00000002,,,,,0x006c6c64,0x2e33335f,,,0x006c6c64,0x00000001,,,,,,,,,0x006c6c64,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,Package (cpuset 0xffffffff) at Package (cpuset 0xffffffff)
* coming from: windows:GetLogicalProcessorInformationEx
*
* The following FAQ entry in the hwloc documentation may help:
*   What should I do when hwloc reports "operating system" warnings?
* Otherwise please report this error message to the hwloc user's mailing list,
* along with any relevant topology information from your platform.
*
* hwloc will now ignore this invalid topology information and continue.
****************************************************************************
julia> using LLVM
┌ Warning: You are using a version of Julia that links against a build of LLVM with assertions enabled.
│
│ This is not supported out-of-the-box, and you need a build of libLLVMExtra that supports this.
│ Use `deps/build_local.jl` for that, add the resulting LocalPreferences.toml to your project
│ and add a direct dependency on LLVMExtra_jll to pick up those preferences.
└ @ LLVM.API Z:\home\ven-k\nightly\v1.7\wine-depot\packages\LLVM\vQ98J\src\LLVM.jl:53

However these issues aren't present natively on Julia Version 1.7.3-pre.6-win64

vtjnash commented 2 years ago

You need to use a compatible copy of Julia (e.g. from julialangnightlies/bin/winnt/x64/julia-latest-win64.zip) for LLVM. The hwloc error looks like a problem with CPUSummary running code during precompile that it should not be doing, but also looks non-fatal here.