Skip to main content
Apr 7, 2017 4:04 PM UTC

Bash gets S0C4 when executing a 'set' command when .bashrc is present

I’m getting a S0C4 when I invoke the ‘set’ command after invoking ‘bash’ with a .bashrc file present. The .bashrc file creates 4 aliases and sets and exports the PS1 environment variable.

If I remove the file, the S0C4 does not occur.
If I comment out (#) all the lines in .bashrc, the S0C4 does not occur.
If I uncomment any one line, doesn’t seem to matter which, the S0C4 occurs.

If I rename the .bashrc file to .bashrcx then invoke bash and enter ‘. ./.bashrcx’, all of the aliases and the PS1 variable get set. Then when I issue the ‘set’ command, I do not get a S0C4.

There clearly seems to be an issue with using a .bashrc file at the invocation of bash.

The .bashrc file is encoded IBM-1047. I’m trying to create an ISO-8859-1 version of the file to see if the issue still exists.

Any thoughts appreciated.

    22 replies

    May 22, 2017 4:30 PM UTC

    I’m getting a S0C4 when I invoke the ‘set’ command after invoking ‘bash’ with a .bashrc file present. The .bashrc file creates 4 aliases and sets and exports the PS1 environment variable.

    If I remove the file, the S0C4 does not occur.
    If I comment out (#) all the lines in .bashrc, the S0C4 does not occur.
    If I uncomment any one line, doesn’t seem to matter which, the S0C4 occurs.

    If I rename the .bashrc file to .bashrcx then invoke bash and enter ‘. ./.bashrcx’, all of the aliases and the PS1 variable get set. Then when I issue the ‘set’ command, I do not get a S0C4.

    There clearly seems to be an issue with using a .bashrc file at the invocation of bash.

    The .bashrc file is encoded IBM-1047. I’m trying to create an ISO-8859-1 version of the file to see if the issue still exists.

    Any thoughts appreciated.

    Jerry helped me find another way to produce this issue that might give a clue. It doesn’t appear to be directly related to alias.

    /u/xxxxxx []$ bash
    /u/xxxxxx []$ set > anything
    CEE3204S The system detected a protection exception (System Completion Code=0C4).
             From entry point print_assignment at compile unit offset +000000EC at entry offset +000000EC at address
             2483C9BC.
    [1] + Done(139) bash
      84018330      Segmentation violation  /V2R1/usr/lpp/ported/rocket/bash-4.3_b017.170426/bin/bash
    Dec 9, 2017 2:53 PM UTC

    I’m getting a S0C4 when I invoke the ‘set’ command after invoking ‘bash’ with a .bashrc file present. The .bashrc file creates 4 aliases and sets and exports the PS1 environment variable.

    If I remove the file, the S0C4 does not occur.
    If I comment out (#) all the lines in .bashrc, the S0C4 does not occur.
    If I uncomment any one line, doesn’t seem to matter which, the S0C4 occurs.

    If I rename the .bashrc file to .bashrcx then invoke bash and enter ‘. ./.bashrcx’, all of the aliases and the PS1 variable get set. Then when I issue the ‘set’ command, I do not get a S0C4.

    There clearly seems to be an issue with using a .bashrc file at the invocation of bash.

    The .bashrc file is encoded IBM-1047. I’m trying to create an ISO-8859-1 version of the file to see if the issue still exists.

    Any thoughts appreciated.

    For what it’s worth, I just added a .bashrc to my home directory. It contains the single statement “true”. When I issue a “set” command, it returns the expected result.