workers-sdk: šŸ› BUG: JSG lock error when running locally

Which Cloudflare product(s) does this pertain to?

Wrangler

What version of Wrangler are you using?

3.0.0

What operating system are you using?

Windows 10

Describe the Bug

I’m trying to run Remix (1.16.1) on Pages locally (Win10(. It works with Wrangler 2, but after upgrading to Wrangler 3, it doesn’t work producing several errors:

[ERROR] No matching export in "../../Users/rodri/AppData/Local/Temp/functionsWorker-0.19168769412996323.mjs" for import "default"

    ../../Users/rodri/AppData/Local/Temp/tmp-22076-Wi4LUibqhmZQ/middleware-insertion.entry.js:2:7:
      2 │ import worker from "C:\\Users\\rodri\\AppData\\Local\\Temp\\functio...
workerd/jsg/jsg.c++:98: error: took recursive isolate lock; kj::getStackTrace() = 7ff7d1b3a54e 7ff7d17baa24 7ff7d19b6e06 7ff7d19ef9ca 7ff7d19ef912 7ff7d15689b5 7ff7d20e7e7e 7ff7d20ad54b 7ff7d179281a 7ff7d16a3a01 7ff7d1d7eebf 7ff7d16a3a01 7ff7d1d7f80c 7ff7d16a3a01 7ff7d090c23c 7ff7d16a5f12 7ff7d16a3a01 7ff7d090c23c 7ff7d16a4e24 7ff7d16a3a01 7ff7d1a9eefc 7ff7d16a3a01 7ff7d090c23c 7ff7d16a4e24 7ff7d16a3a01 7ff7d1a9f6bc 7ff7d16a3a01 7ff7d1aa039c 7ff7d16a4e24 7ff7d16a3a01

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 26
  • Comments: 26 (2 by maintainers)

Most upvoted comments

I get the same error intermittently on macOS with remix-run 1.16.1

workerd/jsg/jsg.c++:98: error: took recursive isolate lock; kj::getStackTrace() = 10b4d7c39 10b808f12 10b832f01 10b832e86 10cf8e7af 10bb4fe3d 10ba9a895 10ba9aab2 10cf598a2 10b93d4c1 10cf59c92 10b93df91 10cf59c92 10b7e7741 10cf5b973 10cf59c92 10b7e8651 10cf5ab23 10cf598a2 10b7e94a1 10cf59c92 10b7e95c1 10cf5ab23 10cf598a2 10b7e9ac1 10cf59c92 10b

still an issue with wrangler 3.17.1, even after #1415 got merged - I’m seeing the following over and over…

  workerd/jsg/jsg.c++:136: error: took recursive isolate lock; kj::getStackTrace() = 1010321d9
  10161ebea 101638f11 101638e96 1033333ef 1019beefa 1019bffa6 1018fab25 1018fad42 1032ff0e2
  101763a91 1032ff4d2 101764601 1032ff4d2 1015f8b41 1033011c3 1032ff4d2 1015f9a51 103300363
  1032ff0e2 1015fa0e1 1032ff4d2 1015fa201 103300363 1032ff0e2 1015fa701 1032ff4d2 1015fb9d1
  103300363

I can confirm this is still happening, wrangler@beta and running Arch Linux. workerd/jsg/jsg.c++:133: error: took recursive isolate lock; kj::getStackTrace() =

Hey everyone! šŸ‘‹ This error isn’t user actionable, and was meant for internal debugging (https://github.com/cloudflare/workerd/issues/706#issuecomment-1638272710). As of wrangler@3.21.0 (https://github.com/cloudflare/workers-sdk/pull/4511), the error should be suppressed. Thanks @huw!

Same for me with wrangler 3.0.1 and macOS 13.4 Beta (22F5037d)

workerd/jsg/jsg.c++:133: error: took recursive isolate lock; kj::getStackTrace() = 102b6723b 102e08017 102e2af97 102e2af1b 104253e03 10309fe0b 10300788f 103007ab7 10422668f 102ef798b 1042269b7 102ef8477 1042269b7 102ded257 104228337 1042269b7 102dede4b 104227663 10422668f 102deea7f 1042269b7 102deebab 104227663 10422668f 102deef8f 1042269b7 102df022f 104227663 10422668f

Usually in comparison with streaming, as in const reader = response.body.pipeThrough(new TextDecoderStream()).getReader(); while (true) { const { value, done } = await reader.read(); (…)

Also getting this in 3.19.0:

✘ [ERROR] workerd/jsg/jsg.c++:136: error: took recursive isolate lock; kj::getStackTrace() = 102588b8b 102a55047 102a68d4b 102a68ccf 1043bf5c7 102eb979b 10439e4cb 1043dbbf7 1043979ab 104398a8b 102a795cf 104398983 10439577b 10333b337 104395ab3 10333afcf 10256785f 10439577b 10333ac83 10333ab0f 10333adc7 102aea873 102bba5e3 102bb8f3f 102d45c9f 102ca592f 102a126bf 102c93dcb 102c8013f

(This seems to be the only ā€œnon-actionableā€ warning left now that a bunch have been cleaned up…)

I get the workerd/jsg/jsg.c++:136: error: took recursive isolate lock; error in my application after upgrading from wrangler v2 to v3 as well. Weirdly it just triggers on some requests and I couldn’t see figure out a pattern, it’s not consistent for which routes trigger that error.

Also, I didn’t notice anything not working. Everything in my app still works fine, I can’t see any request timeouts or stuff.

@scottwillmoore true, my usecase was local files. I missed the ā€œgoogle.com.auā€ bit.

I ran into this too.

workerd/jsg/jsg.c++:98: error: took recursive isolate lock; kj::getStackTrace() = 104fcf23b 10526d2c7 10528fb53 10528fad7 1066abd8f 1054fd0b3 10546828b 1054684b3 10667e61b 10535a2ab 10667e943 10535ad97 10667e943 10525262f 1066802c3 10667e943 105253223 10667f5ef 10667e61b 105253e57 10667e943 105253f83 10667f5ef 10667e61b 105254367 10667e943 105255607 10667f5ef 10667e61b

I am running MacOS, wrangler 3.0.0. I managed to trigger this by ingesting a number of events in a queue and they all read-write from KV in some way. Nothing unreasonable, and I know this process works in the actual remote cloudflare environment. It also worked in wrangler v2.

Edit: In case it’s a point of curiosity, I wasn’t running remix at all, this was all cloudflare workers running locally.