Git Product home page Git Product logo

Comments (6)

gear54rus avatar gear54rus commented on June 15, 2024

noticed the same. In my case it's

const x = await $`some-command | sort -r | head -n 5`.text();

that causes this. If I remove text(), it works. It also works on Linux 6 (as is) but fails on Linux 5, same as OP has. Hence I post here. Running on alpine inside docker. Can provide core dumps if requested

from bun.

Fuchsoria avatar Fuchsoria commented on June 15, 2024

noticed the same. In my case it's

const x = await $`some-command | sort -r | head -n 5`.text();

that causes this. If I remove text(), it works. It also works on Linux 6 (as is) but fails on Linux 5, same as OP has. Hence I post here. Running on alpine inside docker. Can provide core dumps if requested

I'm using ubuntu 22 without containers

from bun.

Fuchsoria avatar Fuchsoria commented on June 15, 2024

Specially for testing I ordered another hardware, upgraded linux to 6.5 (Linux 6.5.0-21-generic x86_64 x86_64) Ubuntu 22.04.4 LTS. But still getting same issue

57 | }).bind(null, resolveFilename, hookPropertyMap);
58 | // This is a hack to make sure that if a user requires a Next.js module that wasn't bundled
59 | // that needs to point to the rendering runtime version, it will point to the correct one.
60 | // This can happen on `pages` when a user requires a dependency that uses next/image for example.
61 | mod.prototype.require = function(request) {
62 |     if (request.endsWith(".shared-runtime")) {
             ^
TypeError: request.endsWith is not a function. (In 'request.endsWith(".shared-runtime")', 'request.endsWith' is undefined)
      at /home/bun-t3/node_modules/next/dist/server/require-hook.js:62:9
      at getMiddleware (/home/bun-t3/node_modules/next/dist/server/next-server.js:904:26)
      at /home/bun-t3/node_modules/next/dist/server/base-server.js:173:32
      at /home/bun-t3/node_modules/next/dist/server/base-server.js:172:50
      at /home/bun-t3/node_modules/next/dist/server/base-server.js:275:34

error: script "start" was terminated by signal SIGSEGV (Address boundary error)
Segmentation fault (core dumped)

from bun.

Jarred-Sumner avatar Jarred-Sumner commented on June 15, 2024

noticed the same. In my case it's

const x = await $`some-command | sort -r | head -n 5`.text();

that causes this. If I remove text(), it works. It also works on Linux 6 (as is) but fails on Linux 5, same as OP has. Hence I post here. Running on alpine inside docker. Can provide core dumps if requested

While the error message is similar, the cause is entirely different - can you open a new issue? A core dump would be helpful.

from bun.

Jarred-Sumner avatar Jarred-Sumner commented on June 15, 2024

Debug logs:

ASSERTION FAILED: isSymbol()
/Users/runner/work/WebKit/WebKit/Source/JavaScriptCore/runtime/JSCJSValue.cpp(190) : JSObject *JSC::JSValue::synthesizePrototype(JSGlobalObject *) const
1   0x103ca53d0 WTFCrash
2   0x103479220 JSC::constructEmptyObject(JSC::JSGlobalObject*)
3   0x104c85f30 JSC::JSValue::putToPrimitive(JSC::JSGlobalObject*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&)
4   0x1048e0624 JSC::JSValue::getPropertySlot(JSC::JSGlobalObject*, JSC::PropertyName, JSC::PropertySlot&) const
5   0x10496fa38 operationGetByIdOptimize
6   0x138028160 5   ???                                 0x0000000138028160 0x0 + 5234655584
7   0x13857fbbc 6   ???                                 0x000000013857fbbc 0x0 + 5240257468
8   0x13858390c 7   ???                                 0x000000013858390c 0x0 + 5240273164
9   0x138121ff0 8   ???                                 0x0000000138121ff0 0x0 + 5235679216
10  0x13857a1dc 9   ???                                 0x000000013857a1dc 0x0 + 5240234460
11  0x1383f4b04 10  ???                                 0x00000001383f4b04 0x0 + 5238639364
12  0x138121ff0 11  ???                                 0x0000000138121ff0 0x0 + 5235679216
13  0x1380fbf78 12  ???                                 0x00000001380fbf78 0x0 + 5235523448
14  0x1382128e0 13  ???                                 0x00000001382128e0 0x0 + 5236664544
15  0x1054a5cb4 vmEntryToJavaScript
16  0x1048d8bbc JSC::Interpreter::executeCallImpl(JSC::VM&, JSC::JSObject*, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&)
17  0x104d2490c JSC::runJSMicrotask(JSC::JSGlobalObject*, WTF::ObjectIdentifierGeneric<JSC::MicrotaskIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>, JSC::JSValue, JSC::JSValue, JSC::JSValue, JSC::JSValue, JSC::JSValue)
18  0x104f4e1f0 JSC::VM::drainMicrotasks()
19  0x10339bb08 Bun::jsFunctionDrainMicrotaskQueue(JSC::JSGlobalObject*, JSC::CallFrame*)
20  0x13800c03c 19  ???                                 0x000000013800c03c 0x0 + 5234540604
21  0x138112f24 20  ???                                 0x0000000138112f24 0x0 + 5235617572
22  0x1054a5cb4 vmEntryToJavaScript
23  0x1048d8bbc JSC::Interpreter::executeCallImpl(JSC::VM&, JSC::JSObject*, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&)
24  0x104b4f5e4 JSC::call(JSC::JSGlobalObject*, JSC::JSValue, JSC::JSValue, JSC::ArgList const&, WTF::ASCIILiteral)
25  0x1034470c4 Bun::JSNextTickQueue::drain(JSC::VM&, JSC::JSGlobalObject*)
26  0x10350a728 Zig::GlobalObject::drainMicrotasks()
27  0x10350a760 JSC__JSGlobalObject__drainMicrotasks
28  0x101856698 src.bun.js.event_loop.EventLoop.drainMicrotasksWithGlobal
29  0x1025d4820 src.bun.js.event_loop.EventLoop.drainMicrotasks
30  0x10216a724 src.bun.js.javascript.VirtualMachine.drainMicrotasks
31  0x1026e07cc src.bun.js.api.server.NewRequestContext(false,true,src.bun.js.api.server.NewServer(ZigGeneratedClasses.JSDebugHTTPServer,false,true)).drainMicrotasks
error: script "start" was terminated by signal SIGSEGV (Address boundary error)
fish: Job 1, 'bun-debug --bun start' terminated by signal SIGSEGV (Address boundary error)

from bun.

Fuchsoria avatar Fuchsoria commented on June 15, 2024

For test I tried to use custom server with nextjs, getting same segmentation fault issue

import { createServer } from "http";
import { parse } from "url";
import next from "next";

const port = parseInt(process.env.PORT || "3000", 10);
const dev = false;
const app = next({ dev });
const handle = app.getRequestHandler();

app.prepare().then(() => {
  createServer((req, res) => {
    const parsedUrl = parse(req.url!, true);
    handle(req, res, parsedUrl);
  }).listen(port);

  console.log(
    `> Server listening at http://localhost:${port} as ${
      dev ? "development" : "production"
    }`,
  );
});

from bun.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.