OpenSolaris

Printable Version Enter a New Search
Bug ID 6488125
Synopsis fssnap generates misleading error messages when the file system could not be write locked
State 10-Fix Delivered (Fix available in build)
Category:Subcategory kernel:fssnap
Keywords
Responsible Engineer Saurabh Mishra
Reported Against s81
Duplicate Of
Introduced In
Commit to Fix snv_78
Fixed In snv_78
Release Fixed solaris_nevada(snv_78)
Related Bugs 4836824
Submit Date 31-October-2006
Last Update Date 21-November-2007
Description
Solaris 9 + 118558-18 or later.

When fssnap creates snapshots of a file system whose certain pages are locked in memory,
fssnap generates a misleading error message:
fssnap: ioctl: error 22: Invalid argument

With 118558-17 or earlier, the error message was more accurate:
snapshot error: File system could not be write locked 


To reproduce:
Write a small testing program to lock pages, and then run fssnap over the same file system.


Truss out with 118558-17:
344:    -> main(0x4, 0xffbffe6c, 0xffbffe80, 0x23800)
344:    brk(0x00024028)                                 = 0
344:    brk(0x00026028)                                 = 0
344:    open64("/fruit", O_RDONLY)                      = 3
344:      -> create_snap(0x3, 0x24038, 0x0, 0x0)
344:        -> open_backpath(0x3, 0xffbffdb0, 0xffbffd64, 0xfffffff8)
344:    stat64("/var/tmp", 0xFFBFF840)                  = 0
344:        d=0x00800000 i=5831  m=0041777 l=6  u=0     g=3     sz=512
344:            at = Oct 31 11:25:37 SGT 2006  [ 1162265137 ]
344:            mt = Oct 31 11:28:43 SGT 2006  [ 1162265323 ]
344:            ct = Oct 31 11:28:43 SGT 2006  [ 1162265323 ]
344:        bsz=8192  blks=2     fs=ufs
344:    open64("/var/tmp/snapshot0", O_RDWR|O_CREAT|O_EXCL, 0600) = 4
344:    fstatvfs64(3, 0xFFBFF388)                       = 0
344:            bsize=8192       frsize=1024      blocks=123023   bfree=111387
344:            bavail=99085     files=70656      ffree=70645     favail=70645
344:            fsid=0x800008    basetype=ufs     namemax=255
344:            flag=ST_NOTRUNC
344:            fstr=""
344:    llseek(4, 0x07823BFF, SEEK_SET)                 = 0x07823BFF
344:    write(4, " 0", 1)                               = 1
344:        <- open_backpath() = 4
344:    open64("/dev/fssnapctl", O_RDONLY|O_EXCL)       = 5
344:    ioctl(5, 0x20006658, 0xFFBFF940)                Err#22 EINVAL
344:    unlink("/var/tmp/snapshot0")                    = 0
344:        -> die_create_error(0x4, 0x20006658, 0xffbff940, 0x74300000)
344:    fstat64(2, 0xFFBFE988)                          = 0
344:        d=0x00800000 i=25332 m=0020620 l=1  u=0     g=7     rdev=0x00600001
344:            at = Oct 31 11:28:23 SGT 2006  [ 1162265303 ]
344:            mt = Oct 31 11:28:23 SGT 2006  [ 1162265303 ]
344:            ct = Oct 31 11:28:21 SGT 2006  [ 1162265301 ]
344:        bsz=8192  blks=0     fs=ufs
344:    write(2, " s n a p s h o t   e r r".., 16)      = 16
344:    write(2, " F i l e   s y s t e m  ".., 38)      = 38
344:    <- main() = 2
344:    -> _fini(0x0, 0x9f4c4, 0x10ed8, 0xff28bab4)
344:    <- _fini() = 0
344:    _exit(2)



Truss output with the 118558-34:
351:    -> main(0x4, 0xffbffe6c, 0xffbffe80, 0x24000)
351:    brk(0x00024680)                                 = 0
351:    brk(0x00026680)                                 = 0
351:    open64("/fruit", O_RDONLY)                      = 3
351:      -> create_snap(0x3, 0x24690, 0x0, 0x0)
351:        -> open_backpath(0x3, 0x80, 0x0, 0xffbffdb0)
351:    fstatvfs64(3, 0xFFBFFC40)                       = 0
351:            bsize=8192       frsize=1024      blocks=123023   bfree=111387
351:            bavail=99085     files=70656      ffree=70645     favail=70645
351:            fsid=0x800008    basetype=ufs     namemax=255
351:            flag=ST_NOTRUNC
351:            fstr=""
351:    stat64("/var/tmp", 0xFFBFFBA8)                  = 0
351:        d=0x00800000 i=5831  m=0041777 l=6  u=0     g=3     sz=1024
351:            at = Oct 31 12:51:31 SGT 2006  [ 1162270291 ]
351:            mt = Oct 31 12:53:48 SGT 2006  [ 1162270428 ]
351:            ct = Oct 31 12:53:48 SGT 2006  [ 1162270428 ]
351:        bsz=8192  blks=2     fs=ufs
351:          -> open_multi_backfile(0xffbff7a8, 0x1, 0xffbffd60, 0x0)
351:            -> gen_backing_store_path(0xffbff7a8, 0x1, 0xffbff744, 0x0)
351:            <- gen_backing_store_path() = 0x250a0
351:    stat64("/var/tmp/snapshot0", 0xFFBFF6A8)        Err#2 ENOENT
351:    open64("/var/tmp/snapshot0", O_RDWR|O_CREAT|O_EXCL, 0600) = 4
351:          <- open_multi_backfile() = 0
351:    llseek(4, 0x07823BFF, SEEK_SET)                 = 0x07823BFF
351:    write(4, " 0", 1)                               = 1
351:        <- open_backpath() = 1
351:    open64("/dev/fssnapctl", O_RDONLY|O_EXCL)       = 5
351:    ioctl(5, 0x20006660, 0x000258A0)                Err#22 EINVAL
351:        -> unlink_all(0x250a0, 0x1, 0x258a0, 0x74300000)
351:          -> gen_backing_store_path(0x250a0, 0x1, 0xffbffcf4, 0x0)
351:          <- gen_backing_store_path() = 0x250c0
351:    unlink("/var/tmp/snapshot0")                    = 0
351:        <- unlink_all() = 0x250a0
351:        -> die_perror(0x24270, 0x1, 0x258a0, 0x74300000)
351:    fstat64(2, 0xFFBFEDA8)                          = 0
351:        d=0x00800000 i=25332 m=0020620 l=1  u=0     g=7     rdev=0x00600001
351:            at = Oct 31 12:53:30 SGT 2006  [ 1162270410 ]
351:            mt = Oct 31 12:53:30 SGT 2006  [ 1162270410 ]
351:            ct = Oct 31 12:53:26 SGT 2006  [ 1162270406 ]
351:        bsz=8192  blks=0     fs=ufs
351:    write(2, " f s s n a p", 6)                     = 6
351:    write(2, " :  ", 2)                             = 2
351:    write(2, " i o c t l", 5)                       = 5
351:    write(2, " :   e r r o r  ", 8)                 = 8
351:    write(2, " 2 2 :  ", 4)                         = 4
351:    write(2, " I n v a l i d   a r g u".., 16)      = 16
351:    write(2, "\n", 1)                               = 1
351:    <- main() = 2
351:    -> _fini(0x0, 0x9f4c4, 0x11060, 0xff28bab4)
351:    <- _fini() = 0
351:    _exit(2)
Work Around
N/A
Comments
N/A