Activity log for bug #1552621

Date Who What changed Old value New value Message
2016-03-03 09:14:51 Franz Hsieh bug added bug
2016-03-03 09:15:19 Franz Hsieh description Normally system should be able to switch to login screen after oem-config is finished. However on OEM mode the system stops with black screen after oem-config is finished. Steps: 1) Boot into OEM mode (EFI) and install the system 2) Restart system, click "Prepare for shipping to end user" and reboot system. 3) oem-config starts, enter user information 4) Black screen. I found there has race condition between oem-config-* scripts. First, please watch the code pieces I found in the oem-config-firstboot for try in $(seq 1 $TRY); do CODE=0 if [ "$FRONTEND" = debconf_ui ]; then plymouth quit || true LANG=en_US.UTF-8 FRONTEND="$FRONTEND" \ /usr/sbin/oem-config-wrapper $DEBUG $AUTOMATIC --only \ 2>>/var/log/oem-config.log \ || CODE=$? else FRONTEND="$FRONTEND" \ /usr/bin/ubiquity-dm vt7 :0 oem \ /usr/sbin/oem-config-wrapper $DEBUG $AUTOMATIC --only || CODE=$? fi if [ "$CODE" -eq 0 ]; then # Remove the temporary OEM configuration user, if possible # and desired. RET="$(echo GET oem-config/remove | debconf-communicate)" if [ "${RET#* }" = true ] && getent passwd oem >/dev/null; then pkill -u oem || true userdel --force --remove oem || true fi /bin/systemctl set-default graphical.target || true /bin/systemctl --no-block isolate graphical.target || true exit 0 and oem-config-wrapper: #! /bin/sh # Run oem-config, plus other things that need to run after it in X. set -e LANG=en_US.UTF-8 oem-config "$@" # 'set -e' will cause us to exit if oem-config fails. Otherwise: # Don't run again. rm -f /var/lib/oem-config/run # Cleanup from anything the early command prepared RET="$(echo GET oem-config/late_command | debconf-communicate)" || true if [ "${RET%% *}" = 0 ]; then command="${RET#* }" log-output sh -c "$command" || true fi RET="$(echo GET oem-config/remove | debconf-communicate)" if [ "${RET#* }" = true ]; then #debconf crashes with this set (LP: #641478) unset DBUS_SESSION_BUS_ADDRESS #mandb postinst doesn't like not knowing the locale if [ -r /etc/default/locale ]; then . /etc/default/locale export LANG LANGUAGE fi # We're about to pull the rug out from under our own feet, so this # has to run very late. case $FRONTEND in debconf_ui) export DEBIAN_FRONTEND=dialog oem-config-remove || true ;; gtk_ui) oem-config-remove-gtk || true ;; kde_ui) export DEBIAN_FRONTEND=kde oem-config-remove || true ;; esac fi The /usr/sbin/oem-config-wrapper calls oem-config for bring up UI for user and runs oem-config-remove-gtk to remove all ubiquity packages at the end. Because of oem-config-remove-gtk removes all ubiquity packages, the oem-config-firstboot can't run remaining commands. Therefore session can't switch to graphical and result in black screen. Normally system should be able to switch to login screen after oem-config is finished. However on OEM mode the system stops with black screen after oem-config is finished. Steps: 1) Boot into OEM mode (EFI) and install the system 2) Restart system, click "Prepare for shipping to end user" and reboot system. 3) oem-config starts, enter user information 4) Black screen. I found there has race condition between oem-config-* scripts. First, please watch the code pieces I found in the oem-config-firstboot for try in $(seq 1 $TRY); do  CODE=0  if [ "$FRONTEND" = debconf_ui ]; then   plymouth quit || true   LANG=en_US.UTF-8 FRONTEND="$FRONTEND" \   /usr/sbin/oem-config-wrapper $DEBUG $AUTOMATIC --only \    2>>/var/log/oem-config.log \    || CODE=$?  else   FRONTEND="$FRONTEND" \   /usr/bin/ubiquity-dm vt7 :0 oem \    /usr/sbin/oem-config-wrapper $DEBUG $AUTOMATIC --only || CODE=$?  fi  if [ "$CODE" -eq 0 ]; then   # Remove the temporary OEM configuration user, if possible   # and desired.   RET="$(echo GET oem-config/remove | debconf-communicate)"   if [ "${RET#* }" = true ] && getent passwd oem >/dev/null; then    pkill -u oem || true    userdel --force --remove oem || true   fi   /bin/systemctl set-default graphical.target || true   /bin/systemctl --no-block isolate graphical.target || true   exit 0 and oem-config-wrapper: #! /bin/sh # Run oem-config, plus other things that need to run after it in X. set -e LANG=en_US.UTF-8 oem-config "$@" # 'set -e' will cause us to exit if oem-config fails. Otherwise: # Don't run again. rm -f /var/lib/oem-config/run # Cleanup from anything the early command prepared RET="$(echo GET oem-config/late_command | debconf-communicate)" || true if [ "${RET%% *}" = 0 ]; then  command="${RET#* }"  log-output sh -c "$command" || true fi RET="$(echo GET oem-config/remove | debconf-communicate)" if [ "${RET#* }" = true ]; then  #debconf crashes with this set (LP: #641478)  unset DBUS_SESSION_BUS_ADDRESS  #mandb postinst doesn't like not knowing the locale  if [ -r /etc/default/locale ]; then   . /etc/default/locale   export LANG LANGUAGE  fi  # We're about to pull the rug out from under our own feet, so this  # has to run very late.  case $FRONTEND in   debconf_ui)    export DEBIAN_FRONTEND=dialog    oem-config-remove || true    ;;   gtk_ui)    oem-config-remove-gtk || true    ;;   kde_ui)    export DEBIAN_FRONTEND=kde    oem-config-remove || true    ;;  esac fi The /usr/sbin/oem-config-wrapper calls oem-config for bring up UI for user and runs oem-config-remove-gtk to remove all ubiquity packages at the end. Because of oem-config-remove-gtk removes all ubiquity packages, the oem-config-firstboot can't run remaining commands. Therefore session can't switch to graphical and results in black screen.
2016-03-03 09:16:11 Shih-Yuan Lee bug added subscriber Shih-Yuan Lee
2016-03-03 09:17:42 Franz Hsieh description Normally system should be able to switch to login screen after oem-config is finished. However on OEM mode the system stops with black screen after oem-config is finished. Steps: 1) Boot into OEM mode (EFI) and install the system 2) Restart system, click "Prepare for shipping to end user" and reboot system. 3) oem-config starts, enter user information 4) Black screen. I found there has race condition between oem-config-* scripts. First, please watch the code pieces I found in the oem-config-firstboot for try in $(seq 1 $TRY); do  CODE=0  if [ "$FRONTEND" = debconf_ui ]; then   plymouth quit || true   LANG=en_US.UTF-8 FRONTEND="$FRONTEND" \   /usr/sbin/oem-config-wrapper $DEBUG $AUTOMATIC --only \    2>>/var/log/oem-config.log \    || CODE=$?  else   FRONTEND="$FRONTEND" \   /usr/bin/ubiquity-dm vt7 :0 oem \    /usr/sbin/oem-config-wrapper $DEBUG $AUTOMATIC --only || CODE=$?  fi  if [ "$CODE" -eq 0 ]; then   # Remove the temporary OEM configuration user, if possible   # and desired.   RET="$(echo GET oem-config/remove | debconf-communicate)"   if [ "${RET#* }" = true ] && getent passwd oem >/dev/null; then    pkill -u oem || true    userdel --force --remove oem || true   fi   /bin/systemctl set-default graphical.target || true   /bin/systemctl --no-block isolate graphical.target || true   exit 0 and oem-config-wrapper: #! /bin/sh # Run oem-config, plus other things that need to run after it in X. set -e LANG=en_US.UTF-8 oem-config "$@" # 'set -e' will cause us to exit if oem-config fails. Otherwise: # Don't run again. rm -f /var/lib/oem-config/run # Cleanup from anything the early command prepared RET="$(echo GET oem-config/late_command | debconf-communicate)" || true if [ "${RET%% *}" = 0 ]; then  command="${RET#* }"  log-output sh -c "$command" || true fi RET="$(echo GET oem-config/remove | debconf-communicate)" if [ "${RET#* }" = true ]; then  #debconf crashes with this set (LP: #641478)  unset DBUS_SESSION_BUS_ADDRESS  #mandb postinst doesn't like not knowing the locale  if [ -r /etc/default/locale ]; then   . /etc/default/locale   export LANG LANGUAGE  fi  # We're about to pull the rug out from under our own feet, so this  # has to run very late.  case $FRONTEND in   debconf_ui)    export DEBIAN_FRONTEND=dialog    oem-config-remove || true    ;;   gtk_ui)    oem-config-remove-gtk || true    ;;   kde_ui)    export DEBIAN_FRONTEND=kde    oem-config-remove || true    ;;  esac fi The /usr/sbin/oem-config-wrapper calls oem-config for bring up UI for user and runs oem-config-remove-gtk to remove all ubiquity packages at the end. Because of oem-config-remove-gtk removes all ubiquity packages, the oem-config-firstboot can't run remaining commands. Therefore session can't switch to graphical and results in black screen. Normally system should be able to switch to login screen after oem-config is finished. However on OEM mode the system stops with black screen after oem-config is finished. This bug can be reproduced on Xenial daily image. Steps: 1) Boot into OEM mode (EFI) and install the system 2) Restart system, click "Prepare for shipping to end user" and reboot system. 3) oem-config starts, enter user information 4) Black screen. I found there has race condition between oem-config-* scripts. First, please watch the code pieces I found in the oem-config-firstboot for try in $(seq 1 $TRY); do  CODE=0  if [ "$FRONTEND" = debconf_ui ]; then   plymouth quit || true   LANG=en_US.UTF-8 FRONTEND="$FRONTEND" \   /usr/sbin/oem-config-wrapper $DEBUG $AUTOMATIC --only \    2>>/var/log/oem-config.log \    || CODE=$?  else   FRONTEND="$FRONTEND" \   /usr/bin/ubiquity-dm vt7 :0 oem \    /usr/sbin/oem-config-wrapper $DEBUG $AUTOMATIC --only || CODE=$?  fi  if [ "$CODE" -eq 0 ]; then   # Remove the temporary OEM configuration user, if possible   # and desired.   RET="$(echo GET oem-config/remove | debconf-communicate)"   if [ "${RET#* }" = true ] && getent passwd oem >/dev/null; then    pkill -u oem || true    userdel --force --remove oem || true   fi   /bin/systemctl set-default graphical.target || true   /bin/systemctl --no-block isolate graphical.target || true   exit 0 and oem-config-wrapper: #! /bin/sh # Run oem-config, plus other things that need to run after it in X. set -e LANG=en_US.UTF-8 oem-config "$@" # 'set -e' will cause us to exit if oem-config fails. Otherwise: # Don't run again. rm -f /var/lib/oem-config/run # Cleanup from anything the early command prepared RET="$(echo GET oem-config/late_command | debconf-communicate)" || true if [ "${RET%% *}" = 0 ]; then  command="${RET#* }"  log-output sh -c "$command" || true fi RET="$(echo GET oem-config/remove | debconf-communicate)" if [ "${RET#* }" = true ]; then  #debconf crashes with this set (LP: #641478)  unset DBUS_SESSION_BUS_ADDRESS  #mandb postinst doesn't like not knowing the locale  if [ -r /etc/default/locale ]; then   . /etc/default/locale   export LANG LANGUAGE  fi  # We're about to pull the rug out from under our own feet, so this  # has to run very late.  case $FRONTEND in   debconf_ui)    export DEBIAN_FRONTEND=dialog    oem-config-remove || true    ;;   gtk_ui)    oem-config-remove-gtk || true    ;;   kde_ui)    export DEBIAN_FRONTEND=kde    oem-config-remove || true    ;;  esac fi The /usr/sbin/oem-config-wrapper calls oem-config for bring up UI for user and runs oem-config-remove-gtk to remove all ubiquity packages at the end. Because of oem-config-remove-gtk removes all ubiquity packages, the oem-config-firstboot can't run remaining commands. Therefore session can't switch to graphical and results in black screen.
2016-03-03 09:19:00 Chen-Han Hsiao (Stanley) bug added subscriber Chen-Han Hsiao (Stanley)
2016-03-03 11:05:56 Franz Hsieh bug task added ubiquity
2016-03-03 11:06:19 Franz Hsieh affects ubiquity (Ubuntu) oem-priority
2016-03-08 03:03:53 Franz Hsieh affects ubiquity ubiquity (Ubuntu)
2016-03-23 08:47:09 Jamie Chang bug added subscriber OEM Priority Team
2016-03-23 08:47:33 Jamie Chang oem-priority: importance Undecided Critical
2016-03-23 09:15:41 Jamie Chang oem-priority: importance Critical High
2016-03-23 20:30:34 Launchpad Janitor ubiquity (Ubuntu): status New Confirmed
2016-03-23 21:13:03 Ubuntu QA Website tags iso-testing
2016-03-24 02:29:42 Jamie Chang bug added subscriber Jamie Chang
2016-03-24 21:30:54 Dave Morley bug added subscriber Dave Morley
2016-03-28 21:03:00 Mathieu Trudel-Lapierre ubiquity (Ubuntu): status Confirmed In Progress
2016-03-28 21:03:05 Mathieu Trudel-Lapierre ubiquity (Ubuntu): importance Undecided High
2016-03-28 21:03:07 Mathieu Trudel-Lapierre ubiquity (Ubuntu): assignee Mathieu Trudel-Lapierre (cyphermox)
2016-03-29 02:58:17 Launchpad Janitor branch linked lp:ubiquity
2016-03-29 08:15:41 Launchpad Janitor ubiquity (Ubuntu): status In Progress Fix Released
2016-03-29 09:11:13 Ara Pulido oem-priority: status New Fix Released