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

gpsee_getRealm throws during finalizers called during shutdown #98

Open
GoogleCodeExporter opened this issue Aug 23, 2015 · 0 comments
Open

Comments

@GoogleCodeExporter
Copy link

Basically, when cx is grt->coreCx, we have no realm.

If we want to use the data store at realm->moduleData in a finalizer, we assert 
in gpsee_getRealm() if the finalized object is a property of the global object.

Proposed work around:  Make gpsee_getRealm() fallible, and return NULL when cx 
is grt->coreCx.  This can let module writers know that we are busy shutting 
down the module system if that is enough information for them. 

Program received signal SIGABRT, Aborted.
[Switching to Thread 1 (LWP 1)]
0xfef4155c in _lwp_kill () from /usr/lib/libc.so.1
(gdb) bt
#0  0xfef4155c in _lwp_kill () from /usr/lib/libc.so.1
#1  0xfeedff00 in raise () from /usr/lib/libc.so.1
#2  0xfeec0120 in abort () from /usr/lib/libc.so.1
#3  0xfed4618c in gpsee_assert (s=0xfed60e50 "realm", file=0xfed60e58 
"gpsee_realms.c", ln=118) at gpsee.c:92
#4  0xfed59b8c in gpsee_getRealm (cx=0x34b78) at gpsee_realms.c:118
#5  0xfe646d04 in mysqlEntry_Finalize (cx=0x34b78, obj=0xfe512040) at 
mysql/mysqlEntry.c:859
#6  0xff18fd30 in js_GC(JSContext*, JSGCInvocationKind) () from 
/var/surelynx/platform/SunOS-5.10-sun4u-sparc/lib/apr_surelynx/libmozjs.so
#7  0xfed5a158 in gpsee_destroyRealm (cx=0x34b78, realm=0x17a1b0) at 
gpsee_realms.c:285
#8  0xfed479ec in destroyRealm_cb (cx=0x34b78, key=0x17a1b0, value=0x0, 
private=0x0) at gpsee.c:638
#9  0xfed592f4 in gpsee_ds_forEach (cx=0x34b78, store=0x1795b0, cb=0xfed479c0 
<destroyRealm_cb>, private=0x0) at gpsee_datastores.c:371
#10 0xfed47bf4 in gpsee_destroyRuntime (grt=0x36438) at gpsee.c:680
#11 0xfed48a00 in gpsee_destroyInterpreter (jsi=0x289e0) at gpsee.c:981
#12 0x00013c84 in prmain (argc=2, argv=0xffbff774) at gsr.c:895
#13 0xff0bdd68 in PR_Initialize () from /usr/lib/mps/libnspr4.so
#14 0x00013cdc in main (argc=2, argv=0xffbff774) at gsr.c:903
(gdb)

Original issue reported on code.google.com by wes@page.ca on 15 Jun 2012 at 9:30

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

No branches or pull requests

1 participant