<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>38499</bug_id>
          
          <creation_ts>2020-05-19 09:49:42 +0300</creation_ts>
          <short_desc>Ошибка сегментирования</short_desc>
          <delta_ts>2020-10-12 10:59:53 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>Distributions</classification>
          <product>Branch p9</product>
          <component>yarn</component>
          <version>не указана</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>ASSIGNED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Antonov Alexander">aas</reporter>
          <assigned_to name="Vitaly Lipatov">lav</assigned_to>
          <cc>lav</cc>
          
          <qa_contact name="qa-p9@altlinux.org">qa-p9</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>190102</commentid>
    <comment_count>0</comment_count>
    <who name="Antonov Alexander">aas</who>
    <bug_when>2020-05-19 09:49:42 +0300</bug_when>
    <thetext>Ошибка сегментирования при добавлении зависимости, воспроизводится только на i586:
test@workstation-9-i586 yarntest $ yarn init my_yarn_project
yarn init v1.17.3
question name (yarntest): 
question version (1.0.0): 
question description: 
question entry point (index.js): 
question repository url: 
question author: 
question license (MIT): 
question private: 
success Saved package.json
Done in 5.22s.

test@workstation-9-i586 yarntest $ yarn add test
yarn add v1.17.3
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[--] 0/2Ошибка сегментирования
Если указать другое имя зависимости то ошибка не воспроизводится.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>193177</commentid>
    <comment_count>1</comment_count>
    <who name="Vitaly Lipatov">lav</who>
    <bug_when>2020-10-12 09:13:22 +0300</bug_when>
    <thetext>&gt; $ yarn add test
&gt; ...
&gt; [--] 0/2Ошибка сегментирования
Воспроизводится:
[lav@builder32 yarntest]$ yarn add test
yarn add v1.22.4
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[--] 0/2Ошибка сегментирования

Проверено на
node-13.10.1-alt1.i586
libuv-1.40.0-alt1

node-14.13.1-alt1.i586
libuv-1.34.2-alt1

$ gdb -f --args node /usr/bin/yarn add test
Thread 1 &quot;node&quot; received signal SIGSEGV, Segmentation fault.
0x0850a1ea in node::fs::FSReqCallback::~FSReqCallback() ()
(gdb) bt
#0  0x0850a1ea in node::fs::FSReqCallback::~FSReqCallback() ()
#1  0x084fa0c2 in node::fs::FSReqAfterScope::~FSReqAfterScope() ()
#2  0x084fe5a3 in node::fs::AfterInteger(uv_fs_s*) ()
#3  0xb7f98b0e in uv__work_done (handle=0xb7fc3820 &lt;default_loop_struct+96&gt;) at src/threadpool.c:313
#4  0xb7f9c1db in uv__async_io (loop=0xb7fc37c0 &lt;default_loop_struct&gt;, w=&lt;optimized out&gt;, events=&lt;optimized out&gt;) at src/unix/async.c:163
#5  0xb7fae80e in uv__io_poll (loop=&lt;optimized out&gt;, timeout=0) at src/unix/linux-core.c:462
#6  0xb7f9c9ce in uv_run (loop=0xb7fc37c0 &lt;default_loop_struct&gt;, mode=UV_RUN_DEFAULT) at src/unix/core.c:385
#7  0x0853d256 in node::NodeMainInstance::Run() ()
#8  0x084bc3da in node::Start(int, char**) ()
#9  0x0844847b in main ()
(gdb)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>193180</commentid>
    <comment_count>2</comment_count>
    <who name="Vitaly Lipatov">lav</who>
    <bug_when>2020-10-12 10:59:53 +0300</bug_when>
    <thetext>
Про эту багу писали:
https://bugs.archlinux32.org/index.php?do=details&amp;task_id=63
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=922075
https://npm.community/t/npm-install-causing-segfault/6070/2


$ valgrind /usr/bin/node yarn add test
== Invalid read of size 4
...
==32004==  Address 0x1085 is not stack&apos;d, malloc&apos;d or (recently) free&apos;d


eax            0x1085              4229

   0x0850a1dd &lt;+77&gt;:	mov    0x158(%ebx),%eax
   0x0850a1e3 &lt;+83&gt;:	test   %eax,%eax
   0x0850a1e5 &lt;+85&gt;:	je     0x850a1f3 &lt;_ZN4node2fs13FSReqCallbackD0Ev+99&gt;
   0x0850a1e7 &lt;+87&gt;:	sub    $0xc,%esp
=&gt; 0x0850a1ea &lt;+90&gt;:	mov    (%eax),%edx</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>