jzimmerman / langcc

langcc: A Next-Generation Compiler Compiler

Home Page:https://langcc.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tests bog down, get stuck after xfail_lexer_conflict (macOS)

snej opened this issue · comments

On my M1 MacBook Pro (16GB RAM, macOS 12.6), the tests that are run as part of ./bootstrap.sh get stuck for quite a while, at least 10 minutes, after the xfail_lexer_conflict success is logged. The entire OS gets very sluggish, and ps awx showed 300 clang processes.

The test output is:

[000:00:02.439655] >>> Launched 153 tests
[000:00:02.441458] [success] xfail_parser_alias_cycle
[000:00:02.451620] [success] xfail_lexer_nested
[000:00:02.451684] [success] xfail_lexer_cycle
[000:00:02.451721] [success] xfail_parser_compound_id
[000:00:02.451759] [success] xfail_lexer_multi_push
[000:00:02.451792] [success] xfail_conflict_sub
[000:00:02.451830] [success] xfail_parser_non_lr
[000:00:02.451857] [success] xfail_lexer_conflict
^CStack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  unittest_lang            0x000000010536e5a8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 76
1  unittest_lang            0x0000000104cfc650 sig_handler(int) + 12
2  libsystem_platform.dylib 0x000000019a24b4a4 _sigtramp + 56
3  libsystem_c.dylib        0x000000019a102fc8 nanosleep + 220
4  libsystem_c.dylib        0x000000019a102ee0 usleep + 68
5  unittest_lang            0x0000000104cfa860 run_unit_tests() + 1352
6  unittest_lang            0x0000000104cf8fb8 main + 1596
7  dyld                     0x0000000105cd508c start + 520
./bootstrap.sh: line 9:  4429 Abort trap: 6           build/unittest_lang

Here’s a snapshot of top just before I killed the tests. Note that RAM is full and there is a lot of swapping.

Processes: 896 total, 187 running, 49 stuck, 660 sleeping, 3459 threads                    11:25:30
Load Avg: 367.04, 229.32, 112.28  CPU usage: 9.77% user, 85.57% sys, 4.64% idle
SharedLibs: 456M resident, 96M data, 24M linkedit.
MemRegions: 229241 total, 9026M resident, 371M private, 3033M shared.
PhysMem: 15G used (3086M wired), 37M unused.
VM: 339T vsize, 3831M framework vsize, 18370824(192938) swapins, 19266739(207417) swapouts.
Networks: packets: 310947792/383G in, 152899790/118G out.
Disks: 74762492/1405G read, 22120795/924G written.

PID    COMMAND      %CPU      TIME     #TH    #WQ   #PORTS MEM    PURG   CMPRS  PGRP  PPID  STATE
0      kernel_task  331.7     15:34:36 564/12 0     0      34M+   0B     0B     0     0     running
967    WindowServer 20.8      18:22:58 24     7     5279-  1863M+ 8704K- 556M+  967   1     sleeping
4429   unittest_lan 15.7      00:57.72 1/1    0     10     5297K  0B     5024K  3818  3818  running
30996  com.apple.We 14.0      01:08.16 7/1    4/1   102    344M+  0B     155M-  30996 1     running
35306  Xcode        11.5      07:35.23 24/1   10/2  2068-  1522M- 0B     1479M+ 35306 1     running
6392   Safari       8.4       41:07.10 26/5   20/4  4046-  833M-  0B     810M+  6392  1     running
3697   sysmond      8.3       06:38.39 3      2     29     2657K  0B     928K-  3697  1     sleeping
6573   Code Helper  7.7       30:37.49 20/1   2     417+   348M+  0B     307M-  6395  6395  running
3985   top          6.9       00:20.79 1/1    0     485    11M+   0B     9328K- 3985  3958  running
91640  Activity Mon 6.5       01:44.08 8      6     424+   96M+   0B     63M-   91640 1     sleeping
4876   clang-15     5.6       00:12.87 1      0     10     97M+   0B     77M+   3818  4875  stuck
4851   clang-15     5.5       00:13.05 1/1    0     10     100M+  0B     78M-   3818  4846  running
6568   Code Helper  5.2       18:47.75 14/3   5     185-   313M+  0B     66M+   6395  6395  running
4843   clang-15     4.7       00:13.07 1      0     10     102M+  0B     85M+   3818  4838  sleeping
4827   clang-15     4.4       00:12.76 1/1    0     10     99M+   0B     78M+   3818  4819  running
4817   clang-15     4.4       00:12.74 1      0     10     99M+   0B     79M-   3818  4800  stuck
4841   clang-15     4.3       00:12.79 1      0     10     98M+   0B     79M+   3818  4831  sleeping
4801   clang-15     4.3       00:12.78 1      0     10     100M+  0B     81M-   3818  4766  sleeping
4856   clang-15     4.3       00:12.79 1      0     10     98M+   0B     80M-   3818  4847  stuck
4813   clang-15     4.3       00:12.71 1      0     10     99M+   0B     78M-   3818  4786  sleeping
4803   clang-15     4.2       00:12.71 1/1    0     10     100M+  0B     81M-   3818  4755  running
4864   clang-15     4.2       00:12.92 1/1    0     10     99M+   0B     80M-   3818  4862  running
4863   clang-15     4.2       00:12.96 1/1    0     10     101M+  0B     80M-   3818  4855  running
4814   clang-15     4.2       00:12.73 1/1    0     10     99M+   0B     82M+   3818  4794  running
4811   clang-15     4.2       00:12.66 1      0     10     100M+  0B     82M-   3818  4783  sleeping
4865   clang-15     4.2       00:12.80 1/1    0     10     100M+  0B     80M-   3818  4857  running

Should be fixed by 232d858.