-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent issues launching mintupdate #869
Comments
Is this behavior new (maybe since you updated some packages), or has it been since you installed the system? |
It definitely used to work fine on Mint 20.3 and works fine on a new 21.3 VM. I can’t say whether or not this has been occurring since updating to 21.3 or more recently. I did recently install and subsequently remove xorg-dev. That would seem related, but I checked and libX11 is still there and the version matches what’s in the fresh VM. Also no other apps are exhibiting issues. Do you have hints how else to debug or troubleshoot? I tried debugging and breaking on gdb_x_error and saw some dequeuing errors from xcb. Thank you. |
When situation (1) occurs (small window pops up that is see through), the error received at the terminal is
when executing |
This is an issue with making UI updates from background threads. Repeated attempts to stop on breakpoints before the error occurred usually led to error-free launches, which made it seem very much like a threading/race condition issue. As the error message implies, calling
This reduced the frequency of errors on launch but didn't eliminate them entirely. But it shouldn't be necessary if all UI updates are done on the main thread. Since Do Would you accept a PR with this change? |
The Gdk.threads_enter/leave functions still do what they should, but it's definitely not the correct way anymore, and we don't use it with new code elsewhere. We've stuck with them here because some places where they're would need a good amount of refactoring (I think during the install thread confirmations? We did run into these errors briefly when we first added flatpak support, but haven't seen any other reports since - it's still puzzling why you'd be getting these only on one machine (assuming that's still the case). Out of curiousity, how many cores does this machine have? We'd accept a PR, but I think it's a bit too late in our development cycle to go in Mint 22 - Mintupdate is critical and I'd rather have a longer testing period for this sort of change. ref: |
This machine is a Core i5-2500K which is 4 cores/4 threads. I don't experience the issue on a live CD on the same hardware or a fresh VM, but I haven't tested on any other systems. Since you say that threads_enter/leave do still work, I'm not sure why the issue occurs, it must be related to intricacies of how the "critical sections" function vs. just sending those calls to the main thread. For InstallThread and elsewhere, I pulled the UI code into a method, and sometimes had to use Thank you! |
I ran into this same issue. Very occasionally it would work, but usually not. Adding the call to XInitThreads() seemed to resolve it. |
Describe the bug
mintupdate fails to start, but not consistently
When running
mintupdate
at the terminal several times in a row:Screenshots
To Reproduce
Steps to reproduce the behavior:
mintupdate
.Expected behavior
Expect it to open normally each time. Only expected terminal messages should be
DeprecationWarning: Gdk.threads_leave is deprecated
andFlatpaks: skipping update check - nothing installed
.Distribution:
Software version:
6.0.9
Logs:
This is in the log when mintupdate launches correctly.
03.07@17:06 ++ Launching Update Manager
03.07@17:06 ++ Changes to the package cache detected, triggering refresh
03.07@17:06 ++ Initial refresh will happen in 0 day(s), 0 hour(s) and 10 minute(s)
03.07@17:06 ++ Inhibited power management
03.07@17:06 ++ Starting refresh (local only)
03.07@17:06 ++ System is up to date
03.07@17:06 ++ Refresh finished
03.07@17:06 ++ Resumed power management
Crash report:
/usr/lib/linuxmint/mintUpdate/mintUpdate.py:1379: DeprecationWarning: Gdk.threads_init is deprecated
Gdk.threads_init()
/usr/lib/linuxmint/mintUpdate/mintUpdate.py:1764: DeprecationWarning: Gdk.threads_enter is deprecated
Gdk.threads_enter()
/usr/lib/linuxmint/mintUpdate/mintUpdate.py:803: DeprecationWarning: Gdk.threads_leave is deprecated
Gdk.threads_leave()
(mintUpdate.py:17432): Gdk-ERROR **: 17:07:08.835: The program 'mintUpdate.py' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadRequest (invalid request code or no such operation)'.
(Details: serial 701 error_code 1 request_code 141 (unknown) minor_code 141)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the GDK_SYNCHRONIZE environment
variable to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
Additional context
Perhaps this is specific to my system, but not sure how to troubleshoot, have already tried reinstalling mintupdate. Seems similar to #868
Locale:
LANG=en_US.UTF-8
LANGUAGE=en_US
The text was updated successfully, but these errors were encountered: