question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Warning about loading tilt/haml in a non thread-safe way

See original GitHub issue

I’m seeing this warning in my Gradle-based project:

WARN: tilt autoloading 'tilt/haml' in a non thread-safe way; explicit require 'tilt/haml' suggested.

The same warning also shows up in this sample project: https://github.com/JGrenier/asciidoclet-sample

I’m using Gradle 2.6.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:93 (70 by maintainers)

github_iconTop GitHub Comments

1reaction
johncarl81commented, Nov 3, 2018

… perhaps we should upgrade asciidoclet to the latest asciidoctorj as well then.

1reaction
enebocommented, Jul 5, 2018

@johncarl81 for some reason your exec:java is not working for me but if I generate with package in your last changes to pom.xml the shaded jar it generates will run. So both my instincts seem to be right:

java -Djruby.jit.background=false -jar target/asciidoctorj-test-1.0-SNAPSHOT-shaded.jar 
Jul 05, 2018 3:15:23 PM org.asciidoctor.internal.JRubyAsciidoctor render
SEVERE: org.jruby.RubyNoMethodError
Errored after 50 iterations.

I get 50 iterations consistently so what we generate when switching to full build is broken. Also if set threshold to -1 then no full build is performed and all is working:

java -Djruby.jit.threshold=-1 -Djruby.jit.background=false -jar target/asciidoctorj-test-1.0-SNAPSHOT-shaded.jar 

So at this point we know we have a bug in full build (which would also occur in JIT itself if it was enabled) and we know what code is doing it. My cursory examination of code in question in its internal representation actually looks ok so next steps is to see how different it looks for real. Perhaps extracting that snippet by itself was inadequate.

Read more comments on GitHub >

github_iconTop Results From Across the Web

'sass' in a non thread-safe way - ruby on rails - Stack Overflow
I'm getting these warnings when trying to use sass in Rails 3.1 rc1. WARN: tilt autoloading 'sass' in a non thread-safe way; explicit ......
Read more >
Writing reentrant and threadsafe code - IBM
In single-threaded processes, only one flow of control exists. The code executed by these processes thus need not be reentrant or threadsafe.
Read more >
Thread Safety in Java | DigitalOcean
Thread safety in java is the process to make our program safe to use in multithreaded environment, there are different ways through which...
Read more >
What is thread safe or non-thread safe in PHP - GeeksforGeeks
Thread-safe : It is used to ensure that when the shared data structure which is manipulated by different threads are prevented from entering ......
Read more >
C/C++ Thread Safety Analysis - Google Research
on loads or stores to variables. It checks that the appropriate capability is in the current set, and issues a warning if it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found