Coder Social home page Coder Social logo

frc-openjdk-roborio's Introduction

frc-openjdk

This is a roboRIO ipk package builder for the OpenJDK JRE.

The roboRIO ipk uses the ARM 32bit JRE for ARMv7 soft float ABI.

Building

On any Unix system, simply run ./build-docker to build the package.

frc-openjdk-roborio's People

Contributors

austinshalit avatar peterjohnson avatar sciencewhiz avatar thadhouse avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

frc-openjdk-roborio's Issues

wrong version in packaging?

versions.sh calls out 6aa6f6860508 which looks to correspond to jdk-11.0.12+5. However, it's packaged as 11.0.9u12-1

Reentrant `synchronized` usage causing deadlock

Hi All,

Bottom line:
Starting in 2022, (v2022-11.0.9u12-1 and on) if you have multiple threads calling a synchronized function which then acquires another synchronized lock, there is a small (but very present) likelihood of deadlock. This deadlock does not happen with earlier roboRIO JRE versions or on my workstation.

Affected java versions:

admin@roboRIO-176-FRC:/home/lvuser# /usr/local/frc/JRE/bin/java --version
openjdk 11.0.12.12-frc 2021-07-20
OpenJDK Runtime Environment (build 11.0.12.12-frc+0-2022-11.0.9u12-1)
OpenJDK Client VM (build 11.0.12.12-frc+0-2022-11.0.9u12-1, mixed mode)

admin@roboRIO-176-FRC:~# /usr/local/frc/JRE/bin/java --version
openjdk 11.0.12.5-frc 2021-07-20
OpenJDK Runtime Environment (build 11.0.12.5-frc+0-2022-11.0.12u5-1)
OpenJDK Client VM (build 11.0.12.5-frc+0-2022-11.0.12u5-1, mixed mode)

Please see attached proof-of-concept Main.java.txt and thread_dump.txt

Steps to reproduce:

  1. On a roboRIO with FRC_roboRIO_2022_v4.0 using GradleRIO version 2022.3.1 (and thus openjdk 11.0.12.5-frc 2021-07-20)
  2. Deploy the proof-of-concept Main.java.txt
  3. You should see output that resembles
Starting!
7402115
10125555
10125555
10125555
10125555
  1. Run kill -3 <pid of java process> to acquire a thread dump. It should look similar to the one attached.
  2. Install 2021's release of the FRC JRE: v2021-11.0.9u11-1
  3. After restarting the robot code, you should see output that resembles
Starting!
2469866
4920792
7393729
...
24649211
27119381
29589939
30000000
Starting!
2468994
4965939
7437033
...

Notes:

  1. Originally I tried using older FRC images (FRC_roboRIO_2020_v10 and FRC_roboRIO_2021_v3.0) and their respective GradleRIO versions, but then narrowed it down to the JRE as I could install an older version and reproduce previous behavior
  2. This does not occur if you disable threads 2 and 3
  3. This also does not occur if you remove the synchronized block from setSum()
  4. Workaround: replacing synchronized with a ReentrantReadWriteLock and locking the critical sections in the same way, this does not happen

Thanks,
Kyle Z
Software Mentor
Team 176 - Aces High

Main.java.txt
thread_dump.txt

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.