Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,391
    • Issues 4,391
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 376
    • Merge Requests 376
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #14153

Closed
Open
Opened Aug 24, 2017 by enolan@trac-enolan

Change worker thread name to something mentioning original process name

Worker OS thread are renamed to ghc_worker when spawned. This is annoying when reading debugging messages that print the process name. For example, at work I'm debugging a segfault in a Haskell program and the kernel message just says ghc_worker[21992]: segfault at 0 ip... which doesn't tell me which of our Haskell programs is having the problem.

I'd like to change this so it mentions the original name. On Linux, we can get that from the program_invocation_name global. pthread_setname_np has a maximum length of 15 characters, so we'll have to truncate it. I propose the first 13 characters of the original name followed by ":w". I'd just as soon not change the name in the first place but apparently this change was made to make it easier to distinguish worker threads from the main thread when debugging processes in gdb (commit 674c631e).

Trac metadata
Trac field Value
Version 8.2.1
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Runtime System
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
Assignee
Assign to
8.4.1
Milestone
8.4.1 (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#14153