This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 230024 - Platform reboot initiated from module installer restore causes boot freeze
Summary: Platform reboot initiated from module installer restore causes boot freeze
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Module System (show other bugs)
Version: 7.4
Hardware: PC Linux
: P2 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2013-05-21 08:39 UTC by igor_nikiforov
Modified: 2013-06-20 10:20 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The issue demo (16.84 KB, application/zip)
2013-05-21 08:40 UTC, igor_nikiforov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description igor_nikiforov 2013-05-21 08:39:19 UTC
Test case:
  1. Create Platform application based on trunk.
  2. Add one module.
  3. Create installer for that module and add the following implementation
     to the restore method:
     LifecycleManager.getDefault().markForRestart();
     LifecycleManager.getDefault().exit();
  4. Create the .zip, unpack it and start.
  5. Expected behavior: platform application reboots in a loop. Current behavior: platform application becomes frozen during the first start.

This is a regression appeared about 2 months ago.
Comment 1 igor_nikiforov 2013-05-21 08:40:59 UTC
Created attachment 134662 [details]
The issue demo
Comment 2 Vladimir Voskresensky 2013-05-22 15:39:52 UTC
Yarda, this is regression. We haven't changed the logic, but got hang
Comment 3 Jaroslav Tulach 2013-05-27 11:01:23 UTC
It may be a regression, but first of all I'd like to understand why you are doing something like this at all!?
Comment 4 igor_nikiforov 2013-05-27 11:24:33 UTC
Some Oracle Solaris Studio users do not perform any development on their local systems. They are using some remote systems with OSS installed instead, which are accessed by  VNC/X-forwarding/...

So we have introduced special kind of OSS IDE distribution, simplifying IDE usage in that case.

Here is use case:
  1. User goes to server with OSS installed and starts IDE as he usually does.
  2. He initiates creating of Desktop Distribution, which contains IDE bits, user directory and projects packed to .zip.
  3. User takes this zip to his workstation, unzips and starts -> after the start he should see IDE configured the same way as on remote server with his projects open as full-remote ones.

To implement that we have added special module to Desktop Distribution, that unpacks saved user directory data to newly created one (during the first start) and reboots the platform, to make changes take effect.

Unfortunately, the "unpacking" logic is quite complex, so it is quite hard to place it to the starting script, that's why we have chosen module approach.
Comment 5 Jaroslav Tulach 2013-06-03 12:07:37 UTC
Probably you could get similar result (but without deadlock) with an OptionProcessor registered for Option.always() that throws new CommandLineException(1).
Comment 6 Jaroslav Tulach 2013-06-06 07:11:52 UTC
Calling exit() while initialization sequence is running is dangerous. The fact that it worked was more an accident (with unknown side effects) than a feature. I am ready to help you find new, supported way of achieving the same in new versions of NetBeans Platform: suggestion in comment #5 is supported one. Does it work for you?
Comment 7 igor_nikiforov 2013-06-20 10:20:05 UTC
The approach with OptionProcessor works for us. Thanks for the hint!