Cryptic contract violation from with-current-saved-continuation-marks-and
还没有人认领这个 Issue。
评估
调研方向
从 web-server/lang/abort-resume.rkt 的第 244 行附近和被指认为问题所在的 portal/private-servlet/feedback/notify.rkt 模块开始,然后检查 config.rkt 中的堆栈引用。使用基于 web-server 的语言重现 contract violation,并比较在 web-server 和 racket/base 下直接执行的情况;当报告的失败和 CS invalid-memory-reference 行为得到解释并由回归测试覆盖时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
After refactoring a big web-server program, attempting to run it now blames one of my modules for violating the contract of with-current-saved-continuation-marks-and ("expected 1 value, returned 2 values in: the range of the 3rd argument of (-> any/c any/c (-> any/c) any/c)"—full message below).
I am not sure how to minimize this example. The blamed module doesn't use with-current-saved-continuation-marks-and directly (nor does any of my code), and it doesn't even seem to use or define any functions with multiple return values. It is written in a language based on #lang web-server. (Changing to the plain #lang web-server doesn't seem to help.)
The bug seems to be the web server's fault: changing the blamed module to use #lang racket/base seems to fix the error. (It isn't clear why this module was in a web-server-based language in the first place: my guess is that I left it that way in an earlier refactoring.)
The contract problem happens both in Racket 7.4 CS and in traditional Racket built from master, but Racket CS has an additional problem: if I try to run the blamed module directly (i.e. racket portal/private-servlet/feedback/notify.rkt) when it's #lang is either web-server or my web-server-based language, Racket 7.4 CS has an "invalid memory reference," whereas traditional Racket succeeds.
Here's the full error message:
Sapientia:ricoeur-portal philip$ ./config/no-voyant-test.rkt
with-current-saved-continuation-marks-and: contract violation;
expected 1 value, returned 2 values
in: the range of
the 3rd argument of
(-> any/c any/c (-> any/c) any/c)
contract from:
<pkgs>/web-server-lib/web-server/lang/abort-resume.rkt
blaming: <pkgs>/ricoeur-portal/portal/private-servlet/feedback/notify.rkt
(assuming the contract is correct)
at: <pkgs>/web-server-lib/web-server/lang/abort-resume.rkt:244.2
context...:
/Users/pltbuild/build/plt-release-64/bundle/racket/collects/racket/contract/private/blame.rkt:347:0: raise-blame-error16
loop
/Users/pltbuild/build/plt-release-64/bundle/racket/collects/racket/contract/private/arrow-common.rkt:63:5
call-with-values
call-with-values
call-with-values
/Users/philip/code/ricoeur/ricoeur-portal/config.rkt:207:22: pr:proc
call-with-values
/Users/pltbuild/build/plt-release-64/bundle/racket/collects/racket/private/promise.rkt:103:0: force/generic
/Users/philip/code/ricoeur/ricoeur-portal/config.rkt:217:21
call-with-values
body of (submod "/Users/philip/code/ricoeur/ricoeur-portal/config/no-voyant-test.rkt" main)
temp37_0
for-loop
run-module-instance!125
#%for-each
- 主要语言
- Racket
- 星标
- 100
- 派生
- 48
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
racket/web-server 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 70/100
racket/web-server#46 ·
-
难度 4/5 3-5 天 新手友好度 38/100
racket/web-server#141 ·
-
难度 4/5 3-5 天 新手友好度 45/100
racket/web-server#140 ·
-
难度 2/5 1-3 小时 新手友好度 45/100
racket/web-server#135 ·
-
难度 5/5 一周以上 新手友好度 35/100
racket/web-server#131 · 1 条评论 ·
查看 racket/web-server 的全部 Issue
相似的 Issue
-
Issue Triage-Needed
难度 2/5 1-3 小时 新手友好度 68/100
pulp/pulp_container#2581 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
oasdiff/oasdiff#1337 · 1 条评论 ·
维护者通常 1 天内回复
-
bug(trainer): CustomTrainer func_args with non literal values fail inside the TrainJob可能已有人在做 @avanishkasar 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 69/100
c1overzz/dsh-bili-scroll#35 ·
维护者通常 1 天内回复