Giter Club home page Giter Club logo

Comments (10)

dotnwat avatar dotnwat commented on June 14, 2024

That's a bug. Thanks for reporting. I'll have a fix soon.

from lua-rados.

czheo avatar czheo commented on June 14, 2024

Just a supplemental report: it seems the behavior of stat() is not deterministic. Sometimes it raises an unknown error(can be caught by lua) and sometimes it throws segment fault.

from lua-rados.

dotnwat avatar dotnwat commented on June 14, 2024

do you have a minimal example of a script that will reproduce the error?

from lua-rados.

czheo avatar czheo commented on June 14, 2024
-- test.lua
rados = require 'rados'

cluster = rados.create()
cluster:conf_read_file()
cluster:connect()
ioctx = cluster:open_ioctx('test_pool')

print(ioctx:stat('test_obj'))

After several runs of the script, a segfault occurs as below. Sometimes, the segfault happens more often.
image

from lua-rados.

dotnwat avatar dotnwat commented on June 14, 2024

from lua-rados.

czheo avatar czheo commented on June 14, 2024

image

from lua-rados.

dotnwat avatar dotnwat commented on June 14, 2024

I'm testing with an older version of Ceph and the same verison of Lua, and I can't reproduce the error. I'll try with a newer version of Ceph soon. Would you be able to run this under GDB to get a back trace, or send me a core dump after the segfault?

from lua-rados.

czheo avatar czheo commented on June 14, 2024

Here is the back trace generated from the core dump. It seems this is not caused by the stat() function but the close operation on ioctx.

(gdb) core core
warning: core file may not match specified executable file.
[New LWP 8150]
[New LWP 8151]
[New LWP 8155]
[New LWP 8153]
[New LWP 8152]
[New LWP 8160]
[New LWP 8159]
[New LWP 8158]
[New LWP 8156]
[New LWP 8154]
[New LWP 8157]
[New LWP 8163]
[New LWP 8162]
[New LWP 8161]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `lua test.lua'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f7a87c4b14c in librados::IoCtx::close() () from /usr/lib/librados.so.2
[Current thread is 1 (Thread 0x7f7a9166d700 (LWP 8150))]

(gdb) bt full
#0  0x00007fb70f31e14c in librados::IoCtx::close() () from /usr/lib/librados.so.2
No symbol table info available.
#1  0x00007fb70f31f025 in librados::Rados::ioctx_create(char const*, librados::IoCtx&) () from /usr/lib/librados.so.2
No symbol table info available.
#2  0x00007fb717bdf3a7 in lrad_open_ioctx (L=0x1f9a010) at lua_rados.cc:301
        cluster = 0x1fa2218
        pool_name = 0x1fa3838 "test_pool"
        ioctx = 0x20dc898
        ret = <optimized out>
#3  0x00000000004080e0 in luaD_precall (L=L@entry=0x1f9a010, func=func@entry=0x1f9a420, nresults=nresults@entry=1) at ldo.c:320
        ci = <optimized out>
        n = <optimized out>
        cl = <optimized out>
        funcr = <optimized out>
#4  0x00000000004116e2 in luaV_execute (L=L@entry=0x1f9a010, nexeccalls=nexeccalls@entry=1) at lvm.c:591
        b = <optimized out>
        nresults = 1
        i = <optimized out>
        ra = 0x1f9a420
        cl = 0x1fa3ba0
        base = <optimized out>
        k = 0x1fa3650
        pc = 0x1fa3558
#5  0x000000000040853d in luaD_call (L=0x1f9a010, func=0x1f9a410, nResults=<optimized out>) at ldo.c:378
No locals.
#6  0x000000000040782b in luaD_rawrunprotected (L=L@entry=0x1f9a010, f=f@entry=0x404950 <f_call>, ud=ud@entry=0x7ffed5767f60)
    at ldo.c:116
        lj = {previous = 0x7ffed57680e0, b = {{__jmpbuf = {33136656, -7142391443340622946, 0, 1, 1, 33137280,
                7141734621551821726, -7142388360951594082}, __mask_was_saved = 0, __saved_mask = {__val = {
                  0 <repeats 13 times>, 268435456, 7795503554532172149, 8299690376036639087}}}}, status = 0}
#7  0x000000000040869b in luaD_pcall (L=L@entry=0x1f9a010, func=func@entry=0x404950 <f_call>, u=u@entry=0x7ffed5767f60,
    old_top=64, ef=<optimized out>) at ldo.c:464
---Type <return> to continue, or q <return> to quit---
        status = <optimized out>
        oldnCcalls = 1
        old_ci = 40
        old_allowhooks = 1 '\001'
        old_errfunc = 0
#8  0x0000000000405d26 in lua_pcall (L=L@entry=0x1f9a010, nargs=nargs@entry=0, nresults=-1, errfunc=errfunc@entry=2)
    at lapi.c:821
        c = {func = 0x1f9a410, nresults = -1}
        status = <optimized out>
        func = <optimized out>
#9  0x0000000000403ecc in docall (L=0x1f9a010, narg=0, clear=0) at lua.c:102
        status = <optimized out>
        base = 2
#10 0x00000000004048a9 in handle_script (n=<optimized out>, argv=<optimized out>, L=<optimized out>) at lua.c:250
        status = 0
        fname = <optimized out>
#11 pmain (L=0x1f9a010) at lua.c:362
        s = 0x7ffed5768250
        argv = <optimized out>
        has_i = <optimized out>
        has_v = <optimized out>
        has_e = <optimized out>
#12 0x00000000004080e0 in luaD_precall (L=L@entry=0x1f9a010, func=func@entry=0x1f9a3e0, nresults=0) at ldo.c:320
        ci = <optimized out>
        n = <optimized out>
        cl = <optimized out>
        funcr = <optimized out>
#13 0x00000000004084f4 in luaD_call (L=0x1f9a010, func=0x1f9a3e0, nResults=<optimized out>) at ldo.c:377
No locals.
#14 0x000000000040782b in luaD_rawrunprotected (L=L@entry=0x1f9a010, f=f@entry=0x404960 <f_Ccall>, ud=ud@entry=0x7ffed5768220)
    at ldo.c:116
        lj = {previous = 0x0, b = {{__jmpbuf = {33136656, -7142391443343768674, 0, 1, 0, 33137280, 7141734623741248414,
---Type <return> to continue, or q <return> to quit---
                -7142388360951594082}, __mask_was_saved = 0, __saved_mask = {__val = {0, 33136656, 11304355161124930462,
                  4269024, 140732479734624, 0, 0, 7141734623797871518, 11304355712757957534, 0, 0, 4269024, 616, 0, 0,
                  140424358989119}}}}, status = 0}
#15 0x000000000040869b in luaD_pcall (L=L@entry=0x1f9a010, func=func@entry=0x404960 <f_Ccall>, u=u@entry=0x7ffed5768220,
    old_top=16, ef=ef@entry=0) at ldo.c:464
        status = <optimized out>
        oldnCcalls = 0
        old_ci = 0
        old_allowhooks = 1 '\001'
        old_errfunc = 0
#16 0x0000000000405db5 in lua_cpcall (L=L@entry=0x1f9a010, func=func@entry=0x404380 <pmain>, ud=ud@entry=0x7ffed5768250)
    at lapi.c:856
        c = {func = 0x404380 <pmain>, ud = 0x7ffed5768250}
        status = <optimized out>
#17 0x0000000000403b94 in main (argc=2, argv=0x7ffed5768368) at lua.c:387
        status = <optimized out>
        s = {argc = 2, argv = 0x7ffed5768368, status = 0}
        L = 0x1f9a010

from lua-rados.

dotnwat avatar dotnwat commented on June 14, 2024

is it possible that you are running lua-rados with a version of rados that is different than the one you compiled with?

from lua-rados.

czheo avatar czheo commented on June 14, 2024

I am running using this docker image: https://hub.docker.com/r/ceph/demo/

It seems librados-dev and ceph are both 11.2.0

[14:46:36][root@ed924ffed822][~] 6 files
:) apt-get install librados-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
librados-dev is already the newest version (11.2.0-1xenial).
0 upgraded, 0 newly installed, 0 to remove and 18 not upgraded.

[14:46:40][root@ed924ffed822][~] 6 files
:) ceph -v
ceph version 11.2.0 (f223e27eeb35991352ebc1f67423d4ebc252adb7)

from lua-rados.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.