Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local build/bun-debug core dump on linux - Cannot access memory at address 0x6 #8144

Open
asilvas opened this issue Jan 13, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@asilvas
Copy link
Contributor

asilvas commented Jan 13, 2024

What version of Bun is running?

1.0.21-debug+9a0dadad2

What platform is your computer?

Linux 6.2.0-39-generic x86_64 x86_64

What steps can reproduce the bug?

Using the code from another bug doesn't work using a local debug build of Bun, making it very difficult to make any progress towards solution. #7820

What is the expected behavior?

Should work consistent as the release build.

What do you see instead?

Core dump very early on while loading AWS credentials.

[fs] openat(2147483647, /home/asilvas/app/node_modules/@smithy/fetch-http-handler/dist-cjs/fetch-http-handler.js) = 13
[fs] close(13)
[fs] openat(2147483647, /home/asilvas/app/node_modules/@smithy/fetch-http-handler/dist-cjs/request-timeout.js) = 13
[fs] close(13)
[fs] openat(2147483647, /home/asilvas/app/node_modules/@smithy/fetch-http-handler/dist-cjs/stream-collector.js) = 13
[fs] close(13)
[Loop] ref
[SYS] openat(-100, /home/asilvas/.aws/config) = 13
[SYS] fstat(13) = 0
[SYS] read(13, 55) = 39 (0.004ms)
[SYS] read(13, 16) = 0 (0.001ms)
[fs] close(13)
[Loop] ref
[SYS] openat(-100, /home/asilvas/.aws/credentials) = 13
[SYS] fstat(13) = 0
[SYS] read(13, 132) = 116 (0.002ms)
[SYS] read(13, 16) = 0 (0.000ms)
[fs] close(13)
Segmentation fault (core dumped)

Additional information

Core was generated by `../bun/build/bun-debug ./tools/getShardModel-bug.ts'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  __memcpy_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:265
Download failed: Invalid argument.  Continuing without source file ./string/../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S.               
265     ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S: No such file or directory.
[Current thread is 1 (Thread 0x7f800a9fe040 (LWP 337335))]
(gdb) bt
#0  __memcpy_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:265
#1  0x00005636452de162 in WTF::copyElements<char16_t> (destination=0x7f7fae01d014 u"", source=0x6 <error: Cannot access memory at address 0x6>, 
    length=15847168) at bun-webkit/include/wtf/text/StringCommon.h:907
#2  0x00005636452de105 in WTF::StringImpl::copyCharacters<char16_t> (destination=0x7f7fae01d014 u"", 
    source=0x6 <error: Cannot access memory at address 0x6>, length=15847168) at bun-webkit/include/wtf/text/StringImpl.h:414
#3  0x00005636464f1d9d in WTF::StringImpl::createInternal<char16_t> (characters=0x6 <error: Cannot access memory at address 0x6>, length=15847168)
    at /webkit/Source/WTF/wtf/text/StringImpl.cpp:262
#4  0x00005636464e9026 in WTF::StringImpl::create (characters=0x6 <error: Cannot access memory at address 0x6>, length=15847168)
    at /webkit/Source/WTF/wtf/text/StringImpl.cpp:268
#5  0x0000563646509f91 in WTF::String::String (this=0x7ffd5e92a210, characters=0x6 <error: Cannot access memory at address 0x6>, length=15847168)
    at /webkit/Source/WTF/wtf/text/WTFString.cpp:44
#6  0x00005636480b9dd1 in WTF::String::String (this=0x7ffd5e92a210, characters=...) at WTF/Headers/wtf/text/WTFString.h:62
#7  0x0000563648552072 in JSC::toLocaleCase<(JSC::CaseConversionMode)1> (globalObject=0x7f7fbe448868, callFrame=0x7ffd5e92a430)
    at /webkit/Source/JavaScriptCore/runtime/StringPrototype.cpp:1653
#8  0x00005636485358bd in JSC::stringProtoFuncToLocaleLowerCase (globalObject=0x7f7fbe448868, callFrame=0x7ffd5e92a430)
    at /webkit/Source/JavaScriptCore/runtime/StringPrototype.cpp:1660
#9  0x00007f7fbf608038 in ?? ()
#10 0x00007ffd5e92a4c0 in ?? ()
#11 0x00005636467fb3f1 in js_trampoline_op_call ()
#12 0x0000000000000000 in ?? ()
@asilvas asilvas added the bug Something isn't working label Jan 13, 2024
@aw1875
Copy link

aw1875 commented Apr 1, 2024

Did you end up having any luck sorting this out? I'm also getting a segfault based on a similar stack (../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S: No such file or directory.).

@asilvas
Copy link
Contributor Author

asilvas commented Apr 1, 2024

Did you end up having any luck sorting this out? I'm also getting a segfault based on a similar stack (../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S: No such file or directory.).

Tried several versions since, but been a while so not sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants