Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gem install rarely causes makeSharedShape() can only be called on non-shared shapes. (UnsupportedOperationException) #1601

Closed
deepj opened this issue Mar 9, 2019 · 6 comments
Assignees
Labels

Comments

@deepj
Copy link

deepj commented Mar 9, 2019

When I tried to install hamlit, I got in TruffleRuby 1.0.0 RC13:

gem install hamlit
ERROR:  While executing gem ... (RuntimeError)
    makeSharedShape() can only be called on non-shared shapes. (UnsupportedOperationException)
	from com.oracle.truffle.object.ShapeImpl.makeSharedShape(ShapeImpl.java:956)
	from org.truffleruby.language.objects.shared.ShareObjectNode.createSharedShape(ShareObjectNode.java:116)
	from org.truffleruby.language.objects.shared.ShareObjectNodeGen.executeAndSpecialize(ShareObjectNodeGen.java:95)
	from org.truffleruby.language.objects.shared.ShareObjectNodeGen.executeShare(ShareObjectNodeGen.java:61)
	from org.truffleruby.language.objects.shared.WriteBarrierNode.writeBarrierCached(WriteBarrierNode.java:47)
	from org.truffleruby.language.objects.shared.WriteBarrierNodeGen.executeWriteBarrier(WriteBarrierNodeGen.java:46)
	from org.truffleruby.language.objects.shared.ShareInternalFieldsNode.shareCachedObjectArray(ShareInternalFieldsNode.java:50)
	from org.truffleruby.language.objects.shared.ShareInternalFieldsNodeGen.executeShare(ShareInternalFieldsNodeGen.java:50)
	from org.truffleruby.language.objects.shared.ShareObjectNode.shareCached(ShareObjectNode.java:62)
	from org.truffleruby.language.objects.shared.ShareObjectNodeGen.executeShare(ShareObjectNodeGen.java:43)
Translated to internal error

The same error when I tried something else in the morning, but I don't remember what's it.

@chrisseaton
Copy link
Collaborator

@eregon will know the most about this one.

@eregon
Copy link
Member

eregon commented Apr 12, 2019

I cannot reproduce, and instead get a compiler error:

compiling hamlit.c
/home/eregon/.rubies/truffleruby-1.0.0-rc15/lib/ruby/gems/2.6.0/gems/hamlit-2.9.3/ext/hamlit/hamlit.c:286:5: error: statement requires
      expression of integer type ('VALUE' (aka 'void *') invalid)
    switch (value) {
    ^       ~~~~~
/home/eregon/.rubies/truffleruby-1.0.0-rc15/lib/ruby/gems/2.6.0/gems/hamlit-2.9.3/ext/hamlit/hamlit.c:405:3: error: statement requires
      expression of integer type ('VALUE' (aka 'void *') invalid)
  switch (value) {
  ^       ~~~~~
2 errors generated.
make: *** [Makefile:214: hamlit.bc] Error 1

However, I think I can do something to fix the exception you got.

@deepj
Copy link
Author

deepj commented Apr 12, 2019

@eregon gem install hamlit is just a case when this was occurred. This issue has happened twice to me in different cases until now. But not in RC15 so far yet.

@eregon eregon added this to the 19.0.0 milestone May 21, 2019
@eregon
Copy link
Member

eregon commented May 21, 2019

I merged a fix for this in aa6623d, which was in the 19.0 release.
@deepj Thank you for the report.

@eregon eregon closed this as completed May 21, 2019
@eregon
Copy link
Member

eregon commented May 23, 2019

Reopening, this needs a second fix.

@eregon eregon reopened this May 23, 2019
@eregon eregon modified the milestones: 19.0.0, 20.0-beta1 May 27, 2019
@eregon
Copy link
Member

eregon commented May 27, 2019

This should be solved for good now with 22dfb29, it will be in the next release.

@eregon eregon closed this as completed May 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants