OpenSolaris

Printable Version Enter a New Search
Bug ID 6521585
Synopsis metasync dumps core if its argument is not a valid metadevice name
State 3-Accepted (Yes, that is a problem)
Category:Subcategory kernel:svm
Keywords svm-backlog
Responsible Engineer Petr Skovron
Reported Against
Duplicate Of
Introduced In solaris_9
Commit to Fix
Fixed In
Release Fixed , solaris_nevada(snv_86) (Bug ID:2159271)
Related Bugs
Submit Date 6-February-2007
Last Update Date 12-March-2008
Description
Metasync drops core if argument is not a metadevice name.  E.g.

    metasync db30

Produces this:

# metasync db30
Assertion failed: sp->setno == MD_MIN2SET(meta_getminor(np->dev)), file ../common/meta_resync.c, line 31
metasync: Abort
Abort - core dumped

Whereas the correct name:

# metasync d30
#

Causes no trouble.  It seems any argument starting with "d" is accepted, decoded,
and if invalid causes this assertion failure and corefile.

It seems a correctly formed but non-existing metadevice name 
or a name starting other than "d" elicits an error  but
no corefile:

# metasync d0
metasync: coslab131: d0: No such file or directory

A single argument starting with a numeric gets a SIGSEGV:

# metasync 0
metasync: Segmentation Fault
Segmentation Fault - core dumped

I suspect we need more robust argument checking here.  This may be made more difficult
by "friendly names" and perhaps was introduced with that feature.
Work Around
Use the correct argument.
Comments
N/A