JuliaInterop / JuliaInterop/JavaCall.jl

JULIA_COPY_STACKS=1 disable threading

Open
#169 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
125
Forks
53
PR merge metrics
No merged PRs in 30d

Description

This upstream issue: https://github.com/JuliaLang/julia/issues/47591 is still current.

It would be good to (highly) warn the user about this. It is very difficult and takes a lot of time to get to the source of the bug, we must realize that:

  1. there is a slowdown
  2. multithreading is disabled even if Threads.nthreads() != 1
  3. it comes from JULIA_COPY_STACKS
  4. it comes from JavaCall

I don't know if this is the case for all systems though. My versioninfo:

julia> versioninfo()
Julia Version 1.11.5
Commit 760b2e5b739 (2025-04-14 06:53 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 16 × AMD Ryzen 7 8840HS w/ Radeon 780M Graphics
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, znver3)
Threads: 16 default, 0 interactive, 8 GC (on 16 virtual cores)
Environment:
  JULIA_COPY_STACKS = 1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with upstream Julia issue 47591 and inspect JavaCall's handling of JULIA_COPY_STACKS, then verify the reported slowdown and threading behavior. Done means users receive a clear warning identifying the slowdown, disabled multithreading, JULIA_COPY_STACKS, and JavaCall as the cause where applicable.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, julia
Domain
backend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.