aptitude crashes qemu-m68k with handle_cpu_signal received signal outside vCPU context

Bug #1815911 reported by John Paul Adrian Glaubitz
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Undecided
Unassigned

Bug Description

When building a package with sbuild on Debian, sbuild can use aptitude to resolve dependencies.

Recently, some changes introduced to aptitude or related packages cause qemu to crash:

(sid-m68k-sbuild)root@nofan:/# aptitude -y --without-recommends -o Dpkg::Options::=--force-confold -o Aptitude::CmdLine::Ignore-Trust-Violations=false -o Aptitude::ProblemResolver::StepScore=100 -o Aptitude::ProblemResolver::SolutionCost="safety, priority, non-default-versions" -o Aptitude::ProblemResolver::Hints::KeepDummy="reject sbuild-build-depends-core-dummy :UNINST" -o Aptitude::ProblemResolver::Keep-All-Level=55000 -o Aptitude::ProblemResolver::Remove-Essential-Level=maximum install vim
Warning: Invalid locale (please review locale settings, this might lead to problems later):
  locale::facet::_S_create_c_locale name not valid
The following NEW packages will be installed:
  libgpm2{a} vim vim-common{a} vim-runtime{a} xxd{a}
0 packages upgraded, 5 newly installed, 0 to remove and 1 not upgraded.
Need to get 7225 kB/7260 kB of archives. After unpacking 33.5 MB will be used.
qemu:handle_cpu_signal received signal outside vCPU context @ pc=0x6019d1bf
qemu:handle_cpu_signal received signal outside vCPU context @ pc=0x601b64ab
Segmentation fault
(sid-m68k-sbuild)root@nofan:/#

The crash does not reproduce on real hardware running Debian unstable.

Revision history for this message
Laurent Vivier (laurent-vivier) wrote :

It seems it crashes during futex syscall:

...
[pid 4] getpid() = 4
[pid 4] tgkill(4, 24, SIGRT_1) = 0
[pid 24] <... futex resumed> ) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
[pid 24] --- SIGRT_1 {si_signo=SIGRT_1, si_code=SI_TKILL, si_pid=4, si_uid=0} ---
[pid 4] futex(0x7f77abb4f610, FUTEX_WAIT_PRIVATE, 16777216, NULL <unfinished ...>
[pid 24] getpid() = 4
[pid 24] --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x10} ---
...

Revision history for this message
John Paul Adrian Glaubitz (glaubitz) wrote : Re: [Bug 1815911] Re: aptitude crashes qemu-m68k with handle_cpu_signal received signal outside vCPU context

On 2/15/19 1:47 PM, Laurent Vivier wrote:
> It seems it crashes during futex syscall:
>
> ...
> [pid 4] getpid() = 4
> [pid 4] tgkill(4, 24, SIGRT_1) = 0
> [pid 24] <... futex resumed> ) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
> [pid 24] --- SIGRT_1 {si_signo=SIGRT_1, si_code=SI_TKILL, si_pid=4, si_uid=0} ---
> [pid 4] futex(0x7f77abb4f610, FUTEX_WAIT_PRIVATE, 16777216, NULL <unfinished ...>
> [pid 24] getpid() = 4
> [pid 24] --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x10} ---
> ...

The crash also reproduces with qemu-sh4, so it's not specific to m68k.

Revision history for this message
Steve Dodd (anarchetic) wrote :

I think this is probably a duplicate of bug #1594394, in which case it seems to be fixed in 5.0.0+.

Revision history for this message
Thomas Huth (th-huth) wrote :

John, can you still reproduce it with the latest version of QEMU?

Changed in qemu:
status: New → Incomplete
Revision history for this message
John Paul Adrian Glaubitz (glaubitz) wrote :

Just verified it with a very recently compiled version of QEMU from git master and, indeed, the bug seems to be fixed as I can no longer reproduce the crash. The command executes correctly.

I guess it's safe to mark this as fixed.

Thomas Huth (th-huth)
Changed in qemu:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.