Skip to content

SIGSEGV on running text/expirations.test.py (fiber 1 is switched while running GC finalizer (i.e. __gc metamethod)) #133

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

Open
ligurio opened this issue Oct 11, 2024 · 1 comment
Labels
1sp bug Something isn't working teamE

Comments

@ligurio
Copy link
Member

ligurio commented Oct 11, 2024

[005] binary/binary-expire.test.py                                    [ pass ]
[005]
[005]
[005] [Instance "binary" returns with non-zero exit code: 1]
[005]
[005] [test-run server "binary"] Last 15 lines of the log file /tmp/t/005_binary/binary.log:
[005] #8  0x5616a2778c42 in lj_ccall_func+898
[005] #9  0x5616a2749580 in lj_cf_ffi_meta___call+176
[005] #10 0x5616a272abb3 in lj_BC_FUNCC+70
[005] #11 0x5616a27342f5 in gc_call_finalizer.isra.0+133
[005] #12 0x5616a273545c in lj_gc_finalize_cdata+140
[005] #13 0x5616a2737bcd in cpfinalize+13
[005] #14 0x5616a272afa4 in lj_vm_cpcall+86
[005] #15 0x5616a2737f91 in lua_close+177
[005] #16 0x5616a26ba254 in tarantool_lua_free+260
[005] #17 0x5616a24ce690 in main+2480
[005] #18 0x7f84e6011083 in __libc_start_main+243
[005] #19 0x5616a24cf11e in _start+46
[005] 2024-10-11 14:05:40.750 [3951] main C> fiber 1 is switched while running GC finalizer (i.e. __gc metamethod)
[005] 2024-10-11 14:05:40.750 [3951] main I> destroying slab cache
[005] 2024-10-11 14:05:40.750 [3951] main I> destroying arena...

main C> fiber 1 is switched while running GC finalizer (i.e. __gc metamethod)

Source: https://github.com/tarantool/tarantool/blob/a4b4158f2196442308aba7df8f8e21b98b5319fc/src/lua/utils.c#L1155
CI: https://github.com/tarantool/tarantool/actions/runs/11293697488/job/31413793885?pr=10632#step:9:115

Tarantool version: master, 47295fdebc1910b990c391c26fe92918a9c0c001
memcached version: c5fd957

Full log: job-logs.txt

@Totktonada
Copy link
Member

This GC hook:

instance.service = ffi.gc(service, memcached_internal.memcached_free)

Yields:

void
memcached_free(struct memcached_service *srv)
{
memcached_stop(srv);
if (srv) free((void *)srv->name);
free(srv);
}

void
memcached_stop (struct memcached_service *srv)
{
memcached_expire_stop(srv);
while (srv->stat.curr_conns != 0)
fiber_sleep(0.001);
}

Igor doesn't like such hooks.

@oleg-jukovec oleg-jukovec added 1sp bug Something isn't working teamE labels Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1sp bug Something isn't working teamE
Projects
None yet
Development

No branches or pull requests

3 participants