Bug 23630 – Regression in library caused by dmd 2.101.0 update

Status
NEW
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
All
Creation time
2023-01-15T09:02:42Z
Last change time
2024-12-13T19:26:41Z
Assigned to
No Owner
Creator
lempiji
Moved to GitHub: dmd#20213 →

Comments

Comment #0 by lempiji — 2023-01-15T09:02:42Z
I have recently updated the compiler (dmd) used in the 'golem' library that I am developing and have noticed that the execution of sample programs and unit tests for the library are now failing. The sample programs fail intermittently during loop execution, and while the tests themselves appear to be successful, there are no error messages provided. After investigating, I have determined that this is a regression caused by the update to dmd 2.101.0. The issue can be reproduced using the command 'dub test' and can also be narrowed down to specific conditions using the command 'dub test -- -t 1 -i golem.model'. This issue occurs on both Windows and Linux systems, and a failed log on Linux can be found at the following URL: https://github.com/lempiji/golem/actions/runs/3922568356/jobs/6705593687. I am requesting assistance in resolving this issue.
Comment #1 by dkorpel — 2023-01-15T11:23:47Z
Trying to reproduce it locally, it seems a segfault happens during certain gc allocations when I run `dub test`. However, when I `dub build --force --config=unittest && ./golem-test-unittest` is succeeds, which is really weird. I'm trying to bisect it.
Comment #2 by dkorpel — 2023-01-15T12:05:31Z
When using digger bisect, it fails on older dmd versions with an assertion error on golem.models.linear:165 ``` assert(model.predict(dataset[5][0])[0] > 0.5); ```
Comment #3 by lempiji — 2023-01-15T13:06:58Z
Thank you for investigating this issue quickly. The failure of assert that was pointed out may be due to the use of random numbers. As far as I can tell from running it multiple times on my end, there is no problem with the data, and it completed normally with version 2.100.1 (ldc2 1.30). It does not seem to be related to the segfault that occurs with version 2.101.0. Could you please try running it a few more times to confirm?
Comment #4 by lempiji — 2023-01-28T06:10:36Z
Hello. Is it possible to solve this problem? Earlier you mentioned that you used git bisect for troubleshooting. Is it possible to investigate and fix it locally for me in the same way? I would like to know the procedure if possible. Any other additional information or assistance I can provide?
Comment #5 by dkorpel — 2023-02-09T11:21:43Z
I'm dissecting with Digger: https://github.com/CyberShadow/Digger Weirdly, `dub test` succeeds now with current dmd master for me.
Comment #6 by robert.schadek — 2024-12-13T19:26:41Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20213 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB