Git Product home page Git Product logo

bugreporting.jl's People

Contributors

anandijain avatar dependabot[bot] avatar dilumaluthge avatar fingolfin avatar giordano avatar github-actions[bot] avatar keno avatar liozou avatar maleadt avatar mattbrzezinski avatar simeonschaub avatar staticfloat avatar stefankarpinski avatar timholy avatar tkf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bugreporting.jl's Issues

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Check `/proc/sys/kernel/perf_event_paranoid` before starting `rr`?

I often forget running sudo sysctl kernel.perf_event_paranoid=1 before starting the bug-report session and get

[ Info: Loading BugReporting package...
rr needs /proc/sys/kernel/perf_event_paranoid <= 1, but it is 2.
Change it to 1, or use 'rr record -n' (slow).
Consider putting 'kernel.perf_event_paranoid = 1' in /etc/sysctl.conf
[ Info: Preparing trace directory for upload (if your trace is large this may take a few minutes)
...

The error message from rr is a bit hard see when it's followed by other message from BugReporting.jl since BugReporting.jl will try to upload the empty trace directory.

Maybe it makes sense to check /proc/sys/kernel/perf_event_paranoid before starting rr?

Missing symbols with replay from PkgEval trace; needs --serve-files

With PkgEval now producing rr traces, I tried replaying one (leading to a segfault), but the backtraces are completely unhelpful:

Thread 1 received signal SIGSEGV, Segmentation fault.
0x00007f40c60e3f71 in ?? ()
(rr) bt
#0  0x00007f40c60e3f71 in ?? ()
#1  0x00000000000000cc in ?? ()
#2  0x00007fffeebdba20 in ?? ()
#3  0x00007f407438d150 in ?? ()
#4  0x00007f407438d190 in ?? ()
#5  0x00007f407438d410 in ?? ()
#6  0x000000000145ac40 in ?? ()
#7  0x00007f4000008001 in ?? ()
#8  0x000000000145ac40 in ?? ()
#9  0x00007f40bc93ccd0 in ?? ()
#10 0x00007f40bc93ccf8 in ?? ()
#11 0x00007f40bc93cd00 in ?? ()
#12 0x0000000000000001 in ?? ()
#13 0x0000000000000004 in ?? ()
#14 0x00007f40c6982ff6 in ?? ()
#15 0x00007fffeebdb850 in ?? ()
#16 0x000000000145ac40 in ?? ()
#17 0x00007f4073cef260 in ?? ()
#18 0x000000000145ac40 in ?? ()
#19 0x0000000001858f58 in ?? ()
#20 0x0000000000000000 in ?? ()

This due to the loaded shared libraries being missing:

(rr) info sharedlibrary
warning: .dynamic section for "/lib/x86_64-linux-gnu/libpthread.so.0" is not at the expected address (wrong library or version mismatch?)
warning: Could not load shared library symbols for 34 libraries, e.g. /home/pkgeval/.julia/artifacts/545b03fb120d861668ae604d739b52db2b343ebc/bin/../lib/rr/librrpreload.so.
Use the "info sharedlibrary" command to see the complete listing.
Do you need "set solib-search-path" or "set sysroot"?
From                To                  Syms Read   Shared Object Library
0x00007f40c6a7bf10  0x00007f40c6a9c550  Yes (*)     /lib64/ld-linux-x86-64.so.2
                                        No          /home/pkgeval/.julia/artifacts/545b03fb120d861668ae604d739b52db2b343ebc/bin/../lib/rr/librrpreload.so
0x00007f40c685fe50  0x00007f40c6860bee  No          /lib/x86_64-linux-gnu/libdl.so.2
0x00007f40c6844bc8  0x00007f40c6853209  No          /lib/x86_64-linux-gnu/libpthread.so.0
0x00007f40c666d360  0x00007f40c67e5afc  No          /lib/x86_64-linux-gnu/libc.so.6
                                        No          /opt/julia/bin/../lib/libjulia.so.1
                                        No          /opt/julia/bin/../lib/julia/libgcc_s.so.1
                                        No          /opt/julia/bin/../lib/julia/libopenlibm.so
                                        No          /opt/julia/bin/../lib/julia/libjulia-internal.so.1
                                        No          /opt/julia/bin/../lib/julia/libunwind.so.8
0x00007f40c5c13200  0x00007f40c5c1670c  No          /lib/x86_64-linux-gnu/librt.so.1
                                        No          /opt/julia/bin/../lib/julia/libz.so.1
                                        No          /opt/julia/bin/../lib/julia/libatomic.so.1
                                        No          /opt/julia/bin/../lib/julia/libstdc++.so.6
0x00007f40c5643a80  0x00007f40c57021d5  No          /lib/x86_64-linux-gnu/libm.so.6
                                        No          /opt/julia/bin/../lib/julia/libjulia-codegen.so.1
                                        No          /opt/julia/bin/../lib/julia/libLLVM-14jl.so
                                        No          /opt/julia/lib/julia/sys.so
                                        No          /opt/julia/bin/../lib/julia/libpcre2-8.so
                                        No          /opt/julia/bin/../lib/julia/libgmp.so
                                        No          /opt/julia/bin/../lib/julia/libmpfr.so
                                        No          /opt/julia/bin/../lib/julia/libgfortran.so.5
                                        No          /opt/julia/bin/../lib/julia/libquadmath.so.0
                                        No          /opt/julia/bin/../lib/julia/libgomp.so.1
                                        No          /opt/julia/bin/../lib/julia/libopenblas64_.so
                                        No          /opt/julia/bin/../lib/julia/libblastrampoline.so
                                        No          /opt/julia/bin/../lib/julia/libnghttp2.so.14
                                        No          /opt/julia/bin/../lib/julia/libcurl.so
                                        No          /opt/julia/bin/../lib/julia/libssh2.so.1
                                        No          /opt/julia/bin/../lib/julia/libmbedtls.so.14
                                        No          /opt/julia/bin/../lib/julia/libmbedx509.so.1
                                        No          /opt/julia/bin/../lib/julia/libmbedcrypto.so.7
                                        No          /opt/julia/bin/../lib/julia/libcholmod.so
                                        No          /opt/julia/bin/../lib/julia/libamd.so.2
                                        No          /opt/julia/bin/../lib/julia/libcolamd.so.2
                                        No          /opt/julia/bin/../lib/julia/libsuitesparseconfig.so.5
                                        No          /opt/julia/bin/../lib/julia/libccolamd.so.2
                                        No          /opt/julia/bin/../lib/julia/libcamd.so.2
                                        No          /home/pkgeval/.julia/artifacts/abf4b5086b4eb867021118c85b2cc11a15b764a9/lib/libopenspecfun.so
                                        No          /home/pkgeval/.julia/artifacts/9a817fe95402e93afa0a95dca247685f61b16664/lib/libRmath-julia.so
(*): Shared library is missing debugging information.

Note that PkgEval mounts Julia at /opt/julia, so this obviously doesn't exist on the host.

Replaying with --serve-files fixes this, but slows down the process a bit. @Keno I don't understand how we can ever run without it though, unless I'm missing something?

call to probe_platform_engines! will break in Julia 1.8

JuliaLang/Pkg.jl#2641 deletes the internal probe_platform_engines! which this package calls. This has been a no-op for since Julia 1.6: you can now just download stuff without calling that. As a result:

  • Old versions of this package will break with Julia 1.8, so they will need to be capped in the registry
  • To support both Julia ≤ 1.5 and ≥ 1.6 at the same time, check if the function exists before calling it
  • To support only Julia ≥ 1.6 you can simply delete the call to probe_platform_engines!

EOFError on upload

I'm getting an EOFError trying to upload an ~120MB pack to S3, on v0.1.6:

julia> make_interactive_report("rr")
rr: Saving execution to trace directory `/home/tim/Julia/depot/artifacts/jl_S15ZK1/julia-0'.
...
[ Info: Preparing trace directory for upload (if your trace is large this may take a few minutes)
rr: Packed trace directory `/home/tim/Julia/depot/artifacts/jl_S15ZK1/julia-0'.
rr: Packed trace directory `/home/tim/Julia/depot/artifacts/e2c59c7acbf3db385ef37c9f73c94a14f4d57c55/julia-0'.

### IMPORTANT =============================================================
You are about to upload a trace directory to a publicly accessible location.
Such traces contain any information that was accessed by the traced
executable during its execution. This includes any code loaded, any
secrets entered, the contents of any configuration files, etc.
DO NOT proceed, if you do not wish to make this information publicly available.
By proceeding you explicitly agree to waive any privacy interest in the
uploaded information.
### =======================================================================

To upload a trace, please authenticate, by visiting:

	https://github.com/login/oauth/authorize?client_id=Iv1.c29a629771fe63c4&state=VkGTBd7XIAMCJvA%3D

You can cancel upload by `Ctrl-C`.

[ Info: Uploading Trace directory
IOError(EOFError() during request(https://s3.us-east-1.amazonaws.com/julialang-dumps/reports/2022-07-20T11-43-57-maleadt.tar.zst?uploadId=lxuR32nuZpvXsTD881lbryrQBXlE2.ncdwEDaBG5_8Uz76rUIaiJgkcn.5xG4WxetPZ9l5j.fv2R6PPWvpsoQtuM2xKprTXdfnWmh3ckib.2eny.3k6nBf_rTatIjxoF))
Uploaded to https://s3.amazonaws.com/julialang-dumps/reports/2022-07-20T11-43-57-maleadt.tar.zst

Versions of deps:

(BugReporting) pkg> st
Project BugReporting v0.1.6
Status `~/Julia/pkg/BugReporting/Project.toml`
⌃ [fbe9abb3] AWS v1.75.1
⌅ [1c724243] AWSS3 v0.8.9
⌅ [cd3eb016] HTTP v0.9.17
  [682c06a0] JSON v0.21.3
  [3161d3a3] Zstd_jll v1.5.2+0
  [e86bdf43] rr_jll v5.5.0+5
  [44cfe95a] Pkg v1.8.0
  [a4e569a6] Tar v1.10.0

JULIA_RR_RECORD_ARGS=-n not effective

$ JULIA_RR_RECORD_ARGS=-n julia --startup-file=no
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.7.1 (2021-12-22)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using BugReporting

julia> BugReporting.global_record_flags
String[]

This line https://github.com/JuliaLang/BugReporting.jl/blob/v0.1.6/src/BugReporting.jl#L335 does not change the value of global_record_flags unless I put a global in front of it (or some other fix).

Feature request: set a timeout with `--bug-report-timeout-minutes=N`

Currently, julia --bug-report=rr works very well if the problem involves an assertion failing, an exception being thrown, a segmentation fault, a signal being raised, or Julia crashing.

However, it doesn't work well if the problem is that Julia hangs indefinitely.

Could we have an option of the form julia --bug-report=rr --bug-report-timeout-minutes=360? Then, if the Julia session has not exited after 360 minutes, rr will forcibly kill the process and upload the trace.

We already have this functionality for Base Julia CI, but it would be nice to make it more easily accessible to users.

Reporting loaded modules/current manifest

It might be very helpful to include in the upload a Manifest showing all the artifacts/packages reachable by the code that ran. While detecting activate() invocations in arbitrary julia code that might crash may not be easy, we can probably rely on most users that are using --bug-report=rr to also provide a --project if they're submitting something nicely-formed, so we can just snarf that at InteractiveUtils.report_bug() time, before we pass it off to the child Julia process.

Precompiling GDB_jll fails due to differing ABI versions of libcrypt.so.x

On a relatively up-to-date installation of Arch:

$ uname -a
Linux berlin 5.19.7-arch1-1 #1 SMP PREEMPT_DYNAMIC Mon, 05 Sep 2022 18:09:09 +0000 x86_64 GNU/Linux

$ yay -Qo /usr/lib/libcrypt.so.2
/usr/lib/libcrypt.so.2 is owned by libxcrypt 4.4.28-2

$ julia --project=.
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.8.1 (2022-09-06)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(test-bug) pkg> add BugReporting
    Updating registry at `~/.julia/registries/General`
    Updating git-repo `https://github.com/JuliaRegistries/General.git`
   Resolving package versions...
   Installed Scratch ───────────── v1.1.1
   Installed XML2_jll ──────────── v2.9.14+0
   Installed EzXML ─────────────── v1.1.0
   Installed fts_jll ───────────── v1.2.7+1
   Installed JSON ──────────────── v0.21.3
   Installed GDB_jll ───────────── v12.1.0+0
   Installed Gettext_jll ───────── v0.21.0+0
   Installed SodiumSeal ────────── v0.1.1
   Installed Preferences ───────── v1.3.0
   Installed Zstd_jll ──────────── v1.5.2+0
   Installed Expat_jll ─────────── v2.4.8+0
   Installed OpenSSL_jll ───────── v1.1.17+0
   Installed Mocking ───────────── v0.7.3
   Installed LoggingExtras ─────── v0.4.9
   Installed XMLDict ───────────── v0.4.1
   Installed IterTools ─────────── v1.4.0
   Installed Bzip2_jll ─────────── v1.0.8+0
   Installed Parsers ───────────── v2.4.0
   Installed SimpleBufferStream ── v1.1.0
   Installed ArrowTypes ────────── v1.2.1
   Installed Git_jll ───────────── v2.34.1+0
   Installed Python_jll ────────── v3.8.8+2
   Installed XZ_jll ────────────── v5.2.5+2
   Installed ProgressMeter ─────── v1.7.2
   Installed JLLWrappers ───────── v1.4.1
   Installed Retry ─────────────── v0.4.1
   Installed argp_standalone_jll ─ v1.3.1+0
   Installed Libiconv_jll ──────── v1.16.1+1
   Installed Libffi_jll ────────── v3.2.2+1
   Installed IniFile ───────────── v0.5.1
   Installed URIs ──────────────── v1.4.0
   Installed BugReporting ──────── v0.2.7
   Installed AWSS3 ─────────────── v0.9.8
   Installed TranscodingStreams ── v0.9.9
   Installed Elfutils_jll ──────── v0.182.0+1
   Installed libsodium_jll ─────── v1.0.20+0
   Installed rr_jll ────────────── v5.5.0+6
   Installed FilePathsBase ─────── v0.9.15
   Installed HTTP ──────────────── v1.3.3
   Installed SymDict ───────────── v0.3.0
   Installed Compat ────────────── v3.46.0
   Installed ExprTools ─────────── v0.1.8
   Installed MbedTLS ───────────── v1.1.5
   Installed CodecZlib ─────────── v0.7.0
   Installed Git ───────────────── v1.2.1
   Installed obstack_jll ───────── v1.2.2+0
   Installed GitHub ────────────── v5.7.3
   Installed AWS ───────────────── v1.76.1
  Downloaded artifact: XML2
  Downloaded artifact: fts
  Downloaded artifact: GDB
  Downloaded artifact: Gettext
  Downloaded artifact: Zstd
  Downloaded artifact: Expat
  Downloaded artifact: OpenSSL
  Downloaded artifact: Bzip2
  Downloaded artifact: Python
  Downloaded artifact: XZ
  Downloaded artifact: Git
  Downloaded artifact: Libiconv
  Downloaded artifact: Libffi
  Downloaded artifact: Elfutils
  Downloaded artifact: rr
  Downloaded artifact: libsodium
  Downloaded artifact: obstack
    Updating `/tmp/test-bug/Project.toml`
  [bcf9a6e7] + BugReporting v0.2.7
    Updating `/tmp/test-bug/Manifest.toml`
  [fbe9abb3] + AWS v1.76.1
⌅ [1c724243] + AWSS3 v0.9.8
⌅ [31f734f8] + ArrowTypes v1.2.1
  [bcf9a6e7] + BugReporting v0.2.7
  [944b1d66] + CodecZlib v0.7.0
⌅ [34da2185] + Compat v3.46.0
  [e2ba6199] + ExprTools v0.1.8
  [8f5d6c58] + EzXML v1.1.0
⌅ [48062228] + FilePathsBase v0.9.15
  [d7ba0133] + Git v1.2.1
  [bc5e4493] + GitHub v5.7.3
  [cd3eb016] + HTTP v1.3.3
  [83e8ac13] + IniFile v0.5.1
  [c8e1da08] + IterTools v1.4.0
  [692b3bcd] + JLLWrappers v1.4.1
  [682c06a0] + JSON v0.21.3
  [e6f89c97] + LoggingExtras v0.4.9
  [739be429] + MbedTLS v1.1.5
  [78c3b35d] + Mocking v0.7.3
  [bac558e1] + OrderedCollections v1.4.1
  [69de0a69] + Parsers v2.4.0
  [21216c6a] + Preferences v1.3.0
  [92933f4c] + ProgressMeter v1.7.2
  [20febd7b] + Retry v0.4.1
  [6c6a2e73] + Scratch v1.1.1
  [777ac1f9] + SimpleBufferStream v1.1.0
  [2133526b] + SodiumSeal v0.1.1
  [2da68c74] + SymDict v0.3.0
  [3bb67fe8] + TranscodingStreams v0.9.9
  [5c2747f8] + URIs v1.4.0
  [228000da] + XMLDict v0.4.1
  [6e34b625] + Bzip2_jll v1.0.8+0
  [ab5a07f8] + Elfutils_jll v0.182.0+1
  [2e619515] + Expat_jll v2.4.8+0
  [a8b33d9f] + GDB_jll v12.1.0+0
  [78b55507] + Gettext_jll v0.21.0+0
  [f8c6e375] + Git_jll v2.34.1+0
  [e9f186c6] + Libffi_jll v3.2.2+1
  [94ce4f54] + Libiconv_jll v1.16.1+1
  [458c3c95] + OpenSSL_jll v1.1.17+0
  [93d3a430] + Python_jll v3.8.8+2
  [02c8fc9c] + XML2_jll v2.9.14+0
  [ffd25f8a] + XZ_jll v5.2.5+2
  [3161d3a3] + Zstd_jll v1.5.2+0
  [c53206cc] + argp_standalone_jll v1.3.1+0
  [d65627f6] + fts_jll v1.2.7+1
  [a9144af2] + libsodium_jll v1.0.20+0
  [c88a4935] + obstack_jll v1.2.2+0
  [e86bdf43] + rr_jll v5.5.0+6
  [0dad84c5] + ArgTools v1.1.1
  [56f22d72] + Artifacts
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [8bb1440f] + DelimitedFiles
  [8ba89e20] + Distributed
  [f43a241f] + Downloads v1.6.0
  [7b1f6079] + FileWatching
  [b77e0a4c] + InteractiveUtils
  [b27032c2] + LibCURL v0.6.3
  [76f85450] + LibGit2
  [8f399da3] + Libdl
  [37e2e46d] + LinearAlgebra
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [a63ad114] + Mmap
  [ca575930] + NetworkOptions v1.2.0
  [44cfe95a] + Pkg v1.8.0
  [de0858da] + Printf
  [3fa0cd96] + REPL
  [9a3f8284] + Random
  [ea8e919c] + SHA v0.7.0
  [9e88b42a] + Serialization
  [1a1011a3] + SharedArrays
  [6462fe0b] + Sockets
  [2f01184e] + SparseArrays
  [10745b16] + Statistics
  [fa267f1f] + TOML v1.0.0
  [a4e569a6] + Tar v1.10.0
  [8dfed614] + Test
  [cf7118a7] + UUIDs
  [4ec0a83e] + Unicode
  [e66e0078] + CompilerSupportLibraries_jll v0.5.2+0
  [781609d7] + GMP_jll v6.2.1+2
  [deac9b47] + LibCURL_jll v7.84.0+0
  [29816b5a] + LibSSH2_jll v1.10.2+0
  [c8ffd9c3] + MbedTLS_jll v2.28.0+0
  [14a3606d] + MozillaCACerts_jll v2022.2.1
  [4536629a] + OpenBLAS_jll v0.3.20+0
  [efcefdf7] + PCRE2_jll v10.40.0+0
  [83775a58] + Zlib_jll v1.2.12+3
  [8e850b90] + libblastrampoline_jll v5.1.1+0
  [8e850ede] + nghttp2_jll v1.48.0+0
  [3f19e933] + p7zip_jll v17.4.0+0
        Info Packages marked with ⌅ have new versions available but cannot be upgraded. To see why use `status --outdated -m`
Precompiling project...
  ✗ GDB_jll
  ✗ BugReporting
  55 dependencies successfully precompiled in 13 seconds
  2 dependencies errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the packages

julia> import Pkg; Pkg.precompile()
Precompiling project...
  ✗ GDB_jll
  ✗ BugReporting
  0 dependencies successfully precompiled in 3 seconds. 55 already precompiled.

ERROR: The following 1 direct dependency failed to precompile:

BugReporting [bcf9a6e7-4020-453c-b88e-690564246bb8]

Failed to precompile BugReporting [bcf9a6e7-4020-453c-b88e-690564246bb8] to /home/jagot/.julia/compiled/v1.8/BugReporting/jl_y129g2.
ERROR: LoadError: InitError: could not load library "/home/jagot/.julia/artifacts/ddec5e99d3d6759aa3cf2485d40807c90e378947/lib/libpython3.8.so"
libcrypt.so.1: cannot open shared object file: No such file or directory
Stacktrace:
  [1] dlopen(s::String, flags::UInt32; throw_error::Bool)
    @ Base.Libc.Libdl ./libdl.jl:117
  [2] dlopen(s::String, flags::UInt32)
    @ Base.Libc.Libdl ./libdl.jl:116
  [3] macro expansion
    @ ~/.julia/packages/JLLWrappers/QpMQW/src/products/library_generators.jl:54 [inlined]
  [4] __init__()
    @ Python_jll ~/.julia/packages/Python_jll/k0o3x/src/wrappers/x86_64-linux-gnu.jl:15
  [5] _include_from_serialized(pkg::Base.PkgId, path::String, depmods::Vector{Any})
    @ Base ./loading.jl:831
  [6] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt64)
    @ Base ./loading.jl:1039
  [7] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1315
  [8] _require_prelocked(uuidkey::Base.PkgId)
    @ Base ./loading.jl:1200
  [9] macro expansion
    @ ./loading.jl:1180 [inlined]
 [10] macro expansion
    @ ./lock.jl:223 [inlined]
 [11] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1144
 [12] include(mod::Module, _path::String)
    @ Base ./Base.jl:419
 [13] top-level scope
    @ ~/.julia/packages/JLLWrappers/QpMQW/src/toplevel_generators.jl:188
 [14] include
    @ ./Base.jl:419 [inlined]
 [15] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
    @ Base ./loading.jl:1554
 [16] top-level scope
    @ stdin:1
during initialization of module Python_jll
in expression starting at /home/jagot/.julia/packages/GDB_jll/SJRCY/src/wrappers/x86_64-linux-gnu-cxx11.jl:6
in expression starting at /home/jagot/.julia/packages/GDB_jll/SJRCY/src/GDB_jll.jl:2
in expression starting at stdin:1
ERROR: LoadError: Failed to precompile GDB_jll [a8b33d9f-0f8b-5197-9986-f85cbaa50c6c] to /home/jagot/.julia/compiled/v1.8/GDB_jll/jl_gIkP5i.
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
    @ Base ./loading.jl:1705
  [3] compilecache
    @ ./loading.jl:1649 [inlined]
  [4] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1337
  [5] _require_prelocked(uuidkey::Base.PkgId)
    @ Base ./loading.jl:1200
  [6] macro expansion
    @ ./loading.jl:1180 [inlined]
  [7] macro expansion
    @ ./lock.jl:223 [inlined]
  [8] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1144
  [9] include
    @ ./Base.jl:419 [inlined]
 [10] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
    @ Base ./loading.jl:1554
 [11] top-level scope
    @ stdin:1
in expression starting at /home/jagot/.julia/packages/BugReporting/7HHK5/src/BugReporting.jl:1
in expression starting at stdin:1
Stacktrace:
 [1] pkgerror(msg::String)
   @ Pkg.Types /usr/share/julia/stdlib/v1.8/Pkg/src/Types.jl:67
 [2] precompile(ctx::Pkg.Types.Context, pkgs::Vector{String}; internal_call::Bool, strict::Bool, warn_loaded::Bool, already_instantiated::Bool, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ Pkg.API /usr/share/julia/stdlib/v1.8/Pkg/src/API.jl:1427
 [3] precompile
   @ /usr/share/julia/stdlib/v1.8/Pkg/src/API.jl:1058 [inlined]
 [4] #precompile#225
   @ /usr/share/julia/stdlib/v1.8/Pkg/src/API.jl:1057 [inlined]
 [5] precompile (repeats 2 times)
   @ /usr/share/julia/stdlib/v1.8/Pkg/src/API.jl:1057 [inlined]
 [6] top-level scope
   @ REPL[2]:1

julia>

Permission error when writing `pack_mmaps`

It fails every time after exiting Julia.

Full output. If you need any more info please let me know.

➜ julia1.6nightly --bug-report=rr
[ Info: Loading BugReporting package...
rr: Saving execution to trace directory `/home/sam/.julia/artifacts/jl_We8tyX/julia-0'.
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.6.0-DEV.33 (2020-05-14)
 _/ |\__'_|_|_|\__'_|  |  Commit 08861c7061 (0 days old master)
|__/                   |

julia> versioninfo()
Julia Version 1.6.0-DEV.33
Commit 08861c7061 (2020-05-14 17:16 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, skylake)

julia> 
[ Info: Preparing trace directory for upload (if your trace is large this may take a few minutes)
rr: Packed trace directory `/home/sam/.julia/artifacts/jl_We8tyX/julia-0'.
[FATAL /workspace/srcdir/rr/src/PackCommand.cc:428:rewrite_mmaps() errno: EACCES] Error writing /home/sam/.julia/artifacts/cb31121d1648b90b50ed68e685d1ee22d08d8980/julia-0/pack_mmaps
=== Start rr backtrace:
/home/sam/.julia/artifacts/8d4aa64cc85b308b4619a66038db4d983df98b9b/bin/rr(_ZN2rr13dump_rr_stackEv+0x28)[0x5108b8]
/home/sam/.julia/artifacts/8d4aa64cc85b308b4619a66038db4d983df98b9b/bin/rr(_ZN2rr15notifying_abortEv+0x47)[0x510937]
/home/sam/.julia/artifacts/8d4aa64cc85b308b4619a66038db4d983df98b9b/bin/rr[0x53f142]
/home/sam/.julia/artifacts/8d4aa64cc85b308b4619a66038db4d983df98b9b/bin/rr[0x524a76]
/home/sam/.julia/artifacts/8d4aa64cc85b308b4619a66038db4d983df98b9b/bin/rr[0x526df5]
/home/sam/.julia/artifacts/8d4aa64cc85b308b4619a66038db4d983df98b9b/bin/rr(_ZN2rr11PackCommand3runERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE+0x4dd)[0x52858d]
/home/sam/.julia/artifacts/8d4aa64cc85b308b4619a66038db4d983df98b9b/bin/rr(main+0x2c1)[0x443131]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7f75828f0b97]
/home/sam/.julia/artifacts/8d4aa64cc85b308b4619a66038db4d983df98b9b/bin/rr[0x44322f]
=== End rr backtrace
ERROR: failed process: Process(`/home/sam/.julia/artifacts/8d4aa64cc85b308b4619a66038db4d983df98b9b/bin/rr pack /home/sam/.julia/artifacts/cb31121d1648b90b50ed68e685d1ee22d08d8980/julia-0`, ProcessSignaled(6)) [0]

Stacktrace:
 [1] pipeline_error at ./process.jl:525 [inlined]
 [2] run(::Cmd; wait::Bool) at ./process.jl:440
 [3] run at ./process.jl:438 [inlined]
 [4] (::BugReporting.var"#1#2"{String})(::String) at /home/sam/.julia/packages/BugReporting/RmZjZ/src/BugReporting.jl:56
 [5] (::rr_jll.var"#8#9"{BugReporting.var"#1#2"{String}})() at /home/sam/.julia/packages/rr_jll/B8mjJ/src/wrappers/x86_64-linux-gnu-cxx11.jl:36
 [6] withenv(::rr_jll.var"#8#9"{BugReporting.var"#1#2"{String}}, ::Pair{String,String}, ::Vararg{Pair{String,String},N} where N) at ./env.jl:161
 [7] rr(::BugReporting.var"#1#2"{String}; adjust_PATH::Bool, adjust_LIBPATH::Bool) at /home/sam/.julia/packages/rr_jll/B8mjJ/src/wrappers/x86_64-linux-gnu-cxx11.jl:35
 [8] rr at /home/sam/.julia/packages/rr_jll/B8mjJ/src/wrappers/x86_64-linux-gnu-cxx11.jl:19 [inlined]
 [9] rr_pack at /home/sam/.julia/packages/BugReporting/RmZjZ/src/BugReporting.jl:53 [inlined]
 [10] upload_rr_trace(::String) at /home/sam/.julia/packages/BugReporting/RmZjZ/src/BugReporting.jl:140
 [11] make_interactive_report(::String, ::Array{Any,1}) at /home/sam/.julia/packages/BugReporting/RmZjZ/src/BugReporting.jl:124
 [12] make_interactive_report(::String) at /home/sam/.julia/packages/BugReporting/RmZjZ/src/BugReporting.jl:114
 [13] #invokelatest#1 at ./essentials.jl:710 [inlined]
 [14] invokelatest at ./essentials.jl:709 [inlined]
 [15] report_bug(::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/InteractiveUtils/src/InteractiveUtils.jl:378
 [16] exec_options(::Base.JLOptions) at ./client.jl:243
 [17] _start() at ./client.jl:487

Test failures due to rr

The following log is from PkgEval running under rr for the primary commit, but not so for the comparison: https://s3.amazonaws.com/julialang-reports/nanosoldier/pkgeval/by_date/2022-07/22/report.html
Several failures appear to be caused by running under rr, which means that we'll be consistent for now (i.e. also run the comparison under rr). Ideally of course, we don't want these failures, so this issue can serve to catalogue specific ones.

Python packages: No module named 'encodings'

Fixed in #64

CURL: SSL issue

$ julia -e 'using Pkg; Pkg.activate(; temp=true); Pkg.add("LibCURL"); Pkg.test("LibCURL"; julia_args=`--bug-report=rr-local`)'
...
curl: /home/tim/Julia/depot/juliaup/julia-1.8.0-rc3+0.x64/bin/../lib/julia/libcurl.so.4: version `CURL_OPENSSL_4' not found (required by curl)
system curl: Error During Test at /home/tim/Julia/depot/juliaup/julia-1.8.0-rc3+0.x64/share/julia/stdlib/v1.8/LibCURL/test/runtests.jl:43
  Got exception outside of a @test
  failed process: Process(`curl -s -S -g -L -f -o /tmp/jl_sxwGMm/README.md https://github.com/JuliaWeb/LibCURL.jl/blob/master/README.md`, ProcessExited(1)) [1]

This error also breaks Git, e.g., in testing RegistryTools.

Fixed in #67

Conda.jl etc: missing files during pack

I still need to reduce this, but several packages (like Conda.jl and [email protected]) were missing files during the rr pack. I'm not sure how this happens, as we don't do much between the end of the record and the start of the pack (i.e., we shouldn't be deleting files here).

Better error reporting on unsupported platforms

e.g. linux32:

Precompiling environment...
  ✗ BugReporting
  41 dependencies successfully precompiled in 16 seconds
  1 dependency errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the package
ERROR: LoadError: UndefVarError: `rr` not defined
Stacktrace:
 [1] include
   @ ./Base.jl:450 [inlined]
 [2] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
   @ Base ./loading.jl:1667
 [3] top-level scope
   @ stdin:1
in expression starting at /home/tim/.julia/packages/BugReporting/RMxj0/src/BugReporting.jl:1
in expression starting at stdin:1
ERROR: Failed to precompile BugReporting [bcf9a6e7-4020-453c-b88e-690564246bb8] to /home/tim/.julia/compiled/v1.10/BugReporting/jl_dXM6Hp.

Disable history by default

@staticfloat and I noticed that, since julia reads the entire history file on startup, it'll be included in the trace. I'm thinking people might be uncomfortable with having their entire history included in the trace. We should probably consider turning off history by default. Alternatively, we might want to look into a way to sanitize the history and only expose those parts of the history that are actually used.

InvalidPart -- One or more of the specified parts could not be found

With #16 (comment), I could start uploading the trace. However, after authenticating the upload via browser, I get this error:

[ Info: Uploading Trace directory
InvalidPart -- One or more of the specified parts could not be found.  The part may not have been uploaded, or the specified entity tag may not match the part's entity tag.
HTTP.ExceptionRequest.StatusError(400, "POST", "/reports/2020-06-01T07-09-44-tkf.tar.zst?uploadId=z76kdZec79opS5c.gIR.purlbXqj4C5iI2AaumB8YKUJcrMax6An_73LCGJ6AFi4igM8eZte089aNiGAvNlga4lvVdVy3v6zW7J5REsmFbZmbPjI1IbSZIKP4erRFb2H", HTTP.Messages.Response:
"""
HTTP/1.1 400 Bad Request
x-amz-request-id: 7F70A4CE41325CA4
x-amz-id-2: HSq/1WHjB1pyp0j53VTUGyPrvu82Wn2pX1HvSPm+8EE8GSA1HC4p1Iz7c28SmJ5DO8uB6orQ6PI=
Content-Type: application/xml
Transfer-Encoding: chunked
Date: Mon, 01 Jun 2020 07:12:04 GMT
Connection: close
Server: AmazonS3

<Error><Code>InvalidPart</Code><Message>One or more of the specified parts could not be found.  The part may not have been uploaded, or the specified entity tag may not match the part's entity tag.</Message><UploadId>z76kdZec79opS5c.gIR.purlbXqj4C5iI2AaumB8YKUJcrMax6An_73LCGJ6AFi4igM8eZte089aNiGAvNlga4lvVdVy3v6zW7J5REsmFbZmbPjI1IbSZIKP4erRFb2H</UploadId><PartNumber>1</PartNumber><ETag>43b6c9b365f40e05c93163da0b710033</ETag><RequestId>7F70A4CE41325CA4</RequestId><HostId>HSq/1WHjB1pyp0j53VTUGyPrvu82Wn2pX1HvSPm+8EE8GSA1HC4p1Iz7c28SmJ5DO8uB6orQ6PI=</HostId></Error>""")
Uploaded to https://s3.amazonaws.com/julialang-dumps/reports/2020-06-01T07-09-44-tkf.tar.zst

Vendored libstdc++ breaks replay

If I use BugReporting.replay to try and replay a trace, I'm getting:

julia> replay("https://s3.amazonaws.com/julialang-reports/nanosoldier/pkgeval/rr/Example-1658164614.tar.zst")
gdb: /home/tim/Julia/depot/juliaup/julia-1.7.3+0~x64/bin/../lib/julia/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by gdb)
gdb: /home/tim/Julia/depot/juliaup/julia-1.7.3+0~x64/bin/../lib/julia/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /usr/lib/libsource-highlight.so.4)
gdb: /home/tim/Julia/depot/juliaup/julia-1.7.3+0~x64/bin/../lib/julia/libcurl.so.4: no version information available (required by /usr/lib/libdebuginfod.so.1)
gdb: /home/tim/Julia/depot/juliaup/julia-1.7.3+0~x64/bin/../lib/julia/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /usr/lib/libboost_regex.so.1.79.0)

If however I download the tarball myself and use my local rr replay, everything works fine. I guess the packaged (older) glibc is somehow messing things up? This is probably also related to me using Arch, which ships a very recent glibc.

Standardized "bug report" format across platforms

Right now this is very rr focused, but it would be good, IMO, to start thinking about what we can offer for non-rr capable systems. I'm thinking things like auto-uploading a manifest, perhaps a gdb backtrace or similar? Making it such that julia --bug-report gives us at least something (and that that something is as consistent as possible across platforms), then building BugReporting.jl to give us the capture and analysis tools to make squashing bugs fun and profitable.

Ideas of information we might want to know:

  • rr trace (only on x86_64-linux-gnu)
  • Manifest.toml (saved out in the bug report such that it's very easy for another dev to instantiate and see what's going on)
  • Basic system vital statistics; how many cores, how much RAM available, how much disk space available, etc... Help us quickly figure out if something is going to need specialized hardware/conditions to debug (like an OOM doing something nasty).
  • Would be cool if we could offer to auto-upload source code; In an rr context I know this will be automatically part of the trace and we can post-process it out, but it would also be nice if we could, for instance, hook into include() and copy all files that are included (filtering out things from base, stdlib and packages) into the tarball that gets uploaded. This could make it very easy to provide even moderate-size reproducers.

Precompilation issue on 1.11

┌ Error: Unexpected output on standard error:
│ ┌ Info: Loading BugReporting package...
│ └ @ InteractiveUtils /cache/julia-buildkite-plugin/julia_installs/bin/linux/x64/1.11/julia-1.11-latest-linux-x86_64/share/julia/stdlib/v1.11/InteractiveUtils/src/InteractiveUtils.jl:348
│ ┌ Warning: Module Base64 with build ID fafbfcfd-f707-74a8-0022-da8799e70ba4 is missing from the cache.
│ │ This may mean Base64 [2a0f44e3-6c83-55bd-87e4-b1978d98bd5f] does not support precompilation but is imported by a module that does.
│ └ @ Base loading.jl:2306
│ ┌ Warning: Module Base64 with build ID fafbfcfd-f707-74a8-0022-da8799e70ba4 is missing from the cache.
│ │ This may mean Base64 [2a0f44e3-6c83-55bd-87e4-b1978d98bd5f] does not support precompilation but is imported by a module that does.
│ └ @ Base loading.jl:2306
│ ┌ Warning: Module InteractiveUtils with build ID fafbfcfd-39ed-e583-0022-da89a6e6ee5f is missing from the cache.
│ │ This may mean InteractiveUtils [b77e0a4c-d291-57a0-90e8-8db25a27a240] does not support precompilation but is imported by a module that does.
│ └ @ Base loading.jl:2306
│ ┌ Warning: Module InteractiveUtils with build ID fafbfcfd-39ed-e583-0022-da89a6e6ee5f is missing from the cache.
│ │ This may mean InteractiveUtils [b77e0a4c-d291-57a0-90e8-8db25a27a240] does not support precompilation but is imported by a module that does.
│ └ @ Base loading.jl:2306
│ ┌ Warning: Module Test with build ID ffffffff-ffff-ffff-0027-9732e74fa5c0 is missing from the cache.
│ │ This may mean Test [8dfed614-e22c-5e08-85e1-65c5234f0b40] does not support precompilation but is imported by a module that does.
│ └ @ Base loading.jl:2306
└ @ Main /cache/build/tester-amdci4-11/julialang/bugreporting-dot-jl/test/rr.jl:138
rr: Test Failed at /cache/build/tester-amdci4-11/julialang/bugreporting-dot-jl/test/rr.jl:140
  Expression: length(stderr_lines) <= 1
   Evaluated: 16 <= 1

possible issue with `upload_rr_trace`

noticed in https://gist.github.com/pkofod/7a418c2f602283ddbd333d2962345269

[ Info: Uploading Trace directory
ERROR: MethodError: no method matching getindex(::String, ::String)
Closest candidates are:
  getindex(::AbstractString, ::Colon) at strings/basic.jl:189
  getindex(::String, ::Int64) at strings/string.jl:222
  getindex(::AbstractString, ::Integer) at strings/basic.jl:184
  ...
Stacktrace:
 [1] upload_rr_trace(trace_directory::String)
   @ BugReporting ~/.julia/packages/BugReporting/AZD4C/src/BugReporting.jl:283
 [2] make_interactive_report(report_type::String, ARGS::Vector{String})
   @ BugReporting ~/.julia/packages/BugReporting/AZD4C/src/BugReporting.jl:219
 [3] #invokelatest#2
   @ ./essentials.jl:708 [inlined]
 [4] invokelatest
   @ ./essentials.jl:706 [inlined]
 [5] report_bug(kind::String)
   @ InteractiveUtils /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/InteractiveUtils/src/InteractiveUtils.jl:407
 [6] exec_options(opts::Base.JLOptions)
   @ Base ./client.jl:233
 [7] _start()
   @ Base ./client.jl:485

Cannot record package tests

BugReporting.jl doesn't work with invoking package tests through Pkg.jl:

[ Info: Loading BugReporting package...
rr: Saving execution to trace directory `/home/tim/.local/share/rr/julia-17'.
     Testing LLVM tests passed

Nothing is actually tested, this takes a couple of ms.

Broken on Julia <1.7 due to `printstyled` kwargs

Trying to upload a bug report only to encounter a glaring bug in BugReporting.jl 😪

tacktrace:
 [1] pkgerror(msg::String)
   @ Pkg.Types /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Types.jl:55
 [2] test(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; coverage::Bool, julia_args::Cmd, test_args::Cmd, test_fn::Nothing)
   @ Pkg.Operations /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Operations.jl:1712
 [3] test(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; coverage::Bool, test_fn::Nothing, julia_args::Cmd, test_args::Cmd, kwargs::Base.Iterators.Pairs{Symbol, Base.TTY, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.TTY}}})
   @ Pkg.API /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:343
 [4] test(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ Pkg.API /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:80
 [5] test(pkgs::Vector{Pkg.Types.PackageSpec})
   @ Pkg.API /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:78
 [6] test(; name::Nothing, uuid::Nothing, version::Nothing, url::Nothing, rev::Nothing, path::Nothing, mode::Pkg.Types.PackageMode, subdir::Nothing, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ Pkg.API /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:96
 [7] test()
   @ Pkg.API /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:88
 [8] top-level scope
   @ none:1
Preparing trace for upload (if your trace is large this may take a few minutes)...

ERROR: MethodError: no method matching printstyled(::String; blink=true)
Closest candidates are:
  printstyled(::Any...; bold, color) at util.jl:107 got unsupported keyword argument "blink"
  printstyled(::IO, ::Any...; bold, color) at util.jl:105 got unsupported keyword argument "blink"
Stacktrace:
  [1] kwerr(::NamedTuple{(:blink,), Tuple{Bool}}, ::Function, ::String)
    @ Base ./error.jl:157
  [2] get_upload_params()
    @ BugReporting ~/.julia/packages/BugReporting/J6Ebl/src/BugReporting.jl:577
  [3] (::BugReporting.var"#20#22"{Vector{String}})(trace_dir::String)
    @ BugReporting ~/.julia/packages/BugReporting/J6Ebl/src/BugReporting.jl:551
  [4] mktempdir(fn::BugReporting.var"#20#22"{Vector{String}}, parent::String; prefix::String)
    @ Base.Filesystem ./file.jl:729
  [5] mktempdir(fn::Function, parent::String) (repeats 2 times)
    @ Base.Filesystem ./file.jl:727
  [6] make_interactive_report(report_arg::String, ARGS::Vector{String})
    @ BugReporting ~/.julia/packages/BugReporting/J6Ebl/src/BugReporting.jl:547
  [7] #invokelatest#2
    @ ./essentials.jl:708 [inlined]
  [8] invokelatest
    @ ./essentials.jl:706 [inlined]
  [9] report_bug(kind::String)
    @ InteractiveUtils /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/InteractiveUtils/src/InteractiveUtils.jl:391
 [10] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:233
 [11] _start()
    @ Base ./client.jl:485

The Project.toml says julia = "1.3", but the blink keyword wasn't added until Julia 1.7.

Julia JuMP issue with nonlinear problem formulation

I try to solve the following problem:
using JuMP, Ipopt

m = Model(Ipopt.Optimizer)

function g(x,y) # this function ecavuates the lowest eigenfrequency
A = [4.0*(x^4 + y^4), 2.0y^4, 2.0y^4, 4.0y^4];
B = [4.0
(x^2 + y^2), -3.0y^2, -3.0y^2, 4.0*y^2];
A = reshape(A,2,2);
B = reshape(B,2,2);
eigv,dum = eig(A,B);
eVal = eigv[1];
return eVal
end

@variable(m, x, start = 1.0)
@variable(m, y, start = 1.0)

I try to optimize the eigenfrequency such that x^2 + y^2 is at a minimum

how can I formulate this problem with JuMP?

@variable(m, eVal)
@NLexpression(m, eVal, g(x,y))
@variable(m, eVal == my_expr)
@NLconstraint(m, my_constr, my_expr >= 0.4)
@NLobjective(m, Min, x^2 + y^2)
optimize!(m)
println("x = ", value.(x), " y = ", value.(y))

Any help would be appreciated

Still incompatible with Julia <1.7

cc @maleadt unfortunately this package is still broken on Julia <1.7. Could you instead set the bounds of the Julia versions according to what Julia you have actually tested against? Otherwise when I try to submit bug report for an earlier Julia version, it just downloads the current BugReporting.jl (which appears incompatible with older Julia versions), despite the [compat] saying julia = "1.3":

julia = "1.3"

If the [compat] is given correctly then it will download the older version of BugReporting which would let me successfully submit a bug report.

The next bug is that errormonitor does not yet exist in Julia 1.6:

ERROR: UndefVarError: errormonitor not defined
Stacktrace:
  [1] get_upload_params()
    @ BugReporting ~/.julia/packages/BugReporting/NFHSR/src/BugReporting.jl:632
  [2] (::BugReporting.var"#20#22"{Vector{String}})(trace_dir::String)
    @ BugReporting ~/.julia/packages/BugReporting/NFHSR/src/BugReporting.jl:551
  [3] mktempdir(fn::BugReporting.var"#20#22"{Vector{String}}, parent::String; prefix::String)
    @ Base.Filesystem ./file.jl:729
  [4] mktempdir (repeats 2 times)
    @ ./file.jl:727 [inlined]
  [5] make_interactive_report(report_arg::String, ARGS::Vector{String})
    @ BugReporting ~/.julia/packages/BugReporting/NFHSR/src/BugReporting.jl:547
  [6] #invokelatest#2
    @ ./essentials.jl:708 [inlined]
  [7] invokelatest
    @ ./essentials.jl:706 [inlined]
  [8] report_bug(kind::String)
    @ InteractiveUtils /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/InteractiveUtils/src/InteractiveUtils.jl:391
  [9] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:233
 [10] _start()
    @ Base ./client.jl:485

support local files

julia> replay("file://bug37262.tar.gz")
ERROR: Invalid trace location: file://bug37262.tar.gz
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:33
 [2] replay(trace_url::String)
   @ BugReporting ~/.julia/packages/BugReporting/DYZaI/src/BugReporting.jl:113
 [3] top-level scope
   @ REPL[7]:1

Default trace location not writeable

rr: Packed trace directory `/home/vchuravy/.julia/artifacts/jl_AsAaFI/julia-0'.
[ Info: `/home/vchuravy/.julia/artifacts/ab46f457722e90678bc6b2d6b88c2698bcc6e897/latest-trace` not writable. Skipping `rr pack`.

We should probably use Scratch to get appropriate scratch space instead of using the artifact dir?

Check assertions after the fact

The issue I reported in JuliaLang/julia#35601 throws an assertion on a debug build. It should be possible for us to compile a version of julia that has assertion disabled, but lets us run the assertions at replay time to see if any of them fail.

Prompt-less upload from trusted hosts

It would be nice if we could re-use the upload code here from PkgEval instead of rolling our own and uploading to the Nanosoldier S3 bucket. Similarly, we may want to use --bug-report=... as part of CI (package CI, or even Base Julia CI). In both cases we don't want BugReporting.jl to prompt for GH auth. We could avoid this by supporting a whitelist of hosts, or by using a GITHUB_TOKEN as specified in the environment. Thoughts, @staticfloat?

Latest rr release doesn't support Zen 4

On my computer I get

[FATAL src/PerfCounters_x86.h:114:compute_cpu_microarch()] AMD CPU type 0x60f10 (ext family 0xa) unknown

when running julia --bug-report=rr and I have confirmed that using the latest rr standalone fixes the problem.

Add direct pernosco upload

I think there'd be two useful pieces of functionality here:

  1. Basically implement what https://github.com/Pernosco/pernosco-submit/blob/master/pernosco-submit does here. pernosco-submit has a number of dependencies and is a bit of pain to set up - we should be able to just upload directly. The submission process is very similar to our own submission process (in that it's also an S3 upload), but there's some encryption going on.

  2. Add the ability to copy a previously uploaded trace to pernosco, ideally by just doing an S3-side copy, but there may need to be a lambda involved for handling the encryption.

It would be nice to streamline pernosco authentication also. I always have trouble finding my credentials and I think from our experience here, the one click authentication is about what users are willing to tolerate.

cc @khuey

–bug-report=rr doesn’t play nicely with hang & interrupt

I’m trying to construct and submit an rr bug report for semi-heisenbug (possibly in Julia itself). When I run

julia my-script.jl

(julia 1.6.1), I get one of a variety of errors, e.g.

corrupted double-linked list

or

julia: malloc.c:3848: _int_malloc: Assertion `chunk_main_arena (fwd)' failed.

signal (6): Aborted

and the program hangs. (Via debugging println()s I know that it's hanging at a function call: the println immediately before the function call prints, while the println in the first line of the function body does not.) I then send an interrupt with Ctrl-c.

The problem is, this interrupt—which is necessary to get the program to end!—interrupts the creation of the rr recording, so I have nothing to send in.

This seems like the perfect case for rr: some kind of memory weirdness at a function call boundary. How can I create the bug report?

(FWIW this is a lightly edited version of my Discourse question https://discourse.julialang.org/t/bug-report-rr-doesnt-play-nicely-with-hang-interrupt-how-to-create-bug-report/60718 . Not sure that was the right place to ask, and since this really does seem somewhere between a bug report and a feature request, I thought it'd be worth trying here.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.