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

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

    <bug>
          <bug_id>41600</bug_id>
          
          <creation_ts>2021-12-21 04:51:33 +0300</creation_ts>
          <short_desc>pstree is killed by signal if stdout is redirected to a file</short_desc>
          <delta_ts>2021-12-21 04:59:08 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>psmisc</component>
          <version>unstable</version>
          <rep_platform>aarch64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>40857</dup_id>
          <see_also>https://bugzilla.altlinux.org/show_bug.cgi?id=40857</see_also>
          <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="Vladimir D. Seleznev">vseleznv</reporter>
          <assigned_to name="Vitaly Chikunov">vt</assigned_to>
          <cc>ldv</cc>
    
    <cc>vt</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>206243</commentid>
    <comment_count>0</comment_count>
    <who name="Vladimir D. Seleznev">vseleznv</who>
    <bug_when>2021-12-21 04:51:33 +0300</bug_when>
    <thetext>On aarch64:
$ uname -m
aarch64
$ pstree -p &gt; pstree 
File size limit exceeded
$ du pstree
0       pstree
$ pstree -p |tee &gt; pstree 
$ du pstree
16K     pstree

Lets trace it:
$ strace -o pstree.trace pstree -p &gt; pstree
File size limit exceeded
$ tail pstree.trace 
newfstatat(AT_FDCWD, &quot;/proc/4187067/ns/user&quot;, 0xffffc7ed6ab0, 0) = -1 EACCES (Permission denied)
newfstatat(AT_FDCWD, &quot;/proc/4187067/ns/uts&quot;, 0xffffc7ed6ab0, 0) = -1 EACCES (Permission denied)
close(4)                                = 0
getdents64(3, 0xaaaabee05120 /* 0 entries */, 32768) = 0
close(3)                                = 0
prlimit64(0, RLIMIT_NOFILE, {rlim_cur=0, rlim_max=0}, NULL) = 0
fstat(1, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
write(1, &quot;systemd(1)-+-agetty(4099)\n      &quot;..., 4096) = -1 EFBIG (File too large)
--- SIGXFSZ {si_signo=SIGXFSZ, si_code=SI_USER, si_pid=648134, si_uid=1720} ---
+++ killed by SIGXFSZ +++
$

Killed by SIGXFSZ

On x86_64:
$ uname -m
x86_64
$ pstre
pstree      pstree.x11
$ pstree -p &gt; pstree
$ du pstree 
104K    pstree
$ 

It works well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>206244</commentid>
    <comment_count>1</comment_count>
    <who name="Vitaly Chikunov">vt</who>
    <bug_when>2021-12-21 04:54:54 +0300</bug_when>
    <thetext>Do you forgot to post pstree version on aarch64?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>206245</commentid>
    <comment_count>2</comment_count>
    <who name="Vitaly Chikunov">vt</who>
    <bug_when>2021-12-21 04:59:08 +0300</bug_when>
    <thetext>Already fixed in #40857.

*** This bug has been marked as a duplicate of bug 40857 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>