[GHC] #10587: Suspending and unsuspending ghci kills and spawns threads
GHC
ghc-devs at haskell.org
Mon Jun 29 14:33:05 UTC 2015
#10587: Suspending and unsuspending ghci kills and spawns threads
---------------------------------+-----------------------------------------
Reporter: niteria | Owner: niteria
Type: bug | Status: new
Priority: low | Milestone:
Component: GHCi | Version: 7.10.1
Resolution: | Keywords:
Operating System: Linux | Architecture: x86_64 (amd64)
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions:
---------------------------------+-----------------------------------------
Description changed by niteria:
Old description:
> When you run:
>
> {{{
> ghci -j8
>
> # in a different terminal:
> pidstat -t -p $(pidof ghc) | grep ghc_worker
> kill -SIGSTOP $(pidof ghc); kill -SIGCONT $(pidof ghc)
> # SIGCONT doesn't really resume it, you have to run fg in the terminal
> where it runs
> pidstat -t -p $(pidof ghc) | grep ghc_worker
> kill -SIGSTOP $(pidof ghc); kill -SIGCONT $(pidof ghc)
> pidstat -t -p $(pidof ghc) | grep ghc_worker
> kill -SIGSTOP $(pidof ghc); kill -SIGCONT $(pidof ghc)
> pidstat -t -p $(pidof ghc) | grep ghc_worker
> }}}
>
> You get:
>
> {{{
> $ pidstat -t -p $(pidof ghc) | grep ghc_worker
> 06:40:55 AM - 2848953 0.00 0.00 0.00 0.00 21
> |__ghc_worker
> 06:40:55 AM - 2848954 0.00 0.00 0.00 0.00 31
> |__ghc_worker
> 06:40:55 AM - 2848955 0.00 0.00 0.00 0.00 21
> |__ghc_worker
> 06:40:55 AM - 2848957 0.00 0.00 0.00 0.00 21
> |__ghc_worker
> 06:40:55 AM - 2848958 0.00 0.00 0.00 0.00 22
> |__ghc_worker
> 06:40:55 AM - 2848959 0.00 0.00 0.00 0.00 37
> |__ghc_worker
> 06:40:55 AM - 2848960 0.00 0.00 0.00 0.00 3
> |__ghc_worker
> 06:40:55 AM - 2848961 0.00 0.00 0.00 0.00 2
> |__ghc_worker
> 06:40:55 AM - 2848962 0.00 0.00 0.00 0.00 36
> |__ghc_worker
> 06:40:55 AM - 2848963 0.00 0.00 0.00 0.00 21
> |__ghc_worker
> 06:40:55 AM - 2848964 0.00 0.00 0.00 0.00 31
> |__ghc_worker
> 06:40:55 AM - 2848965 0.00 0.00 0.00 0.00 11
> |__ghc_worker
> 06:40:55 AM - 2848966 0.00 0.00 0.00 0.00 24
> |__ghc_worker
> 06:40:55 AM - 2848967 0.00 0.00 0.00 0.00 38
> |__ghc_worker
> 06:40:55 AM - 2848968 0.00 0.00 0.00 0.00 23
> |__ghc_worker
> 06:40:55 AM - 2848969 0.00 0.00 0.00 0.00 22
> |__ghc_worker
> 06:40:55 AM - 2848970 0.00 0.00 0.00 0.00 31
> |__ghc_worker
> }}}
>
> {{{
> $ pidstat -t -p $(pidof ghc) | grep ghc_worker
> 06:41:37 AM - 2848953 0.00 0.00 0.00 0.00 21
> |__ghc_worker
> 06:41:37 AM - 2848954 0.00 0.00 0.00 0.00 31
> |__ghc_worker
> 06:41:37 AM - 2848955 0.00 0.00 0.00 0.00 3
> |__ghc_worker
> 06:41:37 AM - 2848957 0.00 0.00 0.00 0.00 3
> |__ghc_worker
> 06:41:37 AM - 2848958 0.00 0.00 0.00 0.00 22
> |__ghc_worker
> 06:41:37 AM - 2848959 0.00 0.00 0.00 0.00 37
> |__ghc_worker
> 06:41:37 AM - 2848960 0.00 0.00 0.00 0.00 5
> |__ghc_worker
> 06:41:37 AM - 2848961 0.00 0.00 0.00 0.00 5
> |__ghc_worker
> 06:41:37 AM - 2848962 0.00 0.00 0.00 0.00 36
> |__ghc_worker
> 06:41:37 AM - 2848963 0.00 0.00 0.00 0.00 7
> |__ghc_worker
> 06:41:37 AM - 2848964 0.00 0.00 0.00 0.00 12
> |__ghc_worker
> 06:41:37 AM - 2848965 0.00 0.00 0.00 0.00 11
> |__ghc_worker
> 06:41:37 AM - 2848966 0.00 0.00 0.00 0.00 24
> |__ghc_worker
> 06:41:37 AM - 2848967 0.00 0.00 0.00 0.00 38
> |__ghc_worker
> 06:41:37 AM - 2848968 0.00 0.00 0.00 0.00 23
> |__ghc_worker
> 06:41:37 AM - 2848969 0.00 0.00 0.00 0.00 8
> |__ghc_worker
> 06:41:37 AM - 2848970 0.00 0.00 0.00 0.00 14
> |__ghc_worker
> 06:41:37 AM - 2850193 0.00 0.00 0.00 0.00 32
> |__ghc_worker
> 06:41:37 AM - 2850194 0.00 0.00 0.00 0.00 33
> |__ghc_worker
> 06:41:37 AM - 2850196 0.00 0.00 0.00 0.00 34
> |__ghc_worker
> 06:41:37 AM - 2850197 0.00 0.00 0.00 0.00 35
> |__ghc_worker
> 06:41:37 AM - 2850198 0.00 0.00 0.00 0.00 10
> |__ghc_worker
> 06:41:37 AM - 2850199 0.00 0.00 0.00 0.00 17
> |__ghc_worker
> 06:41:37 AM - 2850294 0.00 0.00 0.00 0.00 21
> |__ghc_worker
> 06:41:37 AM - 2850295 0.00 0.00 0.00 0.00 31
> |__ghc_worker
> }}}
>
> {{{
> $ pidstat -t -p $(pidof ghc) | grep ghc_worker
> 06:42:43 AM - 2848953 0.00 0.00 0.00 0.00 21
> |__ghc_worker
> 06:42:43 AM - 2848954 0.00 0.00 0.00 0.00 31
> |__ghc_worker
> 06:42:43 AM - 2848955 0.00 0.00 0.00 0.00 3
> |__ghc_worker
> 06:42:43 AM - 2848957 0.00 0.00 0.00 0.00 7
> |__ghc_worker
> 06:42:43 AM - 2848958 0.00 0.00 0.00 0.00 22
> |__ghc_worker
> 06:42:43 AM - 2848959 0.00 0.00 0.00 0.00 37
> |__ghc_worker
> 06:42:43 AM - 2848960 0.00 0.00 0.00 0.00 9
> |__ghc_worker
> 06:42:43 AM - 2848961 0.00 0.00 0.00 0.00 0
> |__ghc_worker
> 06:42:43 AM - 2848962 0.00 0.00 0.00 0.00 36
> |__ghc_worker
> 06:42:43 AM - 2848963 0.00 0.00 0.00 0.00 4
> |__ghc_worker
> 06:42:43 AM - 2848964 0.00 0.00 0.00 0.00 12
> |__ghc_worker
> 06:42:43 AM - 2848965 0.00 0.00 0.00 0.00 11
> |__ghc_worker
> 06:42:43 AM - 2848966 0.00 0.00 0.00 0.00 24
> |__ghc_worker
> 06:42:43 AM - 2848967 0.00 0.00 0.00 0.00 38
> |__ghc_worker
> 06:42:43 AM - 2848968 0.00 0.00 0.00 0.00 23
> |__ghc_worker
> 06:42:43 AM - 2848969 0.00 0.00 0.00 0.00 29
> |__ghc_worker
> 06:42:43 AM - 2848970 0.00 0.00 0.00 0.00 14
> |__ghc_worker
> 06:42:43 AM - 2850193 0.00 0.00 0.00 0.00 32
> |__ghc_worker
> 06:42:43 AM - 2850196 0.00 0.00 0.00 0.00 34
> |__ghc_worker
> 06:42:43 AM - 2850197 0.00 0.00 0.00 0.00 35
> |__ghc_worker
> 06:42:43 AM - 2850198 0.00 0.00 0.00 0.00 10
> |__ghc_worker
> 06:42:43 AM - 2850199 0.00 0.00 0.00 0.00 19
> |__ghc_worker
> 06:42:43 AM - 2850295 0.00 0.00 0.00 0.00 13
> |__ghc_worker
> 06:42:43 AM - 2861009 0.00 0.00 0.00 0.00 34
> |__ghc_worker
> 06:42:43 AM - 2861010 0.00 0.00 0.00 0.00 35
> |__ghc_worker
> }}}
>
> {{{
> $ pidstat -t -p $(pidof ghc) | grep ghc_worker
> 06:43:37 AM - 2848953 0.00 0.00 0.00 0.00 21
> |__ghc_worker
> 06:43:37 AM - 2848954 0.00 0.00 0.00 0.00 31
> |__ghc_worker
> 06:43:37 AM - 2848955 0.00 0.00 0.00 0.00 9
> |__ghc_worker
> 06:43:37 AM - 2848957 0.00 0.00 0.00 0.00 9
> |__ghc_worker
> 06:43:37 AM - 2848958 0.00 0.00 0.00 0.00 22
> |__ghc_worker
> 06:43:37 AM - 2848959 0.00 0.00 0.00 0.00 37
> |__ghc_worker
> 06:43:37 AM - 2848960 0.00 0.00 0.00 0.00 29
> |__ghc_worker
> 06:43:37 AM - 2848961 0.00 0.00 0.00 0.00 20
> |__ghc_worker
> 06:43:37 AM - 2848962 0.00 0.00 0.00 0.00 36
> |__ghc_worker
> 06:43:37 AM - 2848963 0.00 0.00 0.00 0.00 3
> |__ghc_worker
> 06:43:37 AM - 2848964 0.00 0.00 0.00 0.00 12
> |__ghc_worker
> 06:43:37 AM - 2848965 0.00 0.00 0.00 0.00 15
> |__ghc_worker
> 06:43:37 AM - 2848966 0.00 0.00 0.00 0.00 24
> |__ghc_worker
> 06:43:37 AM - 2848967 0.00 0.00 0.00 0.00 38
> |__ghc_worker
> 06:43:37 AM - 2848968 0.00 0.00 0.00 0.00 23
> |__ghc_worker
> 06:43:37 AM - 2848969 0.00 0.00 0.00 0.00 1
> |__ghc_worker
> 06:43:37 AM - 2848970 0.00 0.00 0.00 0.00 19
> |__ghc_worker
> 06:43:37 AM - 2850193 0.00 0.00 0.00 0.00 32
> |__ghc_worker
> 06:43:37 AM - 2850196 0.00 0.00 0.00 0.00 34
> |__ghc_worker
> 06:43:37 AM - 2850197 0.00 0.00 0.00 0.00 35
> |__ghc_worker
> 06:43:37 AM - 2850198 0.00 0.00 0.00 0.00 30
> |__ghc_worker
> 06:43:37 AM - 2861009 0.00 0.00 0.00 0.00 17
> |__ghc_worker
> 06:43:37 AM - 2861010 0.00 0.00 0.00 0.00 19
> |__ghc_worker
> 06:43:37 AM - 2862954 0.00 0.00 0.00 0.00 2
> |__ghc_worker
> 06:43:37 AM - 2862956 0.00 0.00 0.00 0.00 26
> |__ghc_worker
> }}}
>
> The sets of threads are changing on every suspend, unsuspend combination.
>
> This is really visible when running in gdb with -j40, gdb just spews
> threads getting spawned and killed:
> {{{
> [Thread 0x7f0b767fc700 (LWP 2881933) exited]
> [New Thread 0x7f0b767fc700 (LWP 2881940)]
> [New Thread 0x7f0cc2cfd700 (LWP 2881941)]
> [Thread 0x7f0b76ffd700 (LWP 2881928) exited]
> [New Thread 0x7f0b7dffb700 (LWP 2881942)]
> [New Thread 0x7f0b76ffd700 (LWP 2881943)]
> [New Thread 0x7f0b7ffff700 (LWP 2881944)]
> [Thread 0x7f0b777fe700 (LWP 2881932) exited]
> [Thread 0x7f0b77fff700 (LWP 2881931) exited]
> [Thread 0x7f0b7d7fa700 (LWP 2881927) exited]
> [Thread 0x7f0b7f7fe700 (LWP 2881926) exited]
> [New Thread 0x7f0b7f7fe700 (LWP 2881945)]
> [New Thread 0x7f0b7d7fa700 (LWP 2881948)]
> [Thread 0x7f0cc2cfd700 (LWP 2881941) exited]
> [Thread 0x7f0b75ffb700 (LWP 2881938) exited]
> [New Thread 0x7f0cc2cfd700 (LWP 2881949)]
> [Thread 0x7f0b767fc700 (LWP 2881940) exited]
> [New Thread 0x7f0b767fc700 (LWP 2881950)]
> [New Thread 0x7f0b75ffb700 (LWP 2881951)]
> [New Thread 0x7f0b77fff700 (LWP 2881952)]
> [Thread 0x7f0b757fa700 (LWP 2881939) exited]
> [Thread 0x7f0b7d7fa700 (LWP 2881948) exited]
> [New Thread 0x7f0b757fa700 (LWP 2881953)]
> [Thread 0x7f0b7effd700 (LWP 2881936) exited]
> [Thread 0x7f0cc3cff700 (LWP 2881937) exited]
> [New Thread 0x7f0cc3cff700 (LWP 2881954)]
> [New Thread 0x7f0b7effd700 (LWP 2881955)]
> [New Thread 0x7f0b7d7fa700 (LWP 2881956)]
> [Thread 0x7f0b7dffb700 (LWP 2881942) exited]
> [New Thread 0x7f0b777fe700 (LWP 2881957)]
> [New Thread 0x7f0b7dffb700 (LWP 2881958)]
> [Thread 0x7f0b76ffd700 (LWP 2881943) exited]
> [New Thread 0x7f0b76ffd700 (LWP 2881959)]
> [Thread 0x7f0b7e7fc700 (LWP 2881935) exited]
> [Thread 0x7f0b7effd700 (LWP 2881955) exited]
> [New Thread 0x7f0b7effd700 (LWP 2881962)]
> [New Thread 0x7f0b7e7fc700 (LWP 2881963)]
> [Thread 0x7f0b7f7fe700 (LWP 2881945) exited]
> [New Thread 0x7f0b7f7fe700 (LWP 2881964)]
> [New Thread 0x7f0b7cff9700 (LWP 2881965)]
> [Thread 0x7f0b75ffb700 (LWP 2881951) exited]
> [Thread 0x7f0b7dffb700 (LWP 2881958) exited]
> [Thread 0x7f0cc3cff700 (LWP 2881954) exited]
> [New Thread 0x7f0cc3cff700 (LWP 2881967)]
> [New Thread 0x7f0b7dffb700 (LWP 2881968)]
> [Thread 0x7f0b777fe700 (LWP 2881957) exited]
> [Thread 0x7f0b757fa700 (LWP 2881953) exited]
> [Thread 0x7f0cc2cfd700 (LWP 2881949) exited]
> [Thread 0x7f0b7ffff700 (LWP 2881944) exited]
> [New Thread 0x7f0cc2cfd700 (LWP 2881969)]
> [Thread 0x7f0b7e7fc700 (LWP 2881963) exited]
> [Thread 0x7f0b767fc700 (LWP 2881950) exited]
> [New Thread 0x7f0b767fc700 (LWP 2881970)]
> [New Thread 0x7f0b7e7fc700 (LWP 2881971)]
> [Thread 0x7f0b77fff700 (LWP 2881952) exited]
> [New Thread 0x7f0b7ffff700 (LWP 2881972)]
> [New Thread 0x7f0b77fff700 (LWP 2881973)]
> [New Thread 0x7f0b757fa700 (LWP 2881974)]
> [Thread 0x7f0b7dffb700 (LWP 2881968) exited]
> [New Thread 0x7f0b7dffb700 (LWP 2881975)]
> [Thread 0x7f0cc2cfd700 (LWP 2881969) exited]
> [New Thread 0x7f0cc2cfd700 (LWP 2881976)]
> [Thread 0x7f0b76ffd700 (LWP 2881959) exited]
> [Thread 0x7f0b757fa700 (LWP 2881974) exited]
> [New Thread 0x7f0b76ffd700 (LWP 2881977)]
> [New Thread 0x7f0b757fa700 (LWP 2881978)]
> [New Thread 0x7f0b777fe700 (LWP 2881979)]
> [Thread 0x7f0b7effd700 (LWP 2881962) exited]
> [New Thread 0x7f0b7effd700 (LWP 2881980)]
> [Thread 0x7f0b7ffff700 (LWP 2881972) exited]
> [Thread 0x7f0b7e7fc700 (LWP 2881971) exited]
> [Thread 0x7f0b77fff700 (LWP 2881973) exited]
> [New Thread 0x7f0b77fff700 (LWP 2881981)]
> [Thread 0x7f0b7d7fa700 (LWP 2881956) exited]
> [New Thread 0x7f0b7d7fa700 (LWP 2881982)]
> [New Thread 0x7f0b7e7fc700 (LWP 2881983)]
> [Thread 0x7f0cc2cfd700 (LWP 2881976) exited]
> [New Thread 0x7f0cc2cfd700 (LWP 2881984)]
> [New Thread 0x7f0b7ffff700 (LWP 2881985)]
> [New Thread 0x7f0b75ffb700 (LWP 2881986)]
> [Thread 0x7f0b7dffb700 (LWP 2881975) exited]
> [New Thread 0x7f0b7dffb700 (LWP 2881987)]
> [New Thread 0x7f0b74ff9700 (LWP 2881988)]
> [Thread 0x7f0b777fe700 (LWP 2881979) exited]
> [Thread 0x7f0b7effd700 (LWP 2881980) exited]
> [Thread 0x7f0b76ffd700 (LWP 2881977) exited]
> }}}
New description:
When you run:
{{{
ghci -j8
ghci> :set -package array
# in a different terminal:
pidstat -t -p $(pidof ghc) | grep ghc_worker
kill -SIGSTOP $(pidof ghc); kill -SIGCONT $(pidof ghc)
# SIGCONT doesn't really resume it, you have to run fg in the terminal
where it runs
pidstat -t -p $(pidof ghc) | grep ghc_worker
kill -SIGSTOP $(pidof ghc); kill -SIGCONT $(pidof ghc)
pidstat -t -p $(pidof ghc) | grep ghc_worker
kill -SIGSTOP $(pidof ghc); kill -SIGCONT $(pidof ghc)
pidstat -t -p $(pidof ghc) | grep ghc_worker
}}}
You get:
{{{
$ pidstat -t -p $(pidof ghc) | grep ghc_worker
06:40:55 AM - 2848953 0.00 0.00 0.00 0.00 21
|__ghc_worker
06:40:55 AM - 2848954 0.00 0.00 0.00 0.00 31
|__ghc_worker
06:40:55 AM - 2848955 0.00 0.00 0.00 0.00 21
|__ghc_worker
06:40:55 AM - 2848957 0.00 0.00 0.00 0.00 21
|__ghc_worker
06:40:55 AM - 2848958 0.00 0.00 0.00 0.00 22
|__ghc_worker
06:40:55 AM - 2848959 0.00 0.00 0.00 0.00 37
|__ghc_worker
06:40:55 AM - 2848960 0.00 0.00 0.00 0.00 3
|__ghc_worker
06:40:55 AM - 2848961 0.00 0.00 0.00 0.00 2
|__ghc_worker
06:40:55 AM - 2848962 0.00 0.00 0.00 0.00 36
|__ghc_worker
06:40:55 AM - 2848963 0.00 0.00 0.00 0.00 21
|__ghc_worker
06:40:55 AM - 2848964 0.00 0.00 0.00 0.00 31
|__ghc_worker
06:40:55 AM - 2848965 0.00 0.00 0.00 0.00 11
|__ghc_worker
06:40:55 AM - 2848966 0.00 0.00 0.00 0.00 24
|__ghc_worker
06:40:55 AM - 2848967 0.00 0.00 0.00 0.00 38
|__ghc_worker
06:40:55 AM - 2848968 0.00 0.00 0.00 0.00 23
|__ghc_worker
06:40:55 AM - 2848969 0.00 0.00 0.00 0.00 22
|__ghc_worker
06:40:55 AM - 2848970 0.00 0.00 0.00 0.00 31
|__ghc_worker
}}}
{{{
$ pidstat -t -p $(pidof ghc) | grep ghc_worker
06:41:37 AM - 2848953 0.00 0.00 0.00 0.00 21
|__ghc_worker
06:41:37 AM - 2848954 0.00 0.00 0.00 0.00 31
|__ghc_worker
06:41:37 AM - 2848955 0.00 0.00 0.00 0.00 3
|__ghc_worker
06:41:37 AM - 2848957 0.00 0.00 0.00 0.00 3
|__ghc_worker
06:41:37 AM - 2848958 0.00 0.00 0.00 0.00 22
|__ghc_worker
06:41:37 AM - 2848959 0.00 0.00 0.00 0.00 37
|__ghc_worker
06:41:37 AM - 2848960 0.00 0.00 0.00 0.00 5
|__ghc_worker
06:41:37 AM - 2848961 0.00 0.00 0.00 0.00 5
|__ghc_worker
06:41:37 AM - 2848962 0.00 0.00 0.00 0.00 36
|__ghc_worker
06:41:37 AM - 2848963 0.00 0.00 0.00 0.00 7
|__ghc_worker
06:41:37 AM - 2848964 0.00 0.00 0.00 0.00 12
|__ghc_worker
06:41:37 AM - 2848965 0.00 0.00 0.00 0.00 11
|__ghc_worker
06:41:37 AM - 2848966 0.00 0.00 0.00 0.00 24
|__ghc_worker
06:41:37 AM - 2848967 0.00 0.00 0.00 0.00 38
|__ghc_worker
06:41:37 AM - 2848968 0.00 0.00 0.00 0.00 23
|__ghc_worker
06:41:37 AM - 2848969 0.00 0.00 0.00 0.00 8
|__ghc_worker
06:41:37 AM - 2848970 0.00 0.00 0.00 0.00 14
|__ghc_worker
06:41:37 AM - 2850193 0.00 0.00 0.00 0.00 32
|__ghc_worker
06:41:37 AM - 2850194 0.00 0.00 0.00 0.00 33
|__ghc_worker
06:41:37 AM - 2850196 0.00 0.00 0.00 0.00 34
|__ghc_worker
06:41:37 AM - 2850197 0.00 0.00 0.00 0.00 35
|__ghc_worker
06:41:37 AM - 2850198 0.00 0.00 0.00 0.00 10
|__ghc_worker
06:41:37 AM - 2850199 0.00 0.00 0.00 0.00 17
|__ghc_worker
06:41:37 AM - 2850294 0.00 0.00 0.00 0.00 21
|__ghc_worker
06:41:37 AM - 2850295 0.00 0.00 0.00 0.00 31
|__ghc_worker
}}}
{{{
$ pidstat -t -p $(pidof ghc) | grep ghc_worker
06:42:43 AM - 2848953 0.00 0.00 0.00 0.00 21
|__ghc_worker
06:42:43 AM - 2848954 0.00 0.00 0.00 0.00 31
|__ghc_worker
06:42:43 AM - 2848955 0.00 0.00 0.00 0.00 3
|__ghc_worker
06:42:43 AM - 2848957 0.00 0.00 0.00 0.00 7
|__ghc_worker
06:42:43 AM - 2848958 0.00 0.00 0.00 0.00 22
|__ghc_worker
06:42:43 AM - 2848959 0.00 0.00 0.00 0.00 37
|__ghc_worker
06:42:43 AM - 2848960 0.00 0.00 0.00 0.00 9
|__ghc_worker
06:42:43 AM - 2848961 0.00 0.00 0.00 0.00 0
|__ghc_worker
06:42:43 AM - 2848962 0.00 0.00 0.00 0.00 36
|__ghc_worker
06:42:43 AM - 2848963 0.00 0.00 0.00 0.00 4
|__ghc_worker
06:42:43 AM - 2848964 0.00 0.00 0.00 0.00 12
|__ghc_worker
06:42:43 AM - 2848965 0.00 0.00 0.00 0.00 11
|__ghc_worker
06:42:43 AM - 2848966 0.00 0.00 0.00 0.00 24
|__ghc_worker
06:42:43 AM - 2848967 0.00 0.00 0.00 0.00 38
|__ghc_worker
06:42:43 AM - 2848968 0.00 0.00 0.00 0.00 23
|__ghc_worker
06:42:43 AM - 2848969 0.00 0.00 0.00 0.00 29
|__ghc_worker
06:42:43 AM - 2848970 0.00 0.00 0.00 0.00 14
|__ghc_worker
06:42:43 AM - 2850193 0.00 0.00 0.00 0.00 32
|__ghc_worker
06:42:43 AM - 2850196 0.00 0.00 0.00 0.00 34
|__ghc_worker
06:42:43 AM - 2850197 0.00 0.00 0.00 0.00 35
|__ghc_worker
06:42:43 AM - 2850198 0.00 0.00 0.00 0.00 10
|__ghc_worker
06:42:43 AM - 2850199 0.00 0.00 0.00 0.00 19
|__ghc_worker
06:42:43 AM - 2850295 0.00 0.00 0.00 0.00 13
|__ghc_worker
06:42:43 AM - 2861009 0.00 0.00 0.00 0.00 34
|__ghc_worker
06:42:43 AM - 2861010 0.00 0.00 0.00 0.00 35
|__ghc_worker
}}}
{{{
$ pidstat -t -p $(pidof ghc) | grep ghc_worker
06:43:37 AM - 2848953 0.00 0.00 0.00 0.00 21
|__ghc_worker
06:43:37 AM - 2848954 0.00 0.00 0.00 0.00 31
|__ghc_worker
06:43:37 AM - 2848955 0.00 0.00 0.00 0.00 9
|__ghc_worker
06:43:37 AM - 2848957 0.00 0.00 0.00 0.00 9
|__ghc_worker
06:43:37 AM - 2848958 0.00 0.00 0.00 0.00 22
|__ghc_worker
06:43:37 AM - 2848959 0.00 0.00 0.00 0.00 37
|__ghc_worker
06:43:37 AM - 2848960 0.00 0.00 0.00 0.00 29
|__ghc_worker
06:43:37 AM - 2848961 0.00 0.00 0.00 0.00 20
|__ghc_worker
06:43:37 AM - 2848962 0.00 0.00 0.00 0.00 36
|__ghc_worker
06:43:37 AM - 2848963 0.00 0.00 0.00 0.00 3
|__ghc_worker
06:43:37 AM - 2848964 0.00 0.00 0.00 0.00 12
|__ghc_worker
06:43:37 AM - 2848965 0.00 0.00 0.00 0.00 15
|__ghc_worker
06:43:37 AM - 2848966 0.00 0.00 0.00 0.00 24
|__ghc_worker
06:43:37 AM - 2848967 0.00 0.00 0.00 0.00 38
|__ghc_worker
06:43:37 AM - 2848968 0.00 0.00 0.00 0.00 23
|__ghc_worker
06:43:37 AM - 2848969 0.00 0.00 0.00 0.00 1
|__ghc_worker
06:43:37 AM - 2848970 0.00 0.00 0.00 0.00 19
|__ghc_worker
06:43:37 AM - 2850193 0.00 0.00 0.00 0.00 32
|__ghc_worker
06:43:37 AM - 2850196 0.00 0.00 0.00 0.00 34
|__ghc_worker
06:43:37 AM - 2850197 0.00 0.00 0.00 0.00 35
|__ghc_worker
06:43:37 AM - 2850198 0.00 0.00 0.00 0.00 30
|__ghc_worker
06:43:37 AM - 2861009 0.00 0.00 0.00 0.00 17
|__ghc_worker
06:43:37 AM - 2861010 0.00 0.00 0.00 0.00 19
|__ghc_worker
06:43:37 AM - 2862954 0.00 0.00 0.00 0.00 2
|__ghc_worker
06:43:37 AM - 2862956 0.00 0.00 0.00 0.00 26
|__ghc_worker
}}}
The sets of threads are changing on every suspend, unsuspend combination.
This is really visible when running in gdb with -j40, gdb just spews
threads getting spawned and killed:
{{{
[Thread 0x7f0b767fc700 (LWP 2881933) exited]
[New Thread 0x7f0b767fc700 (LWP 2881940)]
[New Thread 0x7f0cc2cfd700 (LWP 2881941)]
[Thread 0x7f0b76ffd700 (LWP 2881928) exited]
[New Thread 0x7f0b7dffb700 (LWP 2881942)]
[New Thread 0x7f0b76ffd700 (LWP 2881943)]
[New Thread 0x7f0b7ffff700 (LWP 2881944)]
[Thread 0x7f0b777fe700 (LWP 2881932) exited]
[Thread 0x7f0b77fff700 (LWP 2881931) exited]
[Thread 0x7f0b7d7fa700 (LWP 2881927) exited]
[Thread 0x7f0b7f7fe700 (LWP 2881926) exited]
[New Thread 0x7f0b7f7fe700 (LWP 2881945)]
[New Thread 0x7f0b7d7fa700 (LWP 2881948)]
[Thread 0x7f0cc2cfd700 (LWP 2881941) exited]
[Thread 0x7f0b75ffb700 (LWP 2881938) exited]
[New Thread 0x7f0cc2cfd700 (LWP 2881949)]
[Thread 0x7f0b767fc700 (LWP 2881940) exited]
[New Thread 0x7f0b767fc700 (LWP 2881950)]
[New Thread 0x7f0b75ffb700 (LWP 2881951)]
[New Thread 0x7f0b77fff700 (LWP 2881952)]
[Thread 0x7f0b757fa700 (LWP 2881939) exited]
[Thread 0x7f0b7d7fa700 (LWP 2881948) exited]
[New Thread 0x7f0b757fa700 (LWP 2881953)]
[Thread 0x7f0b7effd700 (LWP 2881936) exited]
[Thread 0x7f0cc3cff700 (LWP 2881937) exited]
[New Thread 0x7f0cc3cff700 (LWP 2881954)]
[New Thread 0x7f0b7effd700 (LWP 2881955)]
[New Thread 0x7f0b7d7fa700 (LWP 2881956)]
[Thread 0x7f0b7dffb700 (LWP 2881942) exited]
[New Thread 0x7f0b777fe700 (LWP 2881957)]
[New Thread 0x7f0b7dffb700 (LWP 2881958)]
[Thread 0x7f0b76ffd700 (LWP 2881943) exited]
[New Thread 0x7f0b76ffd700 (LWP 2881959)]
[Thread 0x7f0b7e7fc700 (LWP 2881935) exited]
[Thread 0x7f0b7effd700 (LWP 2881955) exited]
[New Thread 0x7f0b7effd700 (LWP 2881962)]
[New Thread 0x7f0b7e7fc700 (LWP 2881963)]
[Thread 0x7f0b7f7fe700 (LWP 2881945) exited]
[New Thread 0x7f0b7f7fe700 (LWP 2881964)]
[New Thread 0x7f0b7cff9700 (LWP 2881965)]
[Thread 0x7f0b75ffb700 (LWP 2881951) exited]
[Thread 0x7f0b7dffb700 (LWP 2881958) exited]
[Thread 0x7f0cc3cff700 (LWP 2881954) exited]
[New Thread 0x7f0cc3cff700 (LWP 2881967)]
[New Thread 0x7f0b7dffb700 (LWP 2881968)]
[Thread 0x7f0b777fe700 (LWP 2881957) exited]
[Thread 0x7f0b757fa700 (LWP 2881953) exited]
[Thread 0x7f0cc2cfd700 (LWP 2881949) exited]
[Thread 0x7f0b7ffff700 (LWP 2881944) exited]
[New Thread 0x7f0cc2cfd700 (LWP 2881969)]
[Thread 0x7f0b7e7fc700 (LWP 2881963) exited]
[Thread 0x7f0b767fc700 (LWP 2881950) exited]
[New Thread 0x7f0b767fc700 (LWP 2881970)]
[New Thread 0x7f0b7e7fc700 (LWP 2881971)]
[Thread 0x7f0b77fff700 (LWP 2881952) exited]
[New Thread 0x7f0b7ffff700 (LWP 2881972)]
[New Thread 0x7f0b77fff700 (LWP 2881973)]
[New Thread 0x7f0b757fa700 (LWP 2881974)]
[Thread 0x7f0b7dffb700 (LWP 2881968) exited]
[New Thread 0x7f0b7dffb700 (LWP 2881975)]
[Thread 0x7f0cc2cfd700 (LWP 2881969) exited]
[New Thread 0x7f0cc2cfd700 (LWP 2881976)]
[Thread 0x7f0b76ffd700 (LWP 2881959) exited]
[Thread 0x7f0b757fa700 (LWP 2881974) exited]
[New Thread 0x7f0b76ffd700 (LWP 2881977)]
[New Thread 0x7f0b757fa700 (LWP 2881978)]
[New Thread 0x7f0b777fe700 (LWP 2881979)]
[Thread 0x7f0b7effd700 (LWP 2881962) exited]
[New Thread 0x7f0b7effd700 (LWP 2881980)]
[Thread 0x7f0b7ffff700 (LWP 2881972) exited]
[Thread 0x7f0b7e7fc700 (LWP 2881971) exited]
[Thread 0x7f0b77fff700 (LWP 2881973) exited]
[New Thread 0x7f0b77fff700 (LWP 2881981)]
[Thread 0x7f0b7d7fa700 (LWP 2881956) exited]
[New Thread 0x7f0b7d7fa700 (LWP 2881982)]
[New Thread 0x7f0b7e7fc700 (LWP 2881983)]
[Thread 0x7f0cc2cfd700 (LWP 2881976) exited]
[New Thread 0x7f0cc2cfd700 (LWP 2881984)]
[New Thread 0x7f0b7ffff700 (LWP 2881985)]
[New Thread 0x7f0b75ffb700 (LWP 2881986)]
[Thread 0x7f0b7dffb700 (LWP 2881975) exited]
[New Thread 0x7f0b7dffb700 (LWP 2881987)]
[New Thread 0x7f0b74ff9700 (LWP 2881988)]
[Thread 0x7f0b777fe700 (LWP 2881979) exited]
[Thread 0x7f0b7effd700 (LWP 2881980) exited]
[Thread 0x7f0b76ffd700 (LWP 2881977) exited]
}}}
--
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10587#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list