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

CTRL+C of ::findjsobjects, followed by ::findjsobjects reports only some objects #91

Closed
jordanhendricks opened this issue Aug 3, 2017 · 1 comment

Comments

@jordanhendricks
Copy link

I was debugging a core file on a Manta object. I was running version 1.1 of mdb and version 3.14.5.11 of mdb_v8:

jhendricks@manta # mdb $MANTA_INPUT_FILE
Loading modules: [ libumem.so.1 libc.so.1 ld.so.1 ]
> ::version
mdb 1.1
> ::load v8
mdb_v8 version: 1.1.4 (release, from 3a6fad0)
V8 version: 3.14.5.11
Autoconfigured V8 support from target
C++ symbol demangling enabled

While running a ::findjsobjects on the core, I ran CTRL+C. I then ran ::findjsobjects again, expecting it to restart, or at least error. Instead, it produced some output:

> ::findjsobjects
^C
> ::findjsobjects
  OBJECT #OBJECTS   #PROPS CONSTRUCTOR: PROPS
80bfdfcd        2       44 Array
80bf8415        1       60 IncomingMessage: _readableState, readable, ...
80bf0595        1       11 Object: authorization, x-forwarded-for, date, ...
80becc0d        2       32 ServerResponse: domain, _events, _maxListeners, ...
80becba5        1       34 IncomingMessage: _readableState, readable, ...
80be9cbd        1        3 Object: ...
80be2931        2        2 TypeError: arguments, type
80bdf6fd        1        3 Object: scheme, params, signingString
80bdb741        1        6 Object: writeQueueSize, owner, onread, reading, ...
80bda495        1        9 Key: type, parts, part, comment, source, ...
80bd41d5        1        4 Object: methods, name, params, spec
80bd40f1        1       28 Socket: _connecting, _handle, _readableState, ...
80bd40d5        1        4 Domain: domain, _events, _maxListeners, members
80bd11b9        2        7 Object: type, uuid, login, groups, ...
80bd1169        2        2 Object: roles, account
80bc8a7d        1       19 Socket: _connecting, _handle, _readableState, ...
80bc8791        2       24 FastMessageDecoder: _readableState, readable, ...
80bc8761        2        9 FastMessageEncoder: _readableState, readable, ...
80bc86e5        1       22 Socket: _connecting, _handle, _readableState, ...
80bc8639        1       15 FastConnection: domain, _events, _maxListeners, ...
80bc7b59        3       25 CueBallClaimHandle: ch_claimTimeout, ch_pool, ...
80bc6939        1       21 Socket: _connecting, _handle, _readableState, ...
80bc5079        7       28 Socket: _connecting, _handle, _readableState, ...
80bc4d79        1        3 Object: host, port, servername
80b8a5ed        4        1 Object: op
80b899e5       17        2 Object: metadata, parentMetadata
80b88f59       30        4 Object: op, metadata, etag, shard
80b8832d       17        4 Object: operations, successes, ndone, nerrors
80b873b5       34        5 Object: func, funcname, status, err, result
80b87325       32        2 Object: key, requestId
80b858f5       34        3 Object: op, metadata, etag
80b84869       30        1 Object: uuids
80b80401        2        3 Object: err, key, requestId
80b80101       32        2 Object: req_id, noCache
80b78865        4        2 Object: accept-encoding, accept
80b74165        4        1 Object: headers
> 

After discussion with @davepacheco, we determined ::findjsobjects would have simply stopped running after the user CTRL-C. This means that this list is an incomplete set of objects in the file, which is quite confusing to the user, given that it happily printed objects.

::findjsobjects should report an error in this case. One way to do this is to set a flag indicating whether the operation is done. If that flag isn't set, the operation should report an error.

@davepacheco
Copy link
Contributor

davepacheco commented Aug 8, 2017

I've got this fixed in a change that's wrapped up with #88 and #44.

davepacheco pushed a commit to davepacheco/mdb_v8 that referenced this issue Aug 8, 2017
joyent-automation pushed a commit that referenced this issue Aug 25, 2017
#88 want better support for bound functions
#91 CTRL+C of ::findjsobjects, followed by ::findjsobjects reports only some objects
Reviewed by: Cody Peter Mello <cody.mello@joyent.com>
Approved by: Cody Peter Mello <cody.mello@joyent.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants