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

WARNING: unhandled Failure detected in DESTROY. No such symbol '<class 'numpy.int64'>' #4852

Open
librasteve opened this issue Apr 6, 2022 · 1 comment

Comments

@librasteve
Copy link

The Problem

I am developing raku::Dan::Pandas on ubuntu and getting an unwanted WARNING apparently from the GC

This is a block to getting that module working (I'm about 80% done after 4 months effort) - and also impacts the active promotion of raku::Dan since Python compatibility is an important aspect for interworking with Python workflows and providing a fully featured raku alternative.

Please help!
~p6steve

Expected Behavior

/raku-Dan-Pandas/bin/synopsis-dan-pandas.raku runs without error

Please note that the module is being build "in context" with deps such as Inline::Python on the jupyter scipy-notebook image via Dockerfile.

Yes, <class 'numpy.int64'> is a Python symbol. I am happy to take any fix over to a PR for Inline::Python if you can tell me what to do.

I have found some prior art on this issue:



Actual Behavior

WARNING: unhandled Failure detected in DESTROY. If you meant to ignore it, you can mark it as handled by calling .Bool, .so, .not, or .defined methods. The Failure was:
No such symbol '<class 'numpy.int64'>'
in block at /home/jovyan/raku-Dan-Pandas/bin/../lib/Dan/Pandas.rakumod (Dan::Pandas) line 587
in block at /home/jovyan/raku-Dan-Pandas/bin/../lib/Dan/Pandas.rakumod (Dan::Pandas) line 585
in block at /home/jovyan/raku-Dan-Pandas/bin/../lib/Dan/Pandas.rakumod (Dan::Pandas) line 582
in method TWEAK at /home/jovyan/raku-Dan-Pandas/bin/../lib/Dan/Pandas.rakumod (Dan::Pandas) line 568
in method new at /home/jovyan/raku-Dan-Pandas/bin/../lib/Dan/Pandas.rakumod (Dan::Pandas) line 426
in block at ./synopsis-dan-pandas.raku line 140

Steps to Reproduce

git clone https://github.com/p6steve/raku-Dan-Pandas.git@GC-issue [note this branch made to freeze at this bug state]
docker build -it p6steve/raku-dan:pandas-2022.02-arm64 [1]
docker run -it p6steve/raku-dan:pandas-2022.02-arm64
./raku-Dan-Pandas/bin/synopsis-dan-pandas.raku

It happens on every run on my setup. Commenting out the line below stops it.
145 E => Categorical.new(),

[1] adjust to amd64 by changing Dockerfile first line to FROM --platform=linux/amd64 jupyter/scipy-notebook]

Environment

  • Operating system: ubuntu
  • Compiler version (perl6 -v or raku -v):
    Welcome to Rakudo™ v2022.02.
    Implementing the Raku® Programming Language v6.d.
    Built on MoarVM version 2022.02.
@grondilu
Copy link
Contributor

grondilu commented May 23, 2022

I also get a similar annoying warning in one of my projects.

WARNING: unhandled Failure detected in DESTROY. If you meant to ignore it, you can mark it as handled by calling .Bool, .so, .not, or .defined methods. The Failure was:

The indicated failure is consistent with a method call, but I have no idea why that method would be called upon destruction of the object. Also, this method call is inside a try block so I really don't get why the compiler would complain about an unhandled failure.

I can't reliably reproduce it, nor can I figure out a way to golf it. Sorry, I know this is not helpful, I'm just bumping this issue.

$ raku -v
Welcome to Rakudo™ v2022.03-175-g9a860ca85.
Implementing the Raku® Programming Language v6.d.
Built on MoarVM version 2022.03-15-g43e1b00a6.

PS. ok I tried to write a toy example of code reproducing the warning: https://gist.github.com/grondilu/39bcb969f7aaca7c38ae2533a1289049

It does not show every time, but about once at of ten.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants