electric-sql / electric-sql/pglite

[Bug] Out of bounds memory access

Open
#339 10 comments 7 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
16k
Forks
442
Avg merge
20h 19m
Merged PRs (30d)
7

Description

When running tests using pglite, i'm getting this error many times:

```
bun test v1.1.29 (6d43b366)

index.test.ts:

# Unhandled error between tests
-------------------------------
1 | import{b as Ge,d as se,e as Ce,f as We,g as X,h as G,i as ie,j as re}from"./chunk-SJVDOE3S.js";import{A as Q,B as Ae,C as $,D as Me,E as Y,F as Ve,G as Re,a as ze,b as je,c as ae,d as le,e as ce,f as de,g as ue,h as pe,i as fe,j as me,k as he,l as ye,m as ge,n as we,o as xe,p as be,q as C,r as ve,s as Ee,t as Pe,u as _e,v as Te,w as Fe,x as Se,y as W,z as De}from"./chunk-7M5G4I52.js";import"./chunk-TAZBUB4Z.js";import{a as ne,b as oe,c as Qe,d as $e}from"./chunk-3BCYDNSE.js";import{b as Le,c as qe,d as i,e as p,f,g as S,i as h}from"./chunk-Y3AVQXKT.js";h();h();h();var et=new Error("timeout while waiting for mutex to become available"),tt=new Error("mutex already locked"),Ke=new Error("request for lock canceled"),Xe=function(u,t,e,s){function d(r){return r instanceof e?r:new e(function(n){n(r)})}return new(e||(e=Promise))(function(r,n){function o(c){try{l(s.next(c))}catch(m){n(m)}}function a(c){try{l(s.throw(c))}catch(m){n(m)}}function l(c){c.done?r(c.value):d(c.value...

RuntimeError: Out of bounds memory access (evaluating 'this.mod._pg_initdb()')
at postgres.wasm.wasm-function[sort_checkpoint_bufferids_med3]
at postgres.wasm.wasm-function[sort_checkpoint_bufferids]
at postgres.wasm.wasm-function[CheckPointBuffers]
at postgres.wasm.wasm-function[CheckPointGuts]
at postgres.wasm.wasm-function[CreateCheckPoint]
at postgres.wasm.wasm-function[ShutdownXLOG]
at postgres.wasm.wasm-function[pg_proc_exit]
at postgres.wasm.wasm-function[pg_initdb]
at //node_modules/@electric-sql/pglite/dist/index.js:1:10594
-------------------------------
```

I'm using PGlite **v0.2.6** and Bun **v1.1.29**

This is flaky. Sometimes it works, sometimes doesn't. Any help on fixing this?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.