<div dir="ltr"><div>Thanks.</div><div><br></div><div>It may be that browserify hits a bug by exhausting resources (heap).<br></div><div>Using another bundler might be a good idea (rollup, webpack, esbuild...).</div><div><br></div><div>Upstream doesn't support 32-bits builds on linux, however it does provide 32-bits build for windows.</div><div>If that bug can be reproduced there, it would be awesome, see</div><div><a href="https://nodejs.org/fr/download/prebuilt-binaries">https://nodejs.org/fr/download/prebuilt-binaries</a><br></div><div><br></div><div>I may have an old windows vm to test this, but I may not have time to do this.</div><div><br></div><div><br></div><div><br></div><div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le lun. 15 juil. 2024 à 10:39, Сергей Сёмин <<a href="mailto:syominsergey@gmail.com">syominsergey@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi!<br>
Just now I upgraded my existing Debian Bookworm i386 installation to<br>
Debian Sid using this repositories:<br>
deb <a href="http://deb.debian.org/debian" rel="noreferrer" target="_blank">http://deb.debian.org/debian</a> unstable contrib main non-free-firmware<br>
deb-src <a href="http://deb.debian.org/debian" rel="noreferrer" target="_blank">http://deb.debian.org/debian</a> unstable contrib main non-free-firmware<br>
<br>
Now I have these versions of packages of interest installed:<br>
nodejs/unstable,now 20.15.1+dfsg-1 i386<br>
node-browserify/unstable,now 17.0.0+ds-5 all [installed]<br>
<br>
Then I downloaded again sources of node-chai using "apt source<br>
node-chai", version 4.3.7~ds1+~cs9.7.21-1 received.<br>
And building with dpkg-buildpackage also fails with segfault in node:<br>
/usr/bin/make chai.js<br>
make[2]: Entering directory '/root/node-chai-4.3.7~ds1+~cs9.7.21'<br>
==> [Browser :: build]<br>
make[2]: *** [Makefile:24: chai.js] Segmentation fault (core dumped)<br>
<br>
root@debian-bookworm-i386:~/node-chai-4.3.7~ds1+~cs9.7.21# make --trace chai.js<br>
Makefile:23: update target 'chai.js' due to: node_modules lib/chai lib/chai.js<br>
printf "==> [Browser :: build]\n"<br>
==> [Browser :: build]<br>
browserify \<br>
       --bare \<br>
       --outfile chai.js \<br>
       --standalone chai \<br>
       --entry index.js<br>
make: *** [Makefile:24: chai.js] Segmentation fault (core dumped)<br>
<br>
root@debian-bookworm-i386:~/node-chai-4.3.7~ds1+~cs9.7.21# browserify \<br>
       --bare \<br>
       --outfile chai.js \<br>
       --standalone chai \<br>
       --entry index.js<br>
Segmentation fault (core dumped)<br>
<br>
Backtrace looks like this:<br>
<br>
root@debian-bookworm-i386:~/node-chai-4.3.7~ds1+~cs9.7.21# date<br>
Sun Jul 14 04:03:55 AM MSK 2024<br>
root@debian-bookworm-i386:~/node-chai-4.3.7~ds1+~cs9.7.21# coredumpctl -1 debug<br>
          PID: 1831 (node)<br>
          UID: 0 (root)<br>
          GID: 0 (root)<br>
       Signal: 11 (SEGV)<br>
    Timestamp: Sun 2024-07-14 04:03:47 MSK (12s ago)<br>
 Command Line: node /usr/bin/browserify --bare --outfile chai.js<br>
--standalone chai --entry index.js<br>
   Executable: /usr/bin/node<br>
Control Group: /user.slice/user-0.slice/session-1.scope<br>
         Unit: session-1.scope<br>
        Slice: user-0.slice<br>
      Session: 1<br>
    Owner UID: 0 (root)<br>
      Boot ID: c006ef12e75e47edb9084d298ace0431<br>
   Machine ID: bb88a0eb919c40a690e344da5d477cfb<br>
     Hostname: debian-bookworm-i386<br>
      Storage: /var/lib/systemd/coredump/core.node.0.c006ef12e75e47edb9084d298ace0431.1831.1720919027000000.zst<br>
(present)<br>
 Size on Disk: 5.2M<br>
      Message: Process 1831 (node) of user 0 dumped core.<br>
<br>
               Module libzstd.so.1 from deb libzstd-1.5.6+dfsg-1.i386<br>
               Module libgcc_s.so.1 from deb gcc-14-14.1.0-4.i386<br>
               Module libstdc++.so.6 from deb gcc-14-14.1.0-4.i386<br>
               Stack trace of thread 1831:<br>
               #0  0x00000000b557d9c7 _ZN4node2fs9FSReqBaseD1Ev<br>
(libnode.so.115 + 0x97d9c7)<br>
               #1  0x00000000b5599e7d _ZN4node2fs13FSReqCallbackD0Ev<br>
(libnode.so.115 + 0x999e7d)<br>
               #2  0x00000000b556a859<br>
_ZN4node24MakeLibuvRequestCallbackI7uv_fs_sPFvPS1_EE7WrapperES2_<br>
(libnode.so.115 + 0x96a859)<br>
               #3  0x00000000b4bea0a2 n/a (libuv.so.1 + 0x230a2)<br>
               #4  0x00000000b4bd5af5 uv_run (libuv.so.1 + 0xeaf5)<br>
               #5  0x00000000b5473267<br>
_ZN4node21SpinEventLoopInternalEPNS_11EnvironmentE (libnode.so.115 +<br>
0x873267)<br>
               #6  0x00000000b55cb2bf<br>
_ZN4node16NodeMainInstance3RunEPNS_8ExitCodeEPNS_11EnvironmentE<br>
(libnode.so.115 + 0x9cb2bf)<br>
               #7  0x00000000b55cb6b3 _ZN4node16NodeMainInstance3RunEv<br>
(libnode.so.115 + 0x9cb6b3)<br>
               #8  0x00000000b5526d29 _ZN4node5StartEiPPc<br>
(libnode.so.115 + 0x926d29)<br>
               #9  0x0000000000454087 main (node + 0x1087)<br>
               #10 0x00000000b7cf2c65 __libc_start_call_main<br>
(libc.so.6 + 0x23c65)<br>
               #11 0x00000000b7cf2d28 __libc_start_main_impl<br>
(libc.so.6 + 0x23d28)<br>
               #12 0x00000000004540c7 _start (node + 0x10c7)<br>
<br>
               Stack trace of thread 1849:<br>
               #0  0x0000000000000000 n/a (n/a + 0x0)<br>
               ELF object binary architecture: Intel 80386<br>
<br>
GNU gdb (Debian 13.2-1+b2) 13.2<br>
Copyright (C) 2023 Free Software Foundation, Inc.<br>
License GPLv3+: GNU GPL version 3 or later <<a href="http://gnu.org/licenses/gpl.html" rel="noreferrer" target="_blank">http://gnu.org/licenses/gpl.html</a>><br>
This is free software: you are free to change and redistribute it.<br>
There is NO WARRANTY, to the extent permitted by law.<br>
Type "show copying" and "show warranty" for details.<br>
This GDB was configured as "i686-linux-gnu".<br>
Type "show configuration" for configuration details.<br>
For bug reporting instructions, please see:<br>
<<a href="https://www.gnu.org/software/gdb/bugs/" rel="noreferrer" target="_blank">https://www.gnu.org/software/gdb/bugs/</a>>.<br>
Find the GDB manual and other documentation resources online at:<br>
   <<a href="http://www.gnu.org/software/gdb/documentation/" rel="noreferrer" target="_blank">http://www.gnu.org/software/gdb/documentation/</a>>.<br>
<br>
For help, type "help".<br>
Type "apropos word" to search for commands related to "word"...<br>
Reading symbols from /usr/bin/node...<br>
(No debugging symbols found in /usr/bin/node)<br>
<br>
warning: Can't open file anon_inode:[io_uring] which was expanded to<br>
anon_inode:[io_uring] during file-backed mapping note processing<br>
<br>
warning: Can't open file anon_inode:[io_uring] which was expanded to<br>
anon_inode:[io_uring] during file-backed mapping note processing<br>
<br>
warning: Can't open file anon_inode:[io_uring] which was expanded to<br>
anon_inode:[io_uring] during file-backed mapping note processing<br>
<br>
warning: Can't open file anon_inode:[io_uring] which was expanded to<br>
anon_inode:[io_uring] during file-backed mapping note processing<br>
<br>
warning: Can't open file anon_inode:[io_uring] which was expanded to<br>
anon_inode:[io_uring] during file-backed mapping note processing<br>
<br>
warning: Can't open file anon_inode:[io_uring] which was expanded to<br>
anon_inode:[io_uring] during file-backed mapping note processing<br>
<br>
warning: Can't open file anon_inode:[io_uring] which was expanded to<br>
anon_inode:[io_uring] during file-backed mapping note processing<br>
<br>
warning: Can't open file anon_inode:[io_uring] which was expanded to<br>
anon_inode:[io_uring] during file-backed mapping note processing<br>
<br>
warning: Can't open file anon_inode:[io_uring] which was expanded to<br>
anon_inode:[io_uring] during file-backed mapping note processing<br>
<br>
warning: Can't open file anon_inode:[io_uring] which was expanded to<br>
anon_inode:[io_uring] during file-backed mapping note processing<br>
<br>
warning: Can't open file anon_inode:[io_uring] which was expanded to<br>
anon_inode:[io_uring] during file-backed mapping note processing<br>
<br>
warning: Can't open file anon_inode:[io_uring] which was expanded to<br>
anon_inode:[io_uring] during file-backed mapping note processing<br>
[New LWP 1831]<br>
[New LWP 1849]<br>
[New LWP 1846]<br>
[New LWP 1848]<br>
[New LWP 1837]<br>
[New LWP 1845]<br>
[New LWP 1834]<br>
[New LWP 1847]<br>
[New LWP 1841]<br>
[New LWP 1840]<br>
[New LWP 1833]<br>
[New LWP 1842]<br>
[New LWP 1836]<br>
[New LWP 1844]<br>
[New LWP 1838]<br>
[New LWP 1843]<br>
[New LWP 1835]<br>
[New LWP 1832]<br>
[New LWP 1839]<br>
[Thread debugging using libthread_db enabled]<br>
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".<br>
Core was generated by `node /usr/bin/browserify --bare --outfile<br>
chai.js --standalone chai --entry ind'.<br>
Program terminated with signal SIGSEGV, Segmentation fault.<br>
#0  0xb557d9c7 in node::fs::FSReqBase::~FSReqBase() () from<br>
/lib/i386-linux-gnu/libnode.so.115<br>
--Type <RET> for more, q to quit, c to continue without paging--<br>
[Current thread is 1 (Thread 0xb7c9e780 (LWP 1831))]<br>
(gdb) bt<br>
#0  0xb557d9c7 in node::fs::FSReqBase::~FSReqBase() () from<br>
/lib/i386-linux-gnu/libnode.so.115<br>
#1  0xb5599e7d in node::fs::FSReqCallback::~FSReqCallback() () from<br>
/lib/i386-linux-gnu/libnode.so.115<br>
#2  0xb556a859 in node::MakeLibuvRequestCallback<uv_fs_s, void<br>
(*)(uv_fs_s*)>::Wrapper(uv_fs_s*) () from<br>
/lib/i386-linux-gnu/libnode.so.115<br>
#3  0xb4bea0a2 in ?? () from /lib/i386-linux-gnu/libuv.so.1<br>
#4  0xb4bd5af5 in uv_run () from /lib/i386-linux-gnu/libuv.so.1<br>
#5  0xb5473267 in node::SpinEventLoopInternal(node::Environment*) ()<br>
from /lib/i386-linux-gnu/libnode.so.115<br>
#6  0xb55cb2bf in node::NodeMainInstance::Run(node::ExitCode*,<br>
node::Environment*) () from /lib/i386-linux-gnu/libnode.so.115<br>
#7  0xb55cb6b3 in node::NodeMainInstance::Run() () from<br>
/lib/i386-linux-gnu/libnode.so.115<br>
#8  0xb5526d29 in node::Start(int, char**) () from<br>
/lib/i386-linux-gnu/libnode.so.115<br>
#9  0x00454087 in main ()<br>
<br>
пн, 15 июл. 2024 г. в 11:12, Jérémy Lal <<a href="mailto:kapouer@melix.org" target="_blank">kapouer@melix.org</a>>:<br>
><br>
> Le dim. 14 juil. 2024 à 23:48, Sergei Semin <<a href="mailto:syominsergey@gmail.com" target="_blank">syominsergey@gmail.com</a>> a écrit :<br>
>><br>
>> Package: nodejs<br>
>> Version: 18.19.0+dfsg-6~deb12u2<br>
>> I was trying to build from source package node-chai in Debian Bookworm i386. And there was a failure. Now I will describe how to reproduce.<br>
><br>
><br>
> Thank you for the detailed report.<br>
><br>
> First thing is to check for regressions from<br>
> 18.19.0+dfsg-6~deb12u2<br>
> 18.19.0+dfsg-6~deb12u1<br>
> 18.19.0+dfsg-5<br>
> and also check if this is reproducible in debian/testing with nodejs 20.x<br>
><br>
> Upstream doesn't build a i386 version, it's going to be difficult to make them fix it.<br>
><br>
> Any help is welcome.<br>
><br>
> Jérémy<br>
<br>
</blockquote></div></div>