#5013: sporadic failures during compilation under solaris
----------------------------------+---------------------------
Reporter: maeder | Owner:
Type: bug | Status: new
Priority: low | Milestone: 7.6.2
Component: Compiler | Version: 7.0.4
Resolution: | Keywords:
Operating System: Solaris | Architecture: x86
Type of failure: Runtime crash | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
----------------------------------+---------------------------
Comment (by maeder):
I've replaced `throwErrnoPathIfMinus1_` with
`throwErrnoPathIfMinus1Retry_` (also in
`libraries/unix/System/Posix/Files/ByteString.hsc`) to see if this makes a
difference.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/5013#comment:24>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#1480: Template Haskell should allow reification of modules
----------------------------+----------------------------------------------
Reporter: igloo | Owner:
Type: feature | Status: closed
request | Milestone: 7.8.1
Priority: highest | Version: 7.7
Component: | Keywords:
Template Haskell | Architecture: Unknown/Multiple
Resolution: fixed | Difficulty: Moderate (less than a day)
Operating System: | Blocked By:
Unknown/Multiple | Related Tickets:
Type of failure: |
None/Unknown |
Test Case: |
Blocking: 8398 |
----------------------------+----------------------------------------------
Comment (by simonmar):
Now that I think about it, I'm wary about using `mi_usages` for
reification, because that widens its scope beyond the recompilation
checker. It seems more correct to add the information to `mi_deps`.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/1480#comment:27>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#1480: Template Haskell should allow reification of modules
----------------------------+----------------------------------------------
Reporter: igloo | Owner:
Type: feature | Status: closed
request | Milestone: 7.8.1
Priority: highest | Version: 7.7
Component: | Keywords:
Template Haskell | Architecture: Unknown/Multiple
Resolution: fixed | Difficulty: Moderate (less than a day)
Operating System: | Blocked By:
Unknown/Multiple | Related Tickets:
Type of failure: |
None/Unknown |
Test Case: |
Blocking: 8398 |
----------------------------+----------------------------------------------
Comment (by simonmar):
Replying to [comment:24 simonpj]:
> Simon, I don't understand the relationship between `mi_deps` and
`mi_usages` fields of `ModIface`. Both seem implicated in the
recompilation check. Can you clarify?
I've just been poking around in the source tree and the wiki, and I think
a concise summary is this: `mi_deps` lists everything below the module,
whereas `mi_usages` lists the bits that the module actually depends on,
and their fingerprints.
`mi_usages` is used ''only'' by the recompilation checker, whereas
`mi_deps` is used by the renamer and other places (linking?), and by the
recompilation checker. The `mi_usages` of modules that we are not
compiling are completely redundant, we never even load them - the
interface deserializer returns a thunk for that bit of the `.hi` file, and
we never look at it.
There is some overlap between these two fields. As far as I know it's
been this way for a long time - since before I implemented fingerprints I
think. Perhaps the redundancy could be eliminated... but there are a lot
of subtleties here.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/1480#comment:26>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#5013: sporadic failures during compilation under solaris
----------------------------------+---------------------------
Reporter: maeder | Owner:
Type: bug | Status: new
Priority: low | Milestone: 7.6.2
Component: Compiler | Version: 7.0.4
Resolution: | Keywords:
Operating System: Solaris | Architecture: x86
Type of failure: Runtime crash | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
----------------------------------+---------------------------
Comment (by maeder):
Replying to [comment:22 simonmar]:
> yes, `stat` is returning `EINTR` and we're not expecting it to. Change
the call to `stat` in `getFileStatus` to use `throwErrnoIfMinus1Retry`
(hope I've got that right from memory).
I do not see what to try out here. I'm looking at
`libraries/unix/System/Posix/Files.hsc` of ghc-7.6.3 (lines 179-189)
{{{
-- | @getFileStatus path@ calls gets the @FileStatus@ information (user
ID,
-- size, access times, etc.) for the file @path@.
--
-- Note: calls @stat@.
getFileStatus :: FilePath -> IO FileStatus
getFileStatus path = do
fp <- mallocForeignPtrBytes (#const sizeof(struct stat))
withForeignPtr fp $ \p ->
withFilePath path $ \s ->
throwErrnoPathIfMinus1_ "getFileStatus" path (c_stat s p)
return (FileStatus fp)
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/5013#comment:23>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#1480: Template Haskell should allow reification of modules
----------------------------+----------------------------------------------
Reporter: igloo | Owner:
Type: feature | Status: closed
request | Milestone: 7.8.1
Priority: highest | Version: 7.7
Component: | Keywords:
Template Haskell | Architecture: Unknown/Multiple
Resolution: fixed | Difficulty: Moderate (less than a day)
Operating System: | Blocked By:
Unknown/Multiple | Related Tickets:
Type of failure: |
None/Unknown |
Test Case: |
Blocking: 8398 |
----------------------------+----------------------------------------------
Comment (by errge):
Yes, you're correct, I want to reify not just the current module, but any
module, even in packages. Therefore `ModGuts` is out of the question, and
we can only depend on `ModIface`, that is actually serialized to `.hi`
files.
Your first option (to extend the serialization format with the Boolean)
seems to be the correct way, that's what I will try first, when I sit down
to do it. But first, I want to look around and get a better understanding
about the whole recompilation checking stuff. This discussion and the
wikipage will help a lot, I hope.
The second option is unsatisfactory: as you pointed out before, it's
different between different haskell implementations (or even between
different versions of cabal libraries).
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/1480#comment:25>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#1480: Template Haskell should allow reification of modules
----------------------------+----------------------------------------------
Reporter: igloo | Owner:
Type: feature | Status: closed
request | Milestone: 7.8.1
Priority: highest | Version: 7.7
Component: | Keywords:
Template Haskell | Architecture: Unknown/Multiple
Resolution: fixed | Difficulty: Moderate (less than a day)
Operating System: | Blocked By:
Unknown/Multiple | Related Tickets:
Type of failure: |
None/Unknown |
Test Case: |
Blocking: 8398 |
----------------------------+----------------------------------------------
Comment (by simonpj):
Gergely wants to be able walk the entire module-import tree, including
deep into packages. (Correct?)
So given a module M (presumably including the current one) he'd like to
produce a list of all modules that M directly imported. We can get from M
to M's `ModIface`, but then we need to find its direct imports. But if M
uses a module X, but X is from a package, we can't tell if X is directly
imported by M or not.
I can see two approaches:
* It would be easy enough to record a boolean flag in
`UsagePackageModule` for this purpose.
* Alternatively, but less satisfactorily, we could say that `reifyModule`
returns a superset of the direct imports. That's what happens now I
think. But that seems yukky.
I prefer the first.
Simon
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/1480#comment:23>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#1480: Template Haskell should allow reification of modules
----------------------------+----------------------------------------------
Reporter: igloo | Owner:
Type: feature | Status: closed
request | Milestone: 7.8.1
Priority: highest | Version: 7.7
Component: | Keywords:
Template Haskell | Architecture: Unknown/Multiple
Resolution: fixed | Difficulty: Moderate (less than a day)
Operating System: | Blocked By:
Unknown/Multiple | Related Tickets:
Type of failure: |
None/Unknown |
Test Case: |
Blocking: 8398 |
----------------------------+----------------------------------------------
Comment (by simonmar):
The source of truth for the design around usages and recompilation is
[wiki:Commentary/Compiler/RecompilationAvoidance].
You're right that !UsagePackageModule doesn't have a usg_exports field.
For package modules we record a lower resolution dependency, just the hash
of the whole module. The rationale is that package modules don't change
very often, so we don't need to track fine-grained dependency information
about them. This does mean that we can't tell the difference between a
direct import and an indirect import of a packages module from the
`Usages`. Probably if you need to get a list of direct imports you should
get it from somewhere else, e.g. `mg_dir_imps` from `ModGuts`.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/1480#comment:22>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler