Project

General

Profile

Bug #11751

mdb refuses to use version 4 mdb modules after 10859

Added by Gordon Ross about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

After updating to a build containing #10859 mdb is unable to
load modules that were compiled with module API version 4

$ mdb -L $ROOT/usr/lib/mdb/proc:/usr/lib/mdb/proc -p 11319
Loading modules: [ ld.so.1 libumem.so.1mdb: libfksmbsrv.so.1 module is
compiled for obsolete mdb API version 4
mdb: libmlsvc.so.1 module is compiled for obsolete mdb API version 4
mdb: libcmdutils.so.1 module is compiled for obsolete mdb API version 4
 libc.so.1mdb: libavl.so.1 module is compiled for obsolete mdb API version 4
 libtopo.so.1 libuutil.so.1 libnvpair.so.1 ]
> ::smblist
mdb: invalid command '::smblist': unknown dcmd name
#1

Updated by Gordon Ross about 1 year ago

It appears that MDB_API_VERSION was not meant to change
for simple additions like mdb_nicenum, but rather only when
the API had to change in ways that would break compatibility.

However, now that version 5 has been out for a few months,
it might be difficult to back out the unnecessary version change.
As an alternative, restoring version 4 support may be sufficient, e.g.

diff --git a/usr/src/cmd/mdb/common/mdb/mdb_module.c
b/usr/src/cmd/mdb/common/mdb/mdb_module.c
index 286f9d0074..ab094b2375 100644
--- a/usr/src/cmd/mdb/common/mdb/mdb_module.c
+++ b/usr/src/cmd/mdb/common/mdb/mdb_module.c
@@ -183,6 +183,7 @@ mdb_module_create(const char *name, const char
*fname, int mode,
  */
  switch (info->mi_dvers) {
  case MDB_API_VERSION:
+ case 4:
  case 3:
  case 2:
  case 1:

#2

Updated by Gordon Ross about 1 year ago

  • Assignee set to Toomas Soome
#3

Updated by Electric Monk about 1 year ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 9e181bc5db2232cec6a9fc936a49a828f9e83ffc

commit  9e181bc5db2232cec6a9fc936a49a828f9e83ffc
Author: Toomas Soome <tsoome@me.com>
Date:   2019-10-10T13:39:58.000Z

    11751 mdb refuses to use version 4 mdb modules after 10859
    Contributed by: Gordon Ross <gwr@nexenta.com>
    Reviewed by: Igor Kozhukhov <igor@dilos.org>
    Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
    Reviewed by: Andy Stormont <astormont@racktopsystems.com>
    Reviewed by: John Levon <john.levon@joyent.com>
    Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF