umockdev 0.16.3-1 breaks autopkgtest of bolt
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bolt (Ubuntu) |
Fix Released
|
Undecided
|
Martin Pitt | ||
umockdev (Debian) |
Fix Released
|
Unknown
|
|||
umockdev (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
The test of bolt fails with the new version due to a crash:
https:/
...
Trace/breakpoint trap (core dumped)
The bolt test really uses umockdev, d/t/control has gir1.2-umockdev-1.0 and
python3-dbusmock and the new version causes this.
Retrying autopkgtest locally with no, all and just umockdev from proposed
and it seems reproducible.
- impish-release - works
- impish-all-proposed - crashes
- impish-release + umockdev+libc6 from proposed - crashes
Repro:
$ umockdev-wrapper /usr/libexec/
FYI:
Downgrading to umockdev 0.16.2-1 in the same environment does not
eliminate the issue. So it might happen at the bolt test-build time.
Debian has the same issue in:
https:/
The new mockdev fails to create /sys/bus which is requested by the test.
From there the error path is what crashes, but the root cause is why we enter
the error-path in the first place.
One should be aware, this fail is "normal" if the environment is not mocked.
Even in the good case the different calls with/without umockdev lead to
exactly the same crash.
# good
$ umockdev-wrapper /usr/libexec/
# same crash as the new version has with umockdev-wrapper
$ gdb /usr/libexec/
This is based on ldpreload.
$ cat /usr/bin/
#!/bin/sh
# Wrapper program to preload the libumockdev library, so that test programs can
# set $UMOCKDEV_DIR for redirecting sysfs and other queries to a test bed.
exec env LD_PRELOAD=
Gut feeling: it seems the mocking no more happens, and due to that
it runs into the non-mocked crash
Debugging with that:
$ pull-lp-source bolt
$ cd bolt-0.9.1/tests
$ gdb /usr/libexec/
(gdb) set environment LD_PRELOAD libumockdev-
(gdb) b mock_sysfs_init
(gdb) run
With that we can see that while the crash is somewhere inside g_warning the
reason is in the g_mkdir failing with the new umockdev.
Good-case
Breakpoint 1, mock_sysfs_init (ms=0x5555555b6400) at ../tests/
165 {
(gdb) n
171 ms->bed = umockdev_
(gdb)
[New Thread 0x7ffff6e65640 (LWP 11444)]
# GLib-DEBUG: setenv()/putenv() are not thread-safe and should not be used after threads are created
# DEBUG: umockdev.vala:104: Created udev test bed /tmp/umockdev.
172 ms->domains = g_hash_
(gdb)
[New Thread 0x7ffff6664640 (LWP 11445)]
175 ms->devices = g_hash_table_new (g_str_hash, g_str_equal);
(gdb)
180 sys = umockdev_
(gdb)
182 bus = g_build_filename (sys, "bus", NULL);
(gdb) p sys
$1 = 0x5555555b99a0 "/tmp/umockdev.
(gdb) n
183 r = g_mkdir (bus, 0744);
(gdb) p bus
$2 = 0x5555555be330 "/tmp/umockdev.
(gdb) n
185 if (r < 0)
(gdb) p r
$3 = 0
(gdb) n
188 cls = g_build_filename (sys, "class", NULL);
Bad-Case
Breakpoint 1, mock_sysfs_init (ms=0x5555555b6400) at ../tests/
165 {
(gdb) n
171 ms->bed = umockdev_
(gdb)
[New Thread 0x7ffff6e65640 (LWP 17082)]
# GLib-DEBUG: setenv()/putenv() are not thread-safe and should not be used after threads are created
# DEBUG: umockdev.vala:110: Created udev test bed /tmp/umockdev.
172 ms->domains = g_hash_
(gdb)
[New Thread 0x7ffff6664640 (LWP 17083)]
175 ms->devices = g_hash_table_new (g_str_hash, g_str_equal);
(gdb)
180 sys = umockdev_
(gdb)
182 bus = g_build_filename (sys, "bus", NULL);
(gdb) p sys
$1 = 0x5555555a98b0 "/tmp/umockdev.
(gdb) n
183 r = g_mkdir (bus, 0744);
(gdb) p bus
$2 = 0x5555555be560 "/tmp/umockdev.
(gdb) n
185 if (r < 0)
(gdb) p r
$3 = -1
(gdb) n
186 g_warning ("could not create %s", bus);
(gdb) n
** (/usr/libexec/
Thread 1 "test-power" received signal SIGTRAP, Trace/breakpoint trap.
I'll tag this update-excuse and FYI-subscribe Martin who has done the Debian upload and the Ubuntu sync of this on 16th Sept (post FF).
summary: |
- 0.16.3-1 breaks autopkgtest of bolt + umockdev 0.16.3-1 breaks autopkgtest of bolt |
tags: | added: update-excuse |
Changed in bolt (Ubuntu): | |
status: | In Progress → Invalid |
Changed in umockdev (Debian): | |
status: | Unknown → Fix Released |
Changed in bolt (Ubuntu): | |
status: | In Progress → Fix Released |
Thanks Christian -- Indeed I noticed that, and set https:/ /gitlab. freedesktop. org/bolt/ bolt/-/ merge_requests/ 246 the day after to fix this. Unfortunately I didn't get a reaction yet, and Christian also didn't respond on IRC yet. I'll do some more prodding.