WolframResearch / WolframLanguageForJupyter

Wolfram Language kernel for Jupyter notebooks
MIT License
1.05k stars 126 forks source link

Wolfram Language 12.1 kernel dies running WolframModel #87

Closed s1a2t3y4 closed 3 years ago

s1a2t3y4 commented 4 years ago

kernel dies when i run ResourceFunction["WolframModel"][{{1, 2, 3}, {2, 4, 5}} -> {{5, 6, 1}, {6, 4, 2}, {4, 5, 3}}, {{1, 2, 3}, {2, 4, 5}, {4, 6, 7}}, 1]

image

cc-wr commented 4 years ago

I am working to reproduce this issue.

labrat97 commented 4 years ago

I am suffering from the same issue on all attempts of model generation using Ubuntu 20.04 and Jupyter Lab. Things like Plot3D are working fine though.

drzraf commented 4 years ago

Same problem (seeing some munmap_chunk(): invalid pointer in jupyter terminal stdout)

Maybe unrelated, but evaluating this (previous to using WolframModel):

<< SetReplace`

Displays:

Global`before$::shdw: Symbol before$ appears in multiple contexts {Global`, WolframLanguageForJupyter`}; definitions in context Global` may shadow or be shadowed by other definitions.
cc-wr commented 4 years ago

@s1a2t3y4, @JamesMcDean, @drzraf,

(I apologize for the delay.)

I can reproduce this issue (only) on Linux.

This issue seems to result from a bad interaction between the SetReplace paclet, which defines WolframModel, and the paclet MXNetLink, which WolframLanguageForJupyter accidentally makes use of.

You should be able to verify this by running (outside of WolframLanguageForJupyter) the following code, which should crash kernel:

In[1]:= Needs["MXNetLink`"]                                                     

In[2]:= Needs["SetReplace`"]                                                    

In[3]:= (* WARNING: This will crash the kernel. *) WolframModel[{{1, 2, 3}, {2, 4, 5}} -> {{5, 6, 1}, {6, 4, 2}, {4, 5, 3}}, {{1, 2, 3}, {2, 4, 5}, {4, 6, 7}}, 1]

We will look further into why this bad interaction occurs, but for the moment, we can just stop WolframLanguageForJupyter from accidentally loading MXNetLink with the pull request #92. Let me know if #92 resolves the immediate issue for you.

cc-wr commented 3 years ago

We will look further into why this bad interaction occurs, but for the moment, we can just stop WolframLanguageForJupyter from accidentally loading MXNetLink with the pull request #92. Let me know if #92 resolves the immediate issue for you.

A general request for comments on the pull request #92 is at #101.

cc-wr commented 3 years ago

Additionally, I can no longer reproduce the bad interaction between MXNetLink and SetReplace. Presumably (at least) one of them has been paclet updated in such a way as to resolve the issue.