You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gstack fails on my computer in 200ms. Causes a SegFault. This is running the test in debug mode.
383: Test command: /mnt/d/dev/jsource/cmake-build-debug/jsrc/jconsole "gstack.ijs"
383: Test timeout computed to be: 1500
383: Hello YouTube Viewers, all 22 of you!
383: see: tsu_notes, tsu_usage, tsu_pacman, and tsu_jd
383:
383: RUN ddall NB. report scripts that fail
383: RECHO ddall NB. echo script names as run and final count of failures
383:
383: j902/j64/linux/beta/GPL3/unknown/2021-01-26T20:43:34/gcc-10-2
Exception: SegFault
Program received signal SIGSEGV, Segmentation fault.
0x00007ffffec9ec10 in jtgaf (jt=0x0, blockx=0) at /mnt/d/dev/jsource/jsrc/m.c:905
905 RESTRICTF A jtgaf(J jt,I blockx){A z;I mfreeb;I n=(I)2<<blockx; // n=size of allocated block
I'm on windows 10 with wsl on Ubuntu 20.4. I'm running the test from the Clion IDE. All other tests that are enabled are passing. I can run the tests from console if you want. I just don't know the command line for ctest. Also I have gcc 10.2 and cmake 19.
I'm on windows 10 with wsl on Ubuntu 20.4. I'm running the test from the Clion IDE. All other tests that are enabled are passing. I can run the tests from console if you want. I just don't know the command line for ctest. Also I have gcc 10.2 and cmake 19.
ninja -C build test is the command (with -j$(nproc) if you want)
The g001 seems to be timing issue (see #39 (comment)), which get worse with more load on the system (at least on my machine).
Yea, g001 is probably the most flaky for me, g430/1a also pretty flaky. I ended up commenting out all of the gmmf* tests, maybe we should just do the same for these ones.
The failure comes from foldr.ijs not been found, and so all the folds fail. Trying the first line in jconsole gave a "file not found error"
Hello YouTube Viewers, all 22 of you!
10 -: ] F.. + i. 5
not found: /.../jsource/jlibrary/addons/dev/fold/foldr.ijs
|nonce error
| 10-:] F..+i.5
So, it seems to looks for fold in jlibrary/addons/dev/fold/foldr.ijs
when the code is in jlibrary/dev/fold/foldr.ijs.
The loading is done in adverbs/ar.c:656
switch(step){ // try the startup, from the bottom upcase1: eval("load'~addons/dev/fold/foldr.ijs'"); // fall throughcase0: if((foldconj=nameref(nfs(8,"Foldr_j_"),jt->locsyms))&&AT(foldconj)&CONJ)goto found; // there is always a ref, but it may be to [:
}
I got the tests to pass by moving the jlibrary/dev folder to jlibrary/addons/dev, but I'm not sure if this is the right solution, or if the root cause is some other misconfiguration.
Maybe someone who knows more about the j system, and how it locates and loads files, could chime in.
gstack fails on my computer in 200ms. Causes a SegFault. This is running the test in debug mode.
I'm on windows 10 with wsl on Ubuntu 20.4.
At the top of the test file, there is a comment about stack size issues
NB. stack issues (function call limit) ----------------------------------00$0 : 0The recursion limit is constrained by the stack size available to the J executable file. Crashes due to stack errors can be overcome by increasing the stack size. Under Windows, the stack size can be queried and set as follows:...
AFAIK windows gives programs less stack by default, compared to linux/mac, so it could be stack overflow. I'm not sure how running in wsl affects the stack size though.
Then looking for "THRESHOLD" in tsu.ijs I found this
THRESHOLD=: 0NB. allow timing tests to trigger failure
THRESHOLD=: 1NB. force timing tests to pass
and this
tsu_notes=: 0 : 0many scripts have timing teststypically comparing timing/result of j vs j modelthese tests can be essential for new/changed codebut vary greatly across environmentsand can result in false failuresTHRESHOLD set to 1 by default - ignores timing test failuresthreshold set to 0.2 for loose tests (0.75 for tighter tests)THRESHOLD should be applied as false failures are discoveredgfft/glapack not in ddall - run separately with: RUN1'gfft'g18x fails on subsequent runs - no idea whyg401 occasionally fails (random data?) but then runs clean)
I didn't check where the lowercase threshold was used, but the uppercase THRESHOLD seemed to be by default 1 (i.e. force timing tests to succeed).
If you check the commit I linked from the jsoftware repo, it just added THRESHOLD +. in front of these test cases. I guess the threshold can then be swithed to 0, if the timing needs to be tested at some point.
Maybe we could cherry-pick the commit and add it here. I'll add PR for that.
This seems correct. I just realized I could run the test with valgrind. And it gave some more details on the stack overflow.
383: ==2072== Stack overflow in thread #1: can't grow stack to 0x1ffe801000
383: ==2072== Stack overflow in thread #1: can't grow stack to 0x1ffe801000
383: ==2072== If you believe this happened as a result of a stack
383: ==2072== overflow in your program's main thread (unlikely but
383: ==2072== possible), you can try to increase the size of the
383: ==2072== main thread stack using the --main-stacksize= flag.
383: ==2072== The main thread stack size used in this run was 16777216.
Maybe running valgrind on other tests with segfaults could help diagnose issues with them.
Activity
codereport commentedon Jan 24, 2021
Looks like there are four main categories:
codereport commentedon Jan 26, 2021
This is the updated list:

Also, recently the following were commented out:
Sebanisu commentedon Jan 27, 2021
gstack fails on my computer in 200ms. Causes a
SegFault. This is running the test in debug mode.codereport commentedon Jan 27, 2021
@Sebanisu Are you on osx or linux? Does
ctestwork?Sebanisu commentedon Jan 27, 2021
I'm on windows 10 with wsl on Ubuntu 20.4. I'm running the test from the Clion IDE. All other tests that are enabled are passing. I can run the tests from console if you want. I just don't know the command line for ctest. Also I have gcc 10.2 and cmake 19.
codereport commentedon Jan 27, 2021
ninja -C build testis the command (with-j$(nproc)if you want)juntuu commentedon Jan 27, 2021
Do flaky tests also fall under this issue?
The
g001seems to be timing issue (see #39 (comment)), which get worse with more load on the system (at least on my machine).codereport commentedon Jan 27, 2021
Yea,
g001is probably the most flaky for me,g430/1aalso pretty flaky. I ended up commenting out all of thegmmf*tests, maybe we should just do the same for these ones.juntuu commentedon Jan 27, 2021
I identified a problem with the
g420test:The failing testcases were testing fold, starting from line 730
The failure comes from
foldr.ijsnot been found, and so all the folds fail. Trying the first line in jconsole gave a "file not found error"So, it seems to looks for fold in
jlibrary/addons/dev/fold/foldr.ijswhen the code is in
jlibrary/dev/fold/foldr.ijs.The loading is done in
adverbs/ar.c:656I got the tests to pass by moving the
jlibrary/devfolder tojlibrary/addons/dev, but I'm not sure if this is the right solution, or if the root cause is some other misconfiguration.Maybe someone who knows more about the j system, and how it locates and loads files, could chime in.
Sebanisu commentedon Jan 28, 2021
Oh it's in the CONTRIBUTING.md. 🙃 I never used ninja till now. It SegFault'ed via the console with ninja as well.
383/397 Test #383: gstack ...........................***Exception: SegFault 0.16 secjuntuu commentedon Jan 28, 2021
At the top of the test file, there is a comment about stack size issues
AFAIK windows gives programs less stack by default, compared to linux/mac, so it could be stack overflow. I'm not sure how running in wsl affects the stack size though.
juntuu commentedon Jan 28, 2021
Found a promising looking commit jsoftware/jsource@6adb504 for the
g001"issue".Then looking for "THRESHOLD" in
tsu.ijsI found thisand this
codereport commentedon Jan 28, 2021
@juntuu I merged this: #64, hopefully helps
juntuu commentedon Jan 28, 2021
I didn't check where the lowercase
thresholdwas used, but the uppercaseTHRESHOLDseemed to be by default 1 (i.e. force timing tests to succeed).If you check the commit I linked from the jsoftware repo, it just added
THRESHOLD +.in front of these test cases. I guess the threshold can then be swithed to 0, if the timing needs to be tested at some point.Maybe we could cherry-pick the commit and add it here. I'll add PR for that.
Sebanisu commentedon Jan 29, 2021
This seems correct. I just realized I could run the test with valgrind. And it gave some more details on the stack overflow.
Maybe running valgrind on other tests with segfaults could help diagnose issues with them.
codereport commentedon Jan 29, 2021
I uncommented all the tests and only have the following failing.