Skip to content

ps aux - Ssps:display.c:66: please report this bug Segmentation fault (core dumped) #3252

Closed

Description

  • Your Windows build number: 10.0.17134.1

  • What you're doing and what's happening:

user@mymachine:~$ ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0   8304   104 ?        Ss   Jun04   0:01 /init ro
<...removed some rows...>
Signal 11 (SEGV) caught by ps (procps-ng version 3.3.10).
root     15472  0.0  0.0  19568  1120 ?        Ssps:display.c:66: please report this bug
Segmentation fault (core dumped)
  • What's wrong / what should be happening instead:

ps output without errors

  • Strace of the failing command, if applicable:

This is the tail output of the command - strace -v -s 256 ps aux

stat("/etc/localtime", {st_dev=makedev(0, 2), st_ino=281474977023961, st_mode=S_IFREG|0644, st_nlink=2, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=1129, st_atime=2018/02/04-16:23:13.751519800, st_mtime=2018/05/14-12:15:13.707070500, st_ctime=2018/05/14-12:15:13.707070500}) = 0
stat("/etc/localtime", {st_dev=makedev(0, 2), st_ino=281474977023961, st_mode=S_IFREG|0644, st_nlink=2, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=1129, st_atime=2018/02/04-16:23:13.751519800, st_mtime=2018/05/14-12:15:13.707070500, st_ctime=2018/05/14-12:15:13.707070500}) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x1c} ---
write(2, "Signal 11 (SEGV) caught by ps (procps-ng version 3.3.10).\n", 58) = 58
write(1, "root     15472  0.0  0.0  19568  1120 ?        Ss", 49) = 49
write(2, "ps:", 3)                      = 3
write(2, "display.c:66: ", 14)          = 14
write(2, "please report this bug", 22)  = 22
write(2, "\n", 1)                       = 1
rt_sigaction(SIGSEGV, {SIG_DFL, [SEGV], SA_RESTORER|SA_RESTART, 0x7f78f8e254b0}, {0x403220, ~[RTMIN RT_1], SA_RESTORER, 0x7f78f8e254b0}, 8) = 0
kill(16100, SIGSEGV)                    = 0
rt_sigreturn({mask=[]} <unfinished ...>
--- SIGSEGV {si_signo=SIGSEGV, si_code=SI_USER, si_pid=16100, si_uid=1000} ---
+++ killed by SIGSEGV (core dumped) +++

I can send the full output to [email protected] if needed.

It seems the same error as #1649, but I'm not sure this is the same cause.

Thanks.

Activity

  1. therealkenc commented on May 28, 2018

    @therealkenc

    #1649 (appreciate the ref) was deemed addressed so you're correct to open a new one. Thanks.

  2. zrax commented on Jun 2, 2018

    @zrax

    It looks like some processes have a ridiculously large start_time:

    $ cat /proc/10606/stat
    10606 (ssh-agent) S 1 10606 10606 0 0 0 0 0 0 0 0 0 0 0 20 0 1 0 18446744073637939154 904584650752 79 18446744073709551615 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    

    Then the crash occurs when ps takes this value and tries to pass it to localtime, but doesn't check the return value of localtime...

    ...
    1018      t = getbtime() + pp->start_time / Hertz;
    1019      proc_time = localtime(&t);
    ...
    (gdb) p pp->start_time
    $1 = 18446744073637939154
    (gdb) p Hertz
    $2 = 100
    (gdb) p t
    $3 = 184467442265061305
    (gdb) p proc_time
    $4 = (struct tm *) 0x0
    
  3. therealkenc commented on Jun 3, 2018

    @therealkenc

    Pretty cool fail. That's the 16th of December in the year 5,845,542,510 (it's a Tuesday) best I can tell. About six billion years from now. I mean, the Sun will have exhausted all it's hydrogen by then. But I don't see why WSL shouldn't still run. Seem like a bug to me.

  4. atsaloli commented on Jun 10, 2018

    @atsaloli

    I am getting the same segfault:

    atsaloli@Aleksey_X1_C2G:~$ sudo su -
    root@Aleksey_X1_C2G:~# ps -ef
    UID        PID  PPID  C STIME TTY          TIME CMD
    root         1     0  0 Jun19 ?        00:00:00 /init ro
    root         3     1  0 Jun19 tty1     00:00:00 /init ro
    atsaloli     4     3  0 Jun19 tty1     00:00:00 -bash
    atsaloli    31     4  0 Jun19 tty1     00:00:01 vim 29-May-2018.txt
    root        32     1  0 Jun19 tty2     00:00:00 /init ro
    atsaloli    33    32  0 Jun19 tty2     00:00:02 -bash
    root       111     1  0 Jun25 tty3     00:00:00 /init ro
    atsaloli   112   111  0 Jun25 tty3     00:00:00 -bash
    atsaloli   126   112  0 Jun25 tty3     00:00:00 vim we
    Signal 11 (SEGV) caught by ps (procps-ng version 3.3.10).
    root       374     1  0ps:display.c:66: please report this bug
    Segmentation fault (core dumped)
    root@Aleksey_X1_C2G:~#
    
  5. ryancdotorg commented on Jun 26, 2018

    @ryancdotorg

    I'm also getting this - also seems to be caused a huge time value.

    This popped up after suspending my system.

  6. benhillis commented on Jul 17, 2018

    @benhillis
    Member

    John Starks (@jstarks) and I took a look at this yesterday and determined that our boot time calculation could overflow if your machine is running for a long time (a few weeks). Essentially what happens is our instance boot time overflows, so any relative calculations based off the boot time (like process creation time) will be way off. Working on a fix for this now.

  7. jadeallenx commented on Jul 21, 2018

    @jadeallenx

    This hits me too.

  8. carlpett commented on Jul 23, 2018

    @carlpett

    Apart from kubectl mentioned in #3399, it seems to also hit ssh (as I noticed that my inexplainable ssh troubles went away when I rebooted to get kubectl working...)

  9. ryancdotorg commented on Jul 23, 2018

    @ryancdotorg

    Ben Hillis (@benhillis) I'm getting hit with this after 11 days of uptime - I would definitely not consider this to be a "long time".

  10. benhillis commented on Jul 23, 2018

    @benhillis
    Member

    Ryan Castellucci (@ryancdotorg) - Your hardware clock might have a higher frequency than the one I tested the fix on. Fix is making its way to insider builds.

  11. atsaloli commented on Jul 26, 2018

    @atsaloli

    Wonderful, thanks for finding and fixing the issue!

  12. benhillis commented on Jul 31, 2018

    @benhillis
    Member

    Should be fixed in 17728.

  13. atsaloli commented on Aug 7, 2018

    @atsaloli

    👍

  14. LordMonoxide commented on Aug 14, 2018

    @LordMonoxide

    Still experiencing this issue (SSH hanging) on build 17733. Rebooting fixes (temporarily, I'm assuming). I had an uptime of 4 days.

  15. benhillis commented on Aug 14, 2018

    @benhillis
    Member

    Corey Frenette (@LordMonoxide) - Another fix is inbound, #3434.

  16. mbarkhau commented on Oct 23, 2018

    @mbarkhau

    I came here via: https://bugs.python.org/issue33965

    So others can find this more quickly, this is the error message it started with:

    Fatal Python error: _Py_InitializeMainInterpreter: can't initialize time
    OverflowError: timestamp too large to convert to C _PyTime_t
    
  17. cdonnellytx commented on Jun 18, 2019

    @cdonnellytx

    I came here via: #3529

    So others can find this more quickly, this is the error message pwsh started with:

    FailFast:
    TimeSpan overflowed because the duration is too long.
    

    And this is the message ruby has been giving, which is probably related as well:

    /usr/lib/ruby/2.5.0/timeout.rb:86: [BUG] pthread_cond_timedwait: Invalid argument (EINVAL)
    ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux-gnu]
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions