Giter Site home page Giter Site logo

erlimem's People

Contributors

acautin avatar c-bik avatar dergraf avatar k2informatics avatar shamis avatar stoch avatar walter-weinmann avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

shamis zabrane

erlimem's Issues

Wrong gui_append log

The following log incorrectly showing the GUI rows buffer boundary extending at both ends

{erlimem_fsm,0778} gui_append  9822 .. 10079 tailing <<"tail">>
{erlimem_fsm,0778} gui_append  9821 .. 10080 tailing <<"tail">>
{erlimem_fsm,0778} gui_append  9820 .. 10081 tailing <<"tail">>
{erlimem_fsm,0778} gui_append  9819 .. 10082 tailing <<"tail">>
{erlimem_fsm,0778} gui_append  9818 .. 10083 tailing <<"tail">>
{erlimem_fsm,0778} gui_append  9817 .. 10084 tailing <<"tail">>
{erlimem_fsm,0778} gui_append  9816 .. 10085 tailing <<"tail">>
{erlimem_fsm,0778} gui_append  9815 .. 10086 tailing <<"tail">>
{erlimem_fsm,0778} gui_append  9814 .. 10087 tailing <<"tail">>
{erlimem_fsm,0778} gui_append  9813 .. 10088 tailing <<"tail">>
{erlimem_fsm,0778} gui_append  9812 .. 10089 tailing <<"tail">>
{erlimem_fsm,0778} gui_append  9811 .. 10090 tailing <<"tail">>
{erlimem_fsm,0778} gui_append  9810 .. 10091 tailing <<"tail">>
{erlimem_fsm,0778} gui_append  9809 .. 10092 tailing <<"tail">>
{erlimem_fsm,0778} gui_append  9808 .. 10093 tailing <<"tail">>
{erlimem_fsm,0778} gui_append  9807 .. 10094 tailing <<"tail">>
{erlimem_fsm,0778} gui_append  9806 .. 10095 tailing <<"tail">>
{erlimem_fsm,0778} gui_append  9805 .. 10096 tailing <<"tail">>
{erlimem_fsm,0778} gui_append  9804 .. 10097 tailing <<"tail">>
{erlimem_fsm,0778} gui_append  9803 .. 10098 tailing <<"tail">>
{erlimem_fsm,0778} gui_append  9802 .. 10099 tailing <<"tail">>
{erlimem_fsm,0778} gui_append  9801 .. 10100 tailing <<"tail">>

Remove rpc interface

rpc interface is not functional anymore as rpc call creates a process and that is being registered which when the call finishes dies. This will result in killing the session process.

IMem in Coldstart Scenario "Insufficient resources for start"

Hello guys

when starting MPro we get the following Errors. MPro cannot start anymore because of this. It is very important to fix this until tomorrow.

All the best
André

Erlang R16B (erts-5.10.1) [source-05f1189] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V5.10.1  (abort with ^G)
1> 18.06.2013 17:29:47.092969 [_IMEM_] {imem_app, 0046} imem_app - CM not defined!
18.06.2013 17:29:47.110544 [_IMEM_] {imem_server, 0022} <0.48.0> listening on {0,
                                                                               0,
                                                                               0,
                                                                               0}:8124
18.06.2013 17:29:47.143580 [_IMEM_] {imem_sup, 0082} imem_sup initializing with ImemTimeout 30000
18.06.2013 17:29:47.149501 [_IMEM_] {imem_if, 0691} SchemaDir "/Users/duke/Documents/projects/mpro/apps/mpro/Imem.nonode@nohost"
18.06.2013 17:29:47.151303 [_IMEM_] {imem_if, 0694} imem_if sleeping for 70 ms...
18.06.2013 17:29:47.319238 [_IMEM_] {imem_if, 0699} imem_if no node found at nonode@nohost for schema 'Imem' in erlang cluster nocookie
18.06.2013 17:29:47.347644 [_IMEM_] {imem_if, 0709} imem_if started as undefined!
18.06.2013 17:29:47.404335 [_IMEM_] {imem_if, 0813} imem_if old snapshots are backed up to "snapshot/snapshot_1371569387348990.zip"
18.06.2013 17:29:47.404515 [_IMEM_] {imem_if, 0716} SnapshotDir "/Users/duke/Documents/projects/mpro/apps/mpro/snapshot"
18.06.2013 17:29:47.409872 [_IMEM_] {imem_meta, 0146} imem_meta starting...
18.06.2013 17:29:47.435475 [_IMEM_] {imem_if, 0357} create_table {atomic,ok} for ddTable
18.06.2013 17:29:47.439434 [_IMEM_] {imem_if, 0357} create_table {atomic,ok} for ddLog_1371600000@nohost
18.06.2013 17:29:47.440418 [_IMEM_] {imem_if, 0357} create_table {atomic,ok} for ddMonitor_1371600000@nohost
18.06.2013 17:29:47.441089 [_IMEM_] {imem_if, 0357} create_table {atomic,ok} for dual
18.06.2013 17:29:47.441545 [_IMEM_] {imem_meta, 0164} imem_meta started!
18.06.2013 17:29:47.444708 [_IMEM_] {imem_seco, 0061} imem_seco starting...
18.06.2013 17:29:47.444933 [_IMEM_] {imem_seco, 0099} imem_seco failed with throw:{'ClientError',
                                                                                   {"Table does not exist",
                                                                                    ddLog@nohost}}
18.06.2013 17:29:47.445164 [_IMEM_] {imem_sup, 0066} imem_sup startup failed with {error,
                                                                                   {shutdown,
                                                                                    {failed_to_start_child,
                                                                                     imem_seco,
                                                                                     "Insufficient resources for start"}}}

=INFO REPORT==== 18-Jun-2013::17:29:47 ===
    application: imem
    exited: {{shutdown,
                 {failed_to_start_child,imem_seco,
                     "Insufficient resources for start"}},
             {imem_app,start,[normal,[]]}}
    type: temporary
18.06.2013 17:29:47.450348 [info] [_IMDR_] {erlimem_app,0022} erlimem application started
18.06.2013 17:29:47.454161 [info] [_IMDR_] {erlimem_session,0068} started <0.92.0> connected to {<<"admin">>,
                                                                                                 local,
                                                                                                 {"Mpro"}}
18.06.2013 17:29:47.457155 [_IMEM_] {imem_if, 0357} create_table {atomic,ok} for mproLog@nohost
18.06.2013 17:29:47.457266 [error] [_IMDR_] {erlimem_session,0214} throw {badarg,
                                                                          [{ets,
                                                                            insert,
                                                                            [imem_if,
                                                                             {user_properties,
                                                                              mproLog@nohost,
                                                                              {1371,
                                                                               569387,
                                                                               456840},
                                                                              {1371,
                                                                               569387,
                                                                               456840}}],
                                                                            []},
                                                                           {imem_if,
                                                                            create_table,
                                                                            2,
                                                                            [{file,
                                                                              "src/imem_if.erl"},
                                                                             {line,
                                                                              359}]},
                                                                           {imem_meta,
                                                                            create_physical_table,
                                                                            4,
                                                                            [{file,
                                                                              "src/imem_meta.erl"},
                                                                             {line,
                                                                              533}]},
                                                                           {imem_meta,
                                                                            create_check_table,
                                                                            4,
                                                                            [{file,
                                                                              "src/imem_meta.erl"},
                                                                             {line,
                                                                              474}]},
                                                                           {imem_server,
                                                                            mfa,
                                                                            2,
                                                                            [{file,
                                                                              "src/imem_server.erl"},
                                                                             {line,
                                                                              85}]},
                                                                           {erlimem_cmds,
                                                                            exec_catch,
                                                                            5,
                                                                            [{file,
                                                                              "src/erlimem_cmds.erl"},
                                                                             {line,
                                                                              32}]},
                                                                           {erlimem_session,
                                                                            handle_call,
                                                                            3,
                                                                            [{file,
                                                                              "src/erlimem_session.erl"},
                                                                             {line,
                                                                              113}]},
                                                                           {gen_server,
                                                                            handle_msg,
                                                                            5,
                                                                            [{file,
                                                                              "gen_server.erl"},
                                                                             {line,
                                                                              588}]}]} to {<0.40.0>,
                                                                                           #Ref<0.0.0.270>}
17:29:47.467 [debug] Lager installed handler {mpro_log_router,file} into lager_event
17:29:47.467 [debug] Lager installed handler {mpro_log_router,file} into lager_event
17:29:47.585 [debug] Lager installed handler lager_backend_throttle into lager_event
18.06.2013 17:29:47.661151 [_IMEM_] {imem_app, 0046} imem_app - CM not defined!
18.06.2013 17:29:47.661531 [_IMEM_] {imem_server, 0022} <0.111.0> listening on {0,
                                                                                0,
                                                                                0,
                                                                                0}:8124
18.06.2013 17:29:47.661749 [_IMEM_] {imem_sup, 0082} imem_sup initializing with ImemTimeout 30000
18.06.2013 17:29:47.661957 [_IMEM_] {imem_if, 0691} SchemaDir "/Users/duke/Documents/projects/mpro/apps/mpro/Imem.nonode@nohost"
18.06.2013 17:29:47.662043 [_IMEM_] {imem_if, 0694} imem_if sleeping for 993 ms...
18.06.2013 17:29:48.656293 [_IMEM_] {imem_if, 0699} imem_if no node found at nonode@nohost for schema 'Imem' in erlang cluster nocookie
18.06.2013 17:29:48.656608 [_IMEM_] {imem_if, 0709} imem_if started as undefined!
18.06.2013 17:29:48.662545 [_IMEM_] {imem_if, 0813} imem_if old snapshots are backed up to "snapshot/snapshot_1371569388657830.zip"
18.06.2013 17:29:48.662792 [_IMEM_] {imem_if, 0716} SnapshotDir "/Users/duke/Documents/projects/mpro/apps/mpro/snapshot"
18.06.2013 17:29:48.662971 [_IMEM_] {imem_meta, 0146} imem_meta starting...
18.06.2013 17:29:48.663362 [_IMEM_] {imem_if, 0341} table ddTable locally exists
18.06.2013 17:29:48.664246 [_IMEM_] {imem_if, 0341} table ddLog_1371600000@nohost locally exists
18.06.2013 17:29:48.664978 [_IMEM_] {imem_if, 0341} table ddMonitor_1371600000@nohost locally exists
18.06.2013 17:29:48.665464 [_IMEM_] {imem_if, 0341} table dual locally exists
18.06.2013 17:29:48.665844 [_IMEM_] {imem_meta, 0164} imem_meta started!
18.06.2013 17:29:48.665953 [_IMEM_] {imem_seco, 0061} imem_seco starting...
18.06.2013 17:29:48.666108 [_IMEM_] {imem_seco, 0099} imem_seco failed with throw:{'ClientError',
                                                                                   {"Table does not exist",
                                                                                    ddLog@nohost}}
18.06.2013 17:29:48.666304 [_IMEM_] {imem_sup, 0066} imem_sup startup failed with {error,
                                                                                   {shutdown,
                                                                                    {failed_to_start_child,
                                                                                     imem_seco,
                                                                                     "Insufficient resources for start"}}}

=INFO REPORT==== 18-Jun-2013::17:29:48 ===
    application: imem
    exited: {{shutdown,
                 {failed_to_start_child,imem_seco,
                     "Insufficient resources for start"}},
             {imem_app,start,[normal,[]]}}
    type: temporary

Sort exception on single column sorting

DESC sort on name(qname) column of 'All Tables'

{imem_sql, 0569} sort on col position 1 Ti=1 Ci=2 {ddColMap,
   '$1',
   'Imem',
   all_tables,
   qname,
   <<"name(qname)">>,
   1,
   2,
   tuple,
   0,
   0,
   undefined,
   false,
   name}
{erlimem_fsm,1520} data_sort NewSql="select name(qname) from all_tables  order by Imem.all_tables.qname asc "
    NewSortFun=#Fun<imem_sql.10.103381686>
{erlimem_fsm,1552} data_index nav=ind Srt=true IndCnt=15 IndTop={{{'Imem',
      ddAccount}},
    9} IndBot={{{'Imem',
                 dual}},
               8}
{erlimem_fsm,1517} data_sort [{1,
                               <<"desc">>}] data_filter {undefined,
                                                         []}
{imem_sql, 0569} sort on col position 1 Ti=1 Ci=2 {ddColMap,
    '$1',
    'Imem',
    all_tables,
    qname,
    <<"name(qname)">>,
    1,
    2,
    tuple,
    0,
    0,
    undefined,
    false,
    name}
{erlimem_fsm,0229} filter_and_sort({undefined, []}
        , [{1, <<"desc">>}]) ->
         {"Unsupported datatype for sort desc",tuple}

Concurrent Session usage

Currently the same session process cannot be used concurrently by many processes. If two processes share the same session and both run a command simultaneously only one of the two gets a reply, resulting in a gen_server timeout for the other.

Secure session double cleanup

Dying DDerl sessions and see the following:

[info] [_IMEM_] {imem_statement,612}
 received normal exit from parent <0.3568.0> ref #Ref<0.0.0.17065>
[error] [_DDRL_] {imem_adapter,689} Error trying to close the connection
 {erlimem_session,<0.3568.0>} exit:{noproc,{gen_server,call,[<0.3568.0>,stop]}}
[info] [_DDRL_] {dderl_session,150} dderl_session {<0.3567.0>,<<"TGDOCST1">>}
 terminating, reason normal

cc @stoch

Sorting on wrong column

image

resulting: order by Imem.v.id asc

select c.owner, v.name from ddView v, ddCmd c where c.id = v.cmd and c.adapters = "[imem]" and (c.owner = user or c.owner = system) order by Imem.v.id asc 

Timeout of session authorization redesign

Issue : K2InformaticsGmbH/dderl#132
By : @stoch

For every wrong password I give in the DDerl login popup, I get a message similar to these two after > 10 minutes:

2015-10-12 08:17:59.158 [error] <0.20295.0>@erlimem_session:handle_info:243 [IMDR]
{erlimem_session,243} Session authorization timeout
2015-10-12 08:18:40.016 [error] <0.20312.0>@erlimem_session:handle_info:243 [IMDR]
{erlimem_session,243} Session authorization timeout

Can we avoid this resource issue under attack ?

Tesing

f().
{ok, EIS} = erlimem:open({tcp, {127,0,0,1}, 1236, [ssl]}, dderl).
{erlimem_session, Pid} = EIS.
EIS:auth(dderl, <<"testing">>, {pwdmd5,{<<"system">>,erlang:md5(<<"change_on_install">>)}}).

Solution

  • remove long global timeout for spawn session process (TCP connect) through all auth steps till login
  • after spawning session process (also connecting TCP socket) each auth step must be completed within a short time (use short timeouts for each auth step)

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.