unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Chris Marusich <cmmarusich@gmail.com>
To: 48941@debbugs.gnu.org
Subject: bug#48941: [powerpc64le-linux] libfaketime CLOCK_MONOTONIC test hangs
Date: Wed, 09 Jun 2021 21:21:09 -0700	[thread overview]
Message-ID: <871r9atkne.fsf@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2820 bytes --]

Hi,

On powerpc64le-linux, using Guix commit
7692295f970a292a3f3db31fc21d05efd97dcb25 on top of Debian unstable, the
libfaketime package fails to build because one of its tests hangs.  It
appears to hang during the CLOCK_MONOTONIC test:

--8<---------------cut here---------------start------------->8---
Running the test program with no faked time specified
$ LD_PRELOAD=../src/libfaketime.so.1 ./timetest
pthread_cond_timedwait: CLOCK_REALTIME test
(Intentionally sleeping 1 second...)
pthread_cond_timedwait: CLOCK_MONOTONIC test
(Intentionally sleeping 1 second..., see docs about CLOCK_MONOTONIC test)
--8<---------------cut here---------------end--------------->8---

There is no output after that last line.  It just sits there.  I left it
there for about 24 hours, and it didn't make any progress.  I tried with
--cores=1, too, but the problem still occurred.  Therefore, it probably
isn't a multithreading issue.

On x86_64-linux Guix, using the aforementioned commit, on top of Fedora
32, the tests pass and the libfaketime builds successfully.  Therefore,
this is probably a platform-specific issue.

The README file for libfaketime says:

>  CLOCK_MONOTONIC test: Running "make test" performs a series of tests
>  after successful compilation of the libfaketime library. On some
>  platforms, the "CLOCK_MONOTONIC test" will apparently hang
>  forever. If and only if this happens on your platform, add the CFLAG
>  -DFORCE_MONOTONIC_FIX to src/Makefile and recompile libfaketime. Do
>  not set FORCE_MONOTONIC_FIX on platforms where the test does not
>  hang.

In fact, we do set this in Guix, via the (apparently undocumented)
FAKETIME_COMPILE_CFLAGS environment variable:

--8<---------------cut here---------------start------------->8---
(define-public libfaketime
  (package
    (name "libfaketime")
    ...
    (arguments
     '(#:phases (modify-phases %standard-phases
                  (replace 'configure
                    (lambda* (#:key outputs #:allow-other-keys)
                      (let ((out (assoc-ref outputs "out")))
                        (setenv "CC" "gcc")
                        (setenv "PREFIX" out)

                        ;; XXX: Without this flag, the CLOCK_REALTIME test hangs
                        ;; indefinitely.  See README.packagers for more information.
                        ;; Try removing this for future versions of libfaketime.
                        (setenv "FAKETIME_COMPILE_CFLAGS" "-DFORCE_MONOTONIC_FIX")
    ...
--8<---------------cut here---------------end--------------->8---

In spite of this, the test hangs on powerpc64le-linux.  Out of
curiosity, I tried NOT setting FAKETIME_COMPILE_CFLAGS, but the behavior
was the same: it still got stuck forever on powerpc64le-linux.

-- 
Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

             reply	other threads:[~2021-06-10  4:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-10  4:21 Chris Marusich [this message]
2021-06-12  2:56 ` bug#48941: [powerpc64le-linux] libfaketime CLOCK_MONOTONIC test hangs Chris Marusich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871r9atkne.fsf@gmail.com \
    --to=cmmarusich@gmail.com \
    --cc=48941@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).