Your message dated Mon, 03 Mar 2014 09:23:19 +0000
with message-id <[email protected]>
and subject line Bug#740144: fixed in ghc 7.6.3-8
has caused the Debian Bug report #740144,
regarding ghc: 64-bit big endian support
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
740144: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=740144
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: ghc
Version: 7.6.3-7
Severity: important
Tags: upstream patch
Hi,
ghc has been removed from the archive on s390x because it hangs randomly
during the build process. This has been reported upstream as ticket
#7993, which hasn't progress so far. In the meantime the same issue has
been reported as ticket #8134 for powerpc64. It happens the problem is
the same and that it affect 64-bit big endian platforms.
A patch is provided in this bug report, and has been committed upstream.
I have tried this patch and I have been been able to build ghc
successfully 3 times in a loop after bootstraping it from the last
available binary in snapshot.d.o.
I have attached this patch to this bug report for convenience, so that
it could be dropped in debian/patches. Would it be possible to upload
a fixed version with this patch? I will then take care of bootstrapping
the binary on s390x again and uploading the package to the archive.
Thanks,
Aurelien
-- System Information:
Debian Release: jessie/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: s390x
Kernel: Linux 3.2.0-4-s390x (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
commit a4b1a43542b11d09dd3b603d82c5a0e99da67d74
Author: Austin Seipp <[email protected]>
Date: Fri Nov 1 22:17:01 2013 -0500
Fix loop on 64bit Big-Endian platforms (#8134)
This is a fun one.
In the RTS, `cas` expects a pointer to StgWord which will translate to
unsigned long (8 bytes under LP64.) But we had previously declared
token_locked as *StgBool* - which evaluates to 'int' (4 bytes under
LP64.) That means we fail to provide enough storage for the cas
primitive, causing it to corrupt memory on a 64bit platform.
Hilariously, this somehow did not affect little-endian platforms (ARM,
x86, etc) before. That's because to clear our lock token, we would say:
token_locked = 0;
But because token_locked is 32bits technically, this only writes to
half of the 64bit quantity. On a Big-Endian machine, this won't do
anything. That is, token_locked starts as 0:
/ token_locked
|
v
0x00000000
and the first cas modifies the memory to:
/ valid / corrupted
| |
v v
0x00000000 0x00000001
We then clear token_locked, but this doesn't change the corrupted 4
bytes of memory. And then we try to lock the token again, spinning until
it is released - clearly a deadlock.
Related: Windows (amd64) doesn't follow LP64, but LLP64, where both
int and long are 4 bytes, so this shouldn't change anything on these
platforms.
Thanks to Reid Barton for helping the diagnosis. Also, thanks to Jens
Peterson who confirmed this also fixes building GHC on Fedora/ppc64 and
Fedora/s390x.
Authored-by: Gustavo Luiz Duarte <[email protected]>
Signed-off-by: Austin Seipp <[email protected]>
diff --git a/rts/STM.c b/rts/STM.c
index e342ebf..bea0356 100644
--- a/rts/STM.c
+++ b/rts/STM.c
@@ -949,7 +949,7 @@ void stmPreGCHook (Capability *cap) {
static volatile StgInt64 max_commits = 0;
#if defined(THREADED_RTS)
-static volatile StgBool token_locked = FALSE;
+static volatile StgWord token_locked = FALSE;
static void getTokenBatch(Capability *cap) {
while (cas((void *)&token_locked, FALSE, TRUE) == TRUE) { /* nothing */ }
--- End Message ---
--- Begin Message ---
Source: ghc
Source-Version: 7.6.3-8
We believe that the bug you reported is fixed in the latest version of
ghc, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Joachim Breitner <[email protected]> (supplier of updated ghc package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Mon, 03 Mar 2014 09:12:47 +0100
Source: ghc
Binary: ghc ghc-prof ghc-doc ghc-dynamic ghc-haddock
Architecture: source all amd64
Version: 7.6.3-8
Distribution: unstable
Urgency: medium
Maintainer: Debian Haskell Group
<[email protected]>
Changed-By: Joachim Breitner <[email protected]>
Description:
ghc - The Glasgow Haskell Compilation system
ghc-doc - Documentation for the Glasgow Haskell Compilation system
ghc-dynamic - Dynamic libraries for the Glasgow Haskell Compilation system
ghc-haddock - Documentation tool for annotated Haskell source code
ghc-prof - Profiling libraries for the Glasgow Haskell Compilation system
Closes: 740144
Changes:
ghc (7.6.3-8) unstable; urgency=medium
.
* Apply a4b1a435 from upstream, to fix building on 64 big endian platforms
such as s390x. Thanks to Aurelien Jarno for pointing out the fix.
Closes: #740144
Checksums-Sha1:
e726fc1d75d14c46534f4aa412aae5ab69c67cf3 1684 ghc_7.6.3-8.dsc
5b26abbf25639b6aae9e87e74760dcbcf8cf2c19 43116 ghc_7.6.3-8.debian.tar.xz
bbe2d31ac6d255df08d3efa18cd0fb8ec1406ddb 7848462 ghc-doc_7.6.3-8_all.deb
54d7de88ad0e7a97969bddea2c7eab6768f81628 26069860 ghc_7.6.3-8_amd64.deb
0b35e1295760b83b03850b224f0804a1cffe9829 24328268 ghc-prof_7.6.3-8_amd64.deb
6a6386ce2d77c7182643aa6fb142125c99ec9d62 13475500 ghc-dynamic_7.6.3-8_amd64.deb
2f0893d614a6ab1053880d0ba9a4c71113b460f6 4271308 ghc-haddock_7.6.3-8_amd64.deb
Checksums-Sha256:
638936994b530f2ac3cdff4eaebea5d83aae801400b4e92267fcab2559c9241d 1684
ghc_7.6.3-8.dsc
2f6b4061ede599dc00123675f280836db23069223246f105f3f5d29ebf65a32b 43116
ghc_7.6.3-8.debian.tar.xz
57954a5e6e922efeeeefe3f1f5a13262deeae01c095a7c58808b2c20fa893707 7848462
ghc-doc_7.6.3-8_all.deb
883f582884353e37008b5988f0efd17b4039aa209d5d62e4c2bdd2c38ac8b99e 26069860
ghc_7.6.3-8_amd64.deb
1d8406f219de85d1b6722f81b5add8570f15898905e178272d53e33be9552dfd 24328268
ghc-prof_7.6.3-8_amd64.deb
d5e234957a2e28713e44ee47499dd60ea03c09fb6e7b341c36606d572b575049 13475500
ghc-dynamic_7.6.3-8_amd64.deb
e9466796fbb898cdeadb6c765cd5e968271ee837aada148ba2c6cbd599c8e46e 4271308
ghc-haddock_7.6.3-8_amd64.deb
Files:
086669e8ae3b472922576ed4282938f1 1684 haskell extra ghc_7.6.3-8.dsc
a2aa5d49b1ed0a0d39a00907d6b44ab8 43116 haskell extra ghc_7.6.3-8.debian.tar.xz
9515df67f516a43a8231bf249c80ae14 7848462 doc extra ghc-doc_7.6.3-8_all.deb
b144a71624992ebdc25f09191924a90e 26069860 haskell extra ghc_7.6.3-8_amd64.deb
499b1ddbb076c70bdfb10a840483106e 24328268 haskell extra
ghc-prof_7.6.3-8_amd64.deb
125d83353580cfa0998a1107f4a4932f 13475500 haskell extra
ghc-dynamic_7.6.3-8_amd64.deb
002dc3e638e84ec3513cd655af15b2cc 4271308 haskell extra
ghc-haddock_7.6.3-8_amd64.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iEYEARECAAYFAlMUQQQACgkQ9ijrk0dDIGz9AQCfX06LJsM90YuBqZ3cFISfUWjr
2U4AmwdbPhqC3oUZFeWYNS18wDDzgDKp
=fil+
-----END PGP SIGNATURE-----
--- End Message ---