[regression] ubiquity crashed in debconf.py:104 with ValueError: invalid literal for int() with base 10: ''
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| OEM Priority Project |
Critical
|
Unassigned | ||
| ubiquity (Ubuntu) |
High
|
Andrea Azzarone | ||
| Bionic |
High
|
Andrea Azzarone |
Bug Description
* Impact
The Ubuntu installer crashes on some machines (seems more often on hiDPI machines (QHD/UHD etc)).
* Test case
Try installing Ubuntu on an hidpi machine, it should complete installation instead of crashing.
* Regression potential
The fix in ubiquity touches the code handle uid drop/privilege, that can have unexpected side effects so we need proper/complete testing of the installer
----------
Update: Actually the crash occurs on slow-ish systems due to a race condition. It's not strictly only hi-DPI machines - that's just the most common place it is experienced.
---
https:/
https:/
https:/
https:/
https:/
---
WORKAROUND:
1. Boot into the live session.
2. Settings > Devices > Displays > Scale = 100%
3. Click Apply.
4. Proceed with installation: Click "Install Ubuntu 18.04 LTS".
---
Crashed in a VM in the middle of installation. The host is Bionic up to date.
From the journal
Feb 23 12:52:27 ubuntu kernel: traps: ubiquity[2646] trap int3 ip:7f5a76936961 sp:7ffde5090c50 error:0 in libglib-
Feb 23 12:52:41 ubuntu /install.py[6858]: Exception during installation:
Feb 23 12:52:41 ubuntu /install.py[6858]: Traceback (most recent call last):
Feb 23 12:52:41 ubuntu /install.py[6858]: File "/usr/share/
Feb 23 12:52:41 ubuntu /install.py[6858]: install.run()
Feb 23 12:52:41 ubuntu /install.py[6858]: File "/usr/share/
Feb 23 12:52:41 ubuntu /install.py[6858]: self.copy_all()
Feb 23 12:52:41 ubuntu /install.py[6858]: File "/usr/share/
Feb 23 12:52:41 ubuntu /install.py[6858]: self.db.
Feb 23 12:52:41 ubuntu /install.py[6858]: File "/usr/lib/
Feb 23 12:52:41 ubuntu /install.py[6858]: lambda *args, **kw: self.command(
Feb 23 12:52:41 ubuntu /install.py[6858]: File "/usr/lib/
Feb 23 12:52:41 ubuntu /install.py[6858]: status = int(status)
Feb 23 12:52:41 ubuntu /install.py[6858]: ValueError: invalid literal for int() with base 10: ''
ProblemType: Crash
DistroRelease: Ubuntu 18.04
Package: ubiquity 18.04.1
ProcVersionSign
Uname: Linux 4.13.0-32-generic x86_64
ApportVersion: 2.20.8-0ubuntu10
Architecture: amd64
CasperVersion: 1.388
Date: Fri Feb 23 12:52:28 2018
ExecutablePath: /usr/lib/
InstallCmdLine: file=/cdrom/
InterpreterPath: /usr/bin/python3.6
LiveMediaBuild: Ubuntu 18.04 LTS "Bionic Beaver" - Alpha amd64 (20180222)
ProcCmdline: /usr/bin/python3 /usr/lib/
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
LANG=C.UTF-8
SHELL=/bin/bash
Python3Details: /usr/bin/python3.6, Python 3.6.4+, python3-minimal, 3.6.4-1
PythonDetails: /usr/bin/python2.7, Python 2.7.14+, python-minimal, 2.7.14-4
Signal: 5
SourcePackage: ubiquity
StacktraceTop:
?? () from /usr/lib/
?? () from /usr/lib/
_XEventsQueued () from /usr/lib/
XPending () from /usr/lib/
?? () from /usr/lib/
Title: ubiquity crashed with signal 5 in _XEventsQueued()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:
Related branches
- Iain Lane: Approve on 2018-05-08
- Daniel van Vugt (community): Approve on 2018-05-07
- Didier Roche (community): Approve on 2018-05-04
-
Diff: 20 lines (+6/-0)1 file modifiedubiquity/misc.py (+6/-0)
|
#52 |
I wonder whether the fix of setting the pool->attached = XNextRequest(dpy)
after the XShmAttach would work. That's effectively delaying the shmdt until after whatever the next X request is after the attach has completed; who knows what that is, but as long as there is one (ahem, that might be a bit of an assumption; could we just add a dummy?) then it should complete. Not got a clue what the perf would be.
pool->attached = XNextRequest(dpy) - 1;
after the XShmAttach would work, yes.
It would then have a sequence number either equal to that of the XShmAttach request or to that of a subsequent request, if there was one.
Correct me if I'm wrong, but XLockDisplay() says that there is no other thread that could "steal the next request", right?
Also, feel free to correct me, but cairo should be calling XLockDisplay() before doing "SHM stuff".
XLockDisplay only works if XInitThreads was done, and that his highly not recommended as it slows Xlib down enormously (because it was very badly implemented with fine-grained locking).
XLockDisplay() would work, and there is no bug if there is only one thread (i.e. when XInitThreads() is not called), but XLockDisplay() is not necessary.
tags: | removed: need-duplicate-check |
tags: | added: rls-bb-incoming |
Apport retracing service (apport) wrote : | #2 |
StacktraceTop:
XPending (dpy=0x1384000) at ../../src/
client_
_gdk_x11_
?? ()
?? ()
Changed in glib2.0 (Ubuntu): | |
importance: | Undecided → Medium |
tags: | removed: need-amd64-retrace |
Changed in ubiquity (Ubuntu Bionic): | |
status: | New → Triaged |
importance: | Undecided → High |
tags: | removed: rls-bb-incoming |
tags: | added: id-5a9829e833b1e20a0cfd336c |
Steve, what makes you think it might be a glib issue?
Iain Lane (laney) wrote : | #7 |
Marking Incomplete for glib per the previous comment.
Changed in glib2.0 (Ubuntu Bionic): | |
status: | New → Incomplete |
Ubuntu QA Website (ubuntuqa) wrote : | #8 |
This bug has been reported on the Ubuntu ISO testing tracker.
A list of all reports related to this bug can be found here:
http://
tags: | added: iso-testing |
Casey Matson-deKay (caseymdk) wrote : | #9 |
I am getting the same issue, same error. Crashes once I reach the progress screen of 18.04 installation.
Syslog report:
......
Apr 28 20:26:54 ubuntu localechooser: info: Set debian-
Apr 28 20:26:54 ubuntu localechooser: info: System locale (debian-
Apr 28 20:26:54 ubuntu ubiquity: /usr/lib/
Apr 28 20:26:54 ubuntu ubiquity[3103]: debconffilter_done: ubi-timezone (current: ubi-timezone)
Apr 28 20:26:54 ubuntu ubiquity[3103]: Step_before = stepLocation
Apr 28 20:26:54 ubuntu partman: mke2fs 1.44.1 (24-Mar-2018)
Apr 28 20:26:54 ubuntu ubiquity[3103]: switched to page usersetup
Apr 28 20:26:54 ubuntu clear_partitions: Considering /home,/
Apr 28 20:26:54 ubuntu kernel: [ 100.161039] EXT4-fs (nvme0n1p6): mounted filesystem with ordered data mode. Opts: (null)
Apr 28 20:26:54 ubuntu kernel: [ 100.278116] EXT4-fs (nvme0n1p7): mounted filesystem with ordered data mode. Opts: errors=remount-ro
Apr 28 20:26:54 ubuntu kernel: [ 100.296127] EXT4-fs (nvme0n1p6): mounted filesystem with ordered data mode. Opts: (null)
Apr 28 20:26:55 ubuntu ubiquity: File descriptor 3 (pipe:[67210]) leaked on pvs invocation. Parent PID 18458: /bin/sh
Apr 28 20:26:55 ubuntu ubiquity[3103]: debconffilter_done: ubiquity.
Apr 28 20:26:55 ubuntu /install.py: keeping packages due to preseeding: icedtea6-plugin openoffice.org
Apr 28 20:26:55 ubuntu /install.py: keeping language packs for: en_US.UTF-8
Apr 28 20:26:56 ubuntu ubiquity: W: Failed to fetch http://
Apr 28 20:26:56 ubuntu ubiquity: W: Failed to fetch http://
Apr 28 20:26:56 ubuntu ubiquity: W: Failed to fetch http://
Apr 28 20:26:56 ubuntu ubiquity: W: Some index files failed to download. They have been ignored, or old ones used instead.
Apr 28 20:26:56 ubuntu ubiquity: W: --force-yes is deprecated, use one of the options starting with --allow instead.
Apr 28 20:27:13 ubuntu ubiquity[3103]: debconffilter_done: ubi-usersetup (current: ubi-usersetup)
Apr 28 20:27:13 ubuntu ubiquity[3103]: Step_before = stepUserInfo
Apr 28 20:27:14 ubuntu kernel: [ 119.884166] do_trap: 26 callbacks suppressed
Apr 28 20:27:14 ubuntu kernel: [ 119.884168] traps: ubiquity[3103] trap int3 ip:7ff0a1502c41 sp:7ffe0681d810 error:0 in libglib-
Apr 28 20:27:25 ubuntu /install.py: Exception during installation:
Apr 28 20:27:25 ubuntu /install.py: Traceback (most recent call last):
Apr 28 20:27:25 ubuntu /install.py: File "/usr/share/
Apr 28 20:27:25 ubuntu /install.py: install.run()
Apr 28 20:27:25 ubuntu /install.py: File "/usr/share/
Apr 28 20:27:25 ubuntu /install.py: self.copy_all()
Apr 28 20:27:25 ubuntu /install.py: File "/usr/sha...
Daniel van Vugt (vanvugt) wrote : Re: ubiquity crashed in debconf.py:104 with ValueError: invalid literal for int() with base 10: '' | #10 |
summary: |
- ubiquity crashed with signal 5 in _XEventsQueued() + ubiquity crashed in debconf.py:104 with ValueError: invalid literal for + int() with base 10: '' |
Changed in glib2.0 (Ubuntu Bionic): | |
importance: | Medium → High |
description: | updated |
Daniel van Vugt (vanvugt) wrote : | #11 |
And my own crash from 18.04 final:
Apr 29 22:54:52 ubuntu ubiquity[3581]: debconffilter_done: ubi-usersetup (current: ubi-usersetup)
Apr 29 22:54:52 ubuntu ubiquity[3581]: Step_before = stepUserInfo
Apr 29 22:54:52 ubuntu kernel: do_trap: 28 callbacks suppressed
Apr 29 22:54:52 ubuntu kernel: traps: ubiquity[3581] trap int3 ip:7fd2ca14ec41 sp:7fffd3ffdfa0 error:0 in libglib-
Apr 29 22:55:04 ubuntu /install.py[8718]: Exception during installation:
Apr 29 22:55:04 ubuntu /install.py[8718]: Traceback (most recent call last):
Apr 29 22:55:04 ubuntu /install.py[8718]: File "/usr/share/
Apr 29 22:55:04 ubuntu /install.py[8718]: install.run()
Apr 29 22:55:04 ubuntu /install.py[8718]: File "/usr/share/
Apr 29 22:55:04 ubuntu /install.py[8718]: self.copy_all()
Apr 29 22:55:04 ubuntu /install.py[8718]: File "/usr/share/
Apr 29 22:55:04 ubuntu /install.py[8718]: self.db.
Apr 29 22:55:04 ubuntu /install.py[8718]: File "/usr/lib/
Apr 29 22:55:04 ubuntu /install.py[8718]: lambda *args, **kw: self.command(
Apr 29 22:55:04 ubuntu /install.py[8718]: File "/usr/lib/
Apr 29 22:55:04 ubuntu /install.py[8718]: status = int(status)
Apr 29 22:55:04 ubuntu /install.py[8718]: ValueError: invalid literal for int() with base 10: ''
Apr 29 22:55:04 ubuntu /install.py[8718]:
Daniel van Vugt (vanvugt) wrote : | #12 |
The X error (from comment #3) is:
#3 0x00007f5a769377f7 in g_log_structured (log_domain=
args = {{gp_offset = 48, fp_offset = 48, overflow_arg_area = 0x7ffde50913e8, reg_save_area = 0x7ffde50912d0}}
buffer = "`\t\223\
format = 0x1 <error: Cannot access memory at address 0x1>
message = <optimized out>
p = <optimized out>
n_fields = 6
i = 6
fields = 0x7ffde5090d40
array = <optimized out>
Daniel van Vugt (vanvugt) wrote : | #13 |
Here's the crash with GDK_SYNCHRONIZE=1. It appears to be graphical. And I have a theory this maybe only happens on machines that default to hi-DPI (scale 200%) in the live session...
#6 0x00007fffef656c8d in _XError () from /usr/lib/
#7 0x00007fffef653bb7 in ?? () from /usr/lib/
#8 0x00007fffef653c75 in ?? () from /usr/lib/
#9 0x00007fffef654b88 in _XReply () from /usr/lib/
#10 0x00007fffef65057d in XSync () from /usr/lib/
#11 0x00007fffef65061b in ?? () from /usr/lib/
#12 0x00007fffef65760f in ?? () from /usr/lib/
#13 0x00007fffef40d7b7 in XShmAttach ()
from /usr/lib/
#14 0x00007fffef18b82b in ?? () from /usr/lib/
#15 0x00007fffef18c05e in ?? () from /usr/lib/
#16 0x00007fffef189c81 in ?? () from /usr/lib/
#17 0x00007fffef1868e8 in ?? () from /usr/lib/
#18 0x00007fffef16a585 in ?? () from /usr/lib/
---Type <return> to continue, or q <return> to quit---
#19 0x00007fffef16a78c in ?? () from /usr/lib/
#20 0x00007fffef16ae28 in ?? () from /usr/lib/
#21 0x00007fffef10e021 in ?? () from /usr/lib/
#22 0x00007fffef157efc in ?? () from /usr/lib/
#23 0x00007fffef11657e in ?? () from /usr/lib/
#24 0x00007fffef10fb39 in ?? () from /usr/lib/
#25 0x00007fffef108a55 in cairo_fill ()
from /usr/lib/
#26 0x00007fffc2e66240 in ?? ()
from /usr/lib/
#27 0x00007fffc1fd1e61 in ?? ()
from /usr/lib/
#28 0x00007fffc2051a3b in ?? ()
from /usr/lib/
#29 0x00007fffc1fdbbd1 in ?? ()
from /usr/lib/
#30 0x00007fffc1fe1897 in ?? ()
from /usr/lib/
#31 0x00007fffc1f4879f in ?? ()
from /usr/lib/
#32 0x00007fffc1ccabde in ?? ()
from /usr/lib/
#33 0x00007fffc1daeed2 in ?? ()
---Type <return> to continue, or q <return> to quit---
from /usr/lib/
#34 0x00007fffc1cc67ab in ?? ()
from /usr/lib/
#35 0x00007fffc1cc7095 in ?? ()
from /usr/lib/
#36 0x00007fffc1005903 in WTF::RunLoop:
from /usr/lib/
#37 0x00007fffc102e959 in ?? ()
from /usr/lib/
#38 0x00007ffff4b9e0f5 in g_main_
from /usr/lib/
#39 0x00007ffff4b9e4c0 in ?? () from /usr/lib/
#40 0x00007ffff4b9e7d2 in g_main_loop_run ...
Daniel van Vugt (vanvugt) wrote : | #14 |
WORKAROUND:
1. Boot into the live session.
2. Settings > Devices > Displays > Scale = 100%
3. Click Apply.
4. Proceed with installation: Click "Install Ubuntu 18.04 LTS".
description: | updated |
Daniel van Vugt (vanvugt) wrote : | #15 |
Stack trace with debug symbols (mostly).
Daniel van Vugt (vanvugt) wrote : | #16 |
This looks odd. We start with a 16x16 icon upscaled to 32x32 (scale=200%) but the pixbuf_x/y offset seems to be negative (memory underrun?). Is that a faulty attempt at rendering 32x32 from 16x16 input?
#19 0x00007fffef158e83 in INT_cairo_
#20 0x00007ffff18884bc in gdk_cairo_
#21 0x00007fffec8bb784 in gtk_css_
at ../../.
#22 0x00007fffec8b6db1 in _gtk_css_image_draw (image=0x11990c0, cr=0x1336800, width=16, height=16)
at ../../.
Daniel van Vugt (vanvugt) wrote : | #17 |
Ignore comment #16. Negative offsets appear to be valid: https:/
description: | updated |
summary: |
- ubiquity crashed in debconf.py:104 with ValueError: invalid literal for - int() with base 10: '' + [regression] ubiquity crashed in debconf.py:104 with ValueError: invalid + literal for int() with base 10: '' |
description: | updated |
Daniel van Vugt (vanvugt) wrote : | #18 |
Here's the offending source code up to the failing X call. I'm not so sure that the math is right (or how getting it wrong might trigger this bug)...
static cairo_xlib_shm_t *
_cairo_
{
Display *dpy = display->display;
cairo_
size_t bytes, maxbits = 16, minbits = MIN_BITS;
Status success;
pool = malloc (sizeof (cairo_
if (pool == NULL)
return NULL;
bytes = 1 << maxbits;
while (bytes <= size)
bytes <<= 1, maxbits++;
bytes <<= 3;
minbits += (maxbits - 16) / 2;
pool->shm.shmid = shmget (IPC_PRIVATE, bytes, IPC_CREAT | 0600);
while (pool->shm.shmid == -1 && bytes >= 2*size) {
bytes >>= 1;
}
if (pool->shm.shmid == -1)
goto cleanup;
pool-
pool-
if (pool->shm.shmaddr == (char *) -1) {
shmctl (pool->shm.shmid, IPC_RMID, NULL);
goto cleanup;
}
pool->attached = XNextRequest (dpy);
success = XShmAttach (dpy, &pool->shm);
Possibly worth noting is that size==4096 at scale 200%, and size==256 at scale 100%.
Daniel van Vugt (vanvugt) wrote : | #19 |
Correction:
Possibly worth noting is that size==4096 at scale 200%, and size==1024 at scale 100%.
Eric Desrochers (slashd) wrote : | #20 |
It has been brought to my attention by a community user, that the workaround (change scale from 200% to 100%) found in comment#14 works.
Mario Limonciello (superm1) wrote : | #21 |
On an Dell XPS 9360 with a 3200x1800 display it also defaults to 200% and I reliably reproduce this bug with the 18.04 final image.
I can confirm setting the scaling to 100% in the live session resolved the crash.
PJSingh5000 (pjsingh5000) wrote : | #22 |
Here is the backtrace (bt f) with debug symbols.
I still have gdb open, if anyone needs me to do anything else?
Changed in oem-priority: | |
status: | New → Triaged |
importance: | Undecided → Critical |
description: | updated |
description: | updated |
description: | updated |
Daniel van Vugt (vanvugt) wrote : | #23 |
According to this page, the problem possibly started in ubiquity version 18.04.11:
https:/
Daniel van Vugt (vanvugt) wrote : | #24 |
This one also started in version 18.04.11:
https:/
But this one started in 18.04.3:
https:/
Daniel van Vugt (vanvugt) wrote : | #25 |
Thanks @pjsingh5000. Your attachment shows the python stack ends at:
# There's still work to do (postinstall). Let's keep the user
# entertained.
Gtk.main()
Which agrees with what I see on screen when the bug occurs. It's the slideshow that never starts (or does, as a blank black/white image).
After that there is no debug info from comment #22. Although my attachment from comment #15 probably fills in the blanks: https:/
So it looks like the bug here is entirely in the C code.
Daniel van Vugt (vanvugt) wrote : | #26 |
The BadAccess from ShmAttach is coming from the Xorg process somewhere in here:
static int
ProcShmAttach(
{
SHMSTAT_TYPE buf;
ShmDescPtr shmdesc;
REQUEST(
REQUEST_
LEGAL_
if ((stuff->readOnly != xTrue) && (stuff->readOnly != xFalse)) {
return BadValue;
}
for (shmdesc = Shmsegs; shmdesc; shmdesc = shmdesc->next) {
if (!SHMDESC_
break;
}
if (shmdesc) {
if (!stuff->readOnly && !shmdesc->writable)
return BadAccess;
}
else {
shmdesc = malloc(
if (!shmdesc)
return BadAlloc;
#ifdef SHM_FD_PASSING
#endif
if ((shmdesc->addr == ((char *) -1)) || SHMSTAT(
return BadAccess;
}
/* The attach was performed with root privs. We must
* do manual checking of access rights for the credentials
* of the client */
if (shm_access(client, &(SHM_PERM(buf)), stuff->readOnly) == -1) {
return BadAccess;
}
Shmsegs = shmdesc;
}
if (!AddResource(
return BadAlloc;
return Success;
}
Daniel van Vugt (vanvugt) wrote : | #27 |
Possibly relevant to permissions: The uid of this process changed from 'root' in 17.10 (where it works), to 'ubuntu' in 18.04 (where it doesn't work).
ubuntu 4468 17.8 1.2 502716 97352 tty1 Sl+ 08:17 0:01 /usr/bin/python3 /usr/lib/
In both cases the Xorg process is running as 'ubuntu'.
Daniel van Vugt (vanvugt) wrote : | #28 |
Getting closer. It's this failing in the Xorg process:
/* The attach was performed with root privs. We must
* do manual checking of access rights for the credentials
* of the client */
if (shm_access(client, &(SHM_PERM(buf)), stuff->readOnly) == -1) {
return BadAccess;
}
Changed in glib2.0 (Ubuntu): | |
status: | Incomplete → Invalid |
Changed in glib2.0 (Ubuntu Bionic): | |
status: | Incomplete → Invalid |
Daniel van Vugt (vanvugt) wrote : | #29 |
Unfortunately I can't tell what in shm_access is failing exactly because gdb skips straight from shm.c:314 back to the caller. So that suggests this code path, but I can't verify it:
static int
shm_access(
{
int uid, gid;
mode_t mask;
int uidset = 0, gidset = 0;
LocalClient
if (GetLocalClient
...
}
/* Otherwise, check everyone else */
mask = S_IROTH;
if (!readonly) {
mask |= S_IWOTH;
}
return (SHMPERM_MODE(perm) & mask) == mask ? 0 : -1;
}
So Xorg _should_ be returning an error, and it is. The problem seems to be that the client (python3 gtk_ui process) has a real uid=0 and effective uid=999. So that allows it to connect to Xorg (normally Xorg rejects root clients), but doesn't allow Xorg to check the client shm permissions. So Xorg rejects the client's attempt at XShmAttach.
How any of this relates to scale=200% and why it works at 100%, I'm not sure. We might need to review comment #15 in more detail.
Daniel van Vugt (vanvugt) wrote : | #30 |
Given that XShmAttach can fail (you can google the reasons), I think maybe we need to handle that in ubiquity/cairo and fall back to an alternative rendering method.
I'm not so sure we should be treating XShmAttach failure as a bug.
Daniel van Vugt (vanvugt) wrote : | #31 |
OK, I can now reproduce the problem at scale=100%. The trick is to slow down the installer with GDK_SYNCHRONIZE=1. So this is just a race condition, usually triggered by slower rendering of scale 200%, but can be triggered other ways.
Daniel van Vugt (vanvugt) wrote : | #32 |
So it sounds like a race between Xorg and the ubiquity perms dropping which then breaks Xorg's ability to authenticate XShmAttach used in cairo.
PJSingh5000 (pjsingh5000) wrote : | #33 |
Ubiquity also crashes inside a virtual machine (VirtualBox) running on a non-HiDPI host machine.
I have observed corrupted graphics in the "main area" of Ubiquity when this bug occurs. By "main area", I am referring to the rendered rectangular area in Ubiquity below the title bar and above the "Copying files..." progress bar.
The corruption looks like jagged diagonal lines or "snow". I have seen this on both actual hardware (HiDPI machine scaled at 200%) and in a virtual machine (non-HiDPI hardware scaled at 100%).
Changed in ubiquity (Ubuntu): | |
assignee: | nobody → Daniel van Vugt (vanvugt) |
Changed in ubiquity (Ubuntu Bionic): | |
assignee: | nobody → Daniel van Vugt (vanvugt) |
Changed in ubiquity (Ubuntu): | |
status: | Triaged → In Progress |
Changed in ubiquity (Ubuntu Bionic): | |
status: | Triaged → In Progress |
Jerry Kao (jerry.kao) wrote : | #34 |
I can reproduce this issue on xps13 9350. crash report is attached.
Daniel van Vugt (vanvugt) wrote : | #35 |
Please report crash files by running this command:
ubuntu-bug YOURFILE.crash
Attaching them to bugs is not helpful to us, and a security risk to you.
Changed in cairo (Ubuntu): | |
assignee: | nobody → Daniel van Vugt (vanvugt) |
status: | New → In Progress |
Changed in cairo (Ubuntu Bionic): | |
status: | New → In Progress |
assignee: | nobody → Daniel van Vugt (vanvugt) |
Created attachment 139297
Handle-
I found myself amongst this code in the process of trying to fix a crash in the Ubuntu 18.04 graphical installer (https:/
Here's a patch to fix that, and hopefully this bug too.
Daniel van Vugt (vanvugt) wrote : | #36 |
A patch to fix the crash is here:
https:/
If we fail to get cairo fixed for any reason, it's probably possible to do a workaround/fix in ubiquity. But I think there are now multiple reasons to fix cairo as first preference.
Changed in ubiquity (Ubuntu): | |
assignee: | Daniel van Vugt (vanvugt) → Andrea Azzarone (azzar1) |
Changed in ubiquity (Ubuntu Bionic): | |
assignee: | Daniel van Vugt (vanvugt) → Andrea Azzarone (azzar1) |
Changed in cairo: | |
importance: | Unknown → Medium |
status: | Unknown → Confirmed |
Andrea Azzarone (azzar1) wrote : | #37 |
Fix for ubiquity proposed here: https:/
PJSingh5000 (pjsingh5000) wrote : | #38 |
I tried the patch for /usr/lib/
Instead of corrupted graphics in the Ubiquity window, I saw a blank white area above the "Copying files..." progress bar.
After a few seconds, the Ubiquity slide show appeared as usual, and I did *not* get a crash.
I will also try this on actual hardware.
Daniel van Vugt (vanvugt) wrote : | #39 |
You will get the same behaviour using the cairo fix too:
https:/
Changed in cairo (Ubuntu): | |
importance: | Undecided → High |
Changed in cairo (Ubuntu Bionic): | |
importance: | Undecided → High |
no longer affects: | glib2.0 (Ubuntu) |
no longer affects: | glib2.0 (Ubuntu Bionic) |
description: | updated |
Andrey Arapov (andrey-arapov) wrote : | #40 |
The patch https:/
Thank you, Andrea!
description: | updated |
description: | updated |
description: | updated |
description: | updated |
An upload of ubiquity to bionic-proposed has been rejected from the upload queue for the following reason: "All looks good with the package itself, but sadly there seems to be some leftover .gladep file included with the changes. Could you reupload without it? Or, if it's needed, just mention that in the bug? Thank you!".
Iain Lane (laney) wrote : | #42 |
Ah, I'm sorry, I didn't see that there had been a bionic upload for this since the vcs was untouched and there was nothing in the unapproved queue... I just uploaded ubiquity for this to *cosmic* - not bionic yet. If it gets approved it should be in the next day's dailies and hopefully someone can test those to verify it's good.
Iain Lane (laney) wrote : | #43 |
Removed the .gladep file; it seems to have crept in by error during the git migration (also in my cosmic upload) and uploaded bionic. Thanks and sorry cyphermox if this treads on your toes.
Launchpad Janitor (janitor) wrote : | #44 |
This bug was fixed in the package ubiquity - 18.10.1
---------------
ubiquity (18.10.1) cosmic; urgency=medium
[ Iain Lane ]
* Bump sources to cosmic
* Automatic update of included source packages: bterm-unifont 1.5,
choose-mirror 2.78ubuntu4, preseed 1.71ubuntu8.
[ Andrea Azzarone ]
* misc.py: Restore the corrent euid in regain_
regain_
before the call to drop_privileges
os.setresgid twice to avoid permission issues when calling os.setgroups.
(LP: #1751252)
-- Iain Lane <email address hidden> Tue, 08 May 2018 12:07:44 +0100
Changed in ubiquity (Ubuntu): | |
status: | In Progress → Fix Released |
Hello Jean-Baptiste, or anyone else affected,
Accepted ubiquity into bionic-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-
Further information regarding the verification process can be found at https:/
Changed in ubiquity (Ubuntu Bionic): | |
status: | In Progress → Fix Committed |
tags: | added: verification-needed verification-needed-bionic |
Changed in ubiquity (Ubuntu Bionic): | |
status: | Fix Committed → In Progress |
status: | In Progress → Fix Committed |
Dmitrii Shcherbakov (dmitriis) wrote : | #46 |
I can confirm that the package version from bionic-proposed solves the problem.
During an installation I used Dell 2715Q with settings as in the screenshot attached (single monitor mode, 200% scaling).
# the updated package
apt policy ubiquity
ubiquity:
Installed: 18.04.14.1
Candidate: 18.04.14.1
Version table:
*** 18.04.14.1 500
500 http://
100 /var/lib/
18.04.14 500
500 http://
Before adding "deb http://
ay 13 12:39:12 ubuntu ubiquity: W: --force-yes is deprecated, use one of the options starting with --allow instead.
May 13 12:39:12 ubuntu ubiquity[4617]: debconffilter_done: ubi-usersetup (current: ubi-usersetup)
May 13 12:39:12 ubuntu ubiquity[4617]: Step_before = stepUserInfo
May 13 12:39:12 ubuntu kernel: [ 249.861407] do_trap: 40 callbacks suppressed
May 13 12:39:12 ubuntu kernel: [ 249.861410] traps: ubiquity[4617] trap int3 ip:7fc1a36cdc41 sp:7ffe6a90a760 error:0 in libglib-
May 13 12:39:21 ubuntu update-
May 13 12:39:22 ubuntu /install.py: Exception during installation:
May 13 12:39:22 ubuntu /install.py: Traceback (most recent call last):
May 13 12:39:22 ubuntu /install.py: File "/usr/share/
May 13 12:39:22 ubuntu /install.py: install.run()
May 13 12:39:22 ubuntu /install.py: File "/usr/share/
May 13 12:39:22 ubuntu /install.py: self.copy_all()
May 13 12:39:22 ubuntu /install.py: File "/usr/share/
May 13 12:39:22 ubuntu /install.py: self.db.
May 13 12:39:22 ubuntu /install.py: File "/usr/lib/
May 13 12:39:22 ubuntu /install.py: lambda *args, **kw: self.command(
May 13 12:39:22 ubuntu /install.py: File "/usr/lib/
May 13 12:39:22 ubuntu /install.py: status = int(status)
May 13 12:39:22 ubuntu /install.py: ValueError: invalid literal for int() with base 10: ''
After the update a newly started installation went just fine.
tags: |
added: verification-done-bionic removed: verification-needed-bionic |
Samuel Bancal (samuel-bancal) wrote : | #47 |
Hi,
I do confirm proposed worked also for me on a Dell XPS 15 9530.
Launchpad Janitor (janitor) wrote : | #48 |
This bug was fixed in the package ubiquity - 18.04.14.1
---------------
ubiquity (18.04.14.1) bionic; urgency=medium
[ Iain Lane ]
* Update Vcs-* for git migration
[ Andrea Azzarone ]
* misc.py: Restore the corrent euid in regain_
regain_
before the call to drop_privileges
os.setresgid twice to avoid permission issues when calling os.setgroups.
(LP: #1751252)
-- Iain Lane <email address hidden> Tue, 08 May 2018 15:22:49 +0100
Changed in ubiquity (Ubuntu Bionic): | |
status: | Fix Committed → Fix Released |
The verification of the Stable Release Update for ubiquity has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.
Changed in oem-priority: | |
status: | Triaged → Fix Released |
gene_wood (gene.wood) wrote : | #50 |
For anyone looking for how to use this fix with the current Ubuntu 18.04 installation ISO, this page ( https:/
Changed in ubiquity (Ubuntu Bionic): | |
milestone: | none → ubuntu-18.04.1 |
Could a maintainer review the patch there?
@Sebastian: I don't know who you count as a maintainer, but I'll take a look...
So... this bug is about _cairo_
In comment #3 I wondered about XLockDisplay(), but that seems unrelated. I was possibly confused since there are two places calling XShmAttach() and one of them locks the display while the other one does not.
The patch in comment #6 says it is about https:/
What the patch does is to make XShmAttach synchronous (aka "slow"). I do not know why, but nothing in this bug report suggests that this is necessary. The description of the patch does not say anything about this either. XShmAttach() should not just randomly fail, so why does the patch try to handle random failures?
The XLockDisplay is needed so that an error in another thread does not get reported as a failure of XShmAttach.
XSetErrorHandler() is not appropriate for use with multi-thread code.
It's been a few months so my memory is not completely clear. I do however think Uli's statement is incorrect in the final two sentences:
> What the patch does is to make XShmAttach synchronous (aka "slow"). I do not
> know why, but nothing in this bug report suggests that this is necessary.
> The description of the patch does not say anything about this either.
> XShmAttach() should not just randomly fail, so why does the patch try to
> handle random failures?
attachment 139297 mentions multiple times "why" it is necessary to make it synchronous. Because it's impossible to detect errors in XShmAttach otherwise.
It's possible we're using to the wrong bug here, but I believe the patch is still correct and we have no choice but to make XShmAttach slow. You can only choose between maximum performance or reliable error handling, and not have both. The reasons are detailed in attachment 139297.
So I think reliability should be the first priority.
Also, I don't *think* the affected function would usually be used in any performance-
(In reply to Daniel van Vugt from comment #11)
> The reasons are detailed in attachment 139297.
I don't see an explanation why XShmAttach is failing.
The patch says:
"XShmAttach returns True, even on error."
and
"XShmAttach is hard-coded in libXext to return True, even on failure."
You can dig through the related source code to verify that.
(In reply to Daniel van Vugt from comment #11)
> attachment 139297 [details] [review] mentions multiple times "why" it is
> necessary to make it synchronous. Because it's impossible to detect errors
> in XShmAttach otherwise.
It is not impossible to detect errors without XSync.
Display:
the patch comment claims that _cairo_
a reliable status synchronously. I haven't check that claim, but if so, I
wonder whether it would be possible to take a fallback path until the pool is
successfully created.
Great. I would be happy to see alternative solutions but also don't need to be involved at all...
In Ubuntu we are not dependent on this patch because we have instead modified other components to indirectly avoid triggering the failure in Cairo. Effectively we have a permanent workaround already.
(In reply to Daniel van Vugt from comment #14)
> The patch says:
>
> "XShmAttach returns True, even on error."
>
> and
>
> "XShmAttach is hard-coded in libXext to return True, even on failure."
The question was what error or failure, and why is that happening.
XShmAttach returns True to indicate it successfully queued the request.
It does not fail to queue the request.
If the server fails to process the request successfully, then it sends an
error response.
It would be helpful to understand why you are expecting an error response.
The best clue appears to be the patch at the end of
https:/
> XShmAttach returns True to indicate it successfully queued the request.
> It does not fail to queue the request.
>
> If the server fails to process the request successfully, then it sends an
> error response.
>
> It would be helpful to understand why you are expecting an error response.
Essentially we have the Xorg server process having its privileges demoted and re-promoted. If the XShmAttach request comes in while it is demoted then it can't complete the request and returns BadAccess to the client. The client initiated the request from _cairo_
I am happy with your explanation that "XShmAttach returns True to indicate it successfully queued the request". However I don't believe the same applies to _cairo_
-- GitLab Migration Automatic Message --
This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https:/
Changed in cairo: | |
status: | Confirmed → Unknown |
Sebastien Bacher (seb128) wrote : | #71 |
Untargetting from cairo/bionic, the ubiquity fix is enough there
no longer affects: | cairo (Ubuntu Bionic) |
Seyed Mustafa Afzouni (afzouni) wrote : | #72 |
In the Live Version on MacBook Pro 2015 (13 inches, Retina) I changed the 'Screen Scale' from 200% to 100%, settings > Device > Display, and solved!
Amsalu Abegaz (zelekea19) wrote : | #73 |
an able to upgrade from 17.04 to 18.04
Daniel van Vugt (vanvugt) wrote : | #74 |
I think the fix is in Ubuntu 18.04.1 (not 18.04) so please use 18.04.1:
no longer affects: | cairo (Ubuntu) |
affects: | cairo → ubuntu-translations |
no longer affects: | ubuntu-translations |
tags: | removed: verification-needed |
_cairo_ xlib_display_ fini_shm sets pool->attached to XNextRequest() assuming /cgit.freedeskt op.org/ cairo/tree/ src/cairo- xlib-surface- shm.c?id= 3f1a6f7225e3105 7a8af9313f051a1 d311df0c69# n602
the approaching XShmAttach() will be the next request.
https:/
This assumption can be invalid when another request is performed on another
thread before the XShmAttach() reads |request| from the display.
An |attached| sequence number that is too old means that xlib_shm_ pool_cleanup( ) can call _cairo_ xlib_display_ shm_pool_ destroy( )
_cairo_
and so shmdt() before the server processes the ShmAttach request, resulting in
BadAccess errors.
Similarly _cairo_ xlib_shm_ surface_ mark_active( ) is called and uses xlib_shm_ surface_ flush() and get_compositor() and xlib_shm_ info_cleanup( ). I assume _cairo_ xlib_shm_ surface_ get_obdata( )
XNextRequest() before the corresponding request, leading to similar races
affecting _cairo_
_cairo_
has similar issues.