All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 1861161] [NEW] qemu-arm-static 100% CPU when cross-compiling emacs on alpine
@ 2020-01-28 15:37 Philippe Vaucher
  2020-01-28 15:57 ` [Bug 1861161] Re: qemu-arm-static stuck with 100% CPU when cross-compiling emacs Philippe Vaucher
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Philippe Vaucher @ 2020-01-28 15:37 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

Hello,

I'm trying to build multi-arch docker images for
https://hub.docker.com/r/silex/emacs.

Here is the machine I'm building on (hetzner cloud machine):

root@ubuntu-4gb-fsn1-1:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.3 LTS
Release:        18.04
Codename:       bionic
root@ubuntu-4gb-fsn1-1:~# uname -a
Linux ubuntu-4gb-fsn1-1 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Whenever I try to build the following alpine Dockerfile
https://gitlab.com/Silex777/docker-
emacs/blob/master/26.3/alpine/3.9/dev/Dockerfile like this:

$ sysctl kernel.randomize_va_space=0
$ docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
$ docker build --pull -t test --platform arm .

It builds fine until this:

root@ubuntu-4gb-fsn1-1:~# ps -ef | grep qemu
root     26473 26465 99 14:26 pts/0    01:59:58 /usr/bin/qemu-arm-static ../src/bootstrap-emacs -batch --no-site-file --no-site-lisp --eval (setq load-prefer-newer t) -f batch-byte-compile emacs-lisp/macroexp.el

This is supposed to take a few seconds, but in practice it takes 100%
CPU and never ends. When I strace the process I see a never ending loop
like this:

getdents64(5, /* 0 entries */, 2048)    = 0
lseek(5, 0, SEEK_SET)                   = 0
getdents64(5, /* 5 entries */, 2048)    = 120
tgkill(5875, 5878, SIGRT_2)             = -1 EAGAIN (Resource temporarily unavailable)
getdents64(5, /* 0 entries */, 2048)    = 0
lseek(5, 0, SEEK_SET)                   = 0
getdents64(5, /* 5 entries */, 2048)    = 120
tgkill(5875, 5878, SIGRT_2)             = -1 EAGAIN (Resource temporarily unavailable)
getdents64(5, /* 0 entries */, 2048)    = 0
lseek(5, 0, SEEK_SET)                   = 0
getdents64(5, /* 5 entries */, 2048)    = 120
tgkill(5875, 5878, SIGRT_2)             = -1 EAGAIN (Resource temporarily unavailable)
getdents64(5, /* 0 entries */, 2048)    = 0
lseek(5, 0, SEEK_SET)                   = 0
getdents64(5, /* 5 entries */, 2048)    = 120
tgkill(5875, 5878, SIGRT_2)             = -1 EAGAIN (Resource temporarily unavailable)
getdents64(5, /* 0 entries */, 2048)    = 0
lseek(5, 0, SEEK_SET)                   = 0
getdents64(5, /* 5 entries */, 2048)    = 120
tgkill(5875, 5878, SIGRT_2)             = -1 EAGAIN (Resource temporarily unavailable)

It happens with all the QEMU versions I tested:
- 2.11.1 (OS version)
- 4.1.1-1 (from multiarch/qemu-user-static:4.1.1-1)
- 4.2.0-2 (from multiarch/qemu-user-static)

Any ideas of what I could do to debug it further?

Kind regards,
Philippe

p.s: Everything builds fine when the base image is ubuntu. I also had
similar hangs with basic commands like "apt-get install foo" sometimes.

** Affects: qemu
     Importance: Undecided
         Status: New

** Description changed:

  Hello,
  
  I'm trying to build multi-arch docker images for
  https://hub.docker.com/r/silex/emacs.
  
  Here is the machine I'm building on:
  
  root@ubuntu-4gb-fsn1-1:~# lsb_release -a
  No LSB modules are available.
  Distributor ID: Ubuntu
  Description:    Ubuntu 18.04.3 LTS
  Release:        18.04
  Codename:       bionic
  root@ubuntu-4gb-fsn1-1:~# uname -a
  Linux ubuntu-4gb-fsn1-1 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
  
  Whenever I try to build the following alpine Dockerfile
  https://gitlab.com/Silex777/docker-
  emacs/blob/master/26.3/alpine/3.9/dev/Dockerfile with this command:
  
  $ docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
  $ docker build --pull -t test --platform arm .
  
  It builds fine until this:
  
  root@ubuntu-4gb-fsn1-1:~# ps -ef | grep qemu
  root     26473 26465 99 14:26 pts/0    01:59:58 /usr/bin/qemu-arm-static ../src/bootstrap-emacs -batch --no-site-file --no-site-lisp --eval (setq load-prefer-newer t) -f batch-byte-compile emacs-lisp/macroexp.el
  
  This is supposed to take a few seconds, but in practice it takes 100%
  CPU and never ends. When I strace the process I see this:
  
  getdents64(5, /* 0 entries */, 2048)    = 0
  lseek(5, 0, SEEK_SET)                   = 0
  getdents64(5, /* 5 entries */, 2048)    = 120
  tgkill(5875, 5878, SIGRT_2)             = -1 EAGAIN (Resource temporarily unavailable)
  getdents64(5, /* 0 entries */, 2048)    = 0
  lseek(5, 0, SEEK_SET)                   = 0
  getdents64(5, /* 5 entries */, 2048)    = 120
  tgkill(5875, 5878, SIGRT_2)             = -1 EAGAIN (Resource temporarily unavailable)
  getdents64(5, /* 0 entries */, 2048)    = 0
  lseek(5, 0, SEEK_SET)                   = 0
  getdents64(5, /* 5 entries */, 2048)    = 120
  tgkill(5875, 5878, SIGRT_2)             = -1 EAGAIN (Resource temporarily unavailable)
  getdents64(5, /* 0 entries */, 2048)    = 0
  lseek(5, 0, SEEK_SET)                   = 0
  getdents64(5, /* 5 entries */, 2048)    = 120
  tgkill(5875, 5878, SIGRT_2)             = -1 EAGAIN (Resource temporarily unavailable)
  getdents64(5, /* 0 entries */, 2048)    = 0
  lseek(5, 0, SEEK_SET)                   = 0
  getdents64(5, /* 5 entries */, 2048)    = 120
  tgkill(5875, 5878, SIGRT_2)             = -1 EAGAIN (Resource temporarily unavailable)
  
- It happens with all the QEMU versions I tested: 
+ It happens with all the QEMU versions I tested:
  - 2.11.1 (OS version)
  - 4.1.1-1 (from multiarch/qemu-user-static:4.1.1-1)
  - 4.2.0-2 (from multiarch/qemu-user-static)
  
  Any ideas of what I could do to debug it further?
  
  Kind regards,
  Philippe
+ 
+ p.s: Everything builds fine when the base image is ubuntu. I also had
+ similar hangs with basic commands like "apt-get install foo" sometimes.

** Description changed:

  Hello,
  
  I'm trying to build multi-arch docker images for
  https://hub.docker.com/r/silex/emacs.
  
  Here is the machine I'm building on:
  
  root@ubuntu-4gb-fsn1-1:~# lsb_release -a
  No LSB modules are available.
  Distributor ID: Ubuntu
  Description:    Ubuntu 18.04.3 LTS
  Release:        18.04
  Codename:       bionic
  root@ubuntu-4gb-fsn1-1:~# uname -a
  Linux ubuntu-4gb-fsn1-1 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
  
  Whenever I try to build the following alpine Dockerfile
  https://gitlab.com/Silex777/docker-
  emacs/blob/master/26.3/alpine/3.9/dev/Dockerfile with this command:
  
  $ docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
  $ docker build --pull -t test --platform arm .
  
  It builds fine until this:
  
  root@ubuntu-4gb-fsn1-1:~# ps -ef | grep qemu
  root     26473 26465 99 14:26 pts/0    01:59:58 /usr/bin/qemu-arm-static ../src/bootstrap-emacs -batch --no-site-file --no-site-lisp --eval (setq load-prefer-newer t) -f batch-byte-compile emacs-lisp/macroexp.el
  
  This is supposed to take a few seconds, but in practice it takes 100%
- CPU and never ends. When I strace the process I see this:
+ CPU and never ends. When I strace the process I see a never ending loop
+ like this:
  
  getdents64(5, /* 0 entries */, 2048)    = 0
  lseek(5, 0, SEEK_SET)                   = 0
  getdents64(5, /* 5 entries */, 2048)    = 120
  tgkill(5875, 5878, SIGRT_2)             = -1 EAGAIN (Resource temporarily unavailable)
  getdents64(5, /* 0 entries */, 2048)    = 0
  lseek(5, 0, SEEK_SET)                   = 0
  getdents64(5, /* 5 entries */, 2048)    = 120
  tgkill(5875, 5878, SIGRT_2)             = -1 EAGAIN (Resource temporarily unavailable)
  getdents64(5, /* 0 entries */, 2048)    = 0
  lseek(5, 0, SEEK_SET)                   = 0
  getdents64(5, /* 5 entries */, 2048)    = 120
  tgkill(5875, 5878, SIGRT_2)             = -1 EAGAIN (Resource temporarily unavailable)
  getdents64(5, /* 0 entries */, 2048)    = 0
  lseek(5, 0, SEEK_SET)                   = 0
  getdents64(5, /* 5 entries */, 2048)    = 120
  tgkill(5875, 5878, SIGRT_2)             = -1 EAGAIN (Resource temporarily unavailable)
  getdents64(5, /* 0 entries */, 2048)    = 0
  lseek(5, 0, SEEK_SET)                   = 0
  getdents64(5, /* 5 entries */, 2048)    = 120
  tgkill(5875, 5878, SIGRT_2)             = -1 EAGAIN (Resource temporarily unavailable)
  
  It happens with all the QEMU versions I tested:
  - 2.11.1 (OS version)
  - 4.1.1-1 (from multiarch/qemu-user-static:4.1.1-1)
  - 4.2.0-2 (from multiarch/qemu-user-static)
  
  Any ideas of what I could do to debug it further?
  
  Kind regards,
  Philippe
  
  p.s: Everything builds fine when the base image is ubuntu. I also had
  similar hangs with basic commands like "apt-get install foo" sometimes.

** Description changed:

  Hello,
  
  I'm trying to build multi-arch docker images for
  https://hub.docker.com/r/silex/emacs.
  
  Here is the machine I'm building on:
  
  root@ubuntu-4gb-fsn1-1:~# lsb_release -a
  No LSB modules are available.
  Distributor ID: Ubuntu
  Description:    Ubuntu 18.04.3 LTS
  Release:        18.04
  Codename:       bionic
  root@ubuntu-4gb-fsn1-1:~# uname -a
  Linux ubuntu-4gb-fsn1-1 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
  
  Whenever I try to build the following alpine Dockerfile
  https://gitlab.com/Silex777/docker-
- emacs/blob/master/26.3/alpine/3.9/dev/Dockerfile with this command:
+ emacs/blob/master/26.3/alpine/3.9/dev/Dockerfile like this:
  
+ $ sysctl kernel.randomize_va_space=0
  $ docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
  $ docker build --pull -t test --platform arm .
  
  It builds fine until this:
  
  root@ubuntu-4gb-fsn1-1:~# ps -ef | grep qemu
  root     26473 26465 99 14:26 pts/0    01:59:58 /usr/bin/qemu-arm-static ../src/bootstrap-emacs -batch --no-site-file --no-site-lisp --eval (setq load-prefer-newer t) -f batch-byte-compile emacs-lisp/macroexp.el
  
  This is supposed to take a few seconds, but in practice it takes 100%
  CPU and never ends. When I strace the process I see a never ending loop
  like this:
  
  getdents64(5, /* 0 entries */, 2048)    = 0
  lseek(5, 0, SEEK_SET)                   = 0
  getdents64(5, /* 5 entries */, 2048)    = 120
  tgkill(5875, 5878, SIGRT_2)             = -1 EAGAIN (Resource temporarily unavailable)
  getdents64(5, /* 0 entries */, 2048)    = 0
  lseek(5, 0, SEEK_SET)                   = 0
  getdents64(5, /* 5 entries */, 2048)    = 120
  tgkill(5875, 5878, SIGRT_2)             = -1 EAGAIN (Resource temporarily unavailable)
  getdents64(5, /* 0 entries */, 2048)    = 0
  lseek(5, 0, SEEK_SET)                   = 0
  getdents64(5, /* 5 entries */, 2048)    = 120
  tgkill(5875, 5878, SIGRT_2)             = -1 EAGAIN (Resource temporarily unavailable)
  getdents64(5, /* 0 entries */, 2048)    = 0
  lseek(5, 0, SEEK_SET)                   = 0
  getdents64(5, /* 5 entries */, 2048)    = 120
  tgkill(5875, 5878, SIGRT_2)             = -1 EAGAIN (Resource temporarily unavailable)
  getdents64(5, /* 0 entries */, 2048)    = 0
  lseek(5, 0, SEEK_SET)                   = 0
  getdents64(5, /* 5 entries */, 2048)    = 120
  tgkill(5875, 5878, SIGRT_2)             = -1 EAGAIN (Resource temporarily unavailable)
  
  It happens with all the QEMU versions I tested:
  - 2.11.1 (OS version)
  - 4.1.1-1 (from multiarch/qemu-user-static:4.1.1-1)
  - 4.2.0-2 (from multiarch/qemu-user-static)
  
  Any ideas of what I could do to debug it further?
  
  Kind regards,
  Philippe
  
  p.s: Everything builds fine when the base image is ubuntu. I also had
  similar hangs with basic commands like "apt-get install foo" sometimes.

** Description changed:

  Hello,
  
  I'm trying to build multi-arch docker images for
  https://hub.docker.com/r/silex/emacs.
  
- Here is the machine I'm building on:
+ Here is the machine I'm building on (hetzner cloud machine):
  
  root@ubuntu-4gb-fsn1-1:~# lsb_release -a
  No LSB modules are available.
  Distributor ID: Ubuntu
  Description:    Ubuntu 18.04.3 LTS
  Release:        18.04
  Codename:       bionic
  root@ubuntu-4gb-fsn1-1:~# uname -a
  Linux ubuntu-4gb-fsn1-1 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
  
  Whenever I try to build the following alpine Dockerfile
  https://gitlab.com/Silex777/docker-
  emacs/blob/master/26.3/alpine/3.9/dev/Dockerfile like this:
  
  $ sysctl kernel.randomize_va_space=0
  $ docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
  $ docker build --pull -t test --platform arm .
  
  It builds fine until this:
  
  root@ubuntu-4gb-fsn1-1:~# ps -ef | grep qemu
  root     26473 26465 99 14:26 pts/0    01:59:58 /usr/bin/qemu-arm-static ../src/bootstrap-emacs -batch --no-site-file --no-site-lisp --eval (setq load-prefer-newer t) -f batch-byte-compile emacs-lisp/macroexp.el
  
  This is supposed to take a few seconds, but in practice it takes 100%
  CPU and never ends. When I strace the process I see a never ending loop
  like this:
  
  getdents64(5, /* 0 entries */, 2048)    = 0
  lseek(5, 0, SEEK_SET)                   = 0
  getdents64(5, /* 5 entries */, 2048)    = 120
  tgkill(5875, 5878, SIGRT_2)             = -1 EAGAIN (Resource temporarily unavailable)
  getdents64(5, /* 0 entries */, 2048)    = 0
  lseek(5, 0, SEEK_SET)                   = 0
  getdents64(5, /* 5 entries */, 2048)    = 120
  tgkill(5875, 5878, SIGRT_2)             = -1 EAGAIN (Resource temporarily unavailable)
  getdents64(5, /* 0 entries */, 2048)    = 0
  lseek(5, 0, SEEK_SET)                   = 0
  getdents64(5, /* 5 entries */, 2048)    = 120
  tgkill(5875, 5878, SIGRT_2)             = -1 EAGAIN (Resource temporarily unavailable)
  getdents64(5, /* 0 entries */, 2048)    = 0
  lseek(5, 0, SEEK_SET)                   = 0
  getdents64(5, /* 5 entries */, 2048)    = 120
  tgkill(5875, 5878, SIGRT_2)             = -1 EAGAIN (Resource temporarily unavailable)
  getdents64(5, /* 0 entries */, 2048)    = 0
  lseek(5, 0, SEEK_SET)                   = 0
  getdents64(5, /* 5 entries */, 2048)    = 120
  tgkill(5875, 5878, SIGRT_2)             = -1 EAGAIN (Resource temporarily unavailable)
  
  It happens with all the QEMU versions I tested:
  - 2.11.1 (OS version)
  - 4.1.1-1 (from multiarch/qemu-user-static:4.1.1-1)
  - 4.2.0-2 (from multiarch/qemu-user-static)
  
  Any ideas of what I could do to debug it further?
  
  Kind regards,
  Philippe
  
  p.s: Everything builds fine when the base image is ubuntu. I also had
  similar hangs with basic commands like "apt-get install foo" sometimes.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1861161

Title:
  qemu-arm-static 100% CPU when cross-compiling emacs on alpine

Status in QEMU:
  New

Bug description:
  Hello,

  I'm trying to build multi-arch docker images for
  https://hub.docker.com/r/silex/emacs.

  Here is the machine I'm building on (hetzner cloud machine):

  root@ubuntu-4gb-fsn1-1:~# lsb_release -a
  No LSB modules are available.
  Distributor ID: Ubuntu
  Description:    Ubuntu 18.04.3 LTS
  Release:        18.04
  Codename:       bionic
  root@ubuntu-4gb-fsn1-1:~# uname -a
  Linux ubuntu-4gb-fsn1-1 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

  Whenever I try to build the following alpine Dockerfile
  https://gitlab.com/Silex777/docker-
  emacs/blob/master/26.3/alpine/3.9/dev/Dockerfile like this:

  $ sysctl kernel.randomize_va_space=0
  $ docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
  $ docker build --pull -t test --platform arm .

  It builds fine until this:

  root@ubuntu-4gb-fsn1-1:~# ps -ef | grep qemu
  root     26473 26465 99 14:26 pts/0    01:59:58 /usr/bin/qemu-arm-static ../src/bootstrap-emacs -batch --no-site-file --no-site-lisp --eval (setq load-prefer-newer t) -f batch-byte-compile emacs-lisp/macroexp.el

  This is supposed to take a few seconds, but in practice it takes 100%
  CPU and never ends. When I strace the process I see a never ending
  loop like this:

  getdents64(5, /* 0 entries */, 2048)    = 0
  lseek(5, 0, SEEK_SET)                   = 0
  getdents64(5, /* 5 entries */, 2048)    = 120
  tgkill(5875, 5878, SIGRT_2)             = -1 EAGAIN (Resource temporarily unavailable)
  getdents64(5, /* 0 entries */, 2048)    = 0
  lseek(5, 0, SEEK_SET)                   = 0
  getdents64(5, /* 5 entries */, 2048)    = 120
  tgkill(5875, 5878, SIGRT_2)             = -1 EAGAIN (Resource temporarily unavailable)
  getdents64(5, /* 0 entries */, 2048)    = 0
  lseek(5, 0, SEEK_SET)                   = 0
  getdents64(5, /* 5 entries */, 2048)    = 120
  tgkill(5875, 5878, SIGRT_2)             = -1 EAGAIN (Resource temporarily unavailable)
  getdents64(5, /* 0 entries */, 2048)    = 0
  lseek(5, 0, SEEK_SET)                   = 0
  getdents64(5, /* 5 entries */, 2048)    = 120
  tgkill(5875, 5878, SIGRT_2)             = -1 EAGAIN (Resource temporarily unavailable)
  getdents64(5, /* 0 entries */, 2048)    = 0
  lseek(5, 0, SEEK_SET)                   = 0
  getdents64(5, /* 5 entries */, 2048)    = 120
  tgkill(5875, 5878, SIGRT_2)             = -1 EAGAIN (Resource temporarily unavailable)

  It happens with all the QEMU versions I tested:
  - 2.11.1 (OS version)
  - 4.1.1-1 (from multiarch/qemu-user-static:4.1.1-1)
  - 4.2.0-2 (from multiarch/qemu-user-static)

  Any ideas of what I could do to debug it further?

  Kind regards,
  Philippe

  p.s: Everything builds fine when the base image is ubuntu. I also had
  similar hangs with basic commands like "apt-get install foo"
  sometimes.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1861161/+subscriptions


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-07-09  4:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-28 15:37 [Bug 1861161] [NEW] qemu-arm-static 100% CPU when cross-compiling emacs on alpine Philippe Vaucher
2020-01-28 15:57 ` [Bug 1861161] Re: qemu-arm-static stuck with 100% CPU when cross-compiling emacs Philippe Vaucher
2020-01-28 16:50 ` Peter Maydell
2020-01-28 18:01 ` Philippe Vaucher
2020-01-29 18:07 ` Philippe Vaucher
2020-01-29 19:33 ` Philippe Vaucher
2020-03-22  8:50 ` Philippe Vaucher
2020-11-05 10:57 ` Peter Maydell
2021-05-09 15:09 ` Thomas Huth
2021-07-09  4:17 ` Launchpad Bug Tracker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.