Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


OOM Killer
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

OOM Killer

LeviLevi Member

So, I encountered this nasty bugger while performing fio test.

I have .sh file with content:

!/bin/bash

echo 'FIO random reads:' >> tst.log
./fio reads.ini --output-format=json >> tst.log
echo 'Done' >> tst.log

Results are:

FIO random reads:
Done

And a error in console:

./test.sh: line 4: 2335 Killed ./fio reads.ini --output-format=json >> tst.log

When running manually from console:

./fio reads.ini --output-format=json >> tst.log

Results are correctly saved in json format without any single error.

Logs shown this:

debian kernel: Out of memory: Kill process 2352 (fio) score 274 or sacrifice child

The question: why the hell OOM killer killing fio process launched from .sh script, but not touching it when I manually execute it?

Comments

  • t0mt0m Member

    Maybe you need PHP selector?

    Thanked by 3uptime ralph Amitz
  • LeviLevi Member

    @t0m said:
    Maybe you need PHP selector?

    It's 'selekter' not selector. Debian, thx.

    Thanked by 1Amitz
  • uptimeuptime Member

    oom killah

    php selektra

    dmesg dumpcore

    fsck all the things

    Thanked by 1ralph
  • angstromangstrom Moderator

    @LTniger said:

    @t0m said:
    Maybe you need PHP selector?

    It's 'selekter' not selector. Debian, thx.

    If we return to the original prophetic text ( https://www.lowendtalk.com/discussion/157805/shred-hosting ), we see that

    PHP SELECTER

    written in capital letters is the intended form.

    Thanked by 2TimboJones Amitz
  • uptimeuptime Member

    what if they got it wrong ok

  • angstromangstrom Moderator

    @uptime said:
    what if they got it wrong ok

    I think that the use of capitals was meant to tell us something.

    Thanked by 2uptime Amitz
  • uptimeuptime Member

    CAPTIALS OK

    Thanked by 2angstrom Amitz
  • jsgjsg Member, Resident Benchmarker
    • How can we help you if you don't show us the job file?
    • --debug=mem is your friend
    • try again with /bin/sh instead of a fat pervert monstrosity bash
  • skorousskorous Member
    edited May 2019

    @jsg, what *nix are you running. /bin/sh is bash.

    [root@localhost ~]# ls -lah /bin
    lrwxrwxrwx. 1 root root 7 Mar 7 08:56 /bin -> usr/bin
    [root@localhost ~]# ls -lah /usr/bin/sh
    lrwxrwxrwx. 1 root root 4 Mar 15 07:02 /usr/bin/sh -> bash

  • jsgjsg Member, Resident Benchmarker

    @skorous said:
    @jsg, what *nix are you running. /bin/sh is bash.

    [root@localhost ~]# ls -lah /bin
    lrwxrwxrwx. 1 root root 7 Mar 7 08:56 /bin -> usr/bin
    [root@localhost ~]# ls -lah /usr/bin/sh
    lrwxrwxrwx. 1 root root 4 Mar 15 07:02 /usr/bin/sh -> bash

    I don't care about the pervert habits of diverse aberrant linux distros. On a Unix - incl. sensible linux distros - /bin/sh is some kind of basic [d]ash shell. And I'll continue to refuse to have more than a short glance on anything starting with #![/usr/local]/bin/bash.

    Whatever, without his job file we can't offer any sensible advice anyway (other than stating the fact that using bash is sinful, pervert, and highly likely indicating that the user is a Harkonnen drinking the blood of cute baby cats).

  • angstromangstrom Moderator

    @LTniger said: So, I encountered this nasty bugger while performing fio test.

    The problem must be in your file reads.ini. Given the many parameters that fio offers, I imagine that it could produce memory issues with certain combinations of parameters.

    In any case, I can confirm that the following works.

    First, create a script fio_reads.sh:

    #!/bin/bash
    
    echo 'FIO random reads:' >> tst.log
    fio reads.ini --output-format=json >> tst.log
    echo 'Done' >> tst.log
    

    This is basically what you gave, but I added the missing "#" and removed the "./" before "fio".

    Then create a file reads.ini:

    [global]
    name=randread
    ioengine=libaio
    iodepth=16
    bs=4k
    direct=0
    size=512M
    numjobs=4
    runtime=120
    group_reporting
    
    [randomreads]
    rw=randread
    

    Finally, do bash fio_reads.sh, and at the end of two minutes you'll have the file tst.log with the results.

    Thanked by 2uptime Amitz
  • NeoonNeoon Community Contributor, Veteran

    @t0m said:
    Maybe you need PHP selector?

    Thanked by 1Amitz
  • skorousskorous Member

    jsg said: I don't care about the pervert habits of diverse aberrant linux distros.

    lol

  • donlidonli Member

    @skorous said:

    jsg said: I don't care about the pervert habits of diverse aberrant linux distros.

    lol

    Thanked by 2skorous uptime
Sign In or Register to comment.