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

gopy: import+reimport same package crashes interpreter #27

Closed
sbinet opened this issue Aug 6, 2015 · 4 comments
Closed

gopy: import+reimport same package crashes interpreter #27

sbinet opened this issue Aug 6, 2015 · 4 comments
Assignees
Labels

Comments

@sbinet
Copy link
Member

sbinet commented Aug 6, 2015

with python-2.7:

>>> import gopy
>>> hi = gopy.load("github.com/go-python/gopy/_examples/hi")
[...]
>>> print hi
<module 'gopy.hi' from '/home/binet/dev/go/root/path/src/github.com/go-python/gopy/hi.so'>

>>> hi.Hello("you")
hello you from go

>>> hi = gopy.load("github.com/go-python/gopy/_examples/hi")
[...]
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff43ca4c0 in runtime.sigtrampgo (sig=17, info=0x7fffffffd3f0, ctx=0x7fffffffd2c0) at /home/binet/dev/go/root/go/src/runtime/signal_linux.go:93
93      setg(g.m.gsignal)
(gdb) bt
#0  0x00007ffff43ca4c0 in runtime.sigtrampgo (sig=17, info=0x7fffffffd3f0, ctx=0x7fffffffd2c0) at /home/binet/dev/go/root/go/src/runtime/signal_linux.go:93
#1  0x00007ffff43e853b in runtime.sigtramp () at /home/binet/dev/go/root/go/src/runtime/sys_linux_amd64.s:234
#2  0x00007ffff43e8540 in runtime.sigtramp () at /home/binet/dev/go/root/go/src/runtime/sys_linux_amd64.s:235
#3  0x0000000000000001 in ?? ()
#4  0x0000000000000000 in ?? ()
@sbinet sbinet added the bug label Aug 6, 2015
@sbinet sbinet self-assigned this Aug 6, 2015
@sbinet
Copy link
Member Author

sbinet commented Aug 6, 2015

this is most probably: golang/go#11100

sbinet added a commit that referenced this issue Aug 12, 2015
While waiting for #27 to be handled upstream, prevent users from crashing their
interpreter by not allowing to reload a C-extension module if already wrapped
and compiled.

Fixes #46.

Change-Id: Ic9624beae3061b286d09aca71882915923bd6298
@shtripat
Copy link

Something similar I face while executing a python code from go.
If the python raises and exception once, next calls dont event go to python and go-python returns immediately with blank return value from CallObject() call.

In my scenario, I need to log this error, but next execution should succeed. But here after first exception in python no python calls are possble at all and I need to re-start the go service again.

Kindly suggest, how to tackle this scenario.

@sbinet
Copy link
Member Author

sbinet commented Jan 12, 2016

@shtripat are you sure this is the correct issue tracker for this? (ie: aren't you confusing with sbinet/go-python ?)
in any case, please file a new issue with the minimum amount of code to reproduce.

thanks.

@rcoreilly
Copy link
Member

for old version, closing

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