Univention Bugzilla – Full Text Bug Listing |
Summary: | Firefox hangs when clicking on "finish" at the end of the setup wizard | ||
---|---|---|---|
Product: | UCS | Reporter: | Alexander Kläser <klaeser> |
Component: | UMC - Setup wizard | Assignee: | Eduard Mai <mai> |
Status: | CLOSED FIXED | QA Contact: | Alexander Kläser <klaeser> |
Severity: | normal | ||
Priority: | P5 | CC: | best, mai |
Version: | UCS 4.1 | ||
Target Milestone: | UCS 4.1-2-errata | ||
Hardware: | Other | ||
OS: | Linux | ||
See Also: |
https://bugzilla.mozilla.org/show_bug.cgi?id=1105891 https://bugzilla.mozilla.org/show_bug.cgi?id=662444 https://forge.univention.org/bugzilla/show_bug.cgi?id=38866 https://forge.univention.org/bugzilla/show_bug.cgi?id=43375 |
||
What kind of report is it?: | --- | What type of bug is this?: | --- |
Who will be affected by this bug?: | --- | How will those affected feel about the bug?: | --- |
User Pain: | Enterprise Customer affected?: | ||
School Customer affected?: | ISV affected?: | ||
Waiting Support: | Flags outvoted (downgraded) after PO Review: | ||
Ticket number: | Bug group (optional): | ||
Max CVSS v3 score: | |||
Bug Depends on: | |||
Bug Blocks: | 40006 |
Description
Alexander Kläser
2016-04-04 13:29:24 CEST
https://bugzilla.mozilla.org/show_bug.cgi?id=1105891#c24 → Maybe this problem is related to some problem with the profile? https://bugzilla.mozilla.org/show_bug.cgi?id=662444 → The shutdown process will trigger some shutdown operations which might end up in a deadlock. Not sure, but I had the impression that Bug 38866 might be related to this problem as well. I observed FF with a normal load and it did not hang with DHCP. Firefox also reports errors due to dbus missing (→ Bug 36168), not sure whether this could be related. In about:config → toolkit.asyncshutdown.timeout.crash could be set to 1 (ms) (default value is 60000ms). This could be worth a try. Otherwise, I could not detect any other config parameters that might be of interest. Another workaround would be to install a temporary web service which allows to kill the Firefox session. Problem has been reproduced in "demo mode" and when joining the system as UCS master. Revision 68429: Closing Firefox by umcp command instead of window.close Successful build Package: univention-system-setup Version: 9.1.4-5.954.201604061432 Branch: ucs_4.1-0 Scope: appliance Really nice fix :) ! Just some minor issues... (a) this.umcpCommand('setup/closefirefox', {keep_alive: true}, false); → As no data is transferred, this could be rather: this.umcpCommand('setup/closefirefox', {}, false); (b) def close_firefox(self, request): ... → Could have a simple_response decorator, then without the "request" parameter. + def close_firefox(self, request): + PATH_BROWSER_PID = '/var/cache/univention-system-setup/browser.pid' + try: + fpid = open(PATH_BROWSER_PID) + strpid = fpid.readline().strip() + pid = int(strpid) + p = psutil.Process(pid) + p.kill() + except IOError: + print 'WARN: cannot open browser PID file: %s' % PATH_BROWSER_PID + except ValueError: + print 'ERROR: browser PID is not a number: "%s"' % strpid + except psutil.NoSuchProcess: + print 'ERROR: cannot kill process with PID: %s' % pid 1. you don't need to define a constant for a variable which is only used once 2. use "with open(filename) as fd:" when opening files (to automatically close them) 3. don't use print, use MODULE.error() try: with open('/var/cache/univention-system-setup/browser.pid', 'rb') as fd: pid = int(fd.readline().strip()) process = psutil.Process(pid) p.kill() except IOError as exc: MODULE.error('cannot open PID file: %s' % (exc,)) … Added suggestions from Comment 5 and 6. Rev. 68438: Code cleanup Rev. 68439: Corrected typo Successful build Package: univention-system-setup Version: 9.1.4-7.956.201604061840 User: emai Branch: ucs_4.1-0 What in case of an error? Maybe the window.close() should be readded to the error handler of the umcpCommand deferred - even if it takes 5 minutes then it's better than closing it never. Rev. 68509: Added error handling. Package: univention-system-setup Version: 9.1.4-8.957.201604081401 Branch: ucs_4.1-0 Scope: appliance Just a small hint: You don't have to use psutil to kill a process. You can simply use os.kill(pid). os.kill(pid, 9) 9 is signal.SIGKILL. 15 is signal.SIGTERM. Maybe SIGTERM is better? (In reply to Florian Best from comment #11) > os.kill(pid, 9) > > 9 is signal.SIGKILL. > 15 is signal.SIGTERM. > Maybe SIGTERM is better? Not sure, looking at the FF bug when the process is hanging. Firefox does exit for me on SIGTERM in this particular case. However SIGKILL seems fine to me, as system-setup does not rely on Firefox exiting gracefully. Changes: OK, works like a charm. YAML: OK → VERIFIED |