OpenSolaris

Printable Version Enter a New Search
Bug ID 6785504
Synopsis bootadm(1M) doesn't stop waiting for rpc/meta
State 10-Fix Delivered (Fix available in build)
Category:Subcategory kernel:boot-x86
Keywords 137138 | bootadm | rtiq_regression | s10u7rr-waived | x64-solaris-qt
Responsible Engineer Robert Harris
Reported Against 5.10 , solaris_10 , solaris_10u1 , solaris_10u3 , solaris_10u4 , solaris_10u5
Duplicate Of
Introduced In solaris_nevada
Commit to Fix s10u8_01
Fixed In s10u8_01
Release Fixed solaris_10u8(s10u8_01) , solaris_nevada(snv_111) (Bug ID:2173231)
Related Bugs 6521412 , 6779399 , 6793609 , 6796165
Submit Date 16-December-2008
Last Update Date 20-May-2009
Description
Steps to reproduce the problem:
===============================

0) Prepare an x64 system, which has multiple disks
1) Install Solaris 10 5/08 (or earlier)
2) Configure a mirrored root file system with SVM

------------------------------------------------------------------------------
e.g.)
bash-3.00# metadb  
        flags           first blk       block count
     a m  p  luo        16              8192            /dev/dsk/c1d0s7
     a    p  luo        8208            8192            /dev/dsk/c1d0s7
     a    p  luo        16400           8192            /dev/dsk/c1d0s7
     a    p  luo        16              8192            /dev/dsk/c2d0s7
     a    p  luo        8208            8192            /dev/dsk/c2d0s7
     a    p  luo        16400           8192            /dev/dsk/c2d0s7
bash-3.00# df -k /
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/md/dsk/d10      76404895 7093001 68547846    10%    /
bash-3.00# metastat -p d10
d10 -m d11 d12 1
d11 1 1 c1d0s0
d12 1 1 c2d0s0
bash-3.00# metastat -t d10
d10: Mirror
    Submirror 0: d11
      State: Okay         Mon Dec 15 21:23:40 2008
    Submirror 1: d12
      State: Okay         Mon Dec 15 22:11:07 2008
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 155159424 blocks (73 GB)

d11: Submirror of d10
    State: Okay         Mon Dec 15 21:23:40 2008
    Size: 155159424 blocks (73 GB)
    Stripe 0:
        Device   Start Dbase State       Reloc Hot Spare Time
        c1d0s0       0 No    Okay        Yes             Mon Dec 15 21:22:07 2008


d12: Submirror of d10
    State: Okay         Mon Dec 15 22:11:07 2008
    Size: 155203965 blocks (74 GB)
    Stripe 0:
        Device   Start Dbase State       Reloc Hot Spare Time
        c2d0s0       0 No    Okay        Yes             Mon Dec 15 21:22:35 2008
[...snip...]
------------------------------------------------------------------------------

3) Go to Single User Mode

4) Install "Solaris 10 x86 Recommended Patch Cluster", which includes patch
   137138-09

   OR
   
   Install patch 137138-09 using patchadd(1M) command
   

Then, "bootadm update-menu" will hang when running postpatch script of
137138-09.
-------------------------------------------------------------------------------
Patch 137138-09 has been successfully installed.
See /var/run/.patchSafeMode/root/var/sadm/patch/137138-09/log for details
Executing postpatch script...
Creating GRUB menu in /   <--- Hangs at this point. See the lines 121-122.
-------------------------------------------------------------------------------
::::::::::::::
137138-09/postpatch
::::::::::::::
        [...]
    82  #
    83  # multiboot: install grub on the boot slice
    84  #
    85  install_grub()
    86  {
        [...]
   112          for rootdev in $grubdevlist
   113          do
   114                  if [ X"$rpcfsdev" != X ]; then
   115                          echo "Creating GRUB menu in ${MENUDIR}/stubboot"
   116                          "${ROOTDIR}/sbin/bootadm" update-menu $zfsarg \
   117                                  -R "${MENUDIR}/stubboot" \
   118                                  -o "$rootdev,${MENUDIR}" 2>/dev/null
   119                  else
   120                          echo "Creating GRUB menu in ${MENUDIR:-/}"
   121                          "${ROOTDIR}/sbin/bootadm" update-menu -R "${MENUDIR:-/}" \  
   122                                  $zfsarg -o $rootdev 2>/dev/null
-------------------------------------------------------------------------------
### ps -ef ###
     UID   PID  PPID   C    STIME TTY         TIME CMD
    root     0     0   0 23:46:29 ?           0:49 sched
    root     1     0   0 23:46:34 ?           0:06 /sbin/init
    root     2     0   0 23:46:34 ?           0:00 pageout
    root     3     0   0 23:46:34 ?           0:38 fsflush
    root   517 28316   0 23:53:07 console     0:00 /bin/ksh /PATCH/10_x86_Recommended/137138-09/postpatch 
    root     7     1   0 23:46:37 ?           0:02 /lib/svc/bin/svc.startd
    root     9     1   0 23:46:37 ?           0:17 /lib/svc/bin/svc.configd
  daemon   154     1   0 23:46:51 ?           0:00 /usr/lib/crypto/kcfd
    root   143     1   0 23:46:51 ?           0:00 devfsadmd
    root 28311 28299   0 23:49:56 console     0:00 patchadd 137138-09
    root 28316 28311   0 23:50:04 console     0:03 /bin/ksh -hp /usr/lib/patch/patchadd -R /var/run/.patchSafeMode/root -s -M /PAT
    root   159     1   0 23:46:52 ?           0:00 /usr/lib/power/powerd
    root   119     1   0 23:46:51 ?           0:00 /usr/lib/sysevent/syseventd
    root   623   517   0 23:53:08 console     0:06 /var/run/.patchSafeMode/root/sbin/bootadm update-menu -R / -o /dev/rdsk/c1d0s0
    root 28299     7   0 23:49:17 console     0:00 -sh
    root   681 28299   0 12:11:59 console     0:00 ps -ef
    root  5784     1   0 23:47:20 ?           0:00 /usr/sbin/mdmonitord
    root 15502     7   0        - ?           0:00 <defunct>

### ptree 623 ###
7     /lib/svc/bin/svc.startd
  28299 -sh
    28311 patchadd 137138-09
      28316 /bin/ksh -hp /usr/lib/patch/patchadd -R /var/run/.patchSafeMode/roo
        517   /bin/ksh /PATCH/10_x86_Recommended/137138-09/postpatch 
          623   /var/run/.patchSafeMode/root/sbin/bootadm update-menu -R / -o /
-------------------------------------------------------------------------------
Work Around
a) Use patchadd(1M) command as background process in Single User Mode.

   # patchadd 137138-09 &
   # pkill bootadm    <--- Kill bootadm process once it hangs.
   # pkill bootadm    <--- Kill bootadm process once it hangs.

   Note: We will need to kill bootadm process at least two times
         for a mirrored root filesystem with SVM.
OR

b) Use patchadd(1M) command in Multi User Mode though it is usually not
   recommended. In this case, "bootadm update-menu" will not hang when
   running postpatch script of 137138-09.

OR

c) Enable meta service usinng svcadm(1M) command with the -r option
   if it is disabled or uninitialized in Single User Mode.

   # svcadm enable -r svc:/network/rpc/meta:default

   If meta service is enabled, then "bootadm update-menu" will not hang when
   running postpatch script of 137138-09.
Please use only option c) as a workaround, i.e. run

	svcadm enable -r network/rpc/meta:default

immediately before adding patch 138138-09.
Comments
N/A