IzPack

On unix corporate install (with 30000 users), izpack hangs forever

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: 4.3.2
  • Fix Version/s: 4.3.3, 5.0
  • Component/s: Installer
  • Labels:
    None
  • Environment:
    opensolaris 2009.06 connected to the Sun internal network with a Sun regular user login, not a local user
  • Number of attachments :
    1

Description

On unix corporate install (with 30000 users), izpack hangs forever.

Doing a dump of the threads, we see:

"AWT-EventQueue-0" prio=3 tid=0x08b7b400 nid=0x12 runnable [0xb138d000..0xb138eb60]
java.lang.Thread.State: RUNNABLE
at java.io.UnixFileSystem.getBooleanAttributes0(Native Method)
at java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:228)
at java.io.File.exists(File.java:733)
at
com.izforge.izpack.util.os.unix.UnixUsers.getUsersWithValidShellsAndExistingHomes(Unknown
Source)
at
com.izforge.izpack.util.os.unix.UnixUsers._getUsersWithValidShellsExistingHomesAndDesktops(Unknown
Source)
at
com.izforge.izpack.util.os.unix.UnixUsers.getUsersWithValidShellsExistingHomesAndDesktops(Unknown
Source)
at com.izforge.izpack.util.os.Unix_Shortcut.<clinit>(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at com.izforge.izpack.util.TargetFactory.makeObject(Unknown Source)
at com.izforge.izpack.panels.ShortcutPanel.panelActivate(Unknown Source)
at com.izforge.izpack.installer.InstallerFrame.switchPanel(Unknown Source)
...

which is on the AWT thread and is taking forever.

Not sure why we need to get this list of all users to do a local installation of a product using ispack. It definitely does not scale and block AWT UI.
See https://glassfishplugins.dev.java.net/issues/show_bug.cgi?id=282

Issue Links

Activity

Hide
Julien Ponge added a comment -

Thanks for reporting it, we are investigating this.

One small note of the GF bug report: yes the code is ugly there, but please keep in mind that nobody's paid for developing IzPack... we are not funded.

Show
Julien Ponge added a comment - Thanks for reporting it, we are investigating this. One small note of the GF bug report: yes the code is ugly there, but please keep in mind that nobody's paid for developing IzPack... we are not funded.
Hide
Julien Ponge added a comment -

This is a first patch to solve the issue, thanks for reviews.

Unfortunately, I do not have a machine with 30000 accounts to test...

Here is what the change does:

  • The Unix users lookup is made lazily (previously in the constructor).
  • Navigation between panels is now made asynchronously in a separate thread which:
    • blocks the GUI on the EDT
    • performs the work on the created thread
    • releases the GUI on the EDT.

The outcome is that the Swing/AWT thread should not be freezed anymore when swiching panels. It should be "blocked" through the glass pane and the mouse icon showing heavy work in progress.

Show
Julien Ponge added a comment - This is a first patch to solve the issue, thanks for reviews. Unfortunately, I do not have a machine with 30000 accounts to test... Here is what the change does:
  • The Unix users lookup is made lazily (previously in the constructor).
  • Navigation between panels is now made asynchronously in a separate thread which:
    • blocks the GUI on the EDT
    • performs the work on the created thread
    • releases the GUI on the EDT.
The outcome is that the Swing/AWT thread should not be freezed anymore when swiching panels. It should be "blocked" through the glass pane and the mouse icon showing heavy work in progress.
Hide
ludovic added a comment -

Sorry for my bad comment: we selected izpack for a good reason: simple and we like it! over the competition.
It was more about the logic than the code in this corner case.
We'll try the patch, but I would like to understand if this query will still happen. Not sure we need to list all the users of a system in order to install a product for 1 single user. In our case, (Sun, the time to finally get this list can be close to infinity (i.e hours possbly

And thanks also for jumping on a fix. We do have a temp workaround (deliver a tarball as well), and if a fix is available before next monday, we may integrate it for a release on Dec 17 of the tools bundle.

Show
ludovic added a comment - Sorry for my bad comment: we selected izpack for a good reason: simple and we like it! over the competition. It was more about the logic than the code in this corner case. We'll try the patch, but I would like to understand if this query will still happen. Not sure we need to list all the users of a system in order to install a product for 1 single user. In our case, (Sun, the time to finally get this list can be close to infinity (i.e hours possbly And thanks also for jumping on a fix. We do have a temp workaround (deliver a tarball as well), and if a fix is available before next monday, we may integrate it for a release on Dec 17 of the tools bundle.
Hide
Julien Ponge added a comment -

The fix is in progress on our side.

The GUI should not be blocked anymore, and the mouse cursor indicates that work is in progress.

The lookup happens when you want to create Freedesktop.Org (Gnome/KDE/XFCE) shortcuts on Unix for all users, which I suspect is checked by default in your case when the panel shows up. The code needs to actually look up the accounts and see which ones are legit user accounts.

In short: the first patch that we have will make the application look busy instead of locked, but at some point you will have a 30000 accounts lookup.

Given that your case is actually an extreme one, you may also:

BTW do you need shortcuts at all for deploying the GF Eclipse bundles?

Cheers

Show
Julien Ponge added a comment - The fix is in progress on our side. The GUI should not be blocked anymore, and the mouse cursor indicates that work is in progress. The lookup happens when you want to create Freedesktop.Org (Gnome/KDE/XFCE) shortcuts on Unix for all users, which I suspect is checked by default in your case when the panel shows up. The code needs to actually look up the accounts and see which ones are legit user accounts. In short: the first patch that we have will make the application look busy instead of locked, but at some point you will have a 30000 accounts lookup. Given that your case is actually an extreme one, you may also: BTW do you need shortcuts at all for deploying the GF Eclipse bundles? Cheers
Hide
Julien Ponge added a comment -

Ok, so we can have a release next monday (French timezone).

Is that ok with you Ludovic?

Otherwise I can give you a patched version, say, sunday.

Cheers

Show
Julien Ponge added a comment - Ok, so we can have a release next monday (French timezone). Is that ok with you Ludovic? Otherwise I can give you a patched version, say, sunday. Cheers
Hide
ludovic added a comment -

Great!!

send me the patched version as soon as you want, and we'll test (possibly on monday morning PST).

Show
ludovic added a comment - Great!! send me the patched version as soon as you want, and we'll test (possibly on monday morning PST).
Hide
ludovic added a comment -

Currently, even if we add <defaultCurrentUser/> in the shorcut xml def, the call to get all users is done.
Can you confirm that your patch will never do this call if we add <defaultCurrentUser/>

?

Show
ludovic added a comment - Currently, even if we add <defaultCurrentUser/> in the shorcut xml def, the call to get all users is done. Can you confirm that your patch will never do this call if we add <defaultCurrentUser/> ?
Hide
Julien Ponge added a comment -

I could not test it on a Unix box, but it should not be called.

Can you please test with a snapshot build of IzPack? http://snapshots.dist.codehaus.org/izpack/izpack-snapshot-IZPACK-501-install.jar

Thanks a lot

Show
Julien Ponge added a comment - I could not test it on a Unix box, but it should not be called. Can you please test with a snapshot build of IzPack? http://snapshots.dist.codehaus.org/izpack/izpack-snapshot-IZPACK-501-install.jar Thanks a lot
Hide
ludovic added a comment -

the installer fails on mac with error executing
/bin/chmod a+x ........./utils/wrappers/izpack2app/Mac-App-Template/Content/MacOS/JavaApplicationStub

Show
ludovic added a comment - the installer fails on mac with error executing /bin/chmod a+x ........./utils/wrappers/izpack2app/Mac-App-Template/Content/MacOS/JavaApplicationStub
Hide
Julien Ponge added a comment -

The fix does not block the GUI anymore.

Show
Julien Ponge added a comment - The fix does not block the GUI anymore.
Hide
ludovic added a comment -

And the izpack installer on mac issue is fixed as well?

Show
ludovic added a comment - And the izpack installer on mac issue is fixed as well?
Hide
Julien Ponge added a comment -

It is not an issue, just that I built from a Git checkout and some files where missing.

I'll post a link to the released installer to https://glassfishplugins.dev.java.net/issues/show_bug.cgi?id=282 as a comment.

Show
Julien Ponge added a comment - It is not an issue, just that I built from a Git checkout and some files where missing. I'll post a link to the released installer to https://glassfishplugins.dev.java.net/issues/show_bug.cgi?id=282 as a comment.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: